SDL vs Allegro

Hello !

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

It runs on DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows,
QNX, BeOS und MacOS X.


I’m curious about Allegro’s portability, versus SDL’s. I write an SDL


I’ve been using Allegro for quite some time before i ‘switched’ , or
better said, began to ‘test’ SDL.

My experience with Allegro is that it is ‘easy’ to learn, it is less
abstract then SDL. Though once you’re used to SDL you might think
allegro even has some overhead.

Allegro gives you a bunch of routines as default, while in SDL you
have to ‘program’, er, i mean copy/paste them yourself (like getpixel,

Both have extentions.

I found Allegro harder to port to another OS (especially if you use
extentions!). With SDL i have no trouble compiling my program on
Windows, Mac or Linux, and with no hassle at all.

The Allegro extentions are most of the time Windows compatible only.
Linux is supported in a great depth as well, but for a Mac you’ll have
to try it yourself before knowing. (Though i read somewhere there is a
new version, which has improved Mac support).

All in all, just try it. I wonder if there is any 'allegro like layer’
for SDL. I found myself writing some routines which i found in Allegro
as default.

Stefan Hendriks

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

dos is horribleOn Mon, 06 Aug 2007 10:36:14 -0400 “Leo M. Cabrera” wrote:

Hello !

dos is horrible

I really don’t want to feed the trolls.

For me DOS was wonderfull in these days.

Okay it had no Multitasking and other
features, but it had some nice paradigms
that even todays OSes like Mac OS X

The installation of a complete app in one
directory for example, making it easy to delete
the app or game in the end.


I once tried allegro (Is about a year ago) and i found that 2D graphics
have been much faster (blitting) than in SDL.

Possibly SDL was converting your surfaces on the fly.

I don’t know what Allegro does, but if you preconvert your surfaces
before blitting, they usually turn into memcpy() calls in SDL.

If you can’t, most conversions have optimized MMX/Altivec/etc code.


A long time ago (7 or 8 years ?) I started working on a 2D tiling engine for
some simple games I was gonna write. Had the tiling engine done and a bunch
of other stuff… and chose to go with Allegro since it had dos & linux
support. It’d load maps and tile them and ya could scroll around and all
that goodness.

A few years ago, as an introduction, I re-implemented the tiler in SDL.
Speed was good, it was easy to do… basically everything was good. I’ve
since done some work with SDL on WinCE with only minimal hassles. The tiler
ported to linux from win32 with no problems, although I’ve not tried it
under CE due to the fact it’s not really designed for it (32x32 tiles on a
240x320 screen is… meh).

Allegro’s built in basic UI functionality is kind of nice, but there are
several UI libs for SDL that are capable and simple. It didn’t take me long
to write a basic map editor in Allegro, so that’s a testament to it’s
simplicity. Since that time, I’ve realized that some RAD tool is more
appropriate for things like map editors for my games, so VB, RealBasic, etc
are my ‘compilers’ of choice for those projects.

There are plenty of add on libraries for SDL that will provide similar
functionality to what you can get out of Allegro. As such, if you wish to
use SDL as a higher level library (rather than playing with pixel data etc),
you can get the add on libs and enjoy blissful obliviousness of the workings
under the hood.

Both libraries are good, but for my needs, SDL is more appropriate… and
apparently more easily multiplatform.

-WillOn 8/6/07, Ryan C. Gordon wrote:

I once tried allegro (Is about a year ago) and i found that 2D graphics
have been much faster (blitting) than in SDL.