Beginning C++ Game Programming 3rd Edition

Get to grips with programming and game development techniques using C++ libraries and Visual Studio 2022 with this updated edition of the bestselling series.

See it on Amazon


New from the Blog

1301, 2015

Making games: Where do I start?

So you want to make a game? Games can be powerful! To the gamer they can entertain, motivate, educate, persuade. They can cause visceral feelings like excitement, happiness, sadness and even fear. To you, the creator/programmer/designer, making games can give immense satisfaction and personal advancement, perhaps even fame and wealth.

So, you know you’re serious about building games but what should you do next?
The 3 getting started questions of doom
There are a lot of different ways to make games. Loads in fact. […]

Latest Programming Tutorials

Setting up Remix to Learn Solidity

Welcome to the second tutorial of our Solidity course! In this tutorial, we’ll walk you through setting up the Remix IDE and configuring the Solidity compiler. Remix is a powerful […]

Introduction to Smart Contracts and Ethereum

Welcome to the first tutorial of our Solidity course! In this tutorial, we’ll introduce you to the fascinating world of smart contracts and Ethereum. Smart contracts are self-executing contracts with […]

Game Development Projects

Coding a simple Pong game with SFML

In this first playable game project we will build a very simple Pong clone. If you don’t know what Pong is then you are much younger than me and you […]

Conditions and branching demo: Bouncing shapes

In this mini-project we will get to use C++ condition checking with some statements. Like the last project we will draw some shapes (slightly different this time) and move […]

Game variables demo: moving circles

In this mini-project we will get to experiment with how we can use C++ variables in our games. We will play around with some  variables and see how they can […]

Building your first SFML game project

Now that we have a working development environment we can go ahead and configure a project and write some code that actually does something. For the sake of actually seeing […]

Setting up Visual Studio and SFML development environment

This is the very first project on the road to building games for desktop operating systems like Windows, Linux and Mac. In these really simple steps we will walk through the […]

Android 2d rotation and heading demo

In this project, we will put into practice everything we learned in part 1 and part 2 of the tutorial series on trigonometric functions. We will draw a simple triangle-shaped […]

Coding Android sprite sheet animations

This very simple tutorial will quickly bring your games to life by drawing the frames of animation from a row of frames drawn consecutively in the same file. We will […]

Coding a Space Invaders game for Android

Welcome to the Space Invaders coding project for Android. In this game project, we will step through everything you need to know to have a fully playable Space Invaders clone […]

Coding a Breakout (Arkanoid) game for Android

In this project, we will build a really simple but fun version of the classic Breakout game for Android. Often known as the “Brick breaker game” the history of the […]

Playing sound FX demo

In this mini-project, we will play a sound on an Android device. We will see how we use the SoundPool class to load a sound from a file and then […]

Building a simple game engine

In this mini-project we will draw a moving, controllable sprite to your Android device. We will draw Bob to the screen and when the screen is touched he will move […]

Drawing graphics demo

In this really simple mini-project, we will really harness the power of classes and objects by using classes from the Android API which allow us to draw graphics on the […]

Beginner Programming Tutorials

Controlling game memory with C++ pointers

Pointers have a bad reputation. They can appear complicated or convoluted. Add to this, the way pointers can be used in C++ code has evolved in recent years. I believe […]

Java Game Coding Level 1

This course is for you if you are completely new to programming or the Java language. This course will quickly cover everything you need to know to be building Java […]

Game variables

When we code a computer game, the first thing we need it to do is to ‘know’ what the current state of the game is. This might include the player’s score, how many […]

Changing the value of game variables

The main way to change our game’s variables using Java is using a concept called operators.Operators in Java are just like mathematical operators and many of them are the same […]

Checking for conditions in our game

In order for our game to dynamically respond to the player’s input, conform to the game’s rules and control the artificial intelligence of characters within the game; our code will need […]

Branching our game code

We have seen in the last tutorial how we can detect certain conditions in our code. For example when the player loses a life, destroys an alien or gets a […]

Looping our game code

So, what do loops have to do with programming? They are a way of repeating the same part of the code more than once. We can loop over code although potentially for a […]

Organizing our game code with methods

Methods allow to organize and compartmentalize our code. As our game projects become more and more advanced with exiting features and deep systems then methods will be one of the […]

Understanding OOP for coding Java games

Object Oriented Programming OOP, is the way almost all programming is done, in almost all languages. It hasn’t been this way forever and there are some exceptions but if we […]

Handling game data with Java arrays

All these objects and variables are useful but what happens when we have hundreds or thousands of them? How can we possibly keep track? Java arrays are the solution and […]

Managing simultaneous events with Threads

So what is a thread? You can think of threads in Java programming in the same way you do threads in a story. In one thread of a story, we […]

Using Java Interfaces

As the title of the tutorial suggests we will be using interfaces. Interfaces are a special type of class and we already know how to create classes. However, we will […]