Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004

    Unhappy [SOS] what table should i include?

    i am new to database, currently i am doing a online mastermind game, my game will very similar to feature of yahoo board game,i would like to know if my system consitst of following feature:
    1) one user play as guesser( who guess the peg) another user play as chooser( choose peg to allow the guesser to guess). chooser allow to select black peg and white peg only, guesser allow to select all the color peg.
    2) allow to create table and invite people from buddy list, allow people to go in to the table and watch game.
    3) involve chatting feature.(need to store the message?)
    4) login or register.(login table and register can share one table?)
    what table should i involve in this game? i am doing using applet and java RMI.
    i really don't know what table should include, please help, thanks.
    Last edited by OpenSesame6; 06-15-04 at 01:15.

  2. #2
    Join Date
    Jun 2004
    Kuala Lumpur
    I'd start by asking if you want to use a database at all, and if so, what for.

    One problem is that you seem to be using 'table' to mean a gaming table (4-legged object) on which a game of Mastermind might take place - you might not even be interested in databases and might have found your way to this forum by mistake, having no idea what it's about!
    But I'll ignore that possibility, and assume that you are asking about databases.

    If you ignored the online aspect, where a single server might need to manage several different games simultaneously, then a simple two-player mastermind game might just use program variables to store its data:
    - the colours of the 4 hidden pegs
    - the colours of the pegs in each row submitted as guesses
    - the number of guesses so far
    - etc.

    An ongoing game of Mastermind can be viewed as having a current state (the variables described above), and you probably also want to know who the two players are.

    If it's an online (web-based?) game, then there are two reasons why you would need to store the game state in something more persistent than program variables:
    (1) if it's web-based, then most web-server programs only run in response to user requests, rather than continuously, so variables can't be remembered in the program
    (2) you may have several games running simultaneously

    For those reasons, you probably need to have a way of storing (or 'persisting') all the variables for each game, and a way of telling one game from another. You could use several methods for that, including flat files or a database.
    If you used a database, you might want one or more tables, listing all active games and giving the variables for each game. That would be a fairly simple database design exercise.

    Whether you also want a database (table) of known users (people who can play games of Mastermind) is another question, but it could easily be kept in the same database.

    A 'chat' feature (where the setter can taunt the guesser) is clearly also an important feature of such a game.

  3. #3
    Join Date
    Jun 2004
    yes, currently i am looking for online game. this is the most headache part . how to do with if server need to serve all the client at the same time? can i use the local host to do this? since there can be more than one player at the same time, if i am creating table "#1" and play with other user, the movement of the game need to save in database, the movement here i mean is if i am guesser who put the pegs, and the chooser who evaluate my guess, he /she may put black and white peg. at the same time , how about the other user too? i mean other table 's people? i need to know is that how to store those movement? at the same time , it could be 100 table there, how to do this? now i am confusing, i heard that RMI can do this for us....really? i got no clue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts