View Full Version: SDL or Allegro

C++ Learning Community > Recommended Resources > SDL or Allegro


Title: SDL or Allegro
Description: What do you recommend? Why?


AquaFox - October 2, 2005 12:03 PM (GMT)
Please post the best game for the one you have voted.. I'd like an explanation too if you can. Thnx anyways :D!
(I wanna start using one)

fragspaz - January 23, 2006 07:25 AM (GMT)
i like allegro because i use it
:)

C-Man - January 23, 2006 08:58 AM (GMT)
I learned that SDL is best when using OpenGL and allegro is best for 2D renderings

AquaFox - January 23, 2006 07:04 PM (GMT)
Good, good. So which one is faster?

C-Man - January 23, 2006 08:45 PM (GMT)
allegro

Neken - January 24, 2006 01:12 AM (GMT)
directx ^_^

C-Man - January 24, 2006 09:13 AM (GMT)
1) directx is a nightmare to code (go ahead flame me)
2) is WINDOWS ONLY (i like my code to be open to porting to other platforms)

dr voodoo - January 25, 2006 02:54 PM (GMT)
[offtopic]
QUOTE (C-Man)
(go ahead flame me)

user posted imageC-Man
[/offtopic]

DX is a 3D graphic API and Allegro and SDL are 2D orientated. Already this makes DX harder to use for 2D and I didn't even consider its design.

Allegro is a more high level API then SDL although it does also allow access at the same level as SDL. This makes it very difficult to implement SDL on every platform effeciently. If the graphic card doesn't like pixel putting then you are pretty much out of the game with SDL. Allegro also has better docs.

Under Windows Allegro is superior to SDL.

C-Man - January 25, 2006 03:21 PM (GMT)
well SDL is only good when using with OpenGL
for 2D allegro owns

AquaFox - January 26, 2006 11:38 AM (GMT)
Meh.. I am getting teh confused.. I wanna know which is faster!? Also I'm making a Tetris game with SDL. Do I stop and start with Allegro?
I'm under Windows XP BTW.

C-Man - January 26, 2006 01:39 PM (GMT)
SDL should be sufficient, but Allegro will be faster

aab - January 26, 2006 10:53 PM (GMT)
What about SDL combined with OpenGL, binding textures (unfltered) to quads?

C-Man - January 27, 2006 09:06 AM (GMT)
thats what i'm going to use

FrozenKnight - January 28, 2006 06:32 PM (GMT)
Why not use OpenGL directly like i'm learning to do?

C-Man - January 28, 2006 08:20 PM (GMT)
how is that ?

C00L - January 29, 2006 05:05 AM (GMT)
QUOTE (AquaFox @ Jan 26 2006, 06:38 AM)
Meh.. I am getting teh confused.. I wanna know which is faster!? Also I'm making a Tetris game with SDL. Do I stop and start with Allegro?
I'm under Windows XP BTW.

if your making a testris game speed shouldn't matter that much you could even use gdi for that matter, unless you are making like tetris 3d or something.

FrozenKnight - January 30, 2006 10:24 PM (GMT)
QUOTE (FrozenKnight)
Why not use OpenGL directly like i'm learning to do?

QUOTE (C-Man)
how is that ?


By calling the api in opengl32.dll, glut32.dll & glu32.dll directly. without using any interpreted functions.

C-Man - January 31, 2006 09:07 AM (GMT)
i see

ramirez - January 31, 2006 11:33 AM (GMT)
QUOTE (FrozenKnight @ Jan 28 2006, 06:32 PM)
Why not use OpenGL directly like i'm learning to do?

Even if you use SDL you use OpenGL directly.
SDL doesn't have any wrapper functions for OpenGL API or anything, all it does is handle window creation and such.

FrozenKnight - February 1, 2006 08:45 AM (GMT)
oh sorry i've been learning OpenGL in ASM so i didnt understand. :/

TheDarkJay - February 11, 2006 04:11 PM (GMT)
QUOTE (FrozenKnight @ Jan 28 2006, 06:32 PM)
Why not use OpenGL directly like i'm learning to do

Or use Yagl. I personally use this, it is multi-language (FreeBASIC, C/C++), very fast and very simple. It can be found here

Just check it out, it is very easy to use. Most of the users are FreeBASIC programmers but...it is still VERY good.

NJCatch22 - March 8, 2006 10:54 PM (GMT)
Allegro seems depreceated with the slow development. However, i think it does more for you than SDL, so it's probably easier to use.

You can use opengl with SDL directly while with allegro you need a lib.

But other than that, I don't know.

Another popular choice is clan lib sdk, but I quitted because I couldn't make it to work on dev-cpp.

As for speed, I think they are both slow. Drawing stuff with the software is really painfull, unless you do the dirty rectangle technique. And I think you need to implement it in both libraries. The fastest is to use 3D to do your 2D with textured quads. But wether your doing it with allegro or SDL, it's OpenGL code you'll need to do.

AquaFox - March 11, 2006 04:59 PM (GMT)
Is OGL hard :/?

Viper - March 11, 2006 05:48 PM (GMT)
No..




Hosted for free by InvisionFree