gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > Allegro vs LibSDL

#95429 - Optihut - Sat Jul 29, 2006 11:16 am

Hi,

in this thread tepples suggested to go through the tutorials with the Allegro library.

Checking out the link, I have seen that it is a game programming library, providing functions for graphic, sound, timers and input. Now, that sounded awfully familiar, as I have been looking into using libSDL for my hobby-project game programs.

So, has anyone used both libraries and can make a definite recommendation for one or the other? Just going by the layout of the website, I'd definitely prefer libSDL ;)

Best regards,

Optihut

#95441 - Sausage Boy - Sat Jul 29, 2006 1:50 pm

I prefer SDL, but it's a matter of taste. I've heard that Allegro provides more things to make your life easier and is higher level than SDL, but I havn't played with it much, so I don't know.

Any of them will do fine.
_________________
"no offense, but this is the gayest game ever"

#95474 - MrD - Sat Jul 29, 2006 6:32 pm

Allegro is slightly more quick-and-dirty than SDL. Both are incredibly useful, mind you.
SDL is a little more... professionally planned, I guess you could call it.
They're incredibly similar, because they're designed to do similar things. If you learn the intricacies of one, you can take a step back and use your C/++ knowledge to manipulate either of them or any library you come across in the future. :)
_________________
Not active on this forum. For Lemmings DS help see its website.

#95606 - jake2431 - Sun Jul 30, 2006 3:01 pm

I was looking at allegro and trying to find tutorials for it, but most use a different opperationg system. Are there any tutorials for the api that use windows, devC++, and c as the lanuage? I noticed that J. Harbour's book, Game Programming All in One 2nd edition uses this, but I am worried about using it since others say he used poor programming style in his GBA programming book. Does anyone have anything to say about this book because it would be nice if it used better style.

Also, there seem to be some sdl tutorials, but are there any good ones that use c?

#95642 - sajiimori - Sun Jul 30, 2006 5:45 pm

SDL is a C API, so tutorials will be in C by default.

Both Allegro and SDL are meant to be portable, so you shouldn't need tutorials that are specific to Win32 or a particular compiler.

Consider it a prerequisite to know how to use Windows, DevC++, and C (if that's your environment) before you get into SDL or Allegro.

#95703 - tepples - Sun Jul 30, 2006 8:06 pm

Dev-C++ is just an editor. The programming will be the same whether you use Visual Studio, Dev-C++, Programmers Notepad, or Emacs as your editor. The setup to get Hello World might differ, but that's about it. The Allegro library also hides differences among platforms (linux, windows, mac).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#96572 - edwdig - Thu Aug 03, 2006 10:41 pm

SDL's design looks a little cleaner than Allegro's, however, Allegro has a lot more functionality in the box. With SDL, you're going to end up needing to find a bunch of support libraries to make a full game. To me it seemed quicker and easier to get something going with Allegro, so I went that way.

Also, if you care, Allegro is a little more free than SDL. SDL is LGPL, whereas Allegro's license is "do whatever you want with it, we don't care at all."

#96978 - jake2431 - Mon Aug 07, 2006 3:32 am

Okay, I have been on vacation for the last week so I just go to see the replies. Okay, so the SDL API is a C API, but what I was asking is are there any tutorials this organized that use C: http://lazyfooproductions.com/SDL_tutorials/index.php? And I realize that DevC++ is just an editor, but I have had trouble setting up editors to use these api's before and wanted a DevC++/Win32 specific tutorial so that I know for sure that I can get it to work. And yes, I know how to use Windows, DevC++, and C (I don't know everything about the last two, but I know a good bit). The thing is, I don't have much experience with complicated API's so a lot of using them is still a mystery to me and that is why I need a good indepth tutorial.

#97004 - keldon - Mon Aug 07, 2006 10:25 am

Setting up SDL on windows was a bitch. Makefiles didn't work properly. You can do it with dev c++ quite easily using the built in package installation. The only problem is how it handles the makefiles. And it compiles SDL really slow... but it works!!! Having said that I may have been using additional libraries for compatibility with uni.

#97006 - Dwedit - Mon Aug 07, 2006 10:35 am

My opinion: Use allegro. The only thing I don't like about allegro is that it tries to stick on a special main function, which can be overridden with a special switch.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#97048 - jake2431 - Mon Aug 07, 2006 5:18 pm

Okay, thanks guys. I will work with Allegro as soon as I get a chance.