Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why use SFML over SDL?  (Read 6810 times)

0 Members and 1 Guest are viewing this topic.

Critkeeper

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Why use SFML over SDL?
« on: July 12, 2015, 08:10:43 am »
This spicy question isn't meant to give you heartburn. I just want side by side comparison of these two libraries from someone who has used both and knows their strengths and weaknesses.
if(CritKeeper.askQuestion()){return question.why();}

kitteh-warrior

  • Guest
Re: Why use SFML over SDL?
« Reply #1 on: July 12, 2015, 04:16:40 pm »
Google is your friend. ;)

Nyrox

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Why use SFML over SDL?
« Reply #2 on: July 13, 2015, 04:53:14 am »
I don't know how valid this still is, but I found this:
http://en.sfml-dev.org/forums/index.php?topic=43.0

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Why use SFML over SDL?
« Reply #3 on: July 13, 2015, 07:59:23 am »
It's very outdated, that's why the thread was closed.

Daid

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Why use SFML over SDL?
« Reply #4 on: July 13, 2015, 04:44:31 pm »
In my experience, SDL gives you more lower level access. Meaning you can do more powerful stuff, but you also need to manage more yourself.

This is with SDL1.2 experience. Not sure if SDL2 improved on that. For example, with SDL it was more tricky to ensure you had hardware acceleration. With SFML this is a given fact. SDL did port to everything including the Wii and some other oddball devices.


In the end, they both serve the same goal quite fine. And I would put the choice on if you like to work with objects&classes or plain C code.

Mörkö

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: Why use SFML over SDL?
« Reply #5 on: July 18, 2015, 09:37:02 pm »
Google is your friend. ;)

The first result is a reddit thread, and someone posted
Quote
If you go either route you'd find yourself doing enginemaking rather than gamemaking. That usually comes later, if ever.
Which I thought was funny because I definitely feel like that most of the time ;D

The lesson being that if you want to create something more elaborate than Pong, then it's honestly not a huge deal whether you're using GLFW, SDL or SFML because your media framework will get buried under several layers of abstraction anyway.

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Re: Why use SFML over SDL?
« Reply #6 on: July 20, 2015, 12:04:40 am »
As a game (among other things) developer, the main reason to use SDL over SFML are:

 1. A lot of money/efforts is put into it's development (Valve in particular);
 2. It's apparently VERY portable (like, it is apparently easily ported to consoles);
 3. It's tested and used and fixed a lot more and faster than SFML;

I remember also Laurent (maybe in pm) pointing that for serious development that needs stability, SDL is definitely less of a risk and should be the default choice. I agree with this pragmatic thinking, though I would use SFML for anything where I'm ok with the risks, just because it's far better to code with SFML than SDL.

I don't like the issues related to raw C usage so I avoid SDL as much as I can but recently I decided to replace my input library in my commercial game with SDL (the transition is not done yet though). I would have chosen SFML by default if I didn't need very long term support for that one.