SDL vs SFML/Any good tutorials?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • SDL vs SFML/Any good tutorials?

      Hey guys, I was going to start learning a library for C++, and I was deciding between SDL 2.0, and SFML.

      Does anybody really know the pros and cons for which one I should use, and how good the tutorials available for them are?
      I don't want to do anything too complex really, just a simple rpg.

      Thanks in advance!
    • A slight caveat to my response: I don't have much experience with SFML, so my opinion is at least partially based in my ignorance of that library. For me, SDL is a very simple and easy to use library. It can take care of a lot of the annoying abstraction stuff for you and gets out of your way when you want it to. For example, I know some people who use it just as an OS abstraction layer and don't use any of the graphics features. I know others who use a whole pile of plugins to form the inner core of their engine.

      One thing to consider is that SDL 2 is very stable and is industry proven. There are TONS of commercial games that use SDL at their core, like Portal, Don't Starve, VVVVVV, Psychonauts, Amnesia, Left 4 Dead 2, World of Goo, etc. The list goes on. If you want stable, industry proven tech, go for SDL.

      By contrast, I can't think of any commercial games made with SFML. That doesn't mean it's bad, it just means it's not really being used in commercial games (or it's not public knowledge). It might even be better since it's more object-oriented.

      At the end of the day, I'd go for SDL, simply because it is much more proven and likely much more stable due to the number of people using it. It has a strong and very active community and you can find tutorials all over the place. The best beginner tutorials are right on their site.

      Of course, my REAL recommendation is to download both and make a really small game (like Tetris) in each engine just to get a feel for how they work, then make your decision from that.

      -Rez
    • I myself bought the book SFML Game Development from Packt Publishing and can only recommend it as many others do that have read this book. The final project is a pretty nice game with decent graphics and effects. Furthermore, the book leverages features from C++ 11. I guess if you are new to game development as I am but have a solid understanding of C++, this book gives you a great head start by introducing and implementing concepts like scene graphs, command queues, texture management, networking, particle effects and much more. Since SDL is in fact not that complicated (compared to DirectX, SDL is for Kids :D) you could as well apply the concepts from this book on SDL. There is also another book about SDL Game Development. However, I don't even know how this book could have been published. I have a copy and it is just embarrassing. Online reviews will proof.

      - Sam
    • Doltsche wrote:

      I myself bought the book SFML Game Development from Packt Publishing and can only recommend it as many others do that have read this book. The final project is a pretty nice game with decent graphics and effects. Furthermore, the book leverages features from C++ 11. I guess if you are new to game development as I am but have a solid understanding of C++, this book gives you a great head start by introducing and implementing concepts like scene graphs, command queues, texture management, networking, particle effects and much more. Since SDL is in fact not that complicated (compared to DirectX, SDL is for Kids :D) you could as well apply the concepts from this book on SDL. There is also another book about SDL Game Development. However, I don't even know how this book could have been published. I have a copy and it is just embarrassing. Online reviews will proof.

      - Sam

      nice sales pitch :^)

      Honestly i think you've missed the point of sdl and smfl. Both books you've mentioned use the sdl/sfml integrated rendering. That's not what a serious development team would use. The point of sdl is to act as a canvas, abstracting the application layer (window creation). All of the rendering then comes from opengl/directx.

    • Honestly i think you've missed the point of sdl and smfl. Both books you've mentioned use the sdl/sfml integrated rendering. That's not what a serious development team would use. The point of sdl is to act as a canvas, abstracting the application layer (window creation). All of the rendering then comes from opengl/directx.


      That's not entirely true, it depends on the game. If I were to make a relatively simple 2D game, I would totally use SDL's accelerated 2D rendering. I wouldn't bother with DirectX / Open GL unless I was doing something fancy (or anything 3D).

      -Rez