• 2D shoot 'em up
SDL2 Rogue tutorial
SDL2 Gunner tutorial
SDL2 Shooter 2 tutorial
SDL2 Widget tutorial
SDL2 Adventure tutorial
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.
The full source code and assets for all the listed tutorials is available for purchase.
You may purchase the complete set of tutorials (with on-going updates) from itch.io, using the link below.
It is recommended that you purchase the tutorials from itch.io. However, if you do not wish to create an itch.io account, you can purchase the tutorial bundle directly from this website. If you wish to do so this way, use the PayPal button below. Once your payment has been approved by PayPal, enter the transaction id from the PayPal receipt into the download form below, to download the tutorials.
If you've already paid, you can use the form below to download the tutorials by entering your PayPal transaction id and clicking Download. If you have any trouble, please contact email@example.com.
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 a 2D vertical shoot 'em up
Learn how to create a vertical 2D shoot 'em up, that includes power-ups and enemy attack patterns.
Creating a 2D run and gun game
Learn how to create a 2D run and gun game, like Contra, Turrican, and Duke Nukem.
Creating a roguelike
Learn how to create a simple roguelike.
Binary downloads (Linux + Windows) for some of the tutorials included here: