Sign in to follow this  
Alexander311

What is the best 2D library?

Recommended Posts

Alexander311    122
In terms of both simplicity and lack of compatibility issues, what is the best for doing 2D games? DirectX, OpenGL, Allegro, ...? I learned how to do 2d stuff in DirectX a while ago, but I've found that there are some issues with direct draw nowadays. Apparently, it's no longer a directx component. Thus, I have to learn something new that will hopefully last many years. I am looking to create games that are not too graphically intensive. I don't want to deal with weird bugs due to technical reasons I don't understand. What is a nice, simple library that I should learn? Any advice?

Share this post


Link to post
Share on other sites
PnP Bios    494
Probably Allegro if you want ease,
SDL and OpenGL for speed. But if you use these two, you run a risk of comming up with those weird errors.

Allegro also does windowing and text, along with 2d shapes. You can't go wrong with that.

Share this post


Link to post
Share on other sites
Drew_Benton    1861
Another vote for SDL & co. There are numerous packages avaliable for it so you can get the most out of your game.

Quote:
I don't want to deal with weird bugs due to technical reasons I don't understand.


This will happen with SDL if you are not careful [wink]

Share this post


Link to post
Share on other sites
fireside    122
I'll put in a plug for clanlib while I'm here. Clanlib is oriented toward c++, rather than c. It has resource management using xml files, which is pretty cool. It has a fantastic sprite library with ping pong/loop etc settings plus times for how often the frames change. You can set these in the xml file and forget about them, you can also change them without even recompiling. There are 2 tutorials and many example programs to get started.

Share this post


Link to post
Share on other sites
chad_420    290
Quote:
Original post by PnP Bios
Probably Allegro if you want ease,
SDL and OpenGL for speed. But if you use these two, you run a risk of comming up with those weird errors.

Allegro also does windowing and text, along with 2d shapes. You can't go wrong with that.



Hopefully you are saying faster to program with. I hope you arent trying to say that SDL or Allegro is faster than the other, They're both just directx wrappers underwindows.

Share this post


Link to post
Share on other sites
philipptr    260
Quote:
Original post by Brice Lambson
SDL + SDL_image + SDL_gfx


without opengl? i started an sdl project without sdl and came up with >250 blittet images per frame and a resolution of 640*480 and with 70 fps with a 2.8ghz cpu its imo too slow.

Share this post


Link to post
Share on other sites
Necrosis    150
I'd say give allegro a quick whirl. In about a day through a googled tutorial I had about the same abilities as over half of my DirectDraw book. Havent been using it enough to know how the performance is yet, and with all the people using allegro and sdl, I'm sure they can remain solid semi-long term solutions for 2d development. And it's so unbelievably easy and quick to learn that it's worth trying.

I'd like to get my hands on high level wrappers that does it's 2d through D3D with those D3DX things (sorry, it's been awhile) for the added 3d hardware acceleration and other features :P

Share this post


Link to post
Share on other sites
PnP Bios    494
Quote:
Original post by chad_420
Quote:
Original post by PnP Bios
Probably Allegro if you want ease,
SDL and OpenGL for speed. But if you use these two, you run a risk of comming up with those weird errors.

Allegro also does windowing and text, along with 2d shapes. You can't go wrong with that.



Hopefully you are saying faster to program with. I hope you arent trying to say that SDL or Allegro is faster than the other, They're both just directx wrappers underwindows.


I'm prety sure that allegro is just a pinch faster under windows. And here is why. SDL Hasn't updated their Direct Draw handling code quite some time. Hell, it's still based off of DX6. In many cases, using software surfaces are faster than hardware ones. That's kinda wrong.

Allegro, I think, uses atleast Direct Draw 7. And by doing that alone, they got a bunch of performance.

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