[SDL] Character animation with SDL
skjelten at pvv.org
Fri Mar 16 07:34:54 PST 2001
I'm currently working on a game that is quit similar to "Prince of Persia 1/2"
when it comes to character movement & level design. Unfortunately, I've got
some questions that I can't figure out my self:
* How can I best store an character animation?
One animated gif for walking, one for running, one for jumping......
or should I use one large image and blit out the rects for each frame to
or should I ........
If I should use one large image, what is the most efficient way:
1. Make an SDL_Rect-array and blit from the large image to the screen
2. Make one SDL_Surface for each frame and then blit each frame to
* A friend once told me that modern pc's have a special memory in the
graphic hardware that automaticly pasted sprite graphics to the screen.
This means that if I want to move a sprite - I only need to change the
coordinates to it (don't need to care about refreshing background etc.).
It made it extra easy for spritecollision-dection too. Is this correct?
* Any advice on how to make a nice & powerful level editor? Basic
concepts I should know about? Source code to read?
I should probably spend some more time one Abuse's source code, but it's
written in C++ (and I use C) ....
If anyone take the time to share some ideas it would be great!
More information about the SDL