0
\$\begingroup\$

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?

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – Sidar
    Aug 10, 2012 at 12:09

3 Answers 3

1
\$\begingroup\$

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

\$\endgroup\$
1
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

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.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .