Commit Graph

57 Commits

Author SHA1 Message Date
Michael Bayne 1688a19704 Allow for "loose" path location which gets the sprite as close as possible
by normal means and then walks them in a straight line from there (when
the straight line part will invariably be off-screen, this is OK).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2937 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-12 05:53:59 +00:00
Michael Bayne 7f4a01b795 Made getBlock() public, added enumerateResolvedBlocks(), pressObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2934 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 12:22:05 +00:00
Michael Bayne 0315c4316f Removed the hard coded jiggery pokery that we were doing to layout scene
object tips, replaced it with a system whereby custom tip layout
mechanisms can be registered for object action prefixes. The default tip
layout centers the tip in the object exactly as before minus the height
limitation business (which is actually no longer needed as the sailing
duty stations are no longer assigned to the rigging but to the wall below
the rigging).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2932 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-11 08:26:18 +00:00
Ray Greenwell 424c9b0e0e Let object action handlers have a crack at modifying the tool tip text
for an action (we already let them have a crack at the icon).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2930 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-01-07 22:03:08 +00:00
Michael Bayne d43f20d60f Only warn if we take a (relatively) long time path finding (ie. over 500ms).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2910 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-12-13 02:52:00 +00:00
Ray Greenwell 7795edf604 Use BaseTile objects to contain fringe tile info, mark them as impassible
if they are fringed on by any SPECIFIED tileId (ie, not the default tileId)
that is impassible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2852 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-11-12 23:05:41 +00:00
Michael Bayne a02d076d8e Tone down the max path length, when searching for a path in unresolved
space, it ends up considering up to 10,000 nodes with a max path length of
50 which causes the client to hang for like 5 seconds. Not so good. With a
max path length of 20, that comes down to about 1,300 nodes which ends up
being non-linearly faster.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2825 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-10-15 23:20:40 +00:00
Michael Bayne 48cbb2d095 Track the amount of time we spend searching for paths and report it if
it's lengthy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2792 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-09-08 18:42:38 +00:00
Michael Bayne 11fc21a59b Added code for refreshing the currently displayed scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2777 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-16 03:42:28 +00:00
Michael Bayne f252c0f88d Added sanity check.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2729 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-07-27 02:50:53 +00:00
Michael Bayne b8b76e091c Preserve command events as is.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2676 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-23 20:16:07 +00:00
Michael Bayne 2f63091f59 No show all.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2672 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-20 21:50:56 +00:00
Michael Bayne fc9f2d88f3 Fire a special scene object action when an object is clicked or object
radial menu item is selected.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2671 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 22:20:02 +00:00
Michael Bayne e7a7c2ba09 Pulled icon lookup into method that can be overridden.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2669 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-19 22:03:14 +00:00
Michael Bayne e6c3d54905 Disabled scene memory usage reporting as we get a good enough idea from
periodic cache stats at the moment.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2643 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-05 18:41:36 +00:00
Michael Bayne 368cd940b6 Make all of our object radial menus the same size; having them scale to
the size of the object is not at all useful.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2630 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-06-02 18:57:15 +00:00
Michael Bayne 73a4a02aa1 A few substantial changes:
- Tiles are initialized after being constructed which makes life simpler
  for custom tiles which no longer have to have their own constructor that
  passes Tile's stuff down to it.

- Tiles are no longer LRU cached (because we blow through that cache
  instantly on all but the smallest of scenes), and are now tracked by
  weak references so that we guarantee that only one instance of a tile is
  ever in memory.

- Added code to track and report memory usage of weak cached tiles as well
  as "stray" tiles which are created through other means than asking a
  TileSet for a tile (fringe tiles being the most prolific example).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2628 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:56:38 +00:00
Ray Greenwell bace19ea71 The AutoFringer picks which fringe tile to use next by querying a
Random, instead it relies on a duplicatable hashing method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2621 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:04:58 +00:00
Ray Greenwell 5f8309f118 publicized computeTips().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2620 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-28 18:15:26 +00:00
Michael Bayne 3bacbbe803 More useful debugging information.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2605 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-23 19:35:11 +00:00
Michael Bayne 8197441658 Restructure our block visible warning so that derived classes can augment
it as well as inhibit it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2601 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 16:10:54 +00:00
Michael Bayne 768da14b79 Allow derived class to turn off "block visible" warning. More debug
logging to help sort out the blue screen problem.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2599 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 17:10:05 +00:00
Michael Bayne 569522fd01 rethink() needs to return the number of "visible" blocks pending; added
code to log when we're not painting for lack of blocks and when we restore
painting so that we can further debug the proverbial blue screen situation.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2598 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 15:27:45 +00:00
Michael Bayne 98216ddcbb Account for blocks a bit below our visible bounds because otherwise there
can be serious popping when entire buildings don't come into view until
after we've started displaying.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2597 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 00:28:22 +00:00
Michael Bayne bf4142423f That should be debug not info.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2596 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 23:58:27 +00:00
Michael Bayne 5bdf72f615 Differentiate between blocks that are visible and those that probably
aren't (we can't truly know if a block is visible until we resolve it
because objects of arbitrary height can overlap the view bounds even if
the block's footprint does not); resolve the definitely visible ones first
and go ahead and start drawing once the known visible blocks are ready.
This cuts the time spent on the "blue screen" by about 75%.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2595 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 23:57:48 +00:00
Michael Bayne ded2a44c28 No longer check for on-screen paths here, we'll leave that to Yohoho!, but
we do allow derived classes to dictate whether or not unresolved tiles are
passable. Additionally, we sanity check the number of nodes searched when
computing paths.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2581 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 00:49:16 +00:00
Michael Bayne 16aaad3daf Report the block bounds and the view bounds when a block is reported as
having become visible during resolution.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2578 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-15 23:03:29 +00:00
Michael Bayne 863af05b72 Allow derived classes to dictate whether or not we allow traversal of
tiles that are offscreen.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2576 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-15 18:24:01 +00:00
Michael Bayne 8ca388fb7e Implemented a debugging view that shows when scene blocks are being
resolved; adjusted influential bounds based on new strategy for scrolling
around and resolving blocks.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2567 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-12 02:03:31 +00:00
Michael Bayne 286cd5019e Oh god, unresolved blocks are again unpassable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2558 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 01:12:06 +00:00
Michael Bayne bd18c4cbb1 If a block finishes resolution after it's already become visible, repaint
its bounds immediately rather than waiting for the remaining queued blocks
to be resolved.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 18:12:34 +00:00
Michael Bayne 57ee4d56c8 Let's have some debug logging so that we can investigate potential block
resolution wackiness.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 18:09:56 +00:00
Michael Bayne 02bd2ade00 We just flip flop back and forth on this one: now non-resolved tiles *are*
traversable so that if a sprite claims to have relocated somewhere outside
your resolved scene bounds, we'll just bee line them to their new
location. Since the user can never click outside their resolved view
bounds, we won't ever compute an invalid path for them. Joy.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2522 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 15:13:20 +00:00
Michael Bayne 99fa7fd6ff renderMedia() -> paint().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2509 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 20:48:51 +00:00
Michael Bayne 2a909b772e When we're resized, delay our rethink until the next tick so that the view
bounds are properly updated for the rethink.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2497 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 21:46:33 +00:00
Michael Bayne 4d7993b59f Only delay repaint on setBounds() if we end up queueing up blocks as a
result.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2496 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 21:10:19 +00:00
Michael Bayne 98d6d2f086 Broke out influential bounds computation into a method that can be
overridden.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2495 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 21:02:54 +00:00
Michael Bayne da3ec5f6e4 Report unexpected visibility more sensibly.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2491 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 20:28:45 +00:00
Michael Bayne 7c5d0f275e Document that little feller.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2487 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 18:12:09 +00:00
Michael Bayne 831539b09d How simple! If our bounds change, delay a repaint until we have all of our
blocks resolved. In the future, we could attempt to resolve the blocks
that are needed to repaint the visible view first and allow repaint as
soon as those blocks are resolved.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2486 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 18:08:57 +00:00
Michael Bayne b907bc02b0 Ensure that we always eventually claim to be resolved.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2467 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-26 02:16:18 +00:00
Michael Bayne d86ddce45d More delayed block loading improvements: resolve fewer blocks, use the
same mechanism for including and excluding blocks.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2464 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 22:13:14 +00:00
Michael Bayne cca2a9cd16 Beginnings of support for asynchronous scene image data resolution.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2462 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-25 18:22:52 +00:00
Michael Bayne 995f33af84 Provide our view bounds to the radial menu services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2445 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-22 22:00:51 +00:00
Michael Bayne 1274fbb7c0 Let's inform the derived classes of the delta rather than the new _vbounds
upper left which is something they're already much more likely to be
making use of directly.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2443 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-22 18:12:40 +00:00
Michael Bayne 6b0e816643 Dooh! We need to recompute our visible object set regardless of whether or
not new scene blocks were resolved.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2440 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-21 17:56:55 +00:00
Michael Bayne e628a8e429 Added support for specifying a default tileset for scenes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2439 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-21 17:08:57 +00:00
Michael Bayne 3c94cd67f6 Various fixes to support negative tile coordinates; created sparse miso
scene model and associated business to store scene data in an arbitrary
set of blocks rather than fixed arrays; finally stuck a fork in scene
width and height as well as view width and height along with origin offset
and a few other now obsolete bits.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2434 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 22:40:34 +00:00
Michael Bayne 299e0845bb Center on the center of the scene when it is first set. Adjust our view
bounds to preserve the current center point when we are resized. Deep
sixed "bounded" and some other needless fiddling.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2430 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-19 17:06:08 +00:00