Thread: SDL or Allegro

  1. #1
    Programmer in Training TWIXMIX's Avatar
    Join Date
    Feb 2004
    Posts
    57

    SDL or Allegro

    I'm fairly good ar c++ and I want to move on to something other the the dos window.

    I'm trying to figure out which graphics library to use.
    Keep in mind that I'm sort of a noob.

    Anyone got any opinions what's the best for beginners or what is best overall?


    Thanks in advance,
    TWIXX
    Learning C++
    Programmer in training

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Well SDL and Allegro are not graphics libraries, OpenGL and Direct3D are graphics libraries.

    Now do you want to actually program a game, or are you just looking to program some sort of GUI?

  3. #3
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    I think for some one new to game programming, allegro would be the easiest.
    SDL reminds me of an easy to learn DirectX (even though its 3d is powered by OpenGL).

    OpenGL and DirectX will be harder to learn because you also need to learn the WinAPI.
    What is C++?

  4. #4
    uninteresting
    Join Date
    Jun 2002
    Posts
    66
    You don't need to learn WAPI for OpenGL, SDL is cross-platform and you can use it with that.
    *** TITANIC has quit (Excess Flood)

  5. #5
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    You can also use GLUT which is a cross platform library which uses openGL. If you use GLUT, then you dont have to use the windows API either.

  6. #6
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Ummm bitub Im not sure what you mean I guess you mean you can't "create" your own graphics with either but anyways. Either one is good. Ive used both and its all really a matter of preference Im personally using Allegro at this point but others here use SDL and both can do some nice things.
    Woop?

  7. #7
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    What I meant was what I said. Neither Allegro or SDL are graphics libraries. Both Allegro and SDL use either openGL or direct3D to do their graphics.

    Think of SDL or Allegro as wrappers around graphics libraries which makes them easier to use. I dont know much about Allegro, but I believe SDL also has wrappers which help with networking programming, sound, and user I/O.

    I'm just pointing this out so that the poster doesnt confuse those things with graphic libraries. This is just to keep him from getting confused later on down the road.

  8. #8
    Programmer in Training TWIXMIX's Avatar
    Join Date
    Feb 2004
    Posts
    57
    I really just wanted to do some 2d graphic games.
    anyone got any tutorials for any of these?
    Learning C++
    Programmer in training

  9. #9
    uninteresting
    Join Date
    Jun 2002
    Posts
    66
    www.libsdl.org - There are links to some tutorials there.
    *** TITANIC has quit (Excess Flood)

  10. #10
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    How is Allegro not a graphics programming library?
    hello, internet!

  11. #11
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    I stand corrected (like I said, I wasnt that familiar with Allegro). Allegro does appear to have its own graphics library.

    SDL is not a graphics library though.

  12. #12
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by bithub
    SDL is not a graphics library though.
    just becuase one library uses another doesnt mean its not a library. If i write a library that uses opengl, directx, and allegro all at the same time for rendering, its still a rendering library. Thats like saying 'fopen" isnt a file IO function because it uses "open"

  13. #13
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    just becuase one library uses another doesnt mean its not a library
    I did not say SDL is not a library. I said it was not a graphics library.

    I'm just saying this because if you ask for help on gamedev.net, and answer "SDL" when people ask what graphics library you are using, you will instantly get corrected that SDL is not a graphics library.

  14. #14
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    But why would you answer OpenGL when your actually using SDL. SDL and OpenGL are different in many ways. As a matter of fact I think SDL only uses OpenGL for 3d graphics. I am pretty sure that it is not simply an OpenGL wrapper.

    But there are many differences like, in SDL you have to lock the surface before drawing to it.

    [EDIT]
    I checked SDL's site (www.libsdl.org) and found this

    Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer
    So OpenGL is only used to provide access to 3d capabilities.

    [/EDIT]
    Last edited by Vicious; 09-09-2004 at 07:19 PM.
    What is C++?

  15. #15
    ---
    Join Date
    May 2004
    Posts
    1,379
    Quote Originally Posted by bithub
    I'm just saying this because if you ask for help on gamedev.net, and answer "SDL" when people ask what graphics library you are using, you will instantly get corrected that SDL is not a graphics library.
    Not true.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. SDL or Allegro: Difficult decision
    By Chris87 in forum C Programming
    Replies: 14
    Last Post: 01-04-2009, 10:53 PM
  2. Allegro And SDL
    By 7EVEN in forum Game Programming
    Replies: 5
    Last Post: 08-10-2005, 10:22 AM
  3. SDL or Allegro
    By fungus_mungus in forum Game Programming
    Replies: 7
    Last Post: 04-02-2005, 01:18 PM
  4. Crossplatform Sound Library -- other than SDL and Allegro
    By frenchfry164 in forum Game Programming
    Replies: 4
    Last Post: 10-14-2003, 04:27 PM
  5. Allegro or SDL?
    By napkin111 in forum Game Programming
    Replies: 11
    Last Post: 11-01-2002, 07:08 PM