Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

3 Answers 3

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

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.