Allegro vs SDL
#1 Members - Reputation: 482
Posted 30 October 2006 - 09:15 AM
#2 Members - Reputation: 139
Posted 30 October 2006 - 09:36 AM
It is also a matter of preference, I prefer SDL's PREFIX_CamelCase() coding style better than the long_function_name() style.
#3 GDNet+ - Reputation: 914
Posted 30 October 2006 - 04:29 PM
Anyway, I think Allegro and SDL are equally cross-platform. And Allegro does no built-in collision detection and "sprites" beyond normal bitmaps. I've not had a chance to try SDL, but I get the impression Allegro is a bit higher level (whether that's good or bad depends on you). But to be honest, if you know little enough about SDL and Allegro to even ask the question, flipping a coin and picking one is probably your best option. They're equally capable in the long run.
I'll say it again; if you have to ask the question, you're in a place where either one is fine for learning to program and you should just pick one and be done with it. Besides, after learning one, the other will be even easier to learn. Just pick the one you feel most comfortable with using and it'll work.
Jesus saves ... the rest of you take 2d4 fire damage.
#4 Members - Reputation: 482
Posted 31 October 2006 - 11:15 AM
I apologize for asking a question that has burned a hole in your screen. I certainly did search the forums, Google for the topics, and read through the respective home pages. At that point I came to the conclusion that essentially I couldn't determine a preference/difference for the two libraries - much what the answers sate. I thought I must have been missing something, hence my question.
#5 GDNet+ - Reputation: 914
Posted 31 October 2006 - 03:15 PM
Quote:
Original post by kirkd
Thanks for the explanations.
At that point I came to the conclusion that essentially I couldn't determine a preference/difference for the two libraries
Right, and you won't without trying them. [smile] Good luck with whichever one you choose.
Jesus saves ... the rest of you take 2d4 fire damage.
#6 Members - Reputation: 168
Posted 15 November 2006 - 04:46 AM
#8 Anonymous Poster_Anonymous Poster_* Guests - Reputation:
Posted 23 November 2006 - 08:01 AM
#9 GDNet+ - Reputation: 914
Posted 23 November 2006 - 09:36 AM
Quote:
Original post by Anonymous Poster
I made my start on game programming with allegro and I was wondering if sdl was better and it's worth the effort to learn the new api.
Once you've learned one, you should be educated enough to skim the API of the other and make that decision yourself. Always good to keep learning anyway. [smile]
Jesus saves ... the rest of you take 2d4 fire damage.
#10 Members - Reputation: 1245
Posted 23 November 2006 - 11:13 AM
It has no useful graphics (software) rendering routines, no useful sound routines (e.g. mixing), and little by way of useful stuff typically needed.
Therefore, for making a software-rendered app, SDL must be combined with either other libraries, or your own routines to do useful things.
Allegro, on the other hand, provides a great variety of useful things:
- All types of software rendering, including polygons, circles, text, blending and sprites
- All these can rendering into system ram
- Input functions which are higher level
- Sound functions which include mixing
- Data loaders for useful formats (i.e. ones your editor might support)
----
So the comparison isn't really fair at all.
The problem I see is that people use SDL to set up an opengl context, then realise it's arse because they can't then use the software-rendering part of the library (such as exists).
But Allegro is waay more useful.
Neither Allegro nor SDL provide any "Game engine" type framework, object management, collision detection, level loaders etc.
Mark
#11 Members - Reputation: 325
Posted 24 November 2006 - 07:32 AM
Allegro is a slightly higher-level library in that it doesn't make you think so much about which library something comes from and so on. Simple Directmedia Layer is exactly that: a SIMPLE media layer that abstracts many of the concepts away from the libraries that they call.
Also, if you want to use OpenGL plotting functions from SDL, you'll need a wrapper for simple blitting functions as provided in glSDL or hxRender since the OpenGL context is a separate piece of code from the screen rendering code. In Allegro there is an OpenGL wrapper function called AllegroGL that is a wrapper for the Allegro Scene Render software renderer.
It is my hope that someday somebody (maybe me) will write a set of macros that will translate from one to the other or mutually translate them both into OpenGL primatives.
#12 Members - Reputation: 122
Posted 26 November 2006 - 06:49 PM
Quote:
Original post by markr
It has no useful graphics (software) rendering routines, no useful sound routines (e.g. mixing), and little by way of useful stuff typically needed.
Mark
Yes, it does. I could show them too you if you want.
..anyways as long as there's a lib for some functionality for SDL, SDL has said functionality.
#13 GDNet+ - Reputation: 914
Posted 26 November 2006 - 07:32 PM
Quote:
Original post by Taymo
..anyways as long as there's a lib for some functionality for SDL, SDL has said functionality.
Well, by that logic, every library can do everything, since there's always a library you can add [smile] ...
Jesus saves ... the rest of you take 2d4 fire damage.
#14 Members - Reputation: 122
Posted 27 November 2006 - 04:51 PM
Quote:
Original post by 23yrold3yrold Quote:
Original post by Taymo
..anyways as long as there's a lib for some functionality for SDL, SDL has said functionality.
Well, by that logic, every library can do everything, since there's always a library you can add [smile] ...
How so? I said "..as long as there's a lib.." not that there is alway a lib to add. Whatever, I'm probably not explaining my view correctly.
#15 GDNet+ - Reputation: 914
Posted 28 November 2006 - 06:07 AM
Quote:
Original post by Taymo
How so? I said "..as long as there's a lib.." not that there is alway a lib to add. Whatever, I'm probably not explaining my view correctly.
If it doesn't come with SDL, you need to add the library to your project. Confirm/deny?
Jesus saves ... the rest of you take 2d4 fire damage.
#17 Members - Reputation: 1245
Posted 28 November 2006 - 06:56 AM
The problem with needing lots of extra add-on libraries, is that you have to obtain them and get them to build in all of your build environments- which in a 48hr compo is a big strain.
For example, I wanted my game to work on Windows, otherwise lots of people would be unable to play it- I was using SDL_ttf for text, but because of its idiotic build system I had to essentially hack the win32 makefile.
This would have been a bigger problem if I'd used more SDL_* libraries- each one has its own peculiar build environment and its own README which must be read.
Essentially I just prefer Allegro because it's "All under one roof".
Mark






