Learn modern C++ by building 7 games with SFML 3, then discover how to use AI coding assistants to develop, debug, and refine your own games in this new edition of the bestselling series
Key Features
- Build 7 games and projects with modern C++, SFML 3, and Visual Studio 2026
- Learn the STL, game mechanics, and reusable Entity-Component architecture
- Use AI coding assistants to plan, debug, review, and build a tower-defense game
Book Description
Ever wanted to create your own games but don't know where to start? Beginning C++ Game Programming, Fourth Edition, turns your first lines of code into playable projects. This fully updated guide uses modern C++, SFML 3, and Visual Studio 2026 to teach programming through game development, with no experience required. Start with the fundamentals of C++ as you build Timber!!! and Pong, learning variables, functions, classes, animation, sound, physics, and collision detection. Then explore the Standard Template Library (STL), references, lambdas, and randomness through two new projects: a fireworks particle system and a turn-based ASCII roguelike with procedurally generated dungeons. Build a zombie survival shooter before creating an endless runner with reusable Entity-Component architecture and Factory and State patterns. The final chapters introduce practical, responsible AI-assisted programming. Learn to write effective prompts, assess generated code, debug mistakes, and guide an AI assistant through building a tower-defense game. By the end, you'll have gained the C++ and game development skills to experiment with your own ideas, with or without AI.
What you will learn
- Write modern C++ using classes, pointers, smart pointers, and the STL
- Set up SFML 3 projects in Visual Studio 2026
- Build arcade, roguelike, survival, and runner games
- Implement input, animation, sound, collisions, and cameras
- Create particles and procedurally generated dungeons
- Structure reusable code with Entity-Component, Factory, and State patterns
- Use AI to prompt, review, debug, and improve C++ code
- Guide an AI assistant to build a tower-defense game
Who this book is for
This book is for complete beginners who want to learn C++ through hands-on game development, as well as students, aspiring programmers, and hobbyist game developers seeking a practical introduction to modern C++, SFML 3, and game architecture. It also suits readers curious about using AI coding assistants responsibly while developing real projects. No prior programming, C++, SFML, or game development experience is required; only basic computer skills are needed.