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
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
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
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
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
- 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
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
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
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
- 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
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
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
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
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
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
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
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
We used to compare them against the Object class, but that doesn't work
well in the presence of multiple application domains. So instead we
check for the presence of parent classes.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@166 c613c5cb-e716-0410-b11b-feb51c14d237
a natural thing to do in playerGameDidEnd() is replacePlayer() the departed
player with an AI but if we wait until after playerGameDidEnd() to announce it,
we end up announcing the departure of the newly configured AI.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@161 c613c5cb-e716-0410-b11b-feb51c14d237