Archived

This topic is now archived and is closed to further replies.

graphic unit movement -> tile movement

This topic is 5974 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok, lets say i have tiles at the size of 30 pixel, k? now, when i want to move my unit from one tile to another, basically, i move it from one tile to the other but graphically, the unit moves 30 pixels at once? so i thought about making a "progress" variable in the unit struct, and compute it every time i have to render... ideas to make this in a better way? Gil Micro$oft beta testing: "Does the splash screen works? SHIP IT!!!"

Share this post


Link to post
Share on other sites
Explain please:

so i thought about making a "progress" variable in
the unit struct, and compute it every time i have to render...

I''m sorry but I just have no clue what you''re trying to say here. Try to use more complete thoughts b/c I haven''t seen any code I need more of an understanding of what you''re trying to do.


"this one time at computer camp..."

Share this post


Link to post
Share on other sites
why not have the units be able to be between tiles all the time?
use fixed point numbers, it would be fast and simple.
just have have something like 11 bits for the tile and 5 for subtile movement, but then 32 is a better tile size, that way you can bitshift stuff simply.

or you could just count the unit position in pixels.

or do something that fits your program better.

the way to find a good solution for this kind of stuff is to TRY all the posibilities, if it works awful then rewrite it untill it works perfect, and try different stuff too.

Share this post


Link to post
Share on other sites