Four games, built from a blank file
Now in its third edition and brought fully up to date for Visual Studio 2022, the SFML library, and modern C++20, Beginning C++ Game Programming assumes you have never written a single line of code — and finishes with you having built four complete, playable games of steadily increasing ambition. You never learn C++ in the abstract and hope to use it one day; each idea turns up exactly when a game needs it, and you get to watch it run.
You begin with the raw fundamentals — variables, loops, and functions — then grow into the concepts that keep real game code sane: object-oriented design, pointers and references, and the Standard Template Library. Woven through it all are the parts of game development that are simply good fun to get working — collision detection, game physics, sprite animation, vertex arrays, directional (spatialised) sound, OpenGL shaders, and a handful of reusable design patterns that stop a growing project collapsing under its own weight.
The four projects you'll build
- A Timberman-style chopper — a quick, reflex-driven arcade game that gets sprites, input, text, and sound on screen in your very first chapters.
- Pong — the classic, used to introduce your own classes, collision detection, and the basics of game physics with a bat and ball built from scratch.
- A zombie survival shooter — a top-down arena with waves of spawning enemies, a level-up system, a HUD, and plenty of on-screen carnage.
- An endless runner — a side-scrolling platformer that pulls everything together with parallax backgrounds, texture atlases, and shader effects for a properly polished finish.
What you'll come away knowing
- Setting up a C++ game project in Visual Studio 2022 and working with SFML
- Building games from the ground up — graphics, input handling, physics, and timing
- Core mechanics: animation, collision detection, scorekeeping, and sound
- Spawning objects automatically and giving enemies simple AI
- Advanced touches such as OpenGL shaders, texture atlases, and parallax scrolling
- Scaling and reusing your code with proven game programming design patterns
Who it's for
This one is written for the absolute beginner. Whether you've never programmed before, want a gentle refresher, or just learn best by making something you can actually play, you'll be right at home. By the last chapter you'll have everything you need to design and build your own games from scratch — to put one on Steam, or simply to show your friends what you made.