Hello,
When I first started to program I went back and forth over
SDL and
SFML. Multiple times I would decide,
"Nah, I like the other better you can do X or Y easier."
You will find a lot of games (industry even) made with
SDL and it has been around A LOT longer and has a bigger community. What you will find is
SDL feels more like working with
C, or at least that's what I felt like to me. It's written in
C behind the scenes. I also felt like it gave you a lot more control in certain aspects. It's harder to use for sure. I can't recall exactly what I loved more about it off the top of my head. This might not be a fact, but I believe they are done with it as well and SFML keeps improving and older games become outdated. But because of that, you won't ever have to find the correct version like SFML.
SFML is laid out very nicely using objects and just so simple to work with
C++. I've committed to
SFML long term, I'm not 100% that was the right move or not, but both are great libraries. A lot of people sure have helped me here including the founders.
Either way, you can complete an awesome 2D game with any of them and I suggest you actually build a small little engine using both. Build the same game even with the different libraries. It seems people will live or die with one or the other.
BOOKS I highly suggest in order:
(SFML)
Beginning C++ Game Programming 2nd Edition:
(Creates LumberJack game, Pong, Zombie Arena Shooter, 2 player shapes game, space invaders at the end)SFML Game Development By Example by Raimonday Pupius (easily my favorite) :
(Bouncing Mushroom, Snake, 2D platformer, Design Patterns, Components, complex GUI System, RPG, Online RPG) it also has a follow-up book called Mastering SFML, which goes into OpenGL and shaders and building a map editor)
SFML Game Development: Journey through making a top-down airplane shooter (and multiplayer), and gives you a good idea of the progression on making a complete project and making a cool game engine with some design patterns. Goes through some shaders for the missilesProcedural Content Generation using C++: (Teaches A*, Maze Generation, and applying new stuff to a barebone action roguelike engine. It's a really basic game engine though) but explaining A* and randomization was very helpfulSFML Essentials: (
Basic game loop, and running through what SFML offers and show off some animations, shaders, and multiplayer)C++ Game Development By Example, Siddharh Shekar:
I never finished this book, it's really great for beginners though, and would help anyone. It creates a phone like a side scroller game. It leads into OpenGL laterYou will find some amazing YouTube videos and stuff on Udemy as well. Specifically, a guy who made an Action RPG from scratch (200 videos or something).
NOTE: I would
NOT recommend SFML Blueprint, at all. I tried many times to give it a chance. Just no.
But if you really must, the first few chapters on asteroids are very nice.
SDL:Foo's Tutorials: -
Search it up on google, it's a great starting pointThe Black Art of Multiplatform Game Programming, Jazon Yamamoto C: Really awesome SDL book, progresses a game engine, paddle game, tilemaps, scene management, factory design and script,s and finishes with a really cool horizontal side scroller space game.Game Programming in C++ Creating 3D Games (Game Design), Sanjay Madhav -
Teaching you some really cool things and does an asteroid project, pathfinding, tiles, and eventually leads into OpenGL from SDL.SDL Game Development, Shaun Mitchell: This was a good book to read when I first started SDL, but I had a lot of trouble with it at the time because stuff was outdated.