Commit Graph

664 Commits

Author SHA1 Message Date
Michael Bayne 0a2b8b8f52 Basic Guice compliance.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@614 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-07 17:45:30 +00:00
Michael Bayne 2090bcdfeb Regenerated invocation service bits.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@613 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-06 14:39:03 +00:00
Michael Bayne f663e36fe6 A missed spot of roundId -> sessionId.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@612 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-06 14:37:41 +00:00
Michael Bayne 2890c16224 Back in the wild and wooly days of Puzzle Pirates development, we determined
that we needed to be able to tell if one game ended and another one had started
so we introduced GameObject.roundId which was a value that was incremented
every time the game started. Thus if you had a timer that expired and you
wanted to make sure that somehow the game hadn't ended and then been started
anew while you were away, you could save the roundId and check it when you woke
up. That was all fine and good, except for the poor choice of variable name.

Then we came to implement Whirled and wanted to provide an abstraction of
"rounds" which were subunits into which a single game is divided. We had this
lovely variable already lying around called roundId and we succumbed to the
temptation to overload its meaning and have games that use round increment the
round id multiple times during a game which preserves the monotonically
increasing nature of roundId as expected by the Parlor code and seemed to do no
harm.

Then we discovered a pesky wrinkle, which is that GameManager sets
GameObject.roundId in gameWillStart() and then goes on to set GameObject.state
after that. We were naturally listening for roundId to change and triggering a
call to roundDidStart() at that time, but this resulted in a strange sequencing
of callback methods that went: roundDidStart(), gameDidStart(), roundDidEnd(),
roundDidStart(), ..., roundDidEnd(), gameDidEnd().

The premature roundDidStart() was irksome, and I looked into what would be
needed to remedy it. It turned out that a lot of code on the server-side of
things depended on the Parlor semantics of roundId and wanted roundId to be set
to the current round's value in gameWillStart() and similarly in
gameDidStart().  However, there's no gameWillStart() on the client and it
didn't appear to me that anyone much cared about roundId in gameDidStart(), so
I opted for some hackery in the name of expedience that preserved the
server-side semantics but changed the client to see ROUND_ID change after STATE
changed.

As you might expect given the verbosity of this explanation, that turned out to
be a new bad idea stacked on the previous bad idea of reusing roundId which was
stacked on the bad choice of name for roundId. It turns out some puzzles in
Yohoho did expect roundId to be already set in gameDidStart() which was no
longer the case and the inevitable digital mayhem ensued.

The time has come to undo the various bad decisions and replace them with new
decisions that we hope aren't bad. Those decisions are:

- rename roundId in GameObject to sessionId and restore its original semantics
  which are that it represents a monotonically increasing integer that is
  incremented (and published to the client) in gameWillStart() and thus
  represents the current game session from the very first to the very last;

- add WhirledGameObject.roundId for handling rounds in Whirled games and give
  it the semantics we desire which are for it to be set to 1 in gameDidStart()
  and then incremented only when a new round is started, and reset to 1 when a
  new game is started (this change is in another commit).

This will temporarily break some builds as I need to go rename some things in
Yohoho and then I need to look at Bang! Howdy which if I recall correctly also
naughtily uses roundId for nefarious ulterior purposes and needs also to be
cured of its wayward habits.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@611 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-06 14:20:36 +00:00
Jamie Doornbos fa7a70eea9 Fixed vilya to rely on maven-ized abc files
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@610 c613c5cb-e716-0410-b11b-feb51c14d237
2008-06-05 00:08:03 +00:00
Jamie Doornbos fd37fb8138 Converted vilya to AscTask using mkgroups approach
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@609 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-30 06:29:36 +00:00
Michael Bayne a133c7c693 Switch to new logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@608 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-27 20:00:28 +00:00
Michael Bayne 3b7ef57a20 Use new logging API.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@607 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-27 19:43:07 +00:00
Jamie Doornbos 985f8a4a0a Added a few more vilya classes to abc package for upcoming whirled compilation. includes fixing of unused imports which will not compile under asc
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@606 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-23 22:44:27 +00:00
Jamie Doornbos edcf2d7162 vilya-abc. thank you and goodnight
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@605 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-23 07:12:07 +00:00
Jamie Doornbos 1597fc938a Regenerated vilya action script marshallers etc, preparing for abc build
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@604 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-23 07:03:27 +00:00
Jamie Doornbos 5cf0010d6c Thanks to the extraordinary excellence of the asc script compiler combined with the glorious beauty of GenServiceTask, discovered these stale generated classes (svn blame archaeology tells me ParlorService.TableListener and TableService.TableListener were remove in 2007)
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@603 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-23 00:47:50 +00:00
Michael Bayne 55d16fc0c9 More over the wire class dependency noting.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@602 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-22 15:35:37 +00:00
Michael Bayne ae6c542271 Nixement of ze redundant casts.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@601 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-22 12:08:27 +00:00
Michael Bayne ea6f8ffa1f Use the new Permission objects.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@600 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-22 12:03:51 +00:00
Michael Bayne 7890e26b43 More unit convenience.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@599 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-18 11:29:31 +00:00
Michael Bayne eb6ad10295 Let the unit report failure.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@598 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-18 11:19:33 +00:00
Charlie Groves 19af9eb71a Indicate that isActivePlayer is a better way to see if a player is in the game than accessing playerStatus directly
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@597 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-16 21:08:26 +00:00
Charlie Groves 2e8fa57f7c If edits are being made to blocks that are offscreen, just edit the model directly instead of going through the scene block
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@596 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-14 06:32:22 +00:00
Charlie Groves c6818a167f Allow a scene manager to declare that it isn't persistent and skip updating the scene repository if that's the case
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@595 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-14 06:31:23 +00:00
Michael Bayne 25bacb93f0 Formatting tweaks; moved that new protected method down with its friends.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@594 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-09 11:21:46 +00:00
Ray Greenwell 6e5768b64e verbose-stacktraces=true
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@593 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-07 21:52:59 +00:00
Charlie Groves 7c34651a0d google-collect moved up to narya
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@592 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-05 21:10:37 +00:00
Charlie Groves 5cd827ee8c Don't die if the last scene doesn't exist or if it's malformed
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@591 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-05 18:47:40 +00:00
Ray Greenwell ef217c4ea5 playerInRoom -> occupantInRoom.
For games that make use of this, all occupants should call it,
unless they call playerReady().


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@590 c613c5cb-e716-0410-b11b-feb51c14d237
2008-05-02 01:50:10 +00:00
Michael Bayne f044381e2c Clarify the logic in this method to make it clear that there's no way out that
does not result in shutdown() being called.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@589 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 19:00:33 +00:00
Michael Bayne c8f680696d It's a party in here. We have a method that handles checking whether to start
up a shutdown interval. Let's override that method and implement GameManager's
special requirements instead of overriding an unrelated method and duplicating
most of the code from it.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@588 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 18:57:15 +00:00
Ray Greenwell 759050d576 3 things: Sanity, clarity, correctness.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@587 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 18:33:46 +00:00
Charlie Groves e3cf4a762d Knock the idleUnloadPeriod down to 0 since GameManagers don't go idle and having a shutdown interval just keeps them resident in memory
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@586 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-29 17:55:03 +00:00
Charlie Groves 865c5def8b Return a boolean from setBaseTile to indicate if the tile was actually updated
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@585 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-25 00:45:43 +00:00
Charlie Groves 99ee2f5a5f Allow the minimum distance to be specified in computeEnteringLocation
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@584 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-22 17:35:21 +00:00
Michael Bayne 4ca129e527 Do some fiddly business to update our roundId locally in gameWillStart so that
all pre-game processing can properly know what round it is, but then actually
publish that value to the clients so that we can trigger off ROUND_ID to call
roundDidStart without having roundDidStart get called before gameDidStart.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@583 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-22 01:02:05 +00:00
Mike Thomas de194d5392 Break out the scene manager's method for handling moving to the default portal so that subclasses can override.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@582 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-19 00:23:07 +00:00
Charlie Groves 4a7cc53a88 Allow things other than portals to be painted using the portal drawing code
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@581 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-17 18:12:03 +00:00
Michael Bayne ed027becc4 Get our dependencies either from a local build or Maven.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@580 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-10 15:47:27 +00:00
Michael Bayne 47c9418eab @Entity -> @Table.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@579 c613c5cb-e716-0410-b11b-feb51c14d237
2008-04-01 21:39:08 +00:00
Charlie Groves 99205455e7 Move the common functionality from ObjectEditorDialog and PortalDialog into EditorDialog
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@578 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-26 03:23:40 +00:00
Michael Bayne 29460ce450 Don't let a player create a new table or join an existing table if they're
already sitting at a table. We also enforce this in the UI (though not in
certain cases in MSOY at the moment which is how this was uncovered).


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@577 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-24 23:00:09 +00:00
Michael Bayne c0ce0d188b Allow the no-show timer to be customized.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@576 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-21 18:17:03 +00:00
Dave Hoover 828753344d This got broken in the reorg; it's still possible for someone
to be asking for scene updates starting farther back than what 
we know about, so notice that case & return back a null list of 
updates rather than an incomplete one.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@575 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-19 17:36:22 +00:00
Michael Bayne ae4435d389 Actually just go back to returning null. That's what the javadocs say.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@574 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-18 23:51:51 +00:00
Michael Bayne b1e4460f0f Only claim to have updates if we have a non-zero sized array.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@573 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-18 23:49:53 +00:00
Michael Bayne 5710ea9d37 Allow scene updates to increment the version number by more than 1.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@572 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-18 22:54:51 +00:00
Mark Johnson ee6889395f This is throwing a wrench in bang, reverting it now and will take a better look at it later
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@571 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-13 20:21:48 +00:00
Charlie Groves 53655b2856 - Expose the results of addObject and deleteObject on EditorScenePanel
- Allow subclasses of EditorFrame to specify the EditorScenePanel and StageSceneWriter used



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@570 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-12 06:09:41 +00:00
Charlie Groves d96a1390c5 Allow an orient to be specified to locationForObject
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@569 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-10 20:08:28 +00:00
Charlie Groves 1605df72b1 digester uses beanutils, so Eclipse needs to know about it to run the scene editor
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@568 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-06 03:12:21 +00:00
Ray Greenwell 92b90738ed Don't link in flex.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@567 c613c5cb-e716-0410-b11b-feb51c14d237
2008-03-04 04:55:45 +00:00
Dave Hoover 04ff848f00 Thought I'd committed this ages ago when I was poking around at this stuff,
but apparently not. Use the helper method to see if the game's in play since
it's there for just that reason.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@566 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-29 19:06:07 +00:00
Ray Greenwell 8b17a1daa7 Updated for flex 3.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@565 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-22 22:41:56 +00:00