Commit Graph

3239 Commits

Author SHA1 Message Date
Michael Bayne c59290c91f Allow tables of one player which are started immediately.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3297 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-06 07:32:06 +00:00
Ray Greenwell 5ba72dce1a Occam's razor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3296 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-05 08:07:13 +00:00
Michael Bayne 61c0dde5d5 Regenerated the distributed objects with the new clone happy bits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3295 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-05 06:46:11 +00:00
Michael Bayne e5acc3e45f More DObject fun! We need to keep a careful separation for container
objects (DSet, arrays) in a DEvent (which should not change as a result of
other events being applied) and those in the object itself (which do
change and evolve as events are applied to the object).

This is important both because the DEvent is passed on to another thread
for delivery to remote clients, thus changes to the values in the event
could take place before they were serialized and sent over the network,
and because compound events are applied to an object before they are sent
to the other thread for delivery and thus, for example, setting a DSet and
then adding a few entries to it in a compound event would result in the
DEvent copy of the DSet becoming corrupted.

Two problems remain (note, neither of these are new, the one issue
introduced when I rewrote the DObject stuff is fixed by these checkins):

1. Object subscription requests are supposed to deliver a snapshot of the
   object at the point in the event stream at which the subscription
   request was processed, but presently we pass only a reference to the
   object off to the networking thread which means that before the object
   is serialized and sent to clients, subsequent events could be applied
   to it and then those events would be sent to the client as well
   resulting in funny business (probably nothing more than duplicate DSet
   entry warnings, but imagination and Chapter 17 tell us that worse
   things could happen).

2. The use of Streamable instances could result in badness. If a field in
   a Streamable is modified and the whole Streamable set() back into the
   object to broadcast the update, then further changes were made to the
   Streamable before the attribute change event was serialized and sent
   over the network, the second modifications would be reflected in the
   event triggered by the first modifications.

The first problem may be solvable (albeit inefficiently) by serializing
the DObject on the event dispatcher thread and sending that serialized
copy off to the network thread for delivery to the client. It would be
much less efficient as we would be unable to make use of the client's
already "primed" ObjectOutputStream which may have already mapped many of
the classes in the object to two byte codes, but object subscription is
fairly uncommon compared to delivery of events, so inefficiency might not
be a big problem in this case.

The second problem might be solved by requiring that all Streamable
implementations implement clone() and then cloning any Streamable
attribute just as we do an array or DSet during an attribute, array
element or DSet entry change. This would be a more significant performance
hit as well as require a review of all of our Streamable classes (to
determine if they need a custom clone() implementation), and it has up to
now not actually manifested as a problem.

In any case I'm not going to tackle either of these remedies at the moment
because I'm on vacation, dammit.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3294 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-05 06:24:11 +00:00
Michael Bayne 7777a14c9c DSet already complains if we add a duplicate; no need to do so twice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3293 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-01-05 06:00:37 +00:00
Michael Bayne 920726f9f9 Noticed some other cleanup that could now be done.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-31 05:31:53 +00:00
Michael Bayne 0127ccba96 Only Yohoho needs the game object registered as an auxiliary source
because it plays games in a special place rather than actually moving the
player into the game room which naturally registers the place object as a
chat source. Fortunately, we can implement the necessary hackery to
support Yohoho in a reasonably generic manner.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3291 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-31 05:30:38 +00:00
Ray Greenwell f9f3d784cf My laptop repeatedly gets the sound looping bug, and I noticed that it goes for about 30 seconds before stopping. We keep the line open for 30 seconds, waiting for another sound, and there must be a bug in the Java libraries that sometimes loops the end of the sound. Expire LineSpoolers after 1 second. If this works I may restructure things so that the threads stay around longer but the lines get closed immediately after the drain delay.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3290 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-29 21:56:58 +00:00
Michael Bayne a6da0baf48 Regenerated in the new DObject world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:51:47 +00:00
Michael Bayne 55a0ab91f7 Regenerated our DObject derivations in the new world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3288 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:51:29 +00:00
Michael Bayne d27b150365 Comment fixy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:50:07 +00:00
Michael Bayne 9386fabeee Use the new DObject.changeAttribute() instead of hand-constructing an
AttributeChangedEvent which is no longer allowed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:49:23 +00:00
Michael Bayne 1fde5f69c0 Added a getter for the frame's manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3285 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:48:40 +00:00
Michael Bayne 1d976ceaf8 Merry Christmas to the server CPUs. It occurred to me that we could
accomplish our "previous value" support in the distributed object system
without using reflection and could also avoid using reflection in the case
where we have already applied the event on the server (which is generally
the case on the server).

Rather than hacking up the gendobj script, I took this opportunity also to
rewrite the DObject generation script as an Ant task and in doing so,
implemented another recent idea which is that we can just augment the
FooObject.java file instead of having a separate .dobj and .java file.

You'd think it was spring there's so much cleaning going on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3284 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-28 03:48:07 +00:00
Ray Greenwell bd80c348eb The great Interval revamp.
There is no more SafeInterval, instead Intervals can be constructed with a RunQueue to use for expiring.
PresentsDObjectMgr implements RunQueue.
Client has a getRunQueue() method to get the client side RunQueue.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 19:23:00 +00:00
Ray Greenwell 8ee6cb6fae There is no more nodemap.jar
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3282 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 19:00:30 +00:00
Ray Greenwell 60582d2f5c May as well let the PAUSE key pause/unpause, and cleaned up comments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3281 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 00:23:10 +00:00
Ray Greenwell 6b8ac486b3 Removed ancient nodemap stuff of questionable value.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3280 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-22 00:04:07 +00:00
Ray Greenwell 19aaa0fa3c Rather than greatly complicating the user interface (and code) for defining
custom keys to include a 'global' section, I've just re-added the P key
in a hard-coded manner. If the P key is pressed, the puzzle isn't already
paused, and the user has not redefined P to perform some other command in
the puzzle, it will pause.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3279 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-20 23:46:36 +00:00
Ray Greenwell 7afefd747b Only allow sprites and objects to be clicked with the first mouse button.
Will this change be as ill received as removing "P" from chat? Who knows.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3278 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 23:01:45 +00:00
Michael Bayne cea4f80676 Compute from the screen size the longest we will allow our A* paths to
reach while path finding.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3277 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 03:29:32 +00:00
Michael Bayne b56061da46 Added a default implementation of getRatingTypeId() as well since that's a
wacky notion from Yohoho that shouldn't really be in parlor in the first
place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3276 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 02:39:58 +00:00
Michael Bayne 63131a8911 Added a default implementation of getGameName().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3275 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 02:38:42 +00:00
Michael Bayne 3bbdef33d7 Do our privileged business in PrivilegedAction wrappers which allows
Java's magical security system to do the right thing (or so I think).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3274 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-15 02:15:02 +00:00
Michael Bayne 03c590b6cf Removed old debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3273 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-14 20:12:59 +00:00
Ray Greenwell 73832f59eb Made KeyRecord a static class.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3272 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-13 07:52:09 +00:00
Michael Bayne 6944f479d1 Removed inadvertently checked in test logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3271 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 21:36:03 +00:00
Michael Bayne aeff9e61cf Not having a client is not a warnable offense. All server only
"characters" (NPPs in Yohoho) have no client.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3270 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 19:16:57 +00:00
Michael Bayne a6d7764e29 More custom classloader support. We now have a proof-of-concept working so
it's unlikely that the rabbit hole will surprise us with further depth.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3269 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 02:54:26 +00:00
Michael Bayne c92a922678 The rabbit hole goes deeper. Now we can configure the client with a custom
classloader to use when unserializing objects off the network. Also fixed
the way custom classloaders were used as Class.forName(class, true,
loader) seems to be the proper way to go to have caching work and whatnot.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3268 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 01:23:44 +00:00
Michael Bayne f16beaa0a1 Allow custom classloaders to be used when loading PlaceManager
implementations and their ilk.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3267 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 00:41:38 +00:00
Michael Bayne 5f7409307f Allow a derived place registry to be used.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3266 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-10 00:27:31 +00:00
Ray Greenwell e7ef1e3e61 Support long[] values.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-09 01:34:50 +00:00
Ray Greenwell 129f302938 Put the pause label in the middle of the visible board.
This fixes the bug where there was no pause message in carpentry.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-08 00:08:44 +00:00
Ray Greenwell 7b3750c19c Log when a shutdown is initiated by someone pressing ctrl-C (or sending
the process the same signal another way).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3263 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-06 22:11:57 +00:00
Ray Greenwell ecd8e2e8b6 Clear all mappings of oid->chat type when the user logs off.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3262 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-04 00:02:14 +00:00
Ray Greenwell feb7355804 Go back to defaultly broadcasting to game objects, in case someone ever
creates a traditional lobby->room server with narya, and instead allow
a broadcast object to be registered with the ChatProvider to which all
broadcasts will be sent.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3261 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-03 23:47:19 +00:00
Andrzej Kapolka 33df387517 Moved shouldBroadcast override from PuzzleObject to GameObject.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3260 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-03 23:30:34 +00:00
Ted V 7ea2b45d39 Changed tabs to spaces since not everyone has the same tab stops.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3259 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-03 21:38:22 +00:00
Andrzej Kapolka f4bb453f83 Don't report ready if not actually a player.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3258 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-03 03:27:37 +00:00
Ray Greenwell e95f1e8914 Fixed booch-o that caused the cluster no-can-chat bug.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3257 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-12-02 22:06:05 +00:00
Michael Bayne d04e068d9b Use the custom class loader, though the way MiCasa works, the custom class
loader approach can't work. But it's useful to set a proper example.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3256 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 20:06:36 +00:00
Michael Bayne 3ed8e3cd0e Added support for loading place-related classes with a custom class
loader.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3255 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 20:04:11 +00:00
Michael Bayne d29db7765a Updated to use non-deprecated method signatures.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3254 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 20:03:47 +00:00
Andrzej Kapolka 5e1b2d16ec Added custom deserializer to initialize transient casted reference.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3253 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 02:19:58 +00:00
Michael Bayne dd4ce23b93 Restructured table creation to allow it to be customized. Though I now
realize I will probably have to change it further.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3252 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-30 00:32:43 +00:00
Andrzej Kapolka 9dc8c542b8 Added private table property to TableConfig.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-29 23:04:56 +00:00
Michael Bayne 20acf36919 Removed in the spirit of maintaining the fewest lines of code. This can
effectively be accomplished with a combination of ResultListenerList and
ResultAdapter.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-28 17:03:53 +00:00
Michael Bayne 1965e4ed30 Terser logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3249 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-27 22:29:32 +00:00
Michael Bayne d492d541b3 Create our game configurator directly rather than returning a class and
forcing the caller to instantiate it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-11-27 21:24:33 +00:00