How to Make a 2D Game in C++ and SDL3

constref

A dense video that builds a side-scrolling platformer in C++ with SDL3 and no engine. It starts with the CMake setup and the window, then adds a game loop, animations, a tile map, gravity, collisions, a camera with parallax backgrounds, shooting and enemies. The code is on GitHub, and the author means it as the base for a custom engine.

What you'll learn

  • Setting up SDL3 and SDL_image with CMake
  • Writing a game loop with delta time
  • Animating sprites and managing state with a finite state machine
  • Loading tile maps and handling collision detection and response
  • Adding a camera, parallax backgrounds and jumping
  • Shooting with reusable bullet objects

More Game Dev courses