SDL vs Allegro

Apologies for posting what’s probably a controversial topic, but I was curious
and didn’t have much luck searching the site.

I’m writing a 2D tile based game with heavy animation, in allegro, and it’s
running slower than I’d like, even though it’s pretty well optimised. Is there
any real advantage to switching to SDL?

I really don’t want to start a flame, or bring up a dead topic - even just some
quick links to answers or benchmarks would be appreciated. Thanks.

Hi there.

I just have some Ideas…
It depends on the SO you are using (remember that in
M$-architecture SDL takes advantage of hw accel even
for 2D blitting, but not in Unix-like SOs because the
way X were built does not make it possible, so you
have to use OpenGL, wich is faster anyway).
Sorry, I do not have any benchmark info about
SDLxAllegro, but, you can build one, like, basic
operations your game uses, you can take some of then
and make a batch test, like printing on a file the fps
for one and another and give a look, something like
"operation=blitting from offscreen : FPS="

It is just ideas, I hope I helped.

J. Inacio Ferrarini
J2EE / J2SE Programmer
Extreme Softwares

— Chaotic Harmony
escreveu:> Apologies for posting what’s probably a

controversial topic, but I was curious
and didn’t have much luck searching the site.

I’m writing a 2D tile based game with heavy
animation, in allegro, and it’s
running slower than I’d like, even though it’s
pretty well optimised. Is there
any real advantage to switching to SDL?

I really don’t want to start a flame, or bring up a
dead topic - even just some
quick links to answers or benchmarks would be
appreciated. Thanks.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Yahoo! Mail - Agora com 250MB de espa?o gratuito. Abra
uma conta agora! http://br.info.mail.yahoo.com/

Apologies for posting what’s probably a controversial topic, but I was curious
and didn’t have much luck searching the site.

I’m writing a 2D tile based game with heavy animation, in allegro, and it’s
running slower than I’d like, even though it’s pretty well optimised. Is there
any real advantage to switching to SDL?

I really don’t want to start a flame, or bring up a dead topic - even just
some
quick links to answers or benchmarks would be appreciated. Thanks.

both libs achieve much the same, but take slightly different approaches.
as someone else has said, the only true test is to try it in both.
be aware that any test you do or any other single persons tests will be
influenced by their specific hardware/driver combination, which means any
specific test is not worth much… and generic tests on lots of hardware
will not satisfy you much either.
a good game design is more of an influence than the difference between
Allegro & SDL.

Not to be picky or trying to make you feel stupid. But you do mean OS,
right?

/ Daniel> ----- Original Message -----

From: jinacio3@yahoo.com.br (J Inacio)
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Friday, December 03, 2004 12:54 PM
Subject: Re: [SDL] SDL vs Allegro

Hi there.

I just have some Ideas…
It depends on the SO you are using (remember that in
M$-architecture SDL takes advantage of hw accel even
for 2D blitting, but not in Unix-like SOs because the
way X were built does not make it possible, so you
have to use OpenGL, wich is faster anyway).
Sorry, I do not have any benchmark info about
SDLxAllegro, but, you can build one, like, basic
operations your game uses, you can take some of then
and make a batch test, like printing on a file the fps
for one and another and give a look, something like
"operation=blitting from offscreen : FPS="

It is just ideas, I hope I helped.

J. Inacio Ferrarini
J2EE / J2SE Programmer
Extreme Softwares

— Chaotic Harmony
escreveu:

Apologies for posting what’s probably a
controversial topic, but I was curious
and didn’t have much luck searching the site.

I’m writing a 2D tile based game with heavy
animation, in allegro, and it’s
running slower than I’d like, even though it’s
pretty well optimised. Is there
any real advantage to switching to SDL?

I really don’t want to start a flame, or bring up a
dead topic - even just some
quick links to answers or benchmarks would be
appreciated. Thanks.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Yahoo! Mail - Agora com 250MB de espa?o gratuito. Abra
uma conta agora! http://br.info.mail.yahoo.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

DAMiEN wrote:

Not to be picky or trying to make you feel stupid. But you do mean OS,
right?

Yes, he does.
By the end of his email I can see he’s Brazilian, like me, and Operating
System (OS) is Sistema Operacional (SO) here, hence the typo :wink:

[]s

Adilson.

Hi there,

Sorry if I was not that clear, but, you have to take into consideration that the OS
is important.
(Sorry if I put SO, not OS, because in Portuguese (my 1st language), it is “SO” and sometimes I forgot when I write in english).

Thanks for the review :stuck_out_tongue:

See you,–
Jos? In?cio
Programador J2EE / j2SE
Extreme Softwares

On Fri, 3 Dec 2004 21:34:33 +0100, DAMiEN <damien_ at hotmail.com> wrote:

Not to be picky or trying to make you feel stupid. But you do mean OS,
right?

/ Daniel

----- Original Message -----
From: “J Inacio” <@J_Inacio1>
To: "A list for developers using the SDL library. (includes SDL-announce)"

Sent: Friday, December 03, 2004 12:54 PM
Subject: Re: [SDL] SDL vs Allegro

Hi there.

I just have some Ideas…
It depends on the SO you are using (remember that in
M$-architecture SDL takes advantage of hw accel even
for 2D blitting, but not in Unix-like SOs because the
way X were built does not make it possible, so you
have to use OpenGL, wich is faster anyway).
Sorry, I do not have any benchmark info about
SDLxAllegro, but, you can build one, like, basic
operations your game uses, you can take some of then
and make a batch test, like printing on a file the fps
for one and another and give a look, something like
"operation=blitting from offscreen : FPS="

It is just ideas, I hope I helped.

J. Inacio Ferrarini
J2EE / J2SE Programmer
Extreme Softwares

— Chaotic Harmony
escreveu:

Apologies for posting what’s probably a
controversial topic, but I was curious
and didn’t have much luck searching the site.

I’m writing a 2D tile based game with heavy
animation, in allegro, and it’s
running slower than I’d like, even though it’s
pretty well optimised. Is there
any real advantage to switching to SDL?

I really don’t want to start a flame, or bring up a
dead topic - even just some
quick links to answers or benchmarks would be
appreciated. Thanks.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Yahoo! Mail - Agora com 250MB de espa?o gratuito. Abra
uma conta agora! http://br.info.mail.yahoo.com/


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi,

I “love” SDL, but I am also looking around for alternatives!
so the question is…

Why should I continue using SDL instead of Allegro?

I don’t have the time to learn Allegro as deep as I know SDL 1.2.11,
and I know that SDL 1.3 is coming, but…

I have seen that Allegro goes with a lot of native routines (GUI, font etc).

Is there someone that have tested both Allegro and SDL (+SDL standard libraries
like SDL_mixer, SDL_net, SDL_graph, ecc)?

Is there someone that could give me some informations about where Allegro is
better than SDL and where SDL is better than Allegro?

In particular…

  • is Allegro more efficient in 2D blitting without hardware acceleration?
  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?

Thank you for your time, and excuse me for my English

Guido

Name SDL or Allegro game in which it matters on current hardware.On 8/6/07, Guido Billi wrote:

  • is Allegro more efficient in 2D blitting without hardware acceleration?


Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from
http://decopter.sf.net

From what I can see scanning over the docs, Allegro would be completely insufficient for most 3D games. I see no OpenGL support, and the little 3D support I do see is very simple and limited.

Of course, if you’re just implementing a 2D game, it might be just as good. I wouldn’t know. I pretty much stick to 3D.

Allegro has AllegroGL, another GLContext like SDL-GL.

According to the original question, i don’t see important differences
between both libraries. It’s just a matter of taste. Some people think
Allegro is easier and better for newbies, but i don’t think so, SDL is not
really difficult. And about perfomance, it depends on hardware. If you are
worried about tiny perfomance differences it would be better to make a test
by yourself.On 8/6/07, Mike Powell wrote:

From what I can see scanning over the docs, Allegro would be completely
insufficient for most 3D games. I see no OpenGL support, and the little 3D
support I do see is very simple and limited.

Of course, if you’re just implementing a 2D game, it might be just as
good. I wouldn’t know. I pretty much stick to 3D.


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

Jacek Poplawski <jacekpoplawski gmail.com> writes:

Name SDL or Allegro game in which it matters on current hardware.

I don’t care about “current” hardware! :slight_smile:
It matters for my (pretty old) Toshiba laptop! :slight_smile:

That’s all.

I want to develop a free 2D game client with same (and I hope lower) hardware
requirements of the original game client. The client was pretty old so I don’t
care about “new” hardware.

Please don’t let’s talk about my motiviations…

answer me only about my original question :slight_smile:

Thanks, Guido

answer me only about my original question :slight_smile:

I like playing new Linux games and - from the end user point of view - I
usually know that games that depend on SDL work out of box correctly, and
games that depend on Allegro can be strange and can have problems (it can be
hardware or distro specific), that’s why I always use SDL in my programs,
and never tried to learn Allegro.On 8/6/07, Guido Billi wrote:


Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from
http://decopter.sf.net

I once tried allegro (Is about a year ago) and i found that 2D graphics have
been much faster (blitting) than in SDL. But perhaps my program was not so
good. I Think that allegro is very easy to learn and the best point is, that
a Font Lib is built in. But i like SDL and Allegro.

2007/8/6, Jacek Poplawski :>

On 8/6/07, Guido Billi wrote:

answer me only about my original question :slight_smile:

I like playing new Linux games and - from the end user point of view - I
usually know that games that depend on SDL work out of box correctly, and
games that depend on Allegro can be strange and can have problems (it can be
hardware or distro specific), that’s why I always use SDL in my programs,
and never tried to learn Allegro.


Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from
http://decopter.sf.net


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

Thomas Schober <thomas.schober gmail.com> writes:

I once tried allegro (Is about a year ago) and i found that 2D graphics have
been much faster (blitting) than in SDL. But perhaps my program was not so
good.

this the kind of informatoins I am looking for…
what kind of program was?

Why should I continue using SDL instead of Allegro?
Because you like it and is used with it
(And why should you test Allegro? - Because you are curious and want to learn
new things).

I have seen that Allegro goes with a lot of native routines (GUI, font etc).
The GUI has Atari-look and is in my opinion not very powerful, but like for
SDL there are some addons.
The font is simple, easy and powerful, however, it has no support for scalable
fonts. But once again, like for SDL there are addons…

Is there someone that could give me some informations about where Allegro is
better than SDL and where SDL is better than Allegro?
In my opinion the documentation (including the big number of examples) is good
in Allegro. For that reason I’ve introduced Allegro for students at the
University (in game programming projects).

  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?
    I have noticed that the overhead for a bitmap is quite big. For small sprites
    the size of the overhead overshadow the actual pixel data in memory bitmaps.
    I have not compared to SDL Surfaces though, I might be the same.
    It has turned out that the “sub bitmap” concept is very useful.

In general I can’t recommend one before the other, you have to spend some
hours playing with Allegro to find your own opinion.On Mondayen den 6 August 2007, Guido Billi wrote:

Christer

2007/8/6 Guido Billi

this the kind of informatoins I am looking for…
what kind of program was?

I wrote a Mapeditor for a 2D RPG, which worked in the following way. I
painted a Bitmap, where one pixel stands for a Map Tile. I detected the
color of the pixel first, then i looked for which tile this color is
standing. After that i blitted the maptile. It was a very big map with
scrolling.
In Special for scrolling the blitting was much faster in allegro. But as i
said, i am not sure that i implemented it all correct in SDL, perhaps it is
possible to get out the same speed in SDL when doing it an other way.

2007/8/6, Christer Sandberg <christer.sandberg at mdh.se>:>

On Mondayen den 6 August 2007, Guido Billi wrote:

Why should I continue using SDL instead of Allegro?
Because you like it and is used with it
(And why should you test Allegro? - Because you are curious and want to
learn
new things).

I have seen that Allegro goes with a lot of native routines (GUI, font
etc).
The GUI has Atari-look and is in my opinion not very powerful, but like
for
SDL there are some addons.
The font is simple, easy and powerful, however, it has no support for
scalable
fonts. But once again, like for SDL there are addons…

Is there someone that could give me some informations about where Allegro
is
better than SDL and where SDL is better than Allegro?
In my opinion the documentation (including the big number of examples) is
good
in Allegro. For that reason I’ve introduced Allegro for students at the
University (in game programming projects).

  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?
    I have noticed that the overhead for a bitmap is quite big. For small
    sprites
    the size of the overhead overshadow the actual pixel data in memory
    bitmaps.
    I have not compared to SDL Surfaces though, I might be the same.
    It has turned out that the “sub bitmap” concept is very useful.

In general I can’t recommend one before the other, you have to spend some
hours playing with Allegro to find your own opinion.

Christer


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

And another thing you all forgot - Allegro supports the good ol’ DOS! :smiley:

Christer Sandberg wrote:> On Mondayen den 6 August 2007, Guido Billi wrote:

Why should I continue using SDL instead of Allegro?

Because you like it and is used with it
(And why should you test Allegro? - Because you are curious and want to learn
new things).

I have seen that Allegro goes with a lot of native routines (GUI, font etc).

The GUI has Atari-look and is in my opinion not very powerful, but like for
SDL there are some addons.
The font is simple, easy and powerful, however, it has no support for scalable
fonts. But once again, like for SDL there are addons…

Is there someone that could give me some informations about where Allegro is
better than SDL and where SDL is better than Allegro?

In my opinion the documentation (including the big number of examples) is good
in Allegro. For that reason I’ve introduced Allegro for students at the
University (in game programming projects).

  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?

I have noticed that the overhead for a bitmap is quite big. For small sprites
the size of the overhead overshadow the actual pixel data in memory bitmaps.
I have not compared to SDL Surfaces though, I might be the same.
It has turned out that the “sub bitmap” concept is very useful.

In general I can’t recommend one before the other, you have to spend some
hours playing with Allegro to find your own opinion.

I “love” SDL, but I am also looking around for alternatives!

Of course, asking on the SDL list you’ll get lots of people who like SDL.
SDL is simpler and more low level. Allegro works with a sprite design,
and has more utility functions for games. SDL is designed to set things
up and get out of your way.

A lot of the choice is personal preference. If you like to work at a low
level, then SDL is the right place for you. If you want to work at a higher
level, Allegro is a good alternative, as well as Clanlib. If you just like
SDL, you can find lots of libraries that use SDL to provide more functionality
on the libraries page, and pygame is a great option if you like Python.

As far as speed goes, the sprite approach is easier to hardware accelerate,
and SDL 1.3 is getting some improvements to the API to make it easier to
take advantage of 3D hardware when writing a 2D game.

Both libraries have hundreds of games written for them, both libraries have
their fans. :slight_smile:

  • is Allegro more efficient in 2D blitting without hardware acceleration?

No, as far as I know SDL still has the best software blitters. It’s not
a huge difference, but if you’re trying to make every cycle count, I think
SDL is slightly faster working entirely in software surfaces.

If you’re working with OpenGL, SDL sets up a context and gets completely
out of your way, so you’re talking directly to the OpenGL API on the 3D
hardware at that point.

  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?

My impression is that SDL surfaces have slightly less overhead.

In the end, these days it doesn’t matter that much which library you use.
SDL has sligntly better distribution support and is lower level, Allegro
and other libraries have their own advantages and disadvantages. Play
with the a little and see which one you prefer! :slight_smile:

Also, if you want something even higher level, I’ve heard good things
about Pygame: http://www.pygame.org

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment

Sam Lantinga <slouken devolution.com> writes:

  • is Allegro more efficient in 2D blitting without hardware acceleration?

No, as far as I know SDL still has the best software blitters. It’s not
a huge difference, but if you’re trying to make every cycle count, I think
SDL is slightly faster working entirely in software surfaces.

ok… good to hear…

  • are Allegro bitmaps less expensive than SDL Surfaces about RAM usage?

My impression is that SDL surfaces have slightly less overhead.

ok… good to hear…

Thank you very much uncle Sam :smiley:

I’m curious about Allegro’s portability, versus SDL’s. I write an SDL game
for Linux, and eventually, it lands on some OS I’ve never even heard of…
which is awesome. SDL’s light weight probably attributes to its portability.
Is Allegro as portable? (I’m talking: QNX, MorphOS, PlayStation Portable,
Nintendo DS, GP2X, Maemo, Zaurus, Dreamcast, et cetera)

-bill!On Mon, Aug 06, 2007 at 08:02:01AM -0700, Sam Lantinga wrote:

Of course, asking on the SDL list you’ll get lots of people who like SDL.
SDL is simpler and more low level. Allegro works with a sprite design,
and has more utility functions for games. SDL is designed to set things
up and get out of your way.