
Learn how indie developers monetize and market games, not just master technical features. Real-world notes from marshal of the elite squadron show how gameplay engagement drives downloads and credit.
Install sdl 2.0 on Windows by downloading the vc version, configuring include and lib directories in Visual Studio, linking SDL2 libraries, and copying the dll for a successful build.
Install and sign the SDL 2.0 framework on macOS, then integrate it with your Xcode project by copying the frameworks and configuring build phases to link SDL_image and SDL_mixer.
Learn how to render basic SDL primitives by creating an SDL rect, setting position, size, and color, and drawing rectangles, lines, and points to build simple scenes.
Explore how the sprite class uses static SDL and game object references shared across instances, plus a unique name, rectf bounds, color, texture, and a hidden flag to drive rendering.
Learn how the sprite moves in the game update function by reading the SDL keyboard state array and updating x and y for up, down, left, and right.
Clamp the sprite inside the 800 by 600 window by updating sprite::update to cap top at 0, left at 0, and keep bottom and right within bounds.
Check that a texture is loaded, then draw the sprite with an SDL rect using render copy; support drawing rectangles, pixel data, or a texture atlas subregion, unless hidden.
Have you ever wanted to program your own game in C++ from scratch? Do you want to enjoy easy & free multiplatform deployment (Windows, Mac, Linux iOS and Android?). In this course, we will have a basic introduction to programming games in C++ using the SDL 2.0 library. We will use SDL 2.0 to:
Overview & Motivation
Why use SDL 2.0? Many people opt to go with complete game engines, such as Unity or Unreal Engine 4, to create their games. Unity and Unreal have licensing costs associated with them. Are you prepared to take on that extra cost? What if you can avoid spending that money on the engine and spend it on licensing assets and other resources instead?
What about using a free and open source sound, graphics and input API to deploy your game to all devices? And the freedom to program in pure C or C++?
LibSDL lets you do all that. Simple C commands will enable you to load sounds & music, load & display hardware accelerated graphics easily. The simple framework I provide in the code examples here will make it easy for you to get started creating your own games from scratch.
Programming from C++ directly (instead of using an engine) will give you much more control over how things get done inside your game. If you like raw programming and always wanted to see how games like Super Mario Brothers, Dragon Warrior, and other classic NES games would get assembled, try this course!
Many professional & indie games use libsdl already, including:
Robin hood - the Legend of Sherwood, Left 4 Dead 2, Steel Storm, Edna & Harvey, Proteus, Psychonauts, Amnesia, FastForward, Syberia, AwesomeNauts and more.