Commit Graph

276 Commits

Author SHA1 Message Date
Michael Bayne 244b9b22b8 Use error message names that make sense. Differentiate between not allowing
something because the requester is not the owner of the table and trying to
boot onesself from the table.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@764 c613c5cb-e716-0410-b11b-feb51c14d237
2008-10-23 20:20:14 +00:00
Michael Bayne 8a76c0de9f Allow a custom error handler to be provided to the TableDirector.
If ActionScript supported anonymous classes, TableDirector would not have to
implement InvocationService_ResultListener and could instead define a calldown
handleFailure() method that the client could override by anonymously extending
TableDirector at the point of instantiation and customize the failure handling
thusly. But it doesn't, and so we pollute TableDirector with yet more methods
that many clients probably don't care about.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@763 c613c5cb-e716-0410-b11b-feb51c14d237
2008-10-23 20:08:47 +00:00
Michael Bayne 68c4218324 Fixed improper indentation.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@762 c613c5cb-e716-0410-b11b-feb51c14d237
2008-10-23 20:03:15 +00:00
Jamie Doornbos d2557dfb7f Change "readObject() as Type" to "Type(readObject())" for vilya for better error checking and faster failure
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@758 c613c5cb-e716-0410-b11b-feb51c14d237
2008-10-13 17:42:58 +00:00
Michael Bayne 223ccb86a1 Allow a joiner to say "any available seat". Also attempt to report errors in
the TableDirector (in Flash) even though none of that is actually wired up in
MSOY.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@748 c613c5cb-e716-0410-b11b-feb51c14d237
2008-09-24 00:56:51 +00:00
Bruno Garcia a72c810193 Boot by Name instead of table position
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@730 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-15 23:37:46 +00:00
Bruno Garcia 2ce287a2b1 Formatting
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@714 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-07 22:24:00 +00:00
Bruno Garcia aa84c5055a Booting support to the AS version of TableDirector
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@712 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 01:04:27 +00:00
Michael Bayne 8410b8893c Actually these had been generated. Bruno must have regenerated them with an old
version of Narya.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@710 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 00:53:22 +00:00
Bruno Garcia 9a822fe561 - Adding support for booting players from a table
- Apparently genservice hasn't been run in a while, so half of vilya just got poked


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@709 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-06 00:41:46 +00:00
Jamie Doornbos b52db86905 Added a reference so that vilya.swc consumers (e.g. thane client) will not need to explicitly do so
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@707 c613c5cb-e716-0410-b11b-feb51c14d237
2008-08-04 22:17:31 +00:00
Michael Bayne 18608763ea Regenerated services and objects.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@690 c613c5cb-e716-0410-b11b-feb51c14d237
2008-07-30 13:56:07 +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 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 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
Ray Greenwell 50025dabf6 Parameter needs to live here.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@560 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-17 01:00:05 +00:00
Ray Greenwell 037a45b0f9 ezgame merges with whirledgame.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@558 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-17 00:47:45 +00:00
Ray Greenwell 6fc1f6e068 Capitalize the MESSAGE_RECEIVED event type, for consistency.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@556 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-13 21:04:20 +00:00
Ray Greenwell 8f4a9dc6b1 I'm not sure what to do with this class. It would be useful for ezgames,
but the functionality is handled automatically in whirled.
Let's avoid confusion by leaving this out of the asdocs..


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@555 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-05 20:57:25 +00:00
Ray Greenwell 0a4d59ee8f Documentation improvements.
Removed the superfluous EZEvent.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@554 c613c5cb-e716-0410-b11b-feb51c14d237
2008-02-05 08:11:24 +00:00
Ray Greenwell b542ed3afc Added @eventType tags to the event type constants.
AsDoc is crappy: the @eventType tag has two different syntaxes, depending on whether
you're using it to comment an [Event] declared by a class, or the type constant.
Also: this is pointless, asdoc should be able to get this value using the other
@eventType tag, but instead we have to be redundant, possibly making a mistake.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@547 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-11 19:16:12 +00:00
Ray Greenwell 249e5174ad Added a bunch of @private tags to remove clutter from the game API docs.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@545 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-10 00:28:43 +00:00
Ray Greenwell 989d145b1d Moved to whirled/contrib.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@544 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-09 22:46:10 +00:00
Ray Greenwell d198c25780 Avoid calling the type constant TYPE.
Make a reasonable name for each.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@542 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-08 01:36:18 +00:00
Ray Greenwell d3456ea511 Doc update.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@540 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-05 01:08:33 +00:00
Ray Greenwell 5d693ec6bd getTurnHolder() -> getTurnHolderId().
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@538 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-04 19:21:04 +00:00
Nathan Curtis 5044f147e0 If there are import statements after the [Event...] lines, the compiler doesn't care, but the
asdoc tool fails to recognize the Events, and they don't end up in the documentation.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@537 c613c5cb-e716-0410-b11b-feb51c14d237
2008-01-02 23:46:46 +00:00
Ray Greenwell bc2b47a6ca Comment tweaks.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@536 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-22 01:23:40 +00:00
Ray Greenwell d711f2ae97 The great Game API re-org.
Moved everything onto sub-control objects.
Got rid of the Listener interfaces.
https://intranet.earth.threerings.net/metasoy/EZGame_API_Reorg

I'll go through and make the documentation nice next.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@535 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-21 23:57:02 +00:00
Michael Bayne 8c27874128 GameControlBackend -> EZGameBackend. Tab incompletability and prefix
inconsistency finally pushed me over the edge.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@534 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-20 20:16:52 +00:00
Ray Greenwell 57aefb8e1c Don't freak out on mouse clicks if we're not connected.
(I check every time so that this still works after you're disconnected.)


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@526 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-13 01:42:10 +00:00
Nathan Curtis 7f1ee2e1f4 @param doc tags in asdoc don't work the same as in Java. If you supply a @param for only one
paremeter, it assumes you're supplying the description for the first parameter, even if you 
supply the name of the parameter you're describing.  This basically means that docs for functions
need to supply @params for all parameters or none.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@525 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-12 19:55:31 +00:00
Tom Conkling 35b7e33984 Minor documentation update to clarify the usage of EZGameControl.startTicker
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@524 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-12 18:53:40 +00:00
Michael Bayne 847da11b45 Beans/frank as pointed out by Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@521 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-07 21:26:03 +00:00
Michael Bayne b6b8b39c9f Slight change to playerReady() handling. For party games all occupants will
call playerReady() rather than none of them. Also tidied up the way
EZGameController delays playerReady() until the game backend is connected.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@520 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-07 21:21:09 +00:00
Ray Greenwell d855802a66 Let's continue to decode the value for each requesting function
(just to be safe), but let's document why we're doing that as well
as do it outside the try/catch, in case there's an error in our code.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@518 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-07 03:58:18 +00:00
Ray Greenwell 812feab5b5 We should always wrap calls to usercode with a try/catch. Check.
We should always log any errors thrown from usercode. Oops.
Fixed.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@517 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-07 03:50:27 +00:00
Michael Bayne 32c4464a85 Revamped some table stuff. First I don't know why I called players occupants,
that was stupid. Now they're called players. Next I added a list of watchers
rather than simply a count. If we're going to go to all the trouble to update
the table when the watchers change, let's have the goods.

This will probably break Bang and/or Yohoho. I'll fix them toot sweet.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@515 c613c5cb-e716-0410-b11b-feb51c14d237
2007-12-06 00:37:32 +00:00
Michael Bayne 7be5c32548 Enhanced configuration configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@512 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-27 21:00:56 +00:00
Ray Greenwell a65d124da9 Bugfix: We may get resized prior to willEnterPlace().
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@510 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-27 00:31:43 +00:00
Robert Zubeck c250220684 Goodbye little ones. See you on the other side.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@509 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-20 20:15:02 +00:00
Robert Zubeck 9b326716c3 They lied to me, they're not really my friends! Pox on them.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@507 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-20 01:47:53 +00:00
Robert Zubeck 1630892c4b Meet my new friends, 'copy' and 'paste'.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@506 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-20 01:44:24 +00:00
Robert Zubeck 1ee799e29e Helpful utility classes for game creators.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@505 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-20 01:38:02 +00:00
Ray Greenwell ae8341de04 Removed unused isPartyGame().
(Now things use getMatchType()).


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@504 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-20 00:54:06 +00:00
Michael Bayne 6a783e8bc4 Make the spot services work if you don't implement ClusteredBodyObject. You
won't be able to use clusters but you'll still be able to use locations and
portals.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@501 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-15 02:09:51 +00:00
Michael Bayne b8b63f9e28 Default to "middle" vertical alignment for our controls.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@499 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-13 23:11:55 +00:00
Michael Bayne 7ef4ef92dd Small improvements.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@498 c613c5cb-e716-0410-b11b-feb51c14d237
2007-11-13 22:58:15 +00:00