Commit Graph

3376 Commits

Author SHA1 Message Date
Ray Greenwell be8a755dad The generic set updaters weren't working because proguard renamed the
methods they were looking for.

Since it's probably impossible to have proguard generically skip renaming
for these generated method names, let's update the fields in a different way.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3434 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 22:31:46 +00:00
Michael Bayne a4ac47fb04 Reinstated the Presents I/O refactor with the modification of ensuring
that authentication is processed on the dobjmgr thread rather than
requiring the caller to do the right thing (or not as the case happened to
be).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3433 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 21:49:19 +00:00
Ray Greenwell d58d1001ac Roll it all back.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3432 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 19:33:28 +00:00
Ray Greenwell 36af272a63 Bad idea.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3431 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 19:32:48 +00:00
Ray Greenwell f6e427a26d Bugfix?
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-28 19:23:26 +00:00
Ray Greenwell 5290ab7c1d Pass the mode to the speaker validator.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3429 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-27 20:16:59 +00:00
Michael Bayne 771842edf4 Allow the current alpha value to be obtained.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3428 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 05:11:16 +00:00
Michael Bayne 5544701e5a Let our caller know if our fade level actually changed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3427 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 04:50:52 +00:00
Michael Bayne d54c776527 Factored the fade effect out into a separate effect class so that it can
be used by sprites and animations. Ray is now thinking, "Why do we have
this wacky difference between sprites and animations?" but changing it now
would be a massive amount of typing that I'm not super interested in
doing. In any case factoring out the "effects" into separate classes is
still useful because frequently one wants to combine them in crazy ways
that would not be possible with a FadeSprite or FadeAnimation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3426 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 04:36:33 +00:00
Michael Bayne cd729458f4 Factored FadeAnimation into something that can be extended to fade
different things in. Created FadeImage and FadeLabel derivations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3425 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 04:18:24 +00:00
Michael Bayne 6e947f0238 Added support for antialiased label sprites.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3424 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 02:32:04 +00:00
Andrzej Kapolka 1d4d9fe2ba Check for null puzzle object.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3423 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-24 00:46:28 +00:00
Michael Bayne 1da2e7cc0e Call mark() on the audio input stream because that creates some sort of
push-back buffer that prevents sounds from blarching when we reset the
stream.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3422 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-23 20:57:38 +00:00
Michael Bayne 4bfbb96dfe We need to override hashCode() and equals() because the default
implementations do a fucking DNS lookup on the host of the URL. The degree
to which that violates expectations about the "expense" of calling
hashCode() is so astronomical as to be unexpressible without complicated
metaphor.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3421 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-23 01:56:54 +00:00
Andrzej Kapolka 32a42047dc Ignore non-existent bodies when players knocked out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3420 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-22 03:11:07 +00:00
Michael Bayne a285695ca8 I finally broke down and did the rewrite to fix the potential race
condition between the omgr thread and the conmgr thread. Now when the omgr
thread processes an event that is going out to the clients, it flattents
the message itself for each client that is to receive the message and the
flattened data is posted to the conmgr outgoing queue.

This means that once an event is finished processing, no further
modifications to any of the data associated with the event can effect the
data queued up to be sent to the client. This is a good thing, it will
eliminate or illuminate a very baffling class of bugs that we've sort of
been ignoring because we knew this could be the cause.

We used to take an event and flatten it directly into the direct buffer
from which we would do our socket write. Now we flatten it into a
temporary byte array. This means a metric shitload more garbage generation
and collection. We used to do the flattening on the conmgr thread, now we
do it on the omgr thread. This means a big redistribution of CPU demand.

Either of those things could result in a significant negative impact on
our performance, but we'll just have to deploy this stuff and find out.
Whee! If it turns out to be a serious problem, there are potential
optimizations that could be done by keeping a pool of direct buffers
around and flattening messages into them, relying on the fact that the
outgoing conmgr queue generally doesn't grow too large and we could
allocate tens to a hundred megabytes of memory for the outgoing queue if
we really needed to.

I'd also like to test the overflow handling stuff more. It didn't really
change in that everything just deals with arrays of bytes now instead of
unflattened messages, but I'll be more comfortable once I've seen all this
in action on ice where there may be few users, but they are just as likely
to experience lag and receive an overflow queue as users on the higher
traffic servers. There is code to log when overflow queues are created and
finally flushed and how much use they got while they were around, so that
should give us an indication of whether things are operating properly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3419 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-19 08:39:19 +00:00
Michael Bayne 0e2f51b91f Recreate our shutdowner list when we re-init() so that we don't end up
freaking out in standalone mode where the server is started, and shutdown
and started again repeatedly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3418 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-19 00:30:27 +00:00
Ray Greenwell 74ff1f6fc5 No permissions are needed to load *any* resource from a resource bundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3417 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-19 00:17:58 +00:00
Michael Bayne 9434b6e9bc Just use a volatile variable and do away with the synchronization, at
Mr. Greenwell's suggestion.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3416 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-18 19:26:11 +00:00
Michael Bayne 9682983526 We can't rely on the connection manager not being shutdown to determine
whether or not we're already shutdown as it may have shutdown
unexpectedly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3415 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-18 19:08:18 +00:00
Michael Bayne 77f9d8836c Allow a connection manager shutdown hook to be registered.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3414 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-18 19:00:01 +00:00
Michael Bayne 67087dbda2 Forgot an argument.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3413 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-18 01:13:09 +00:00
Michael Bayne f00cbd2b3b Allow outline images to be created without an image manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3412 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-17 21:46:43 +00:00
Michael Bayne 8b79e57179 Moved AStarPathUtil into media from miso (it has nothing to do with
isometric rendering) and modified it to allow it to consider different
potential move sets than just moving by one in the eight cardinal
directions.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3411 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-17 07:36:47 +00:00
Michael Bayne 60c589be4d Arg. I can't change this or no one will be able to get the "failed"
response telling them to upgrade. Note to self, do the thing where the
server immediately writes the version number to the auth stream so that we
don't have to worry about this sort of legacy crap.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3410 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 22:39:19 +00:00
Michael Bayne 2f24fdb449 Truncate the text of the long message. We can figure out what it is from
the first 80 characters if this every actually discovers an anomaly rather
than just dutifully reporting every time someone updates really lengthy
crew news.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 17:08:55 +00:00
Michael Bayne 0bd239c74c Added a version of getDirection() that works directly with doubles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3408 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 07:58:28 +00:00
Michael Bayne b58c1a3cf4 Added a version of distance that doesn't do the square root.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 07:58:06 +00:00
Michael Bayne 2d19a0ba82 Renamed DSet.entries() -> DSet.iterator().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 02:12:03 +00:00
Ray Greenwell 12b267dbae One day we hope to implement Iterable, let's implement the standard
'iterator()' name and deprecate the old 'entries()' method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3405 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 01:40:22 +00:00
Michael Bayne e018791a80 No need for these classes to extend DObject, that's weird.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3404 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 00:46:01 +00:00
Michael Bayne d62b0dfdbb Missed another serialization spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3403 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:58:02 +00:00
Michael Bayne b97d9ac7c3 Not to booch when serialized and then dead-code removed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:53:36 +00:00
Michael Bayne f2a9f7ed0d Further AI handling improvements.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3401 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 10:08:02 +00:00
Michael Bayne 787d4f1fe5 Allow AI configuration to be specified in the GameConfig and automatically
put into place before the game starts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3400 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:46:34 +00:00
Michael Bayne fb53600e92 Revamped the way AI configuration is specified to be more extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:37:34 +00:00
Ray Greenwell b4e595bd3c Prevent infinite loops if there is no qualified player to become the
new turn holder. Log a warning. This is how we do things here.

Additionally, something I didn't change that is redundant is checking
to see if the player name is null, when the default implementation of
the active player check will return false if the name is null. It seems
to me that the movement of the active player business into the base game
package can result in some cleanup that hasn't been done, but I don't
want to look into it any further.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:14:23 +00:00
Ray Greenwell 3549b9cdaf Do not require the playerStatus field to be initialized. If someone wants
to write a simple board game for gamegardens, they shouldn't have to
explicitly set up an array indicating that all the players are active
(or worse, waste 45 minutes tracking down why the game is freezing up
suddenly).

If the playerStatus array is null, all players are active.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:10:27 +00:00
Ray Greenwell fade675350 Allow resource urls that have a blank resource set specified to
load resources to load from the default sets.
(A normal url would be "resource://<set>/<path>", one using the default set
would be "resource:///<path>". Goofy.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:08:09 +00:00
Andrzej Kapolka 730234b5a5 Made dispatchMessage public.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 22:29:05 +00:00
Ray Greenwell 8445f3c7f2 Removed extra comma.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 02:13:05 +00:00
Andrzej Kapolka ad1edd6e69 Added standalone flag and special standalone logoff method to Client, options to BasicDirector to hold off on initializing directors not needed for standalone mode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 02:06:43 +00:00
Ray Greenwell fea80fdb2b Changed the tileset cache to use soft references. We want the cache
because we'd like to use the same TileSet over again when possible, but
we don't want to forevermore hold onto a TileSet if it could be gc'd.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 01:30:34 +00:00
Ted V 51e8ef3687 Yeah, it does need the !.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:16:13 +00:00
Ted V 08cc800694 Turn/GameManager now supports interface for checking whether a player
is still actively playing the game.  The delegate now uses this when
incrementing turns to skip over players not a part of the game (rather
than needing this same code in the derived classes).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:13:25 +00:00
Ray Greenwell bb83bacdab Rather than keep a reference to an instance of a custom anonymous class
for an error icon, just whip one up on the fly when needed (almost never).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:20:37 +00:00
Ray Greenwell b07d3821fd Use an LRU cache for our config properties files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:19:01 +00:00
Ray Greenwell fbbaf7c64a Got rid of the "occupant cache" which was used to provide the previous
value to observers when an OccupantInfo was updated or removed. This
functionality is now built-in to the dobj system, so just use
getOldEntry() on those two events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:15:02 +00:00
Ted V 94bf03ec9d Moved player status tracking and in/out of game status from puzzles to
games.  Updated the PLAYER_KNOCKED_OUT variable name to prevent some
namespace contention issues.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:52:03 +00:00
Ray Greenwell c36ebdc8d4 A-ha, found the further source of the walk-on-water bug, which is that if
you had logged on to one ocean and then moved to another, the previous
ocean's sceneIds are still in the scene cache.

Fix: Clear the scene cache both when we log off and when the scene repo is set.

Also, I made the cache be a LRUHashMap holding a measly 5 scenes.
Why are we filling up memory on the client with scenes that may or may not
ever be revisited?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:06:38 +00:00