SDL2 Shooter 2 tutorial
SDL2 Widget tutorial
SDL2 Adventure tutorial
Orb source code
SDL2 Game Tutorials
This series of tutorials focuses on creating games using SDL2. The tutorials are split into several parts, to make it easier to understand the steps involved and not to overload the reader with information from the start.
Note: These tutorials assume that you are already familiar with C programming and you are comfortable with advanced topics such as pointers, as well as using Makefiles. You are also advised to follow the tutorials in order, rather than just jumping around as prior knowledge is assumed throughout. You can read more about setting up SDL2 on the API's wiki page: https://wiki.libsdl.org/Installation.
The SDL1 tutorials have moved here. Since these use SDL 1, they are considered out of date and it is suggested you use the SDL 2 tutorials instead.
You may purchase the complete set of tutorials (with on-going updates) from itch.io, using the link below.
You can also download some of the games created by these tutorials by clicking here.
Creating a 2D shoot 'em up
This tutorial will show how to create a simple 2D shoot 'em up, starting with opening a window, all the way to building a highscore table. If you're new to SDL2, this would be a good place to start.
Creating a 2D top-down shooter
This tutorial will show how to create a simple top-down 2D shooter that we're going to call Battle Arena Donk! Mouse controls will be used extensively throughout.
Creating a 2D platformer
Learn how to create a simple multi-scrolling 2D platformer, code-named Pete's Pizza Party.
Creating a sprite atlas
In this tutorial, we'll demonstrate how to create and use a sprite atlas.
Working with TTF fonts
In this tutorial, we'll demonstrate how to use SDL2 TTF for text rendering.
Creating a simple 2D adventure game
Learn how to make a basic 2D adventure game.
Creating a basic widget system
Learn how to make a widget system, for use with in-game menus.
Creating 2D vertical shoot 'em up
Learn how to create a vertical 2D shoot 'em up, that includes power-ups and enemy attack patterns.
Binary downloads (Linux + Windows) for some of the tutorials included here: