Commit Graph

346 Commits

Author SHA1 Message Date
Ray Greenwell caf3f40dff Allow text inside the <range><choice> and <toggle> tags to contain
the tooltip for a game configuration.
- Removed ident translation of _ to ' ' for display purposes. Just use
 a nice name.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@246 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-14 03:48:42 +00:00
Michael Bayne 227de3603e Nixed HostCoordinator and HostEvent as that functionality is now provided by
EZGameControl.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@245 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-14 02:59:46 +00:00
Robert Zubeck 636620c56e Adding a missing bit of info about the round API.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@244 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-14 01:08:33 +00:00
Ray Greenwell aea954ea91 Implement ChatCantStealFocus.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@243 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-13 18:53:13 +00:00
Ray Greenwell 2fc60fad88 Use a LabeledSlider for any range properties.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@242 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-13 01:18:26 +00:00
Ray Greenwell 77bc817f49 Use the new LabeledSlider instead of rolling our own.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@241 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-13 01:14:58 +00:00
Ray Greenwell 3825cf2e68 Allow EZGames to have custom configuration options specified as XML.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@240 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-13 00:50:14 +00:00
Ray Greenwell 565c700d61 Clarify, although can this be what is meant? There does not appear to be
a way to start a new round other than by setting a nonzero delay when ending
the previous round.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@239 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-12 22:23:00 +00:00
Ray Greenwell df483cd566 You can't use that! It's the square of an imaginary number!
(0 should mean no-value)


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@238 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-12 22:20:39 +00:00
Michael Bayne 5b77f2f95d Added support for handling games with multiple rounds.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@237 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-11 07:59:23 +00:00
Michael Bayne b6c6b74d73 Dooh, failed to save my removal of this debug statement.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@236 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-11 06:38:59 +00:00
Michael Bayne 0306b072df Fixed decoding problem in GameControlBackend, switched to varargs in manager.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@235 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-11 06:37:03 +00:00
Michael Bayne 13b8913d5f Not all games are turn games. Let's not require that an unasked-for and
arbitrarily assigned turn holder be the one to end the game.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@234 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-11 02:31:35 +00:00
Ray Greenwell 91131810d4 Rollback to the previous hackery, this hackery didn't work.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@233 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-08 06:09:14 +00:00
Ray Greenwell 6b217bf77d Try... this?
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@232 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-08 05:41:54 +00:00
Ray Greenwell f11f8663e1 Use the TextField hack ourselves.
- Flash seems to sketch out when key events go elsewhere
- Whirled now does the handy thing of re-routing 'word' keypresses
  to the ChatControl, unless a TextField has focus. We want to automatically
  let games get any and all keypresses...
- The damn focus stuff is broken anyway

Untested, Nathan will test.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@231 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-08 05:23:54 +00:00
Ray Greenwell 66a7d642df The temporaray 'configData' is now renamed to 'gameMedia'.
Brought in 'name' from MsoyGameConfig, because it's useful.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@230 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-06 19:26:42 +00:00
Ray Greenwell 69bed52e99 Was writing an email to query for opinions on this, then decided that
this was the right thing to do. Go ahead and log the innards-laden stack
trace, we'll be glad when there's a bug in our innards.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@229 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-06 19:20:17 +00:00
Ray Greenwell d38c43cd5b Throw an error if something booches talking to EZGame. The user
will see a stack trace originating in the EZGameControl, hopefully
with a useful message.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@228 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-06 19:04:11 +00:00
Michael Bayne 0af2789c7b Extract the GameConfig creation into an overridable method so that TableManager
users can do the right thing with regard to adding extra configuration stuff
(rather than trusting the client to have done it).


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@227 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-06 02:20:12 +00:00
Ray Greenwell 384cc76cfe Don't make endGame varargs. Shoulda done this a while ago.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@226 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-06 00:20:25 +00:00
Michael Bayne 03317dbfcd I see that it was not a desire for verbosity but rather a limitation of Flash
that inspired the previous structure.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@225 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-05 02:57:06 +00:00
Michael Bayne d77b8363f7 Added a server managed notion of which client is controlling the game.
Doing this on the client, while theoretically possible, is more complex. We
have a server, we use it to provide commonly needed services, the assignment of
a single client to control the game is a commonly needed service. This also
matches the way other services like turn change and game start and end are
implemented.

A side note: the client-side code was not properly handling disconnected
players, which the server code properly handles.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@224 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-04 20:05:58 +00:00
Ray Greenwell 3c595d85a5 Test ByteArrays a different way.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@223 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-03 09:00:47 +00:00
Ray Greenwell 2e80b4f96b Added much needed method.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@222 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-03 08:32:18 +00:00
Ray Greenwell 70b9c7e43b It's a shame, because it's cool, but GameData isn't really needed anymore.
It acted as a proxy for the distributed ez properties, such that you could
set properties in the object and they'd magically go out over the network.
Like so:

    var data :Object = _gameCtrl.data;
    data.scores = [ 0, 0 ];
    data.startingPlayer = (Math.random() > .5) ? 0 : 1;

Of course, you could read props too and even iterate over them in a for
or for-each loop.

But, with the addition of testAndSet() and setImmediately() it was decided
that this direct access was ripe for confusion. Also, because there was
not a *second-level* proxy for every array property, it didn't send
individual array element updates over the network. I suppose I could write
an array proxy and create one for every array property set, but jeezgod
let's not get too crazy. Let's just keep it EZ and make people use our
nice well-documented methods.

If we want to add a method to EZGameControl for iterating over all
properties, we can. That might be useful...

There is one small concern, which is that now we're handing off our
internal storage Object to usercode, so someone would have to modify
their copy of EZGameControl and then they could... mess up their own game.
Whatever.


git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@221 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-02 08:38:45 +00:00
Robert Zubeck a27c60e4fe Adding extra connection guards to HostCoordinator
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@220 c613c5cb-e716-0410-b11b-feb51c14d237
2007-03-01 20:08:28 +00:00
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