Allegro or SFML?

Pages: 123
Just wondering which library I should move towards after I finish my project. I have been using Allegro, but I have heard some good things about SFML, such as its promotion for Object Oriented Programming. I also heard SFML also has support for OpenGL: which I hope to use down the road. The only reason I use Allegro is because I found it easier to install on my computer, but that was like a 1/2 years ago. I also have problems understanding the documentation for the allegro library (Not descriptive enough). Other than that Allegro is good and has a helpful community. I just want to move to a library that I feel like will help me grow as a programmer(If that makes sense at all).

Feel free to tell me the pros and cons of both. Thanks in advance.
closed account (3qX21hU5)
I would say SFML but that is just me.

For SFML I feel the pros are Amazing documentation and a very simple to use and organized API design. Is a quite fast API in my opinion and yes it does give you easy access to openGL since it was built with it.

Also there should be almost no problems with installing it now since they have precompiled versions for a lot of the major IDE's/Compilers.

I am also really liking the book that just came out on it. It seems well written except for a few grammatical mistakes that I have noticed when skimming but that is expected.

It was refreshing to hear right at the beginning of the book that they are going to put emphasis on using C++11 features and good habits. They even go into RAII as early as page 36 and then on the very next page we are off to using std::unique_ptr's :). I only just received it today and have only skimmed it but from what I have seen it looks like a great book for anyone interested in SFML game development.

But really ultimately it is up to you and whatever library you feel most comfortable with. Weigh the pros and cons for you and not what everyone else thinks. Not every library is a one size fit all type thing, so choose whatever you feel most comfortable with.
Last edited on
Thanks for the reply @Zereo. Just wanted to know if SFML is the only library you have used. Have you tried Allegro? What was your impression about it if you have? Does SFML require you to be proficient in C++ in order for you to use it? (Knowledge in polymorphism, STL and etc.). Thanks again for the input.
SFML, if you can build it :D
I havent used anything but SFML, but coming from someone still learning, its great.

Compiling the source isnt too difficult and id recommend doing it that way

they have documentation on ever part of it on their website as well as some basic tutorials to get you started.

You can pretty much find anything out about by just looking through the documentation
What's a good SFML tutorial?
their tutorials on their website explain the basic use of SFML

im sure there are others if you google it
Well I pretty much figured I could google it, but that doesn't mean it's going to be a good tutorial, I was wondering what other people thought is a good tutorial for SFML.
Last edited on
again their tutorials on their website explain SFML and give you some great building blocks

everything about the library is also well documented, so you if you dont know how to do something, a few minutes of searching will lead you to the answer.

but a
good tutorial for SFML
all depends on what you want to do with it. but when it comes to using the library, its supples you with almost everythng
SFML, I'd avoid Allegro like the plague. It is a niche library that lost it's biggest fanboy (me). I used to swear by it, but I've moved on and would say SFML or SDL are the best two libs for 2D games.

@BHXSpecter, Why did you abandon Allegro 5?
closed account (S6k9GNh0)
If I had to choose.... Allegro, because it's in C.
Czar05 wrote:
@BHXSpecter, Why did you abandon Allegro 5?

I've had issues with the fact that the Allegro developers don't seem to take any user's requests for additions into consideration like SDL and SFML do. I'd been messing with SDL via lazyfoo's website and SFML for a couple of years now. It was a misplaced joke that ultimately made me finally say screw it and leave them.1 They apologized, but was the last straw for me.

computerquip wrote:
If I had to choose.... Allegro, because it's in C.

SDL is written in C too, and has the lazyfoo tutorials to learn them. Allegro has gotten to the point of if the question has been asked they simple reply with a RTFM or "it's been asked before search for it" even though the A.cc search engine is royally screwed up and seldom actually shows you the results you are wanting.


_________________________________________________
1 https://www.allegro.cc/forums/thread/612993/988046#target
Last edited on by closed account z6A9GNh0
closed account (S6k9GNh0)
I'd use SDL if it was a choice in this topic.
Especially since the documentation for SDL 2 has been completely fixed and doesn't suck so much as of literally yesterday.
Last edited on
closed account (N36fSL3A)
@BHX Wow, what 'D's.
@BHXSpecter, I agree, I often noticed an elitist vibe especially at A.cc. But they were usually helpful. Did you ever have some problems with the library itself (documentation structure, etc)? Thanks for sharing by the way.

@computerquip, Judging by your choice and reasoning, I assume you come from a C background Lol. Does the C structure help in any specific way? Thanks for the input.

closed account (N36fSL3A)
@computerquip, Judging by your choice and reasoning, I assume you come from a C background Lol. Does the C structure help in any specific way? Thanks for the input.
No.

Structure is really up to you. Whatever makes you feel comfortable, you use.

Personally I use a mixture. I don't really use namespaces much, (I actually just started using them). I use templates pretty often.
Well documentation wise, they are on library version 5.1.3 or something like that, but the online documentation is for 5.0.x so I don't know if they have changed or not.

computerquip is pointing out they are in C because C libs can be used between C and C++ while C++ libs can't be used by the C language. SFML is locked into being C++ only while you can be a C programmer and still use Allegro or SDL (of which the latter is truly better).
Last edited on by closed account z6A9GNh0
closed account (S6k9GNh0)
Nope. Started with C++ first. I'm of the mindset that a library should sanely be implemented in C then wrapped in C++ or a higher level language. There's nothing wrong with a good C library and to be quite frank, they seem to be much more straight forward and simple.

EDIT: With the exception of Boost although even then, they're pushing the boundaries of over complication. I can't get enough of Boost.ASIO however.
Last edited on
Pages: 123