Sign in to follow this  
GenuineXP

SDL Sprite Class...?

Recommended Posts

Thanks to some help earlier, I've got SDL up and running with my IDE (Code::Blocks). Thanks again to those that helped me! :-) Anyway, I was wondering where I could find a library with sprite classes for SDL. I've followed a few tutorials, but I was wondering if a comprehensive library exists. I followed the tutorial for creating a sprite class on Cone3D, but I'd like to be able to use different file formats and omit the "info" file. It would be nice if I could load GIF and PNG files or create an animation from a bitmap. Also, would it be possible to use Win32 API functions to collect bitmap data and then display those bitmaps using SDL? Just curious. :-) Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by GenuineXP
Anyway, I was wondering where I could find a library with sprite classes for SDL. I've followed a few tutorials, but I was wondering if a comprehensive library exists.


I haven't used it, but you could take a look at the Kyra Sprite Engine.

Quote:
I followed the tutorial for creating a sprite class on Cone3D, but I'd like to be able to use different file formats and omit the "info" file. It would be nice if I could load GIF and PNG files or create an animation from a bitmap.


Take a look at SDL_image for laoding from GIF or PNG - it's really easy to use.

Awhile ago I wrote a class that might be useful for sprites, - it has some basic animation in the demo app. You can get it here. I wouldn't use it in production code, as it's just something I threw together in an afternoon, but it might give you some ideas.

Share this post


Link to post
Share on other sites
Thanks, I'll check out that Kyra Sprite Engine. :-)

Sorry 'bout my stupid bitmap, GIF, and PNG question. I guess next time I should take a look at the functions in the documentation first. :-P

Thanks again.

Share this post


Link to post
Share on other sites
SDL_image is a separate library than SDL, so it's not covered in the SDL docs. You need to download it separately from SDL.

As for the Win32 API bitmap questions, I don't currently have windows installed on any of my computers, so I can't really help there - sorry.

Share this post


Link to post
Share on other sites
There's also Spriteworld X, which is a port of the mac sprite library Spriteworld to SDL. It looks like the port is still in alpha, but years ago I did some mac dev with Spriteworld and it was well written and quite powerful.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this