Game Programming Patterns
Robert Nystrom
Robert Nystrom’s book on how to structure game code, free to read on the web. It revisits a few classic design patterns as they apply to games, then explains patterns that come from game development itself, such as the game loop, components, event queues and object pools. Each chapter stands alone and the examples are in C++.
What you'll learn
- Command, observer, state and other classic patterns in a game context
- How the game loop and update method work
- Decoupling systems with components, event queues and service locators
- Data-driven behavior with bytecode and type objects
- Improving performance with data locality, dirty flags and object pools
- Organizing objects in space with spatial partitioning