Get Started Now

Intro to C++ Programming

Starting from the fundamentals, become a C++ software engineer, step by step.

LATEST UPDATES

Screenshot from Cyberpunk 2077
Module One

Intro to C++ Programming

Starting from the basics, become a C++ software engineer, step by step

Screenshot from Cyberpunk 2077
Screenshot from The Witcher 3: Wild Hunt
Screenshot from Warhammer: Total War
Screenshot from Cyberpunk 2077
Module Two

Game Dev with SDL2

Learn C++ and SDL development by creating hands on, practical projects inspired by classic retro games

Screenshot from Cyberpunk 2077
Screenshot from The Witcher 3: Wild Hunt
Screenshot from Warhammer: Total War
Screenshot from Cyberpunk 2077
Module Three

Professional C++

Learn C++ and SDL development by recreating classic retro games

Screenshot from Cyberpunk 2077
Screenshot from The Witcher 3: Wild Hunt
Screenshot from Warhammer: Total War
MOST POPULAR

Physical Motion

Create realistic object movement by applying fundamental physics concepts
Abstract art representing computer programming
Ryan McCombe
Published

In this lesson, we'll explore fundamental physics principles and how to implement them in our games. We'll explore how to represent position, velocity, and acceleration using our vector system, and how these properties interact over time.

By the end, you'll understand how to create natural movement, predict object trajectories, and integrate player input with physics systems.

We’ll be working with the basic Scene, GameObject, and Vec2 types we created previously:

Force, Drag, and Friction

Learn how to implement realistic forces like gravity, friction, and drag in our physics simulations
Abstract art representing computer programming
Ryan McCombe
Published

Now that we understand basic motion in our game engine, it's time to explore the forces that drive that motion. In this lesson, we'll implement several physical forces including gravity, drag, and friction.

We'll see how each affects our game objects differently based on their properties like mass and velocity. These techniques will allow you to create more realistic and engaging gameplay.

In this lesson, we’ll continue to use the basic application loop and components we introduced in the previous lesson. We’ll mostly be working in the GameObject class in this lesson.

It currently looks like the following, with the most notable characteristics being the Position, Velocity, and Acceleration vectors, and the Tick() function that updates them:

Momentum and Impulse Forces

Add explosions and jumping to your game by mastering momentum-based impulse forces
Abstract art representing computer programming
Ryan McCombe
Published

In this lesson, we'll explore how to implement physics interactions by adding momentum and impulses to our simulations.

We'll learn we can use physics to create features requiring sudden changes to motion, such as having our characters jump or get knocked back by explosions. We’ll also learn how to modify the strength of those forces based on how far away the source of the force is.

This lesson continues to use the components and application loop we introduced earlier in the section. We’ll mostly be working in the GameObject class.

The most relevant parts of this class to note for this lesson are its Tick() and ApplyForce() functions, as well as the Position, Velocity, Acceleration, and Mass variables. Those functions and variables currently look like this:

Scene Rendering

Create a scene management system that converts world space coordinates to screen space for 2D games.
Abstract art representing computer programming
Ryan McCombe
Published

When developing games, we need a way to represent our virtual world and then transform it to display on a screen

In this lesson, we'll create a complete scene system that lets us position game objects using world coordinates, and then automatically converts those positions to screen coordinates when rendering.

We’ll be using the Vec2 struct we created in the previous chapter, as well as Window and Image classes using techniques we covered earlier in the course. A complete version of these are available below:

Cameras and View Space

Create camera systems that follow characters, respond to player input, and properly frame your game scenes.
Abstract art representing computer programming
Ryan McCombe
Published

In most games, the player cannot view the entire game world at the same time. Rather, we can imagine the player moving a virtual camera around the world and what that camera sees determines what appears on the player’s screen.

In a top-down game, for example, they might move that camera by clicking and dragging their mouse. In an action game, the camera is attached to the player they’re controlling. As such, we need to show the world from the perspective of that camera. This view is another example of a space, commonly called the view space or camera space.

In this lesson, we'll explore how view space works, we’ll implement camera movement controls, and create character-following mechanics.

We’ll be using the Vec2 struct we created earlier. A complete version of it is available below:

Discrete and Continuous Values

Learn how to handle floating point precision issues when programming game physics and transformations between coordinate spaces.
Abstract art representing computer programming
Ryan McCombe
Updated
Published

When developing games, we frequently need to work with both continuous values (like physics positions) and discrete ones (like screen pixels).

In this lesson, we'll explore the challenges of working with floating point numbers in different coordinate spaces and learn practical techniques to avoid common pitfalls related to precision and comparison.

We’ll be using the Vec2 struct we created earlier in the course. A complete version of it is available below:

Building a 2D Vector Type

Learn the foundations of vector math to work with positions and movements, and create a custom type to apply these concepts
Abstract art representing computer programming
Ryan McCombe
Updated
Published

In previous lessons, we hinted at a custom type that could store a two-dimensional vector, which we can use to represent positions in a space. Such a type is typically called a vector, and they are the fundamental building block of computer graphics, simulation, and more.

Throughout the rest of this chapter, we’ll use them to represent concepts like positions, movements, directions, accelerations, and forces.

In this lesson, we'll implement a Vec2 type that can represent positions, movements, and forces in a 2D space by equipping our vector with operations like addition, subtraction, and scalar multiplication. This foundation will serve us well throughout the remainder of this chapter as we build increasingly sophisticated graphics and physics systems for our games.

Moving Objects with Vectors

Explore how to use vectors for representing positions, directions, and implementing speed-limited movement in games.
Abstract art representing computer programming
Ryan McCombe
Updated
Published

In this lesson, we’ll see some examples of how we can use our new Vec2 type to support functionality like positioning and moving objects within our game world.

We'll see how vectors provide elegant solutions for positioning and moving objects in a game world. We'll implement a character movement system that handles speed limits, direction calculations, and smooth transitions between positions. Later in the course, we’ll build on these techniques, introducing concepts like acceleration, gravity, and other forces to our movement logic.

The examples in this lesson use the Vec2 type we created in the previous section. A complete version of this struct is available below:

Understanding Screen & World Space

Learn to implement coordinate space conversions in C++ to position game objects correctly on screen.
Abstract art representing computer programming
Ryan McCombe
Published

Every non-trivial game needs to represent positions in at least two different ways: where things are in the game world, and where they appear on the player's screen.

These different representation systems are called the world space and the screen space, and converting between them is a core skill in game development. In this lesson, we'll explore some of the main reasons why we need to work across multiple spaces, and how to transform our objects between them.

We’ll be using the Vec2 struct we created earlier in the course. A complete version of it is available below:

Exponents and cmath

Understand the math foundations needed for game programming in C++, including power and root functions.
Abstract art representing computer programming
Ryan McCombe
Updated
Published

Math and programming go hand in hand, especially in game development. We’ll cover the core concepts throughout this chapter, starting from the basics and moving on to concepts that allow us to implement things like virtual cameras and physics systems.

In this first lesson, we're starting with the fundamentals - exponents and square roots. We'll explore how these work in C++, look at different ways to implement them, and start thinking about performance considerations. This sets the stage for the more complex math concepts we'll tackle as we move forward.

Module One
3D art showing a progammer setting up a development environment

Intro to C++ Programming

Become a software engineer with C++. Starting from the basics, we guide you step by step along the way

This course includes:

  • 60 Lessons
  • Over 200 Quiz Questions
  • 95% Positive Reviews
  • Regularly Updated
  • Help and FAQ
Module Two
sdl2-promo.jpg

Game Dev with SDL2

Learn C++ and SDL development by creating hands on, practical projects inspired by classic retro games

This course includes:

  • 96 Lessons
  • 92% Positive Reviews
  • Regularly Updated
  • Help and FAQs
Module Three
A computer programmer

Professional C++

Comprehensive course covering advanced concepts, and how to use them on large-scale projects.

This course includes:

  • 125 Lessons
  • 550+ Code Samples
  • 96% Positive Reviews
  • Regularly Updated
  • Help and FAQ
Get Started Now

Intro to C++ Programming

Starting from the fundamentals, become a C++ software engineer, step by step.

Contact|Privacy Policy|Terms of Use
Copyright © 2025 - All Rights Reserved