In his fight back against the ruthless Wade-Ellen Asset Protection Corporation, pilot Chris Bainfield finds himself teaming up with the most unlikely of allies - a sentient starfighter known as Athena.

Like our games and tutorials? Then help support us with a cash donation!

SDL2 Game Tutorials

Overview

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.

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.