
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Create a new CLion C++ executable, explore CMake and MinGW defaults, view the hello world boilerplate, and compare Visual Studio workflow.
Modify your ide to improve readability by increasing the interface and font size in sea lion with alt shift plus, and set c++17 as the language standard in visual studio.
Explore common data types in C++ including integers, floats, doubles, characters, booleans, and strings, and learn how to declare, output, and transform these values, including true/false and case distinctions.
Learn to use comments in code, including single-line and multi-line formats, for debugging and task lists, and emphasize readable, self-explanatory code that speaks for itself.
Practice building a game character in c++ by defining name, class, and gold, managing a five-item string inventory (bow, arrows, health potion, map, torch), and displaying with zero-based indexing.
Learn to manage a game inventory in C++ with a std::vector of strings, add items with push_back, and display first, last, and middle items using front, back, and at.
Learn how the increment and decrement operators work, including pre and post forms, with examples using cout and int variables, and how they behave in loops.
Explore operator precedence and order of operations, from parentheses to multiplication, division, modulo, and addition and subtraction, evaluated left to right. See how integers and floats affect results through casting.
Learn the basics of getting user input in c++, using cin and the extraction operator, store input in age, prompt with instructions, and echo back your age as feedback.
Explains fixing off by one errors in for loops by calculating array length (size of numbers divided by size of int), avoiding <=, and embracing for range.
Explore for loops with vectors in c++, including iterator and range-based approaches. Learn to iterate forward and backward, manage size-based indexing, and compare vectors with arrays for looping.
Apply for loops in c++ to generate number sequences: count up from 1 to a user-defined limit, print even numbers by twos, and count down from the limit to 1.
Learn how to pass arguments to a function in C++, using a string parameter like message, printing it for debugging, and handling multiple comma separated parameters with the signature.
Learn to return values from C++ functions, switch from void to int with the return keyword, pass parameters, and add two numbers before storing and printing the result.
Explore passing by value and by reference in c++, comparing memory use and performance while sorting a vector of random integers with the standard sort, and using ampersand references.
Learn how to use templates to sort vectors of any type with a generic sort function using a template parameter T, and apply it to string vectors.
learn how to clean up template definitions with inline files (.inl), place definitions in inlines while keeping declarations in headers, and manage includes for clean, centralized code.
Learn to manage treasure in C++ with pointer-based allocation, checks for null pointers, upgrading treasure value, transferring between chests, and safe memory cleanup.
Master class constructors in C++ for game development by initializing new player objects with default and custom constructors that set name, health, and attack power, including inline initializers.
Learn to implement a template game object that safely manages dynamic memory with the big five: default, copy, and move constructors and assignments, plus destructor and get/set component.
Learn how static variables in a class are shared by all objects and track players across games, with outside-class initialization and updates to player count as games start or end.
Discover how to split CMake files into solution and project lists, define targets with variables like saga_game_target_name, use add_subdirectory, and streamline building a saga game hello world in Visual Studio.
Fetch external libraries with cmake to enable sfml graphics, window, and system support. The lecture covers retrieving sfml from GitHub, selecting version 3.0 for cpp17, and wiring it into build.
Create a window with SFML by initializing a render window at 800x600, handling the close event in a loop, then clear to black and display.
Create an application class in the saga namespace with an SFML render window and video mode. Manage includes and CMake setup, and implement a run loop using a unique_ptr.
separate the engine and the game into two projects, configure cmake to build a static saga engine library and a saga game, and link them through a game framework.
Redefine core data types to centralize definitions and enable consistent naming, renaming unordered map to dictionary, and introduce templates for custom smart pointers and aliases for maps and vectors.
Learn to safely destroy actors by iterating a list, erasing pending destroy entries with iterators, and using weak pointers and locking to avoid memory leaks.
Refactor the game window to let the game application control width, height, and title via the constructor, using SFML style flags for a fixed-size window with a title bar.
Import textures and sprites, set texture paths, and render simple assets in a C++ game project. Prevent rendering and ticking after an actor is destroyed by checking is pending destroy.
Configure the resource directory to load assets from the source folder in debug mode and from the final build directory in release mode, using a config file and CMake integration.
implement a clean cycle in the asset manager to remove unused textures from memory, preventing memory leaks and improving performance, with a two-second cleanup interval.
Develop and test actor transformation functions in a 2d C++ game, implementing set/get location and rotation, offset operations, and degree-based rotation, then validate with a center position and 90-degree rotation.
Implement a ship class in the Saga game engine with a constructor, tick, and velocity getters/setters using a 2d sfml vector, updating position each frame.
Create a root directory setter in the asset manager and use it to build asset paths. Apply this to the player ship loading, centralizing textures and resources.
Define the player ship input system by overriding tick, creating handle input and transform input functions, and using a speed variable to move with w, a, s, d.
Create a reusable health component in c++ for game ships, managing max health, applying damage, checking is dead, exposing health via a getter, and attaching it to enemy ships.
Implement a custom collision shape in the physics system using circle and box colliders. Compute delta and distance, and compare to the sum of the two radii to process overlaps.
Implement firing angle for the spreadsheet weapon so it fires toward the mouse using the player ship's aim angle, replacing the base angle, and balance by adjusting projectile speed.
Track enemy deaths by implementing an add enemy kill function and a get enemy kill count in the game application, updating and logging the kill tally during projectile collisions.
Implement a basic player health UI by integrating a health component and retrieving health and max health. Compute health percentage and render an on-screen health text update.
This course is a comprehensive, project-based program designed to guide you through building a complete, functional 2D Game Engine and a game from the ground up using C++. Master modern C++ programming principles and apply them directly to create your own scalable game engine and a complete game using the SFML 3 library and the CMake build system.
Who is this course for?
This course is for developers who have a foundational understanding of programming and are looking to specialize in C++ for game development, transitioning from core principles to professional engine architecture.
Course Progression and Key Modules:
The curriculum is structured sequentially, moving from core language features to complex game systems:
Module 01: C++ Fundamentals: Solidify your foundation with a deep dive into core C++ syntax, common data types, control flow (If statements, Switch statements, Loops), functions, and standard data structures like Arrays, Vectors, and Maps.
Module 04: Object-Oriented Programming (OOP): Learn the core of professional C++ design. This module covers Classes, Constructors, Destructors, Access Specifiers (public/private), Inheritance, Polymorphism, Operator Overloading, and managing class member functions with Const and Static keywords.
Module 03: Memory and Pointers: Demystify C++ memory management. You will explore Stack and Heap memory, learn to avoid common issues like memory leaks, and master Smart Pointers (Unique, Shared, and Weak) for safe, efficient resource management.
Module 05: Building the Game Engine: This is the heart of the course, where you build the core architecture. You will install and configure the CMake build system, integrate the SFML graphics library, establish the project's structure, implement the main Tick and Render Game Loops, and design core engine classes such as Application, World, and the Actor base class.
Game Feature Implementation (Modules 06 - 11): Apply your engine knowledge to build out a full game:
Player & Projectiles: Implement player input, clamping movement to the screen, and creating owner-based projectile systems with their own movement logic.
Physics System: Implement basic Collision Detection, the Health Component, and enemy AI behaviors like Chasing and off-screen Spawning.
Damage & Health: Centralize damage settings, create a Ship Stats class, and implement the logic for applying damage to both the player and enemies.
Weapon Upgrades & UI: Develop features like Spread Shot, implement a system to track enemy deaths, and build the user interface, including the Main Menu, Game Over Screen, Kill Count, and Health Bar.
Debugging & Polish: Finalize the game with touches like basic player rotation, Camera Shake effects, and a complete Sound System for audio polish.
By the end of this course, you will have a fully working, self-built C++ game engine, giving you the practical experience necessary to tackle more ambitious projects.