Here you can find a collection of SDL2 tutorials ranging from beginning to expert level. SDL is nice, because it’s multiplatforms, and it can use DirectX or OpenGL, I mainly use it on Windows and Mac, but you also have an installation tutorial on linux. I tried to focus on original content you usually don’t found elsewhere. Most of my tutorial are code heavy, I tried to used an example to have something working at the end of the tutorial.
For my part, I have used SDL to make a simple engine for my first commercial game Hope :
These tutorials use the version 2 of SDL not the first version which is only used in legacy code.
For the game editor I have used SFML which is simpler to set up than SDL2.
Basics SDL2 tutorials
The tutorials here show the basics modules of SDL, to make a full game you will probably need to go implements the systems described in the advanced tutorials.
Start with them it’s easier to understand the basic concept on some simple example 😉
- Installation of SDL on Windows
- Installation of SDL on Linux
- Static build of SDL
- Display an image with SDL_image
- Make a health bar with SDL
- Displaying unicode text with SDL_ttf
- Sprite animations with SDL
- Playing music and sound with ALmixer
Advanced SDL2 tutorials
Here are some more advanced tutorials on some useful things used in 2D and 3D games. Most of them are about the rendering system because I Iike things to look pretty 🙂
- Creating a 2D light with SDL
- Creating a particle system
- Make a loading screen
- DXT Texture Compression with SDL
- Random terrain and perlin noise with SDL
- Use a GLSL shader
- Playing a theora video
You can find more SDL tutorials on the official wiki. Most of them are articles, but you can also find some videos.