graphic unit movement -> tile movement
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!!!"
[email=gil@gilzu.com]Gil Zussman[/email]Check out Goose Chase, Coming this fall!http://www.gilzu.com
Come on...
doesnt anybody know?
Gil
Micro$oft beta testing:
"Does the splash screen works? SHIP IT!!!"
doesnt anybody know?
Gil
Micro$oft beta testing:
"Does the splash screen works? SHIP IT!!!"
[email=gil@gilzu.com]Gil Zussman[/email]Check out Goose Chase, Coming this fall!http://www.gilzu.com
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..."
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..."
--my site
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement