Commit Graph

17 Commits

Author SHA1 Message Date
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
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 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 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 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 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 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 729335a4a5 The table system now supports the party game types better.
The creator of a party game isn't joining, but I think that's a problem
with the msoy client...


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@168 c613c5cb-e716-0410-b11b-feb51c14d237
2007-02-10 01:36:06 +00:00
Ray Greenwell 0b8b31aaa6 Prevent server spew when multiple EZGame clients attempt to end the game.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@126 c613c5cb-e716-0410-b11b-feb51c14d237
2006-11-15 21:03:51 +00:00
Ray Greenwell cff4238b3e Updates to EZGame to allow games to store 'user cookies'.
Then intention is that other games besides EZGame may use this as well,
so it's semi-separated, but for now it's part of EZGame.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@123 c613c5cb-e716-0410-b11b-feb51c14d237
2006-11-15 03:01:49 +00:00
Ray Greenwell 1459306393 We need to send the tick out with a different message identifier
because otherwise the EZGameController will try to unmarshall the value.
The marshalling/unmarshalling is purely clientside, the server doesn't
understand how to do it, so it must dispatch a different event that just
contains a nice normal integer.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@85 c613c5cb-e716-0410-b11b-feb51c14d237
2006-10-02 21:11:10 +00:00
Ray Greenwell a32f71bcda Let's name the method the way gendobj wants to.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@83 c613c5cb-e716-0410-b11b-feb51c14d237
2006-10-02 07:43:48 +00:00
Ray Greenwell 6472cf6f80 Added tick services to EZGame.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@82 c613c5cb-e716-0410-b11b-feb51c14d237
2006-10-02 07:39:31 +00:00
Michael Bayne 37dd31ad75 More spots, missed.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@57 c613c5cb-e716-0410-b11b-feb51c14d237
2006-08-24 00:28:04 +00:00
Ray Greenwell 70b0d759c0 Moved the serverless game stuff out of msoy and back into the vilya library.
We'll be using this in game gardens, at least.
Note that the actionscript side currently doesn't compile because of
limitations in building a .swc file, but that'll be fixed soon.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@47 c613c5cb-e716-0410-b11b-feb51c14d237
2006-08-23 02:28:36 +00:00