Thread: SDL vs. Allegro ( Which is better for screen graphics, keystrokes, and maybe sound )

  1. #1
    Registered User HelpfulPerson's Avatar
    Join Date
    Jun 2013
    Location
    Over the rainbow
    Posts
    288

    SDL vs. Allegro ( Which is better for screen graphics, keystrokes, and maybe sound )

    Hello. I have been thinking about learning more about Allegro or SDL. I have already used SDL before and have it installed, but before I went any further, I wanted to know if it was the right choice for handling what I mentioned in the title. I have a book that brushes briefly on Allegro, and it didn't look too awfully hard. It showed me how I would create some graphics and handle events, and I understood it fine by reading it. My main question is which is better for handling the things mentioned in the title. Graphics and keystrokes are most important to me, sound I don't care as much about.
    "Some people think they can outsmart me, maybe. Maybe. I've yet to meet one that can outsmart bullet" - Meet the Heavy, Team Fortress 2

  2. #2
    Ultraviolence Connoisseur
    Join Date
    Mar 2004
    Posts
    555
    This site seems to have some good information on the topic https://www.allegro.cc/forums/thread/223344

    They both provide similar features, allegro has a few extras that SDL may not support (or may require plugins/additional SDL libraries to support). That being said however, I would say SDL is more prevalent and there is probably more documentation/tutorials online.

    If portability is your main goal I would personally go with SDL but these days they're really close on that level. Otherwise it really doesn't matter.

    Edit: forgot to mention that this post is off-topic for this forum, perhaps a mod can move it to the appropriate graphics/game programming section.

  3. #3
    [](){}(); manasij7479's Avatar
    Join Date
    Feb 2011
    Location
    *nullptr
    Posts
    2,657
    SDL has a cleaner design in my opinion, especially the newly released SDL2.
    Also if you are doing something sophisticated with the graphics, consider using OpenGL on top of these libraries.
    That way, you can, in theory, transition between them with minimal change in your main code.

  4. #4
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    I'd recommend SDL, personally. If you're going to start now, start on SDL2 and save yourself a lot of hassle. In the past, I've actually found it easier to convert Allegro apps to use SDL rather than go through the hassle of locating / compiling Allegro libraries for certain platforms.

    In terms of other platforms, I find cross-compiling SDL and its associated libraries much easier. Which is probably why it tends to be the first framework that appears for new platforms when people start coding for them.

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  5. #5
    Registered User HelpfulPerson's Avatar
    Join Date
    Jun 2013
    Location
    Over the rainbow
    Posts
    288
    Quote Originally Posted by nonpuz View Post
    Edit: forgot to mention that this post is off-topic for this forum, perhaps a mod can move it to the appropriate graphics/game programming section.
    Sorry, my mind associates everything with C since that is my main programming language I use. I should have thought about where to place it more than I did.
    "Some people think they can outsmart me, maybe. Maybe. I've yet to meet one that can outsmart bullet" - Meet the Heavy, Team Fortress 2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Using Allegro graphics
    By tsmith94 in forum C Programming
    Replies: 0
    Last Post: 01-29-2012, 10:24 AM
  2. adding sound in graphics.h
    By hakanali in forum C Programming
    Replies: 8
    Last Post: 04-25-2011, 05:00 PM
  3. Crossplatform Sound Library -- other than SDL and Allegro
    By frenchfry164 in forum Game Programming
    Replies: 4
    Last Post: 10-14-2003, 04:27 PM
  4. graphics and sound
    By gcn_zelda in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2003, 07:23 PM
  5. allegro sound initialisation
    By Shakespeare in forum Game Programming
    Replies: 2
    Last Post: 08-16-2002, 05:17 PM