Take the 2-minute tour ×

I was wondering if I could get a player sprite effect similar to the one in this video using SDL (without openGL). If not, does anyone know how I might achieve that effect using SDL/OpenGL?

share|improve this question
You probably need to write some sort of class/algorithm that "keys" values( on an imaginary timeline) and interpolates between them using different easing curves. Thats all the advice I could give though. –  Sidar Aug 10 '12 at 12:09
add comment

3 Answers

SDL_gfx is a library which can do the SDL surface scaling and rotation for you. Its documentation is in the section marked "Rotozoomer".

share|improve this answer
add comment

Without OpenGL, you have to do scaling/rotation/etc yourself. Here is one person's implementation: http://www.ferzkopp.net/joomla/content/view/19/14/ . You could however also manually animate it like that

share|improve this answer
add comment

From what I could see from the video, there are several "effects" in play:

  • scaling (by distance)
  • bouncing (possibly with nonuniform scale) animated procedurally
  • white flashes (on hit)

There's nothing that stops you from doing any of the above in SDL. While SDL has some functions for blitting scaled versions, it's probably better to roll your own for your specific needs. This is relatively easy to do.

As for the white flashes, I'd just keep a second copy of the textures that are white.

share|improve this answer
add comment

Your Answer


