Commit Graph

129 Commits

Author SHA1 Message Date
Michael Bayne 48823b10f9 More revamped serialization cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2079 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-20 23:41:27 +00:00
Michael Bayne 41fe126611 Make sure that we remove ourselves as a listener even if our unknown and
untrustable derived class freaks out in gameDidEnd().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2072 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-16 05:31:00 +00:00
Walter Korman cbbda03e23 Added convenience class to facilitate performing a one-time server-side
action when a game ends.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2071 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-16 05:06:58 +00:00
Walter Korman 96888709ff Not to call addClientObserver() since we extend BasicDirector which
already does that for us.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2063 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 23:55:31 +00:00
Michael Bayne a1e8ffa65a Cancel any game that isn't already over in placeBecameEmpty(), log more
useful info when we abort a game because of a complete no-show.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 21:25:37 +00:00
Michael Bayne 5f4108823c Make it easy for derived classes to opt-out of the no show timer; fixed
checkForNoShows() to only claim a partial no-show when one or more players
have not reported readiness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 20:56:06 +00:00
Michael Bayne 779640972d A few things: added support for detecting no-shows after 30 seconds;
no longer call gameDidStart() directly from startGame() but wait for the
game state event to dispatch and then call it;

removed gameDidReset() because no one was using it and it is funny because
it was being called after gameWillStart() and gameDidStart() were already
called and what in the heck would you be doing that wasn't part of the
normal game startup procedure that you didn't already do in
gameWillReset().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 09:12:10 +00:00
Michael Bayne 260c304fbe Report more useful information if an already in-play game is requested to
start.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1895 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-05 02:24:42 +00:00
Walter Korman c81cf22659 Don't complain about receiving playerReady() for non-players if the game
is a party game.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1885 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-02 01:20:59 +00:00
Walter Korman 5c189fbb14 Added isWinner() and getWinnerIndex().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-29 02:09:03 +00:00
Walter Korman 883f912a30 Added gameWillEnd(), and GameObject.winners that details the winners of
the game, as assigned by GameManager.assignWinners() when the game ends.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-27 23:54:32 +00:00
Michael Bayne 31baef425a Director audit: make sure these guys clean up after themselves when the
client logs off.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1846 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-27 22:23:14 +00:00
Michael Bayne 14a313486b Documentation repairs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1842 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-27 18:49:51 +00:00
Michael Bayne dd912c3d7d Need to use getPlayerSlots() not getPlayerCount().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1825 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-24 19:05:46 +00:00
Michael Bayne 58d33880b1 Added getPlayerSlots() which returns the maximum number of players allowed
in the game and which doesn't choke if called before we have a game
object. Modified code to use it where appropriate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1824 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-24 18:51:41 +00:00
Walter Korman d46423ea7b Added addPlayerAt(). Don't send gameReady notification to players when
added since it's (at least currently) assumed that the puzzle has already
been created and the player is fully present in the puzzle room.
Sanity-check to disallow adding a player to a game more than once.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1823 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-24 07:01:08 +00:00
Walter Korman ff85d1b284 Oops; make getPlayerCount() public, as it was always intended to be.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1803 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-16 00:19:23 +00:00
Walter Korman 21c599cd0a Revamped the player array in the game object to allow sparse player arrays
that may have one or more null player entries so that party games can
create their game with the maximum number of players they support and can
use the player index as the player's "seat".  Simplified some of the
jockeying we had to do when adding and removing players.  Complexified
some of the turn game management in order to deal properly with the sparse
player arrays.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1802 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-15 23:07:23 +00:00
Walter Korman 7d092846cd Replaced by com.threerings.util.RandomUtil.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1800 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-15 22:46:43 +00:00
Michael Bayne 646696e5d0 Report more useful information in this failure case.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1784 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-07 18:42:21 +00:00
Michael Bayne 37c4f866fd No longer do we set the players in an explicit call to
GameManager.setPlayers(), now it is simply provided as part of the game
config object which is cleaner and makes the information available during
the initialization and permissions checking phases.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1778 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-06 00:53:15 +00:00
Michael Bayne 939e4ce5a9 Enhanced logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1776 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-06 00:44:16 +00:00
Michael Bayne e26fd18b38 Brevity is the soul of a happy log file.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1770 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-03 17:16:15 +00:00
Michael Bayne 6c9c3d82f0 Changed service field to gameService; added code to clear out game service
registration when game goes away.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1726 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-20 04:53:42 +00:00
Ray Greenwell bb0ae9e187 moved the incrementation of roundId into gameWillStart()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1723 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-20 02:30:11 +00:00
Michael Bayne ea471aeacc No chokey if we have no game object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1712 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-18 19:26:05 +00:00
Michael Bayne e4aad9213a Not to do the fiddly business with game state constants.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1710 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-18 18:33:20 +00:00
Walter Korman acf21c5908 Rejiggered things to provide facilities for checking whether a game is in
play, rather than whether a game is over.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1709 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-18 04:01:29 +00:00
Walter Korman dbdfd1bad0 Initial support for creating, joining and starting party games that are
created by a particular player; may be subsequently joined by other
players; and started when any game-specific prerequisites are satisfied by
the creating player submitting a GameService.startPartyGame() request.
We'll likely be adding a bit more soon to allow watching players to join a
party game that hasn't yet started.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1667 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-06 22:52:27 +00:00
Michael Bayne 9217eac028 Ensure that all players are ready before we allow a game to be started.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1660 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-21 05:22:41 +00:00
Michael Bayne 99edb5cd5e Regenerated services and receivers to fix bugs and use updated templates.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1659 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-20 19:38:16 +00:00
Michael Bayne e54a4d41f4 The great invocation services rethink of 2002! Rearchitected the remote
method invocation services and converted everything to the new style.
Could this be my biggest checkin ever?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1642 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-14 19:08:01 +00:00
Walter Korman 5ff720b586 Added getPlayerIndex().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1636 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-09 23:34:10 +00:00
Walter Korman 0e86592ca7 Updated documentation to reflect addition of turnDidStart().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1629 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-07 21:17:50 +00:00
Walter Korman dcb2361d89 Added getTurnHolderIndex().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-07 21:16:08 +00:00
Walter Korman 5262a10a69 Added turnDidStart().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1627 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-06 23:23:39 +00:00
Michael Bayne b7b44f5f14 Added basic framework for providing game configuration interfaces that can
be used by a matchmaking interface when setting up a game.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1617 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-25 23:20:22 +00:00
Michael Bayne eb0f92fcef Brought things into line with new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1607 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-23 05:54:53 +00:00
Walter Korman d18ce7a79d Call GameManagerDelegate.setAI() when a player is set to an AI player.
Don't expose the game manager's internal AI skill level array to external
parties.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1502 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:41:25 +00:00
Michael Bayne 5bfbc9f17a Provide access to player info via safer getter methods rather than giving
away references to our internal arrays.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1495 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:18:58 +00:00
Walter Korman 6b8e19f011 Make the array of AI skill levels accessible so that delegates can figure
out what kind of AI-related machinations they should engage in during
startup.  Added isAI() to allow checking whether a particular player index
belongs to an AI player.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1493 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:06:08 +00:00
Walter Korman abcc329e78 Expanded imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1470 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 02:35:10 +00:00
Walter Korman 3f45a25bdb Store the current round id in the game object rather than tracking
separately in the game manager and controller which can then get unhappily
out of sync.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1450 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 07:59:19 +00:00
Ray Greenwell 0443a31294 extend SafeInterval
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1433 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-10 21:37:13 +00:00
Ray Greenwell b81ab2f176 added systemMessage() which can optionally queue up a message for
when the game starts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1427 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-06 22:13:56 +00:00
Ray Greenwell b46aa1c1c3 Default all games to rated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-05 00:47:13 +00:00
Walter Korman c4c8e2297b Added the notion of a round with an associated round identifier that is
incremented whenever the game is reset.  Games that don't make use of the
resetting functionality essentially consist of a single round.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1420 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-03 21:08:57 +00:00
Ray Greenwell bce33033d8 removed setRateGame()
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1419 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-01 23:14:53 +00:00
Ray Greenwell b900adeeeb Moved in the setRateGame() method from PuzzleManager; have it set the
rated flag in the gameconfig.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1418 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-01 21:21:20 +00:00
Michael Bayne 18c4c32c85 Whoops, I booched it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1346 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 00:57:49 +00:00