Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Allegro vs SDL

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Allegro vs SDL
David Sandberg
Member #2,938
November 2002
avatar

I have used allegro for a little while now and when i look around on the web many tutorials futures SDL.

Which pros and cons are there between allegro and SDL.

Im planing to learn OpenGL in a while.

Shall i go ahead with allegro or shall i switch to SDL.

PS. I like allegro a lot DS. :)

gnolam
Member #2,030
March 2002
avatar

Noooo! Fool! You'll get us all involved in the Allegro vs SDL battle again ;)

Anyway, my $0.02:
If you're using it and you like it - stick with it. If you like something, chances are you'll learn to use it better, and that's what counts in the end.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

nonnus29
Member #2,606
August 2002
avatar

I don't think anyone will argue that Allegro is more "feature rich" than SDL. Allegro supports loading more image formats and one of the biggies SDL leaves out is rotating images. There are no functions in SDL to rotate an image, and with Allegro there is.

In short, use whatever your comfortable with and there is nothing from stopping you from using both (Not in the same project though!)

Matthew Leverton
Supreme Loser
January 1999
avatar

Do a search for "libsdl" on these forums and you'll bring up some discussions. (You cannot search for SDL, as it ignores words 3 characters or fewer.)

The main difference between Allegro and SDL is that SDL is designed only to be a thin layer between hardware and the programmer. This means that Allegro has more features, but that SDL is slimmer.

Allegro and SDL also do some things differently, but they both get it done.

We really cannot tell you which you'll like better. Try them both out and see for yourself.

23yrold3yrold
Member #1,134
March 2001
avatar

Both SDL and Allegro works with OpenGL, by the way. And I'd say Allegro is best for beginners. You can always try out SDL later ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Brian Knudsen
Member #1,852
January 2002

If your looking for alternatives I would suggest ClanLib (clanlib.org) .. its very nice. I would say its much less old school in its approach thus has its pros and cons, because its very diffrent from allegro.

ReyBrujo
Moderator
January 2001
avatar

Ah! A new month! Nice! Thank you! ;)

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

HoopsMan
Member #1,943
February 2002

Clanlib seems to be overkill for the situation (learning OpenGL, etc.), although it is quite feature rich. ;)

SDL supports OpenGL internally (it lets you initialise a OpenGL drawing surface directly) plus has routines to interface with OpenGL builtin. Since, you want to learn OpenGL eventually, it might a be a good option. But then Allegro does have a lot more functionality. Sound, Input devices, etc. can be quite painful to use in SDL. As said before, SDL is a layer between the hardware and you, so you have to write quite a lot of code to make it work.

BTW, the SDL documentation itself has quite a bit of tutorial stuff in it. Download the package and see if it meets your demands.

It's all about requirements. :)

David Sandberg
Member #2,938
November 2002
avatar

I think I'll stay with allegro for a while. I also intend to d/l SDL and have a look.

And thank you all for the answers. This seems to be a good forum that may come in handy many times in the future.
;)

Evert
Member #794
November 2000
avatar

Hmm... I think I should seriously take a look at SDL, just so I can formulate an opinion when this topic comes up again.

Then again, I barely have time to work on my Allegro projects...

Marcello
Member #1,860
January 2002
avatar

SDL has a complete mac port afaik... allegro's is still incomplete (right?)

Marcello

Thomas Harte
Member #33
April 2000
avatar

SDL supports 2d hardware a little better than Allegro, but not enough for anyone I've ever mentioned that to on here to care in practice, whereas Allegro does indeed offer many more "features" in terms of out of the box support for file formats etc. With SDL you get BMP and WAV and not much more. With Allegro you have at least (off the top of my head) LBM, PCX, BMP, TGA, VOC and WAV plus those datafile things that some people seem to actually like. For OpenGL purposes, the only benefit AllegroGL has over SDL is that the usual 2d functions continue to be emulated in GL mode. With SDL you must download an add on library to achieve the same thing. If you're a heavy advocate of modularity as I am, you might prefer to see this as a benefit of SDL over AllegroGL. Case in point : I recently wrote a remake of the old ZX Spectrum game Cannonball, the main reason being to play around with volumetric shadows. My .exe was 8kb. It would have taken about 1 minute to change the code from being SDL based to being AllegroGL based or vice versa. So my real decision was whether I wanted a ~450kb DLL or a ~90kb one.

SDL is probably more popular because it follows market forces. The Allegro developers seem to believe that Allegro has a divine right to exist and that decisions on its future should be made based on what they personally would prefer. If that makes a user unhappy, then that user can go find some other library. For example, take the decision to stick with underscores in function names for the forseeable despite this not being the case in either of the big 2 game related libraries (DirectX and OpenGL), the standard C/C++libraries (stdlib or STL), or almost any other popular game library (I had a glance at ClanLib, CDX, SDL ...)

For the record, SDL has a complete Mac port, and I think I read somewhere either already comes with all new Mac's on the CD that includes GCC, or will in the future. In addition, SDL is bundled with Kylix and the PS2 Linux kit.

Matthew Leverton
Supreme Loser
January 1999
avatar

It would be stupid to try to get into a popularity contest. After all if every lib did everything the same why bother? It's good to see differences in libs - that lets people use what best suits them.

I personally prefer Allegro over SDL (thus allegro.cc and not sdl.cc), but I really don't let that get in the way of recommending to someone to give both a shot.

Here's something: Allegro supports DOS, SDL doesn't. Ok, not that I really even care about that, but some people do. 8-)

Marcello
Member #1,860
January 2002
avatar

SDL can be used on delphi/kylix? Curious...

I have faith that allegro 5 will blow SDL away. ;-) Especially with c++ wrappers I've been messing around with...

Marcello

Thomas Fjellstrom
Member #476
June 2000
avatar

Heh. I think there might be a Delphi binding for SDL. Not sure though...

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Thomas Harte
Member #33
April 2000
avatar

Quote:

It would be stupid to try to get into a popularity contest.

Or, to put it in the thoughts of the developers : it would be stupid to listen to public opinion (we automatically know what is best).

Quote:

After all if every lib did everything the same why bother?

This is indeed probably the route of the problem. In a world where fifteen different incompatible SVGAs existed and games ran in a severely backward OS with no decent hardware interface for this sort of thing, Allegro clearly had a mandate. Now it does not.

It has been questioned by people other than me why Allegro doesn't just have, e.g. an SDL target and therefore concentrate on its benefits over SDL (greater support for file formats, more of the features Shawn thought we might like such as the GUI, etc), instead of trying to compete when there is no reason and in a situation where SDL seems to be winning the popularity contest. The big bonus would be that Allegro would no longer restrict people who want good hardware access by not supporting any hardware which the developers decide we don't want to use.

Since at the end of the day you'd still be able to just download a single Allegro ZIP file, which would compile and offer the Allegro API across all the previous targets and many new ones - although Mac is the only one really significant - I don't see why this is a problem. Maybe after so many years of seeing people reproduce (often simply as a good education for themselves) Pac Man, Space Invaders, Pong, etc ad infinitum they've lost sight of the vast benefits of not unnecessarily splitting the market?

Quote:

Here's something: Allegro supports DOS, SDL doesn't. Ok, not that I really even care about that, but some people do.

Okay. But conversely, SDL supports multithreading, so we can use our modern operating systems in a modern fashion, rather than pretending they are just DOS in new clothing.

Quote:

SDL can be used on delphi/kylix?

As I said, SDL comes with Kylix, so you'd like to think so! Seriously though, from the little I know, I've seen Delphi/Kylix wrappers for most popular C/C++ libraries so I have no doubt you can use Allegro also.

Thomas Fjellstrom
Member #476
June 2000
avatar

SDL comes with Kylix? w0w. ;)

You want a SDL target? You are free to write it, And it'll probably be included. The only reason It doesn't exists Is because noone has needed it badly enough to consider writing it.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Peter Hull
Member #1,136
March 2001

It's really a case of 'you say tomato, I say tomato' (hmm, that doesn't work without sound ;) )
You can take allegro and add some libraries, or take SDL and add other libraries, to end up with the functionality you want (pretty much, no doubt there's something that one or the other won't do)

I do think SDL seems to be used in more commercial products, and maybe is better known. But allegro has a more 'fun' community, that's my opinion.

Thomas H's arguments don't all make sense - Allegro does have a right to exist, for as long as the developers want to work on it. And, they're doing it for free, so it is up to them what goes in, surely. Is the SDL development process more open? I don't know.

For me, I know allegro, and I like allegro.cc. I have no reason to learn SDL.

Pete

Zaphos
Member #1,468
August 2001

Allegro.cc really makes allegro the place to be for a newb. I know I learned huge portions of my programming skill through this community, and have watched many people do the same; allegro users, especially newbies with easy questions, get so much support and help that it's hard not to recommend this lib as a good one to start on.
That, I think, is one of the most compelling pro-allegro arguments.

Thomas Fjellstrom
Member #476
June 2000
avatar

Yup. I learned most of C hacking games and utitlities together with allegro :)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Thomas Harte
Member #33
April 2000
avatar

Quote:

Allegro does have a right to exist

With all due respect, I didn't say that Allegro didn't have a right to exist. I implied disagreement that it has what I would describe as a divine right to exist, and argued that it has no mandate.

Quote:

And, they're doing it for free, so it is up to them what goes in, surely. Is the SDL development process more open?

It is up to them, but that misses the point I was making which is that Allegro has become the less popular option partly because of their decisions. I was mostly interesting in addressing David's observation "when I look around on the web many tutorials feature SDL".

Quote:

You want a SDL target? You are free to write it, And it'll probably be included

This is true, but if I wrote an SDL target for Allegro that still wouldn't mean that I could safely assume the functionality exposed by SDL but not by Allegro was present if I wanted to write what would be considered Allegro applications.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

that still wouldn't mean that I could safely assume the functionality exposed by SDL but not by Allegro was present

Then write that too. nothing complicated there. :) the only reason the Alsa rawmidi driver for allegro (in linux) exists, is becasue I had a need. Look at the AllegroGL project, they saw a need wrote the code, and modified allegro to work with it. Someone just needs a big enough reason to do the work.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

I was making which is that Allegro has become the less popular option partly because of their decisions

But that's what I mean... If you write everything for the majority all the time, then the minority never have anything to work with. Perhaps the developers of Allegro don't like SDL, so they come up with their own lib (Allegro 5).

  • Let's say that SDL is what the majority want, as Thomas is suggesting.

  • Then let's say that the Allegro developers don't like SDL for whatever reason. (If they did like it, they would develop for it.)

Given those two 'facts', it's only logical to assume that Allegro will be different, and most likely less popular.

Just because SDL may have more tutorials - doesn't mean it is more popular. Maybe that just means it's harder to use, and that people don't need as many tutorials for Allegro?

Allegro is more popular than SDL on this site (obviously), so it definately is hitting a fair-sized crowd. Allegro.cc has 250 different people who actively participate (member logon) in the site weekly.

If SDL is more popular than Allegro than I would say that the primary reason is because Allegro started out as a DOS lib and took too long to work well on other platforms (namely Windows). SDL was viewed as a cross-platform lib from the start, whereas some people still think today that Allegro is a DOS only lib.

Basically a lot of words just to say: I think it's good that the libs differ in areas. It gives people more choose that which best fits their style.

vpenquerch
Member #233
April 2000

Listening to public opinion ?
What do you think ?
If you want it, code it. If you don't, you'd be arrogant to expect others to code it how you like.
But you can still voice your opinion, of course, like I do :)

Peter Hull
Member #1,136
March 2001

This is an allegro site after all, so criticism of allegro was never going to be greeted with approval. However, Thomas makes a valid point if he is saying that he would like to contribute his ideas and experience to the project, but is not being recognised. There should be other ways to contribute, not just coding.
I have great respect for the allegro developers and I trust that the decisions they make are as a result of much debate. But I find that following big5 or the forum here to be too confusing. I don't know if there is something like this already, but I would love to see a kind of FAQ laid out like this:
1a.proposal
b.arguments for
c.arguments against
d.decision
2a. ...
Then, people would feel happy that the process was right, and we wouldn't see the same things coming up again and again. And, I could get really excited about Allegro5 :)

Pete

 1   2   3 


Go to: