Build a Game Engine (From Scratch) is a practical guide to understanding how game engines work by building one step by step.
This book describes the complete implementation of a small 2D game engine in C from scratch. The engine is an intentionally minimalistic foundation that you can use as an educational reference and also as a starting point for your own work.
The target audience is anyone who knows how to write programs using the C programming language and is interested in learning how game engines work from first principles.
The book is currently in early access, with new chapters being added periodically. Please follow the changelog below to keep track of updates.
The book is a $60 DRM-free PDF download. You can securely buy it from here. The book will always be downloadable from your purchase email.
Why C?
C is a small language, which I believe is helpful in terms of expositional clarity.
If you want to use a different programming language, you can always treat the C code in the book as a pseudocode of sorts.
What does "from scratch" mean?
It means the engine is written from scratch, using no third-party libraries and directly accessing OS-level libraries such as the Win32 API and Direct3D.
What are the technical requirements?
You need a computer running Windows 11 with a graphics card supporting Direct3D 12 and a C development environment installed.
Do you offer any discounts?
I do not. There will never be any gimmicks such as discounts or artificial sales to pressure you into buying. This means you can purchase the book at any time that best suits you without worrying about potentially missing a discount window.
This book is fully human-made and no generative AI tools have been used in any part of its creation process.
David Pol is an independent programmer working in the games industry since 2008.