glob2-devel
[Top][All Lists]
Advanced

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

Re: [glob2-devel] map sizes (was: Minimap algorithm)


From: Leo Wandersleb
Subject: Re: [glob2-devel] map sizes (was: Minimap algorithm)
Date: Sat, 14 Jul 2007 16:55:26 +0200

Hi list

> I think this is only, because this way we address the map faster.
> With "|", "&", "<<" and ">>" we can quickly transform (x,y)
> coordinates to the memory
> address and back.
> Nuage mentioned that accessing memory is by far more time consuming
> than computing
> the address.  So probably "+", "%", "/", "*" are fast enough, and
> arbitrary rectangle maps
> possible.

I vote to not stick with powers of 2 combined with shifting and |&ing and to 
change for arbitrary dimensions with */ing. As mentioned before i once tried to 
hack in smooth transitions in map navigation and failed as only magic powers of 
2 were used and there were even no constants that represented those powers of 2.
plan was: don't manipulate x/y directly with arrow-keys and mmb, but to 
manipulate desiredX/desiredY and then approach these values over time:
x=desiredX*.1+x*.9 (plus some tweaks to get it torrodial). The result would be 
a smooth movement that, especially for the final phase of approaching the 
desired coordinate would be rather slow.

Leo Wandersleb




reply via email to

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