Commit Graph

78 Commits

Author SHA1 Message Date
Ray Greenwell bd80c348eb The great Interval revamp.
There is no more SafeInterval, instead Intervals can be constructed with a RunQueue to use for expiring.
PresentsDObjectMgr implements RunQueue.
Client has a getRunQueue() method to get the client side RunQueue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 19:23:00 +00:00
Andrzej Kapolka e5f36ca111 Pushed reportWinnersAndLosers and related methods up to GameManager, MouseInputAdapter instead of MouseAdapter/MouseMotionAdapter.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3221 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-18 21:45:10 +00:00
Ray Greenwell 4fda6a2fcb Allow specification of a personality type along with the skill level
when setting up AIs.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3164 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-10-22 19:27:54 +00:00
Michael Bayne a9720fd905 LGPLed the library. Hello world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3099 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-27 02:21:06 +00:00
Michael Bayne d28a272a2e Clear our game end tracker when the game is started once again; add code
to work around the rapid-fire endGame()/startGame() calls that don't allow
the endGame() events to propagate before startGame() is called.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3089 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-23 18:40:58 +00:00
Michael Bayne fb6795fe37 Use a repeat call tracker which will properly report stack traces on any
repeat calls.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3072 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-13 21:18:39 +00:00
Michael Bayne fe7e9dc413 Debugging code to try to track down the cause of the multiply released
pending ratings. Somehow a game is getting ended twice even though the
code should prevent it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3055 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-07-10 01:32:54 +00:00
Michael Bayne 32dee3cbaf 405 modified source files and 17,367 lines of diffs later we now enforce
more discipline when handling names in our code base. Any user entered
name should find its way into a Name object as soon as it comes out of a
text field or whatnot, and stay that way until it makes its way into a
text field or into a database record (for which String objects are vastly
simpler because of JORA magic).

Dear God, let me never again make a change this large for the rest of my
mortal life.

Unfortunately, this means we have to keep an eye out for funny business
pretty much everywhere. However, since we will absolutely want to test
market stalls and so forth on Azure, we'll have an opportunity to iron out
any funny business that might fall under the radar during our internal
testing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2980 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-03-06 11:29:19 +00:00
Michael Bayne d618d3c771 Eclipse suggested cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Michael Bayne 94e10e81cd Scratch that we can deal with this in DutyPuzzleManager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2869 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-24 18:09:03 +00:00
Michael Bayne 4415472bef Allow that warning to be disabled for duty puzzles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-24 18:07:58 +00:00
Ray Greenwell 829f3ad0eb Start transactions outside of the try-finally clause so that if there
is a problem with starting a transaction, we don't get an exception
for failing to commit the transaction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2712 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-16 18:03:30 +00:00
Michael Bayne 81460a9496 Added getGameConfig().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2686 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-29 23:11:23 +00:00
Ray Greenwell 5f515133c3 Chat revamp, phase 2.
- FeedbackMessage has been subsumed into SystemMessage, which now has three
  modes: INFO, FEEDBACK, or ATTENTION.
- Cleaned up methods for sending those system messages.
  - on the server: sendInfo(), sendFeedback(), sendAttention()
  - on the client: displayInfo(), displayFeedback(), displayAttention().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2635 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-04 02:50:19 +00:00
Ray Greenwell 40afe3cb94 Chat revamp, phase 1.
- Repackaged crowd/chat
- All messages are delivered to the client via ChatMessage messages,
  including tells.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2631 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-03 21:41:33 +00:00
Michael Bayne ce735b7b69 Make these public so that our delegates can access them. Sigh.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2609 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-26 21:27:18 +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 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
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 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 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 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 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
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
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 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 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 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 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
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
Ray Greenwell 849eaec47b gameDidEnd will now be called even if the game is cancelled.
Made AI ticking only happen while the game is IN_PLAY.
Added forgotten comment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-19 21:40:38 +00:00