SDL vs SFML

Pages: 12
Jun 11, 2010 at 11:16am
I've been trying playing around with SDL and I heard about SFML from some people here so I'm just wondering which one would be better to experiment with first and about their pros and cons.

Needs helpful insight.
Jun 11, 2010 at 12:08pm
Stick to SFML as it will ultimately become more widely used than SDL. The only real reason SDL is so popular is due to amateur game developers. SFML is faster, more modern, and easier to use. I'm not going to list out all the pros and cons for the APIs. I recommend you jump over to the gamdev.net forums where this has been covered in detail.
Jun 11, 2010 at 12:59pm
will ultimately become more widely used than SDL.


Pure assumption...

But I suggest, that You should try out the SFML, too...
Last edited on Jun 11, 2010 at 12:59pm
Jun 11, 2010 at 3:18pm
Pure Assumption? These APIs are only popular because of the game development community. Spend some time in the game dev forums and you'll see which direction its heading. SDL is a C API, it makes no sense to use if there is an equivalent C++ API which in this case is actually better, however there is nothing wrong with learning both.
Jun 11, 2010 at 3:49pm
SDL is a C API, it makes no sense to use if there is an equivalent C++ API
Unless you're writing in C.
Jun 11, 2010 at 3:52pm
I tried SFML for a day or two, but I could not get a window to display. (Believe me, I tried EVERYTHING).

I then loaded up the SDL libs, and had it going in minutes.
Jun 11, 2010 at 5:37pm
helios wrote:
Unless you're writing in C.


Of course.
Jun 11, 2010 at 9:25pm
I personally prefer SFML over many other media libraries. I also prefer it over the standard pThreads or boost library when it comes to threading. I use it for more then just game dev, though I admit my first project with it was a game.
Jun 12, 2010 at 8:39pm
Return 0 wrote : SDL is a C API, it makes no sense to use if there is an equivalent C++ API
helios wrote : Unless you're writing in C

SFML has a C version
Jun 14, 2010 at 3:12am
closed account (S6k9GNh0)
SFML uses more modern and cleaner coding techniques, better looking documentation (if you consider external documentation valid), more convenient uses, etc.

SFML also provides a hardware accelerated graphics API where SDL is still based on software rendering and integration with OpenGL is a complete bitch.

SFML, imho, has already surpassed SDL in many aspects as a free multimedia library.
Jul 9, 2010 at 9:21pm
@Vexer

I don't know if you still have a problem displaying a window, or if you even care about it anymore, but in order to display a window, you have to use RenderWindow WhateverYouWantToNameItand then use have to use WhateverYouWantToNameIt.Draw(/*what you want to draw in here*/); in order to draw something on it and WhateverYouWantToNameIt.Display();to actually display the screen.
Jul 9, 2010 at 9:42pm
I think it more likely that as SFML uses hardware rendering that it's probably because he doesn't have a hardware renderer.

If you're on a system using X11 as a window manager I can give you my AIGLX-enabled xorg.conf, which allows you to use hardware rendering.
Jul 10, 2010 at 4:02am

@Vexer

I don't know if you still have a problem displaying a window, or if you even care about it anymore, but in order to display a window, you have to use RenderWindow WhateverYouWantToNameItand then use have to use WhateverYouWantToNameIt.Draw(/*what you want to draw in here*/); in order to draw something on it and WhateverYouWantToNameIt.Display();to actually display the screen.


Thanks, but I actually just had problems getting the window itself to display(not actually getting something to draw). I might give it another try and see if I can get it to work.
Jul 10, 2010 at 4:09am
What operating system are you using?
Jul 10, 2010 at 5:20pm
Did it compile fine.... Which IDE are you using? I've heard/read that VC++ 10 isn't completely compatible with SFML apparently.
Jul 10, 2010 at 5:30pm
Google doesn't yield anything relevant.
Jul 10, 2010 at 8:06pm
@AngelHoof:

That might be a problem, because I am using VS 2010.

I'll try VS2008 and get back to you.
Jul 13, 2010 at 1:18am
Were you able to find a download for it? I'm trying to use the SFML networking extension and I can't do anything because I'm using 2010.
Jul 13, 2010 at 2:30am
I managed to get a window displayed with 2010, but after closing it I get a stack corruption error.
Jul 13, 2010 at 2:39am
I get access violation errors whenever sending a UDP packet.
Pages: 12