Commit Graph

2059 Commits

Author SHA1 Message Date
Walter Korman ce8fe382a3 Use observer lists, and remove code to disallow adding observers more than
once since the observer list now takes care of that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2062 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 23:54:27 +00:00
Walter Korman 3d2e98f7da Fixed typo in comments. Tried to resist due to negligibility of typo, but
the perfectionist in me got the better of, me.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:27:25 +00:00
Michael Bayne d6f5a4da4d Added support for fully qualified translation messages which will be
fetched from the message bundle embedded in the fully qualified key even
if they are being translated within the context of another message bundle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:24:51 +00:00
Michael Bayne df30c37892 Log a more informative message when we catch an exception.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2059 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 19:00:25 +00:00
Michael Bayne d79a6970e1 Need a package qualifier because this config file is meant to be
overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2058 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 18:36:13 +00:00
Michael Bayne 8d5ba037f1 Added necessary jockeying to cause ant not to freak out if JAVA_LIBS is
not set.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2057 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 07:30:18 +00:00
Michael Bayne 18c7b2cf6f Complain loudly about listeners or subscribers that try to add themselves
more than once. Use testAndAddEqual() where appropriate now that
testAndAdd() doesn't use object equality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2056 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 00:30:47 +00:00
Walter Korman 1b27d90286 Initial version of runtime miso scene business.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2055 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-11 23:07:21 +00:00
Walter Korman 2fde0b7117 Made to implement the RuntimeSpotScene interface as was surely intended.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2054 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-11 23:06:24 +00:00
Walter Korman 3ccbb4ad5b Whitespace change.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2053 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-11 23:05:07 +00:00
Michael Bayne 26065cef4a A test sound.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2052 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 21:37:10 +00:00
Michael Bayne 64ab1e11ae Got the sound manager test app mostly working again.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2051 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 21:36:53 +00:00
Michael Bayne a2c3741b2b A few things:
- Use Constant objects for the command constants because the toString()
output on those is more sensible.

- Fall back to the classpath if we don't find our resource in a bundle

- Don't make the sound manager thread a daemon thread as it provides a
  shutdown() which is a more civilized way to make it go away anyhow and
  allows the sound manager to be used in one-shot tools and test
  programs. At the moment, the sound manager (on Linux at least) seems to
  start up some threads that refuse to go away anyway but that's a problem
  for another time.

- Report if a command is queued up that we don't know about.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2050 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 21:36:33 +00:00
Michael Bayne 8943daf060 Revamped frame test to use new nio-based framing services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2049 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 19:38:56 +00:00
Michael Bayne fd9a06a388 We don't need a SocketChannel. A ReadableByteChannel will suffice.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2048 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-10 19:33:22 +00:00
Michael Bayne 26ed72d109 Report an error rather than NPEing if we resume a session with a null
_clobj.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2047 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 17:19:04 +00:00
Michael Bayne 3b09893292 The end of more font hackery.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2046 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 05:13:45 +00:00
Walter Korman 100739bff5 Removed font hackery now that we've understood and fixed the "font bug",
which turned out to be due to improper restoring of the anti-aliasing
setting in graphics contexts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2045 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-09 05:00:48 +00:00
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