Page 1 of 1

sprite animation, how to "remember" the frames

Posted: Sat Mar 14, 2009 3:36 pm
by Tomdev
ok, so i have my sprite animation working, but now a related question, in my test-animation i had only one sprite so there wasn't a problem but say i have 3 sprites on the screen. i have to keep track of which frame the sprite is showing but what's the best way for doing this. create a info array for each sprite?

Re: sprite animation, how to "remember" the frames

Posted: Mon Mar 16, 2009 6:06 am
by eKid
You should keep data about all of the objects or entities present (containing their animation frames and what not). Then you can translate that data into sprite/rendering data for displaying them.