Commit Graph

142 Commits

Author SHA1 Message Date
Michael Bayne 2c94e12490 Regenerated DObject definitions with new policy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2514 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 22:45:57 +00:00
Michael Bayne 1bf86bf495 Cope with lack of game object in a few methods.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-11 21:29:21 +00:00
Michael Bayne baa595d65c Not to freak out if we don't yet have _playerOids.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2401 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-11 21:22:30 +00:00
Michael Bayne 30b02ababe Cleaned up the code to be more sensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2344 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-27 23:45:04 +00:00
Michael Bayne 5c0879a964 Whoops, spoke to soon. That wasn't really a bug, just a misunderstanding.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-27 23:25:59 +00:00
Michael Bayne 8876bd90e4 Fixed a bug pointed out by Muffy. We love more eyes on the code!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-27 23:20:55 +00:00
Michael Bayne dec635a9a4 That feller needs to be transient.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2317 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-23 02:20:49 +00:00
Ray Greenwell 712d3f8ab5 Two GameConfigs are not equal unless they are of the exact same class.
This was originally in yohoho's PuzzleConfig, but apparently got deleted
a while back, and this is where it should be anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2313 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-20 19:50:35 +00:00
Michael Bayne 56b0012782 Use Comparable for the to be removed distributed set key.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-26 17:54:56 +00:00
Michael Bayne 1a0a1c8951 Created a PartyGameConfig interface and rejiggered party game support a
bit to incorporate it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2261 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 05:34:53 +00:00
Michael Bayne d02a247d76 Added a which().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2114 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 18:36:18 +00:00
Walter Korman 183e25307f Catch and report any exceptions game managers may throw while being
ticked.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2094 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-03 02:47:33 +00:00
Walter Korman ebd50b80f5 Tick all game managers every five seconds to allow them to engage in any
activity that isn't driven by player actions.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2093 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-03 02:35:41 +00:00
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