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
Michael Bayne
6d3d80c58e
Keep a rectangle around with our tile coordinate footprint and use that
...
for overlapping calculations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2627 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-31 00:52:15 +00:00
Ray Greenwell
99ccd996df
Oops, remove these too.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2623 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:59:17 +00:00
Ray Greenwell
af504ef8aa
Added MisoUtil.getTileHash(), made both SceneBlock and AutoFringer use
...
it to pick random tiles based on x/y location.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2622 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-29 01:58:06 +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
f6325c5d4c
Pass all the object info along when visiting.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2615 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 19:04:29 +00:00
Michael Bayne
a5e3752a7b
Make it possible to refresh our object tile if we've had our colorizations
...
changed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2614 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 18:25:19 +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
328f4786ba
Report our resolution on the AWT thread rather than the scene block
...
resolution thread.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2604 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 22:18:27 +00:00
Michael Bayne
9ab9a7f84b
Let's not freak out, but warn and return -1. This is one of those "should
...
never happen" things that keeps happening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2603 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-22 22:18:02 +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
0642b97258
Warn if blocks take a long time to resolve; added debug logging to report
...
a histogram of block load times.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2600 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-21 17:10:41 +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
Ray Greenwell
7071f2e0da
Don't save empty sections when saving scenes.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2586 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 17:26:07 +00:00
Michael Bayne
54b02327c1
Track the number of nodes considered when computing a path; minor
...
rearrangement.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2582 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 00:49:44 +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
21db8d27bc
Further cleanups, eliminated TilePathNode which is no longer needed.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2580 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 00:26:18 +00:00
Michael Bayne
e190c1625f
Removed vestigal code, generally cleaned up.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2579 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 00:22:22 +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
80aa40ac72
Keep the vbounds centered in the resolution view.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2577 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-15 22:49:38 +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
Ray Greenwell
e44f7c243a
Close streams immediately after using them.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2575 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-14 21:34:01 +00:00
Michael Bayne
45033c8623
Use a much smaller scene block size which smooths out block resolution and
...
generally makes everything happier.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2569 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-12 02:04:16 +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
48a102de5a
Allow scene block resolution to be suspended.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2566 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-12 01:53:19 +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
daa9c8ee0e
We can use the raw images here because we eventually splat all fringe
...
tiles into a composited image which has been prepared for display.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2533 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 23:33:30 +00:00
Ray Greenwell
af764f57c7
Added a constructor that takes MisoSceneMetrics.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2527 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 21:50:22 +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
82d3a89e97
Further tweaks though this time they are functionally equivalent.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2499 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 23:33:43 +00:00
Michael Bayne
c045a84703
We want to compare the origin of b not its left and right tiles.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2498 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 22:21:20 +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
abec16cbc1
Assign an ordering based on y position in the absence of any other
...
ordering.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2494 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 20:53:58 +00:00
Michael Bayne
0165cca20a
Make a note of a potentially non-intuitive return value.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2492 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 20:41:13 +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
508e389678
Make the bounds of just our objects available as well.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2489 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-28 20:27:35 +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
a54e01a0fd
Provide estimated travel time.
...
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2473 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-27 03:53:41 +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