• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
kirkd

Allegro vs SDL

17 posts in this topic

I've read through various descriptions and the respective home pages, however, I'm not getting a feel for distinguishing between these two. When would you choose one over the other? The best I've come up with is that SDL is (more or less) cross-platform DirectX, while Allegro isn't as extensive but encapsulates more of the game-specific types such as sprites, collision detections, etc. Am I even close? -Kirk
0

Share this post


Link to post
Share on other sites
What are you trying to make? I think SDL is a lighter library and is great to use with OpenGL, and SDL has several 'extensions' where as with allegro they build everything in.

It is also a matter of preference, I prefer SDL's PREFIX_CamelCase() coding style better than the long_function_name() style.



0

Share this post


Link to post
Share on other sites
I'm getting close to closing these topics on sight. In fact, I feel a bit dirty for not already having done so. Allegro vs. SDL feels almost as played out as OpenGL vs. DirectX. [razz]

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.
0

Share this post


Link to post
Share on other sites
Thanks for the explanations.

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.

0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
Hmmm... It may not be a bad idea for me to say this... If you're not into the gaming business or is just a hobbyist like myself then you better choose allegro over SDL. Why? I think Allegro has a better learning curve. Before I tried using Allegro, I've struggled on reading over the internet for whatever library would help me make a game. And allegro have proven to make me productive overtime. I don't have to concentrate much on the technicalities such as how do I blit an image on the screen. I only have to focus on my game logic. Ofcourse, you have to be well-knowledeable about C/C++ to be able to make a fast, working game. But there's the beginners forums to help you with that. :)
0

Share this post


Link to post
Share on other sites
You should try both. Go through a few tutorials using both SDL and Allegro and see which one you find easier to use. How easy is it to draw a rectangle? How easy is it to display an image on the screen?
0

Share this post


Link to post
Share on other sites
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. Thx to reading this thread I have things much clearer so I dont think u should delete this thread on sight but maybe u can make it sticky.
0

Share this post


Link to post
Share on other sites
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]
0

Share this post


Link to post
Share on other sites
SDL was originally intended as a cross-platform wrapper for DirectDraw with some input routines etc as well.

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
0

Share this post


Link to post
Share on other sites
Just becuase SDL is split up into multiple libraries doesn't mean that SDL_mixer and SDL_draw libraries are inaccessible. It's just broken up into more pieces. Since some of the platforms I support only currently support static linking of SDL I prefer it that way.

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.
0

Share this post


Link to post
Share on other sites
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.


0

Share this post


Link to post
Share on other sites
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] ...
0

Share this post


Link to post
Share on other sites
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.
0

Share this post


Link to post
Share on other sites
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?
0

Share this post


Link to post
Share on other sites
I tried to use SDL to make an entry in a short-deadline game compo. Needless to say, I spent a lot of time trying to get around SDL's shortcomings.

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
0

Share this post


Link to post
Share on other sites
I never had to build SDL from source under windows. I just got the develeopement libraries and used them.

I haven't had any trouble with any of the SDL_* libraries except SDL_gfx, but I use opengl now so I don't need it.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0