Commit Graph

2041 Commits

Author SHA1 Message Date
Walter Korman 8ef2721d73 Fixed javadoc typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2044 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 04:44:33 +00:00
Walter Korman ee83234bee Removed unused imports.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2043 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 04:42:54 +00:00
Michael Bayne 5e81502af3 Track and report our average number of dirty regions per tick.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:53 +00:00
Michael Bayne 8ab0623a9c Refuse to allow a frame participant to be added more than once; enhanced
FPS display, made it possible for frame participants to add to the
performance status string. Also modified perf status to be double
buffered. It's not repainting exactly properly at the moment; soon to be
remedied.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2041 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:12 +00:00
Michael Bayne 42110dc8da Remove invocation receiver mappings from the receivers table when they are
unregistered. Flush invocation listener mappings after an expiry period if
they were not already removed by virtue of receiving a response.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2040 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:18:50 +00:00
Michael Bayne 6caca5fe5a Added code to easily disable the sound manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2039 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 22:41:10 +00:00
Michael Bayne d60e6a69d8 Implemented code to handle the rather complicated circumstance of not
being able to send a message immediately to the client due to it being too
large or the client's outgoing networking buffer being full for some other
reason (many messages sent very quickly or client that's reading messages
slowly).

I still need to add code to disconnect a client who fails to read messages
in a sufficiently timely manner.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2038 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 22:33:04 +00:00
Walter Korman 53d4108602 Added temporary fringe debug logging so that we can assess time and memory
usage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2037 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:30:37 +00:00
Walter Korman e45ba41b0f Realized that the icon manager is caching icon tilesets, not icons
themselves, and accordingly dramatically reduced the cache size and fixed
comment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2036 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:13:00 +00:00
Walter Korman eda77a227d Use an LRUHashMap to cache icons.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2035 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:09:45 +00:00
Walter Korman acaf39b070 Estimate memory usage in bytes rather than pixel area, assuming an int per
pixel for now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2034 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 02:04:32 +00:00
Walter Korman ea545bcb66 Log the size of the cache along with its efficiency.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2033 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 01:10:25 +00:00
Walter Korman be34314e1a Report image cache performance in all relevant places.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2032 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 01:00:58 +00:00
Walter Korman 8c5d490b53 Use an LRUHashMap to cache images, and limit caching to 30 images.
Periodically log cache efficiency and estimated image size.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2031 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 00:58:00 +00:00
Michael Bayne 1558a6ec57 Throttle our action cache performance reports to once every 30 seconds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2030 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-07 00:49:36 +00:00
Michael Bayne 5373597143 Removed caching of tile coordinates as it was too fragile. It is easy to
forget to update a sprite's tile coordinates when updating its screen
coordinates and only TilePath could be used for sprites in the view and
generally a huge pain was incurred to avoid what isn't very expensive
which is to calculate a sprite's tile coordinates from its screen
coordinates when that sprite is involved in a repaint.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2029 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-05 23:06:30 +00:00
Michael Bayne ee8eda46bb Have to check that the user exists in sessionConnectionClosed() before
setting their status to disconnected; don't have to check that the user
exists in sessionDidEnd().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2028 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-05 16:39:21 +00:00
Michael Bayne 0749a20e6e Rejiggered endSession() so that overridden sessionDidEnd() methods can
call super.sessionDidEnd() and still do things with the client object at
the termination of the session.

Also removed the passing of the client object to sessionConnectionClosed()
because it's still possible that it won't be avaiable when that method is
called and whatever is being done there should also be done in
sessionDidEnd() if it is to work when the user ends their session as well
as when they disconnect.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2027 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-05 16:20:45 +00:00
Michael Bayne acae62db72 Remove the frame rate logging because we have a handy dandy visual display
now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2026 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 23:21:25 +00:00
Walter Korman 28ee999426 Added facility for displaying the current frame rate information within
the frame buffer, and a debug chord (Alt+Shift+F) to toggle the display.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2025 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 22:07:28 +00:00
Walter Korman b7e24b0b63 Fixed javadoc comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2024 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 22:04:46 +00:00
Ray Greenwell 83d9cf3363 added versions of lock() and unlock() that take a list of sound keys to
operate on.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2023 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 21:42:34 +00:00
Walter Korman fc14518506 Removed verbose logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2022 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 03:01:12 +00:00
Michael Bayne e91215b689 Explicitly pass along the client object to sessionConnectionClosed()
because it will have been cleared out of _clobj by the time said method is
called if it is called as a part of a terminated session.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2021 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:47:03 +00:00
Walter Korman 6552b5bd8b Include the timestamp associated with sprite events in the event.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2020 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:45:09 +00:00
Ray Greenwell c321f7eb33 - added debug logging so that we can see the time elapsed between the
moment that a sound is requested to just before the LineSpooler object
  that it was given to starts writing the data to a line.
- Turned drain() back on, but only if we're not running under linux.
  If we're in linux, we instead sleep for 3 seconds, and gosh darn it, the
  sound should be finished after that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2019 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:14:12 +00:00
Michael Bayne 1d9de38b61 Make the frames per second info available to callers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2018 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 01:25:17 +00:00
Michael Bayne 6cabb846c5 Use a separate runnable for the AWT queue to avoid a call to
EventQueue.isEventDispatchThread() and to make Ray happy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2017 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:42:21 +00:00
Michael Bayne b2454c59f3 Removed performance monitor stuff because we can track our frame rate
without expensive calls to System.currentTimeMillis().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2016 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:29:35 +00:00
Michael Bayne 6eed170158 Fixed problem with ticker wherein it was not properly dropping frames when
it should. Added code to track and report desired and obtained frame rate.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 19:28:04 +00:00
Michael Bayne b27571c8c0 Created an extensible mechanism for clearing out a client's location
information when they end their session.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2014 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-03 06:58:57 +00:00
Michael Bayne eff8dc0ca7 We'll have to be a little more forceful about leaving than just clearing
out the body object's location id. Sheesh.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2013 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-02 23:18:06 +00:00
Michael Bayne cf578a11b5 Log the shit out of everything if we come across an invalid class code in
the object input stream.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2012 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-02 22:10:10 +00:00
Michael Bayne 0f0631f318 Do some jiggery poker to make sure that if a path completes as a result of
our call to Path.init() we don't freak out. Also made a note that paths
will be ticked after being init()ed because that's the way it works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2011 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-02 20:11:24 +00:00
Michael Bayne 55f40108b8 Added simple mechanism to resolve a client, apply some operation to it and
release it back into the wild.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2010 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 23:40:32 +00:00
Michael Bayne 1c726c8e33 Removed stray newline.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2009 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 23:40:01 +00:00
Michael Bayne a1e8ffa65a Cancel any game that isn't already over in placeBecameEmpty(), log more
useful info when we abort a game because of a complete no-show.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2008 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 21:25:37 +00:00
Ray Greenwell d5cc64aa87 Went back to only draining when we detect that the line is active.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2007 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 21:22:46 +00:00
Michael Bayne 5f4108823c Make it easy for derived classes to opt-out of the no show timer; fixed
checkForNoShows() to only claim a partial no-show when one or more players
have not reported readiness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2006 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-29 20:56:06 +00:00
Michael Bayne f7c27a1afa Added a mechanism to check that we are running on (or not on) the
distributed object event dispatch thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2005 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 22:51:52 +00:00
Michael Bayne 130d126238 Make it possible for other kinds of sprites to know and report their tile
coordinates.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2004 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 03:42:17 +00:00
Michael Bayne 26cd1188ae Improved documentation.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2003 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-28 03:41:58 +00:00
Michael Bayne 8529dd08bf Added support for an orientation offset which will be used to orient the
pathable some number of ticks offset from the "natural" orientation which
would be in the direction it is traveling along the arc.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2002 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 23:48:24 +00:00
Ray Greenwell 0403db5e73 catch NPE. A song can be the top song on the stack and not be playing
if musicvolume is 0.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 21:41:53 +00:00
Walter Korman 709e65f947 Moved sword spark animation here from there, and allowed specifying the
spark duration.  Spark is perhaps a bit of a misnomer as the animation is
really more of a specialized kind of explosion.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2000 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 01:37:14 +00:00
Ray Greenwell 2895b65909 - always drain again
- increased buffer size to 24k


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1999 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:12:14 +00:00
Ray Greenwell dd87f55b45 Fuck the windows file separator character.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1998 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-27 00:08:36 +00:00
Ray Greenwell f901cb3041 When testing, allow sounds to be cached if they're locked.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1997 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 21:14:11 +00:00
Ray Greenwell 54c486710d When music is stopped because the volume is turned to 0, don't
remove it from the playing music stack.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1996 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 18:54:39 +00:00
Michael Bayne 779640972d A few things: added support for detecting no-shows after 30 seconds;
no longer call gameDidStart() directly from startGame() but wait for the
game state event to dispatch and then call it;

removed gameDidReset() because no one was using it and it is funny because
it was being called after gameWillStart() and gameDidStart() were already
called and what in the heck would you be doing that wasn't part of the
normal game startup procedure that you didn't already do in
gameWillReset().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1995 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-26 09:12:10 +00:00