Sign in to follow this  
steven31dd

Transforming 2D sprite

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this