[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pbmserv-dev] just want to bounce this off you all...
Hello developers,
I was thinking of developing a command for multiplayer games called,
"waitlist" and I wish to ask if this seems like a good idea or if there
is anything I am missing. The idea is to include in the "::UnknownCommand"
routine a new command "waitlist" that would create a file in the game's
directory that would hold a list of names of players who are waiting for
opponents. When a player sends in the waitlist command, she would be added
to the end of the list and then the program would check if there are the
required number of players needed to start a new game. If there are say,
6 player's names on the list for a six-player game then it would create
a string of those names (and erase the six players from the waitlist) and
send that string of six names to the "Challenge" command to start a new game.
If less than the required names were on the list then it would simply notify
the player that they were placed on the list and to please wait. I am
thinking the waitlist may hold other information that the player may wish
to add: how many games she wants to be included in, her preferences for
command-line parameters/options, her preferences for how many players in
the game (2-player game, 4-player game, or any number of players).
I believe this would be much easier to program in than my previous ideas. :-)
Some questions I have though: 1) if the first four players to be placed on
the waitlist asked for 6 games of 4-players each, how would I prevent it from
sending in 6 challenges with the same four players? For that matter, how
would I start more than 1 challenge? Does the challenge command return from
its routine with an exit value? 2) If the name of the game were for example
"Yahtzee" would I need to specifically call the routine as:
Yahtzee::Challenge(stringofplayers);
or just call it as
Challenge(stringofplayers);
Thanks for any ideas you may contribute before I try this out on my
test-server.