Commit Graph

3317 Commits

Author SHA1 Message Date
Michael Bayne 01592d2593 Reorganized basic permissions handling to be more cleanly extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:22:27 +00:00
Michael Bayne 713e76373b Allow the authenticator to slip some authentication data down the line to
the PresentsClient which can then use it to fill in things like access
control information for the user. We could use this to replace the
UserStash mechanism we use on Yohoho, but that works so I doubt I'll do
that. However, this is needed to do things the more elegant way on future
projects, like Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:08:23 +00:00
Ray Greenwell 40eb978a96 Added a simple turn display widget (for game gardens).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 02:33:46 +00:00
Ray Greenwell a9df96d6dd Fixed a bug with days not having a defined next-highest unit, which caused
day values to incorrectly always display as 0. I'm surprised nobody
else noticed this, it's right there on the blockade panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-01 01:16:01 +00:00
Ray Greenwell 9733fc2303 Added support for looping sounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-28 19:29:44 +00:00
Ray Greenwell a784ce8a79 Comment change so that I can check it in with the right umask.. grr.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:30:52 +00:00
Ray Greenwell 008b9ad896 When a new default access controller is set, switch any objects
that were using the old default (usually null) to use the new default.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:04:25 +00:00
Ray Greenwell 708431bf86 Allow the SceneFactory to be set after construction.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-25 00:59:35 +00:00
Ray Greenwell 8491496226 Actually, it was stupid of me to handle a non-RandomAccess list differently,
as they still implement get() and however they do that internally
is bound to be more efficient than doing the same thing through an
Iterator.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:52:09 +00:00
Ray Greenwell a107aef489 Added a form of pickRandom that takes a List argument.
I just can't bear to see a useless object created (an Iterator) and
potentially a great many objects iterated past in order to find the
chosen random object when the original List is usually RandomAccess.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:45:25 +00:00
Michael Bayne 44f2a29f4f Regenerated with updated copyright information.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:56:52 +00:00
Michael Bayne eac29cb3b9 Small documentation addition.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:55:09 +00:00
Michael Bayne 53be9a74ca Added more sanity checking to portal traversal to avoid spurious error
messages if repeat requests come in or for some reason the client and
server ever differ in opinion as to which scene the player is in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:54:48 +00:00
Ray Greenwell 7ec0eeca56 Added a bevy of interfaces that Sprites can implement to be recognized
by the MediaPanel as sprites that interact in some standard way with the
mouse.
Modified existing ButtonSprite to work this new way, and it now implements
CommandSprite, ArmingSprite, and DisableableSprite. One method name changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 04:14:44 +00:00
Michael Bayne 097730e84d Update for 2005.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:52 +00:00
Michael Bayne 121f6d7e53 Did the refactoring necessary to get the client and server to live happily
together in one JVM and both interoperate with the AWT thread in a manner
so harmonious as to bring a tear to the eye. This was surprisingly much
easier that I expected, thanks to my eminently sensible initial design,
I'm sure. ;)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:34 +00:00
Michael Bayne 41fb0b1b80 The PuzzleService was superfluous. The ParlorService can handle starting
single player games and indeed should because it's useful outside the
context of puzzles and their ilk.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-19 22:38:06 +00:00
Michael Bayne 4036d12121 Further test fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:14:44 +00:00
Michael Bayne e8705b6137 We need more libraries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:07:10 +00:00
Michael Bayne c0cd2cd3ca Further repairs to the build configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:05:35 +00:00
Michael Bayne 2198748dcb Brought the tests back into the land of compilability.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 01:54:54 +00:00
Ted V ebf4d7cfa2 Now throws the proper type of exception when a color name lookup fails.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-16 22:21:01 +00:00
Ted V 785259a4a8 Quite obviously the parsing should check for integers, not bytes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 21:44:35 +00:00
Ted V d618c12c93 Added accessor function that handles color name -> id lookups.
Could be made faster with some sort of reverse string lookup table,
but it doesn't seem worth the overhead right now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 20:53:49 +00:00
Michael Bayne 93794d5a77 Fixed some comment grammar.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 01:02:17 +00:00
Michael Bayne 877892b4c8 Allow the ZoneManager to veto a body's departure from the zone.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 00:58:16 +00:00
Michael Bayne 7cf98ba971 Automatically lay out our label if it has not already been.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:28 +00:00
Michael Bayne 99d382fdbf Updated the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:14 +00:00
Michael Bayne 459d677a2f Provide the AbstractMediaManager with a reference to the panel it's
working with rather than just the RegionManager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3347 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:00:58 +00:00
Michael Bayne 113ca65f7a We need to know who did the dirty deed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3346 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 22:47:56 +00:00
Michael Bayne 8f9af12fdb Use a direct buffer for our overflow queue partial buffer as well because
there will be relatively few of those (at most one per client that is
experiencing lag) and while the client is experiencing lag we will be
trying to write their data once per pass through the sockets (which could
be hundreds of times a second) and we don't want each write attempt to
result in the creation of a temporary direct buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 04:39:23 +00:00
Ray Greenwell 10e84f9471 Gee wally, now that sound is fixed, let's go back to expiring late sounds
at a reasonable time again.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3344 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 04:00:12 +00:00
Ray Greenwell 5ff24097a7 Tested and verified: the bug is fixed. Removed extra debugging, found
another instance of append() that needed to be changed to appendLoud().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 23:02:39 +00:00
Ray Greenwell 2ff14aa456 Well then! That last bit of debugging has finally shown me the light!
Queue.append() only does a notify() if the queue was previously empty.
So when the dobj thread was requesting two sounds one after another, it
only woke up one player thread, which played the first sound and then
came back 'round to play the next sound after it was done. The next sound
was usually expired by that time.

Use queue.appendLoud(), which always wakes up a waiter thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:34:55 +00:00
Ray Greenwell 67521e973d Even more logging, to ensure that two different threads are indeed playing
these two different sounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:02:22 +00:00
Ray Greenwell 86757cb55e Even more verbose logging to figure out why the sound manager is being so
slow.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3340 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 20:59:14 +00:00
Ray Greenwell f027797120 Added some more info to some logging, cleaned up formatting of logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 19:55:31 +00:00
Ray Greenwell 60c5f60a23 Added additional verbose logging to figure out why some clips take
so long to get played.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3338 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-08 07:09:05 +00:00
Ray Greenwell cb6da9d5bc Playing with the sound under windows, it seems that a lot of sounds are
getting dropped because they're taking too long to play. Extended the
max delay to 1000ms, which will surely help more sounds play, but may
not be worth it. Hey, we've got a test server to test on...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3337 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-08 06:26:27 +00:00
Michael Bayne 45ec296ba0 Here's a giant performance improvement: the current Presents architecture
flattens messages into a buffer and then passes that bucket to a
SocketChannel.write() method which is part of the NIO business. If said
buffer is a "direct" buffer, the write() method will in theory do
high-performance shit like DMA the data right to the network card. If it's
not a direct buffer, Sun apparently makes a temporary direct buffer,
copies the data into it and passes that on to the underlying socket send()
call. We weren't using direct buffers which means that we were copying
everything one more time than needed (not a huge deal) and that we were
allocating a direct buffer for every message (a much bigger deal). This
should take a serious load off of the I/O thread and fortunately we can
test it on Ice to make sure it doesn't do anything super crazy.

All this said, this whole business is going to change when I rearchitect
Presents to avoid the potential race conditions it suffers from now and we
won't be able to use a single direct buffer to write all of our outgoing
messages, but I believe we will be able to use a pool of direct buffers
with one used by every message in the queue waiting to be written
(hopefully that won't be too many at any given time) which we can keep
around to avoid the expense of allocating and freeing direct buffers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3336 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-08 05:08:47 +00:00
Michael Bayne 53c3435854 Handle cases where one or the other direction does not scroll for lack of need.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-07 03:53:54 +00:00
Michael Bayne ff4f9d4a9c A helper that makes it easy to wire up scrollbars or a scrollbox to a
virtual media panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3334 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-07 03:37:39 +00:00
Michael Bayne 02db6a2b73 Further cross-"platform" jockeying.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:59:59 +00:00
Michael Bayne 40b6fc31d7 More jockeying to make things happy with Linux and FreeBSD.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3332 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:30:33 +00:00
Michael Bayne d49873820d Use names that correspond with System.getProperty("os.name").
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3331 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:25:21 +00:00
Michael Bayne 279849151c Use names that correspond with System.getProperty("os.name").
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3330 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:24:57 +00:00
Michael Bayne 924ab5c9e6 We've got crablegs! And a special Makefile for Linux and FreeBSD.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3329 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:22:28 +00:00
Michael Bayne ecf7c7f415 Fuck me riding a pony; whatever goddamned make that FreeBSD uses is
sufficiently incompatible with GNU make that I'd rather just have two
whole separate goddamned directories with their own Makefile than try
to get everyone to agree on how to do things.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3328 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:16:12 +00:00
Michael Bayne f26c58ef4d Revamped things to work in multiple flavors of Joonix.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3327 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-03 01:02:58 +00:00
Ted V f7109f64bf Was doing some debugging; opted to leave the log import checked in.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3326 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-01 23:11:42 +00:00