Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Help with Final Year Project

Options
  • 15-01-2014 1:37pm
    #1
    Registered Users Posts: 153 ✭✭


    Im currently studying a post grad in computer science and have a Final year project. The proposal is due on Friday. My idea for the project is as follows.

    Essentially its a card game,based on poker rules. Its a game of my own invention. It has a name but its based on my surname so I wont give it out, its a very popular game in my homeotwn now. 3 cards are dealt down the middle to make three lines.Then each player is dealt three cards. Each player uses these cards , we'll call them the community cards. Player one plays to the left of the community cards,player 2 plays to the right. They have 4 space to the left or the right,and using the community cards they make the best 5 card poker hand.When a player drops a card into a space he picks a card,all players have 3 cards in their hands at all times.The player with the best hand on the line wins the line. Whoever wins two out of three lines wins the game.
    Now I have never tackled something this complex but I believe I am capable of doing so. Iv worked out some code already that generates random poker hands, but I can see problems in getting the code that draws cards to the players hand, and also creating a computer AI that competes against the player. Also being able to place the cards in spaces where the player wants on the Gui, iv never worked anything that advanced before.

    Any Help is greatly appreciated.


Comments

  • Registered Users Posts: 972 ✭✭✭Digital Society


    What help exactly do you need?

    Have you done much at all yourself?


  • Registered Users Posts: 1,019 ✭✭✭carlmango11


    Maybe if you ask more specific questions we could help...

    Also if I were you I'd probably scrap the AI bit and make it into a game just for real people, at least for the beginning. The AI could be very tough. You could leave it out of the spec and add it if you have time. Underpromise and overdeliver is better than not meeting what you set out in the spec


  • Registered Users Posts: 153 ✭✭SnitchingBubs


    I suppose to be specific, I would need help with the GUI. Iv made Gui's in the past but they've all been with buttons and textfields,you know basic enough stuff. But for this il need the Gui to be interactive for say when you put the card in a specific space you can actually click on the space and the card goes there.
    I haven't started the actual coding yet as the proposal itself is only due Friday. But for any experienced programmers reading this,in your opinion, how hard is this going to be,would you only recommend it for someone who has been coding for years?


  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    You haven't said what languages you have/want to use.
    The user interface to a card game could be implemented on a web page, and a good excuse to use Html 5 features.

    I'm sure there's bitmaps of sets of cards you can use (be careful about copyright images).
    Or even Fonts with the heart,spade,diamond,club symbols.

    Multiplayer card game design


  • Registered Users Posts: 153 ✭✭SnitchingBubs


    sorry im using Java


  • Advertisement
  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    You can still use Java on the backend, maybe running a servlet or web service, and a web page on the front end.

    But if you just want a standalone Swing based application, that's up to you.
    You'd learn more from the web based project, and web pages support drag and drop actions, to drag a card from your "hand" to the space.

    I know this may be out of your comfort zone, but if I were designing something like this, then the brains of it would be in Java on some web server.
    Then different clients can use desktops, mobile phones or tablets to play the game.


  • Registered Users Posts: 7,108 ✭✭✭witnessmenow


    There are plenty of open source card games written in Java I would imagine, I definitively found a texas holdem one before. Im not saying you should copy them but see if you can get any information/ideas from them.

    Off topicL I started to work on one before using Libgdx and Java and "More Controllers Please" a java library I wrote.

    MCP hosts a web server inside the app, where you can feed up custom web pages (controllers etc) to devices that connect to the ip Address

    The idea was that the main table would be on the coumputer/TV screen. Each player would connect via a phone/tablet/computer. The hands would only be sent each player so no one would know what the other players had.

    I made a start on it, but never got around to finishing. Actually I have no idea what stage its at at the moment! Here is the code. Must go back to it at some stage, as I still think its a pretty cool idea.


  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    I would break this down as follows.

    I need to establish the rules of the game, I need to validate hands, be able to random choose cards, ensure I don't double deal or have any weightings to a particular card etc, figure out how to compare two hands and verify a winner, and establish the hierarchy of winning hands. This will be broken down into unit tests, (a lot of them).

    After that, I can then write an API that can deal N players a valid hand, deal the centre cards so every player can see, and then allow player to submit choices that carry over to the next round, such as changing cards or bowing out and get updates round details, such as other players actions, (if they bow out etc).

    After this I can refine the rules around betting or whatever scoring is required.

    A UI never enters into the above until it is all tested and working. I can then work on a UI for multiple players. Connectivity of the players can be handled by any mechanism, as long as all players can see the data. As long as the API does the work, all the player needs to be able to do is see the cards they were dealt, the centre cards, and be able to submit actions and see other players actions. Hell, email could be enough, it doesn't matter at this stage. Advanced UI stuff here is really unrelated to the above, it's client based. You could make the cards dance around and do what you like, as long as the data is right.

    After this, and only after this, can you work on CPU, which could just be random actions, or rules based actions. The rules can be established by unit tests, such as if i'm given a set of cards, what cards could remain and how many other players are there, and maybe some heuristics around particular hands.

    The CPU part is difficult because it's not just about knowing the rules, but trying to work with probabilities as well as heuristics.


  • Registered Users Posts: 60 ✭✭mrnobodyfan87


    Maybe if you ask more specific questions we could help...

    Also if I were you I'd probably scrap the AI bit and make it into a game just for real people, at least for the beginning. The AI could be very tough. You could leave it out of the spec and add it if you have time. Underpromise and overdeliver is better than not meeting what you set out in the spec

    Good AI would be tough but he could implement something, just so it is playable (he'll have to demo this) by one person. He could make the computer do random (valid) moves.
    I suppose to be specific, I would need help with the GUI. Iv made Gui's in the past but they've all been with buttons and textfields,you know basic enough stuff. But for this il need the Gui to be interactive for say when you put the card in a specific space you can actually click on the space and the card goes there.
    I haven't started the actual coding yet as the proposal itself is only due Friday. But for any experienced programmers reading this,in your opinion, how hard is this going to be,would you only recommend it for someone who has been coding for years?

    This shouldn't be too hard. If I did this I would pick a popular java MVC framework and use javascript for the browser. Might be hard if you're not used to any framework and/or javascript.

    This might be useful:

    http://stackoverflow.com/questions/5217904/drag-and-drop-java-gui

    Good luck! Try your best with this and graduate interviews will be a lot easier.


  • Registered Users Posts: 1,712 ✭✭✭neil_hosey


    thats a pretty cool final year project..

    like someone has already said stick with spring mvc for the front end to keep interaction between your view and code as decoupled as possible. If youve not much of an idea with MVC theres loads of downloadable examples, specific Spring MVC also..

    You will easily be able to represent all aspects of a game on your screen with the model part of MVC and it will make it easier to display it.

    Your views using html5 or something like jqueryUI will allow you to easily drag/drop cards etc..

    the controller would interact with a service layer (separate project) that would contain all the logic for dealing hands..figuring out winners..etc.. you can write the whole service layer separate to your front end using Test Driven Development.. ie if some guy gets this hand, and other guy gets another hand.. is the outcome what you expect. (not sure if this stuff covered in ur degree)

    Design patterns such as the observer and mediator patterns would come in very handy here.. (again if you are familiar with the concept)

    Hopefully that wasnt too badly explained.. :/


  • Advertisement
  • Registered Users Posts: 153 ✭✭SnitchingBubs


    Thanks for the reply, some things have changed and im not doing the same project anymore, but I do have a new question.

    I can build a website no problem, nothing fancy but enough to suit my needs. I can used Ajax,Javascript etc. But what I am wondering is say I made a text based adventure game using Eclipse in Java. How hard is it, or what way do I go about putting that application up on a website? I never done that before. Iv made websites and iv made Java applications, iv never combined them.


  • Registered Users Posts: 6,152 ✭✭✭Talisman


    A nice project to have - Here's a link to the orginal Fortran source code of the very first text adventure to inspire you: Colossal Cave Adventure.

    In answer to your question about how to connect the game engine to the browser, have a look at the WebSocket API.

    NetBeans: Using the WebSocket API in a Web Application


Advertisement