glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[glob2-devel] drawing unit paths when only destination is displayed (was


From: Joe Wells
Subject: [glob2-devel] drawing unit paths when only destination is displayed (was: to-do before 1.0)
Date: Sat, 28 Jul 2007 01:35:59 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

"Kai Antweiler" <address@hidden> writes:

>> >* Small details on how "t" ("draw unit paths") works are not essential to
>> fix before 1.0.
>>
>> It should be easy to fix though. Maybe 1-2 lines. The 5-10 mins spent on
>> this is nothing compared to the amount of time people will try to figure out
>> why they cant trace origin to destination because the lines keep going :P
>> This stays :P
>
> We don't know which resources will be targeted.  We only estimate which 
> resource
> will be.  If we want this estimated resources to draw lines, we have
> to estimate these
> resources for every glob!  Right now we only have to estimate for
> every visible glob.
> I guess this is a huge speed difference.

This reasoning is (unfortunately) flawed.

The destinations need to be calculated to decide where each globule
will next move, regardless of whether the globule is currently
displayed.  And the destinations are rarely recalculated, so for
display purposes the information can just be used and does not need to
be calculated.

The reason why it is tough to draw the lines when only the destination
is on the screen is that glob2's internal data structures are not
organized that way.  The information on globule destinations are
stored with the globules, not with the destinations.  So showing the
unit paths when only the destination is on screen requires scanning
all globules, no matter where they currently are on the map.  What is
currently done for drawing unit paths only requires scanning globules
that are currently displayed, which is much less expensive.

I hope this explanation is useful to someone.

-- 
Joe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]