Commit Graph

245 Commits

Author SHA1 Message Date
Ray Greenwell 14284325e2 Always with the forgetting to check things in!
Repackaging.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@219 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-28 23:45:46 +00:00
Robert Zubeck 628e90b347 Updates to host coordinator:
- every time we check for the host's existence, if the host doesn't exist
  or abandoned the game, the client will try to claim their role automatically
- unified both event types into one "host changed" event
- fixed bug that ignored negative player ids



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@218 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-27 00:39:20 +00:00
Ray Greenwell 4df07f7ced That would be occu-PANTS!
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@217 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 23:07:20 +00:00
Ray Greenwell c459a337ab Added seating.getMyPosition(), cuz it's so darn convenient, and we can
do it on the backend more efficiently than seating.getPlayerPosition(getMyId());


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@216 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 22:59:56 +00:00
Ray Greenwell be388eaccf And another bug, something that wasn't wired up.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@215 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 22:30:24 +00:00
Ray Greenwell e192d7b24a Cookies can be retrieved for any occupant.
Fix potential for NPE (passing null to our UserIdentifier) if an
invalid occupantId is specified.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@214 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 22:16:38 +00:00
Ray Greenwell a5ba21f2bb Bugfix, getCookie was bumped to _v2 recently.
Clarify that it applies to occupants, not just players.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@213 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 22:11:40 +00:00
Ray Greenwell 44ad4f517d Wait until the usercode has connected to the GameControlBackend prior
to sending a playerReady notification to the server.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@212 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-26 19:20:15 +00:00
Michael Bayne 6808911f65 Do not attempt to do things in our constructor if we're not connected. This
allows games to create a HostCoordinator in their constructor and still not
fail unrecoverably to display outside the client environment.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@211 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-24 00:46:40 +00:00
Ray Greenwell 03876838b3 Gah, my bad: we've got to return the value from the friend function.
Of course, the flash documentation says that function.apply() returns
void, but luckily this is not the case. DO NOT TRUST THEIR DOCS, they are
riddled with errors.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@210 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-24 00:42:24 +00:00
Michael Bayne 33f55d5a8d Header patrol. Please be sure to use the header in lib/SOURCE_HEADER when
creating new source files.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@209 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-24 00:37:33 +00:00
Ray Greenwell f19a973e27 The larger point is, we shouldn't throw an uninformative NPE.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@208 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-24 00:13:22 +00:00
Michael Bayne 200042c87e Return null if get() is called before we have our game data, rather than NPE.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@207 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-23 23:29:43 +00:00
Ray Greenwell 9eedd5678c Making callEZCode() 'internal' booched it for WorldGameControl.
Made it protected, added a second function for 'friend' access.
We could use a custom namespace for this, too.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@206 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-22 03:53:44 +00:00
Ray Greenwell 9e8dce3619 EZGame API breakup. Possibly a little more to come.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@205 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-22 03:44:12 +00:00
Michael Bayne 8a2539683b Don't create our own chat director, just use the one from the context.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@204 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-22 01:56:27 +00:00
Robert Zubeck 98252184a9 Letter randomization is now weighted based on their distribution in the lexicon. No more
Tangleword boards with only one vowel! :)



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@203 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-20 02:23:02 +00:00
Ray Greenwell 3172353a54 Better yet, rip out premature optimizaton for something that is more correct.
Also use some nice utility classes we have.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@202 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-20 01:36:07 +00:00
Robert Zubeck cfed094aa3 This really should've been an array of unboxed ints. Ugh. :)
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@201 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-20 01:34:06 +00:00
Robert Zubeck 08618a4d74 Now that the server uses the new version, we can finish renaming
DictionaryService to DictionaryManager.



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@200 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-20 00:43:42 +00:00
Robert Zubeck 3dcf2a70a4 Renaming DictionaryService -> DictionaryManager, since a 'service' has a very
specific meaning, and will be treated differently by wrapper generatin scripts.



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@199 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-20 00:30:55 +00:00
Robert Zubeck fa7bf73ddc Moving host coordinator into vilya.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@198 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-19 23:21:28 +00:00
Ray Greenwell e8ada1ac88 Added setImmediate(), made it so that old un-recompiled games are
essentially calling setImmediate() when they call set(), since set() used
to be immediate.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@197 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-19 21:55:10 +00:00
Ray Greenwell 38016c0ab0 - The server should apply the property set immediately, not wait until
the event trundles through the queue, especially since the 'test' was
  being done immediately.
- Simplified some stuff on the server.
- Fixed up the test, as EZgame arrays will auto-grow.
- Do not set the property immediately on the client! Dangerz! We will add
  a new function for that, so that set() behaves like testAndSet() without the
  test, and set() behaves like setImmediate() without the immediate.
  (And there's no such thing as test and set immediately.)


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@196 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-19 21:12:43 +00:00
Robert Zubeck 83e02730cf Fixes for property setting via atomic test-and-set:
- Moved property testing, so that it happens before any propertySet events are
  dispatched. In the previous version, testing happened while processing the
  set event on the server - but since by that time client events have already been 
  sent, it introduced the possibility of short-lived inconsistencies between client 
  and server data models.   

- Introduced a separate EZ API call for test and set - not only does it perform
  the test, but unlike regular set, it does not cache the new value ahead of time. 
  Instead the new value will have to arrive from the server, at some future point.

- Trimmed PropertySetEvent and other handlers back down - they don't need to
  carry any of the test info around, after it's already been performed. Also 
  cut redundant testing on the clients.




git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@195 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-19 19:40:09 +00:00
Mark Johnson e21ad04665 A simple extensible tournament management framework
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@194 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-17 00:30:20 +00:00
Robert Zubeck bdfcd156ab For EZ property sets, added a setter that performs an "atomic" test-and-set:
it's atomic in the sense that a single server event will test the variable, 
and only set it if the previous value was null (i.e. didn't exist). 
This allows for a level of elementary synchronization between the clients.

The new function on EZGameControl is:
  _gameCtrl.testAndSet (propertyName, newValue[, index])

I hoped to generalize this to test against arbitrary values, but that's 
significantly harder, since properties accept numerous types as values,
and those can have different representations on the client and the server.
So it remains a check against null until we need to generalize it. :)





git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@193 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-15 21:55:49 +00:00
Ray Greenwell 720a409185 playerIdx -> playerId
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@192 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-15 01:53:17 +00:00
Ray Greenwell 2c89082a2e Bugfix: hadn't tested this with seated games. :)
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@191 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-15 00:05:11 +00:00
Ray Greenwell ee871c3f2f Occupant events.
Undocumented, I'm sure we'll change some things around soon.
Fixed a few bugs, too.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@190 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 23:50:33 +00:00
Ray Greenwell c8ee960c0d Whoops! Forgot to wire one of the new functions up!
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@189 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 03:45:12 +00:00
Ray Greenwell a8521ecb84 Use some of my acquired special knowledge.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@188 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 03:44:36 +00:00
Ray Greenwell 57facfd1a2 Moved adapter functions for backwards compatibility to their own class.
That way, when a function is changed the compiler will tell us about
any matching change we may need to make to WorldGameControlBackend.
Otherwise, the override function that may be present in the world version
may shift to overridding the adapter function.
It's also just cleaner to move these adapter functions to their own class.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@187 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 03:09:55 +00:00
Ray Greenwell e5d5480e9b EZGameControl updates:
- switched everything to be based on playerId instead of index
  (which doesn't make sense for a party game.)
- started adding new functions
- backwards compatible with all old games!


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@186 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 01:59:29 +00:00
Robert Zubeck 00e771e7a5 Updated the dictionary service, now with Real Functionality :) - loads language-specific
dictionary files, and acually uses them for user queries.



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@185 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-14 00:30:46 +00:00
Robert Zubeck 7ab410dde4 Added an asynchronous dictionary service, to perform word lookups
and other dictionary tasks as separate job units on the Invoker thread
(that's because we want to be as lazy as possible about loading 
dictionary files, but those can take a while :).



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@184 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-13 01:47:13 +00:00
Ray Greenwell 1de048c799 Made getGameType() public.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@183 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-13 01:22:03 +00:00
Ray Greenwell de354c0e7b Did away with PartyGameConfig, added getGameType() to GameConfig.
Changed the names of the 3 standard game types, but I could be convinced
of better names:

SEATED_GAME: normal match-made game, a game with a set list of players that
             does not change.
SEATED_CONTINUOUS: the game starts immediately, but people join the room
             and then choose a place to sit to become a player.
PARTY: no seats, anyone that enters is a player.

Also, changed SEATED_CONTINUOUS to create an occupants array and auto-sit
the creator, since I'm pretty sure we'll want to show seating in the lobby
for those types of games (but it actually does neither right now, code
needs to be written either way, depending on UI decisions.)


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@182 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-13 00:50:29 +00:00
Robert Zubeck 400389ca03 Adding two dictionary-related functions: checking a word against a dictionary,
and retrieving a set of language-specific letters. This is just a transient checkin, since 
it only pushes data both ways through the ActionScript/Java interface ("small step for 
mankind, huge step for me" kind of a thing ;). Word lookup logic will be coming next.



git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@181 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-12 23:32:37 +00:00
Michael Bayne 7a36e3a858 Regenerated ActionScript listener marshallers.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@180 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-12 21:52:20 +00:00
Ray Greenwell b63c756a1f Wrapped values are now automatically unwrapped at a lower layer.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@179 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-12 19:57:46 +00:00
Michael Bayne 62808c9fc6 We got more sinkin' up to do man. Yeah man, it's mighty groovy.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@178 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-11 03:33:04 +00:00
Michael Bayne 75b34c6bf6 New service group world order. My enthusiasm for widening is being stretched.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@177 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-11 01:37:46 +00:00
Ray Greenwell 61d8f478e1 Removed debug that slipped in.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@176 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 20:56:07 +00:00
Ray Greenwell f9dcdd0627 Have the TableDirector place a party game creator in the game, rather
than forcing them from the server.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@175 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 20:53:05 +00:00
Ray Greenwell 3a387c7d8a - Start party games immediately.
- Validate users differently for party games.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@174 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 03:33:51 +00:00
Ray Greenwell 3bd6b15304 Added a convenient method to get the PartyGameType.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@173 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 03:33:31 +00:00
Ray Greenwell bde4a67bed Backend changes to support party games.
This will force us to migrate soon to a OID-based player indexing system.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@172 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 03:32:55 +00:00
Ray Greenwell 71b9ba2827 There was some code in here to not change the turn when only one player is
left. Go ahead and don't start the turn when there are no players,
and don't change it when there are 1 or LESS.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@171 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 03:31:47 +00:00
Ray Greenwell d902b2ed81 Fix NPE when purging a party game.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@170 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 03:26:46 +00:00