• Advertisement
Sign in to follow this  

Transforming 2D sprite

This topic is 3322 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

k I got my Sprite class done its working with a small moving tile, my concern here: how is a transform from sprite to sprite implemented? - I know a timer is used for animation, but do I Create another sprite that alpha blends in as the other goes out? that's my main guess. or is there another function provided by D3DX? using DirectX 9 with visual studio 2008

Share this post


Link to post
Share on other sites
Advertisement
Your sprite has a texture attached to it. You can pick a small part of the texture to be drawn on the screen. So if you put all the animationframes in 1 texture you can make a loop which picks a part of the texture to be drawn every time.
With the timer you can set the animation speed. (when the frame changes to the next)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement