PC Games
• Orb Tutorials
• 2D shoot 'em up Latest Updates
SDL2 Versus game tutorial
Download keys for SDL2 tutorials on itch.io
The Legend of Edgar 1.37
SDL2 Santa game tutorial 🎅
SDL2 Shooter 3 tutorial
Tags • android (3) • battle-for-the-solar-system (10) • blob-wars (10) • brexit (1) • code (6) • edgar (9) • games (43) • lasagne-monsters (1) • making-of (5) • match3 (1) • numberblocksonline (1) • orb (2) • site (1) • tanx (4) • three-guys (3) • three-guys-apocalypse (3) • tutorials (17) • water-closet (4) Books The Attribute of the Strong (Battle for the Solar System, #3) The Pandoran War is nearing its end... and the Senate's Mistake have all but won. Leaving a galaxy in ruin behind them, they set their sights on Sol and prepare to finish their twelve year Mission. All seems lost. But in the final forty-eight hours, while hunting for the elusive Zackaria, the White Knights make a discovery in the former Mitikas Empire that could herald one last chance at victory. |
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 CMake and 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. Building Dependencies
cmake* (* - if using an IDE, plugins may be available to support cmake without requiring any downloads by the user) Compiling These tutorials use cmake to build. You may build them in one of several ways:
cmake CMakeLists.txt make This will generate the make file and all build-related data in the same directory as the CMakeLists.txt file. While this is the simplest approach, it does result in all the cmake files being created alongside the other assets. It is the fastest way to get going, however, and the approach taken in the tutorial listings.
mkdir build cd build cmake .. cd .. make -C build This is a much neater approach, as all the cmake related build data is stored in a directory called "build". The downside is that it requires some extra steps on behalf of the user. Actual compiling also needs to be performed by either changing into the build directory before running make, or by using make -C build to tell make to work with the build directory. Via your IDE An IDE such as VSCode has support for cmake, and may have its own rules as to where it creates the build data, and how it compiles. So long as it respects the rules within the CMakeLists.txt, this shouldn't be an issue. In all cases, the resulting binary will be produced alongside the CMakeLists.txt file, and relative to the required assets (data, gfx, sound, music). If you are using an IDE, ensure the binary is produced this way, as it will expect to load data relative to its location. If not, you will likely find the binary won't run, as it will fail to load any assets. Purchase The full source code and assets for all the listed tutorials is available for purchase. From itch.io You may purchase the complete set of tutorials from itch.io, using the link below. Extras 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.
Creating a lookup system A short tutorial on how to make a key-value lookup system.
Creating an in-game achievement system Learn how to create an achievement system, known as Medals.
Creating a simple 2D turn-based strategy game A tutorial about how to create a 2D turn-based strategy game.
Making a 2D isometric game A tutorial about how to create a 2D isometric game, in an old-school flip-screen style.
Making a basic 2D map editor A tutorial about how to create a basic 2D map editor.
Making a mission-based 2D shoot 'em up Learn how to create a mission and objective-based 2D multi-directional shoot 'em up.
Making a 2D Santa game Learn how to create a simple Santa game to celebrate Xmas!
Making a 2D split screen game A traditional 2D split screen two-player game, using SDL2's geometry functions.
Downloads Binary downloads (Linux + Windows) for some of the tutorials included here:
|