This book is a fun introduction to the world of game programming, C++20, and the OpenGL-powered SFML using four fun, fully playable games of increasing difficulty and advancing features
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on, zero-prerequisite path into C++20 and 2D game development: you learn the language by building four increasingly ambitious, fully playable games with SFML. Best for complete beginners, self-taught hobbyists, and anyone who wants a project-driven refresher rather than a dry syntax reference.
【Book Arc】
- **Opening (~0%–10%)**: Environment setup (Visual Studio 2022, SFML) and the first project, Timber!!!, introduces the game loop, rendering a window, sprites, and the input-update-draw cycle.
- **Early (~10%–30%)**: Core language fundamentals — variables, operators, decisions, strings, loops, arrays, switch, enumerations, and functions — applied immediately to animating sprites, HUDs, and game mechanics.
- **Early–Middle (~30%–45%)**: Object-oriented programming arrives through Pong (classes, encapsulation, inheritance, polymorphism), then AABB collision detection, physics, and scorekeeping finish that game.
- **Middle (~45%–60%)**: The Zombie Shooter project pushes into references, pointers, the STL (vectors, maps), the TextureHolder class, collision/pickups/bullets, SFML Views for layered HUDs, and file I/O for high scores.
- **Late (~60%–85%)**: Run! rebuilds everything around advanced OOP — the Entity Component System pattern, factory pattern, smart pointers, and a generic GameObject/Component architecture.
- **Ending (~85%–100%)**: Final polish with parallax backgrounds, OpenGL programmable shaders and GLSL, camera classes, and a completed endless-runner game.
【Key Takeaways】
- **Games are the teaching vehicle, not a side project** (Opening): every C++ concept is introduced because the current game needs it, which keeps motivation high and makes abstract ideas concrete.
- **The game loop is the spine of everything** (Opening): input, update, draw, repeat — understanding this cycle early makes all later architecture decisions legible.
- **OOP is taught progressively, not dumped upfront** (Early–Middle): classes start simple with Bat and Ball, then grow into inheritance and polymorphism, so the "why" of each feature lands before the "how."
- **Pointers and the STL solve real scaling problems** (Middle): managing a horde of zombies motivates pointers, vectors, and maps far better than toy examples would.
- **Design patterns appear as refactors, not theory** (Late): the Entity Component System and factory pattern emerge because the Run! game becomes unwieldy without them — a lesson in when architecture matters.
- **Smart pointers and composition over inheritance** (Late): the book explicitly steers toward modern C++ ownership semantics and away from deep inheritance trees.
- **Shaders and OpenGL are reachable for beginners** (Ending): GLSL is introduced gently, with a working parallax shader, showing that low-level graphics isn't off-limits.
- **Four complete games beat one toy demo** (Throughout): finishing playable projects — Timberman-like, Pong, zombie shooter, endless runner — builds the confidence and portfolio to start your own.
【Reading Tips】
- **Type every line yourself.** This is a build-along book; copying code from GitHub without typing it defeats the purpose, especially in the early chapters where syntax familiarity is the goal.
- **Deep-read the OOP and pointer chapters (roughly 30%–60%).** These are the conceptual bottlenecks; skimming them will make the Run! project feel like magic rather than engineering.
- **Skim the asset/setup sections** (installing SFML, configuring Visual Studio, preparing sprites and sounds) on a first pass — return to them only when something breaks.
- **Don't skip the "reader challenge" and FAQ boxes.** They flag the exact spots where beginners get stuck and often preview the next concept.
- **After each game, close the book and rebuild one mechanic from memory** before moving on; the fourth game assumes fluency with the first three.
【Coverage Limits】
The excerpts cover the book's structure, chapter topics, and stated goals in detail, but do not include actual code listings, exercise solutions, or the full text of later chapters — so this guide describes the learning path rather than the precise implementation of any single feature.
Excerpt 1
uction reference: 1240524 Published by Packt Publishing Ltd. Grosvenor House 11 St Paul’s Square Birmingham B3 1RB, UK. ISBN 978-1-83508-174-7 www.packt.com...
r been touched by a zombie? Has the player touched a pickup? Summary Frequently asked questions Layering Views and Implementing the HUD Adding all the Text a...
d Texture classes to implement our cloud and bee animations. Chapter 3 , C++ Strings, SFML Time, Player Input, and HUD : In this chapter, we will spend aroun...
ere is way more to come than just this. Read on for details. Chapter 16 , Sound, Game Logic, Inter-Object Communication, and the Player : In this chapter, we...
Book purchase not compatible with the device of your choice? Don’t worry, now with every Packt book you get a DRM-free PDF version of that book at no cost. R...
ming ( OOP ) to boil down complexity into manageable chunks. We will be covering OOP and STL in Chapters 6 and 10 , respectively. C++ is an industry standard...
of the latest version and still follow along with this book. In the sections that follow, we will set up the development environment, beginning with a discus...
VS Projects folder that we created in the previous tutorial. This will be the location where all our project files will be kept. Check the option to place th...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Beginning C++ Game Programming, Third Edition (John Horton)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
Beginning C++ Game Programming, Third Edition (John Horton)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Beginning C++ Game Programming, Third Edition (John Horton)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
这本书面向想通过动手做游戏来学习 C++ 的初学者,把语言学习放进一个有趣的游戏开发环境里。它围绕 C++20 和由 OpenGL 驱动的 SFML 展开,用四个可完整游玩、难度和功能逐步递进的游戏作为主线,让读者在做出能跑起来的作品的过程中掌握编程。全书的重心不是抽象地讲语法,而是把 C++ 知识、SFML 的使用和游戏逻辑放在一起练。
读者可以抓住几条线索。第一条是工具与环境:书中涉及 Microsoft Visual Studio 这一集成开发环境,并交代了项目文件的存放位置,比如把解决方案和项目放在同一目录下的选项,也提到 Mac 和 Linux 的情况,说明作者在意让不同平台的读者都能把环境搭起来。第二条是游戏中的具体机制:从摘录可见,书里会处理“玩家是否碰到拾取物”“是否被僵尸碰到”这类碰撞与状态判断,也会讲到视图分层、实现 HUD、添加文本与 HUD 对象、更新和绘制 HUD 等内容,说明界面与游戏状态的呈现是逐步搭建的。第三条是 C++ 与面向对象的深入:书中会讲到标准模板库、vector 是什么,也会进一步讨论面向对象编程,并使用静态函数—&md...
Digital LibraryAI Assistant
Hi — I can help you pick a book. Tell me a topic, language, or level, e.g. “a light English read”. If that's too broad, I'll ask one follow-up.
Loading comments...
Reply to Comment
Edit Comment