
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Master modern C++ by building a 2D game engine from scratch, learning fundamentals from variables and control flow to object oriented programming, vectors, maps, sets, pointers, and debugging.
Set up Visual Studio Code with a compiler and debugger to write, compile, and run your first C++ hello world program, then use cmake with a Cmakelists.txt for cross-platform builds.
Declare and initialize variables to store data such as a player's name, score, or speed, using int, float, bool, and char types, with clear naming and basic memory awareness.
Explore how to display messages and read user input using the iostream library, cout and cin, with insertion operators, escape sequences, and comments to create clear, interactive terminal programs.
Master loops in C++ by using while, for, and do-while to repeat actions, manage iterations, and handle input, including break and continue, with nested loops and common pitfalls.
Discover how the C++ standard library speeds development with headers for i/o, containers, memory, and math. Learn to consult cppreference for up-to-date library headers and examples.
Learn how Stdarray stores a fixed set of elements, initializes values, uses the fill method, tracks indices safely, and handles 2D arrays for grid-like data.
Learn to store and manipulate text in C++ using std::string, including initialization, concatenation, input with getline, and common methods for substring, find, replace, and formatting with std::format.
Learn how references create aliases to variables, demonstrate range-based for loops, and modify or read container elements using references and const references.
Write reusable functions to organize code, define return types, parameters, and bodies; call functions, pass by value or reference, and use prototypes and scope to manage visibility.
Define and use structures to group related data, initialize members with braces, access via the dot operator, nest structures, and pass or return arrays of structured data in functions.
Define and use enumerations to make code expressive and readable, using named values for days, directions, and difficulties, and switch or if statements to handle them.
Explore how object oriented programming organizes code into classes with behaviors and encapsulation. Use constructors, destructors, getters and setters, and composition with vector two to model 2d game entities.
Demonstrate inheritance in c++ by creating a base class and derived classes such as dog and cat, and warrior and mage, reusing common behavior while adding unique features.
Explore vectors, a dynamic array in C++ that grows and shrinks at runtime, stores elements of the same type, and demonstrates pushback, emplace back, and memory management.
Master pointers as optional references to objects that may be null, using nullptr, the arrow and dereference operators. Return pointers from functions and safely search a player collection by name.
Explore polymorphism in modern C++ by storing derived entities in a single base class interface using virtual methods, smart pointers, and abstract classes, enabling unified update and draw operations.
Learn how iterators move through containers from begin to end, dereference to access elements, and use them with maps and vectors for common operations like find, erase, and insert.
Understand the auto keyword in modern C++11, which lets the compiler deduce a variable’s type from its initializer, with examples for range-based for loops and iterators.
Use the Visual Studio Code debugger to pause execution, set breakpoints, and inspect variables as you step through code, configuring debugging with CMake, launch.json, and tasks.json.
Explore standard algorithms in the C++ standard library, using ranges and lambdas to search, sort, count, reverse, and transform containers with predicates.
Learn to read from and write to files, create folders, and add debugging information. Open scores.txt, update player scores, and track changes with a source location header.
Generate random numbers in modern C++ using a Mersenne Twister engine, seeds, and distributions to drive unpredictable gameplay, from dice rolls to coin flips and deck shuffles.
Master essential c++ math with the smart, numbers, and numeric headers, featuring pi, sqrt, pow, trig, and log, plus algorithms like accumulate, inner_product, clamp, and lerp.
Explore Sfml three, a simple, fast multimedia library for 2d c++17 apps, offering windows, text, shapes, input, textures, sound, and networking.
Create and configure a window with SFML render window, set size 600 by 800 and a title, run a game loop with event handling, and render with clear and display.
learn how SFML handles events via an event queue, using a non-blocking poll loop to read key presses, mouse actions, resizes, and focus changes in an event driven model.
Implement event visitation to simplify the SFML event loop by moving each event into its own handle_event function and using the event's visit with a lambda to dispatch to overloads.
Refactor your project by encapsulating window management, event handling, updating, and rendering into a dedicated application class, centralizing the game loop for a cleaner, modular 2D engine in SFML.
Create and render basic 2D shapes in SFML by using rectangle and circle shapes, customizing color, outline, and position, and building a convex shape for custom polygons.
Load textures from files with Sfml, attach them to shapes or sprites whose size comes from the texture, keep textures alive for performance, and apply color tint and smoothing.
Explore real-time keyboard and mouse input in SFML, using events for single actions and pooling for continuous movement, plus keycodes vs scancodes and basic cursor control.
Learn to move, rotate, and scale objects in SFML using Transformable, center origins for natural transformations, and read positions, rotations, and scales, with delta time to keep motion consistent.
Detect collisions using axis-aligned bounding boxes (AaBb) by accessing getGlobalBounds and intersecting rectangles. Update player movement, block overlap by restoring position, and visually signal collisions with color changes.
Learn to display and style text in SFML: load fonts, create text objects, apply size, color, and effects, and update on-screen content like FPS and scores.
Load and play sounds and music in SFML, using sf::SoundBuffer and sf::Sound for short effects, and sf::Music for streaming long tracks, with controls for volume, pitch, looping, and real-time playback.
Learn to use SFML view to control the visible game world, enabling camera follow and zoom. Center the view on the player and render accordingly.
Conclude by integrating window creation, drawing, input, text, audio, movement, time, and camera control with SFML to build a complete 2D game. Move from isolated examples to designing mechanics, organizing the project, managing assets, and writing core gameplay logic.
Build your first game in modern C++ with SFML—a bounce game with a paddle, bouncing balls, score, sound effects, and background music; set up CMake fetch content and VSCode.
Create a player paddle with SFML, set size and origin, render it, and move it with arrow keys using delta time while clamping to the window.
Add a ball that bounces around the screen with a normalized direction and 250 px/s speed. The cyan circle, radius 10, starts centered and reverses direction on edge collisions.
Implement ball–paddle collision detection via bounding boxes and a collision handler; spawn multiple balls with random directions for a 2D SFML game engine in modern C++.
Create a dedicated game stats class to manage score and lives, including font-backed on-screen text, setters and getters, and a restart mechanic when lives reach zero.
Create a game audio system with a dedicated Game Sounds class using SFML audio to manage background music and bounce sound effects, and add a background image for a scene.
Build a modular, reusable 2D game engine in modern C++ with SFML, organizing window, rendering, input, resources, scenes, and GUI managers through a central engine context.
Set up the arcade engine project from scratch by creating engine folder for code with a content folder, subfolders core, managers, graphics, scene, utils, and Main.cpp, using sfml and cmake.
Create an engine class to power a 2d game in modern c++ with sfml, set up the main window and game loop, and handle events, updates, and rendering in core.
Add a lightweight logging system using speed log to track engine events, debug output, and performance, with cmake fetch speed log and a utils log header.
Create a shared engine context to organize core systems, acting as a container for managers like audio input, rendering, and gui scenes, enabling modular, easily passable access across the engine.
Implement a time manager to track delta time and elapsed time, clamp delta time with a max value from config, and allow the engine to update it each frame.
Create a centralized resource manager to load and reuse textures, sounds, fonts, and music, storing each in hash maps from file names and providing on-demand fetch methods with optional music.
Implement an audio manager to control global volume and 3d sound settings with SFML, using vector3 positions, listener position and direction for spatial audio in a 2d engine.
Define input types and set up gamepad mappings for a flexible input manager that binds actions, using keyboard, mouse, and axis with a threshold, including PlayStation and Xbox mappings.
Develop a flexible input manager that binds actions to keyboard keys, mouse buttons, gamepad inputs, and axes using a multimap and variant-based dispatch for unified input handling.
Build a render manager that draws to an offscreen texture, then renders that texture via a sprite to the window for a controlled pipeline and future shader effects.
Add a scene manager to control active game scene, with next_scene optional and fetch logic to switch or restart, integrating with the engine to handle scene change and menu return.
Create a base scene class and inheritance to organize each game—from menu to space invader scenes—with entities, logic, and settings, using the engine context and virtual update and render methods.
Implement a lightweight cooldown class using the SFML clock to cap action frequency, with a timer and duration, and methods to start, stop, restart, set/get duration, and get elapsed time.
Add a small verify macro to make code safer in both debug and release builds, using assert in debug and void in release to ensure execution and avoid unused warnings.
Rebuild bounce inside the arcade engine as a modular scene, using a centralized config and types structure, with input, rendering, audio, and save system for a reusable game template.
Learn how to add post-processing effects to your engine using shaders, integrating a render manager pipeline, and chaining invert, glitch, bloom, and monitor filters with time-based animation.
Add a focus check to the engine to pause updates when the window is not focused, reducing CPU usage with a small sleep in the main loop.
Complete the 2D game engine, turning simple ideas into a solid, flexible framework that handles window input, audio, time-saving GUI, and scenes for real games.
Use the engine to build complete 2D games, exploring new mechanics and technical challenges as the library expands with regular new projects.
Create a memory game with face-down color cards that players flip to reveal and match, using a mismatch cooldown and increasing levels that add more cards.
Create a 2d side-scrolling runner using jumping, crouching, and fast-falling mechanics. Obstacles spawn from the right and move left as speed rises from 200 to 800, with a distance counter.
Build a Tetris game in a C++20 SFML engine by implementing tetromino shapes, rotations, and line clears on a 10 by 20 grid, with scoring, cooldowns, and a next-piece system.
Build a Pong game in a C++20 SFML engine, configuring two paddles and a ball, with player or AI control, collision-based bouncing, scoring to a target, and visual center line.
Build the breakout arcade game by configuring paddle, ball, bricks, and bonuses, including magnet effects. Register the game in the scene factory and implement update, render, and collisions.
Builds a Flappy Bird clone and extends it with a genetic algorithm that evolves a population of birds by mutating weights, improving survival and score across generations.
Build a 4x4 2048 puzzle in SFML with C++20, using config, types, header, source, and registering in the scene factory. Animate tile moves and merges toward 2048, with new tiles.
Create a menu scene that presents a grid of buttons, each loading a scene by name and revealing a controls overlay via right-click or gamepad.
Welcome!
In this course, you’ll learn how to create your own 2D games in C++20 with SFML 3 — through a complete, step-by-step journey that makes game development both accessible and exciting.
You don’t need to be an expert to get started. Together, we’ll start simple and gradually move on to more advanced concepts, always by building real projects and seeing the results on screen.
The course is divided into five main sections. We begin with Modern C++, where you’ll learn the essential features of the language in a practical, game-oriented way. We’ll also use CMake from the very beginning to build and organize our projects. Then we move on to SFML 3, the library that handles all the visuals, input, and audio. After that, we’ll build our first game, Bounce, before creating our own 2D engine — the reusable foundation that powers all future projects. Finally, we’ll reach the Games section, where we’ll build new games every week, each one introducing new gameplay mechanics.
Everything is explained clearly and demonstrated in real time. You’ll understand not only how things work, but also why. Each project is short, focused, and rewarding — designed to improve both your C++ skills and your confidence as a game developer.
By the end of the course, you’ll have the knowledge, the tools, and the experience to keep creating your own games from scratch — and have a lot of fun doing it.