[SDL] Re : animation lib strategy

julien CLEMENT clementj2005 at yahoo.fr
Tue Dec 16 01:16:43 PST 2008


Hi Rick,

Nice idea. There're existing library to do what you want already. But I admit it's not a reason for not providing another tool :)
I'm thinking about the Kyra sprite engine:
http://www.grinninglizard.com/kyra/

And, of course, any other library referenced on http://www.libsdl.org/libraries.php
It's not that easy to start from scratch, watching what the others have done can be a good starting point, and maybe avoid wasting time.

As for parallax problems, I did a special library called SDLayer (or SDL_Layer, I didn't fix a name). It compiles on Linux, Windows and Mac OS X. You can grab the source code at:
http://code.google.com/p/sdl-layer/

It may not do exactly what you want. Its main purpose is to manage different levels (layers / planes) of display without you to bother with projections and refresh rectangles, which can be tedious when each plane/layer has its own scrolling factor (parallax).
There're 2 demos showing what it can do.

Let me know if it can be of some interest. All you need is SDL 1.2 and SDL_image for the demos only.
I'm also working on a low level sprite library which manages pools of graphical objects moving on the screen, and having no mechanism whatsoever for animation. We can talk about it if you want.

Regards,
Julien

--- En date de : Mar 16.12.08, Rick R <rick.richardson at gmail.com> a écrit :
De: Rick R <rick.richardson at gmail.com>
Objet: [SDL] animation lib strategy
À: sdl at lists.libsdl.org
Date: Mardi 16 Décembre 2008, 2h45

Are there any docs or sample code for SDL 1.3 on best practices for creating a cross platfrom animation library? 
My primary targets are win32, linux and iphone. 
It's purpose would be creating basic sprite motion, gui type objects, as well as parallax scrolling. 

I'm rather new to 2d programming and there seems to be quite a few ways to light up pixels. Should I blit/clip? Or should I draw directly to the surface? 

Also, is such functionality wrapped by SDL on the iphone? Because it would appear that the demos such as fireworks call OpenGLES directly. 


Last question, where is the best place to find docs on the 1.3 stuff? It doesn't appear that the docs feature the 1.3 functions. 

Sorry for the barrage of questions. I'm just getting in to this stuff and it can be a tad overwhelming :)

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20081216/acc4a14a/attachment.htm>


More information about the SDL mailing list