Game Programming Patterns by Robert Nystrom
November 2, 2014
Publisher: Genever Benning
ISBN: 978-0990582908

"Game Programming Patterns" provides a systematic description of selected patterns from the Gang of Four book and how they apply to game programming as well as other patterns grouped into four categories: Sequencing Patterns, Behavioral Patterns, Decoupling Patterns, and Optimization Patterns. Keep in mind that each time you use a pattern, you will likely implement it differently.


Engineering challenges encountered in game programming:

  • Time and sequencing are a core part of a game's architecture.
  • Development cycles are highly compressed.
  • Multiple programmers need to be able to rapidly build and iterate without interfering with each other.
  • Many pieces of software have to interact with each other.
  • Performance is critical.

A good design is about how easily we can accommodate changes. Implementing changes is easier when pieces of software are decoupled, i.e. when one piece can be understood and changed without touching another piece. Maintaining a good architecture requires time, effort, and discipline. It's a trade-off: Do I really need this abstraction? Will I ever use this extensibility point? Keeping things simple may be a helpful guidance in finding the trade off. Try to write code that is easy to understand. Note that writing simple code does not necessarily mean it would take less time to create it.

Game development requires iteration and experimentation. It means that development speed is critical. Prototyping comes handy when we only need to test some idea. It's important to throw away the prototype or re-write it once we are done with testing.

Elegant solutions are usually general: a small bit of logic that covers a wide range of cases.

Adaptive Code via C#: Agile coding with design patterns and SOLID principles (Developer Reference) by Gary McLean Hall

October 19, 2014
Publisher: Microsoft Press
ISBN: 978-0735683204

From the Amazon website:

As every developer knows, requirements are subject to change. But when you build adaptability into your code, you can respond to change more easily and avoid disruptive rework. Focusing on Agile programming, this book describes the best practices, principles, and patterns that enable you to create flexible, adaptive code--and deliver better business value.

Expert guidance to bridge the gap between theory and practice:

  • Get grounded in Scrum: artifacts, roles, metrics, phases
  • Organize and manage architectural dependencies
  • Review best practices for patterns and anti-patterns
  • Master SOLID principles: single-responsibility, open/closed, Liskov substitution
  • Manage the versatility of interfaces for adaptive code
  • Perform unit testing and refactoring in tandem
  • See how delegation and abstraction impact code adaptability
  • Learn best ways to implement dependency interjection
  • Apply what you learn to a pragmatic, agile coding project
  • Get code samples at: (VS 2013; unit tests use MSTest and NUnit)

Refactoring to Patterns by Joshua Kerievsky

August 15, 2004
Publisher: Addison-Wesley Professional
ISBN: 978-0321213358

"Refactoring to Patterns" includes:

  • A catalog of twenty-seven pattern-directed refactorings, featuring real-world code examples 
  • General information and new insights about patterns and refactoring 
  • Detailed implementation mechanics: how low-level refactorings are combined to implement high-level patterns 
  • Multiple ways to implement the same pattern—and when to use each 
  • Practical ways to get started even if you have little experience with patterns or refactoring


Fowler: Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

  • Using patterns to improve an existing design is better than using patterns early in a new design.
  • Patterns are where you want to be. Refactorings are ways to get there from somewhere else.
  • We improve designs with patterns by applying sequences of low-level design transformations, known as refactorings.
  • It's one thing to learn what a pattern is and an altogether different thing to really understand when and how to apply the pattern.
  • Extreme programming (XP) design practices help avoid both over- and under-engineering.
  • When you make your code more flexible or sophisticated than it needs to be, you over-engineer it.
  • We under-engineer when we produce poorly designed software. It may happen when we are made to work on too many projects at once.
  • The book bridges the gap between patterns and refactoring. 

API Design for C++ by Martin Reddy
February 18, 2011
Publisher: Morgan Kaufmann
ISBN: 978-0123850034

An API is defined as "reusable building blocks that allow modular pieces of functionality to be incorporated into end-user applications". It provides a logical interface for a client while hiding its implementation details. We can think of the API as an abstraction and a functional specification of a component it implements. The importance of well-defined interfaces is underlined by a fact that problems in interfaces are far more costly to fix than problems in the associated implementation. That's because APIs (and their interfaces) should remain backward compatible which implies a need for a change control process and automated regression testing. Also, a stable interface acts like a contract between two pieces of software. This allows multiple developers to work in parallel and call API's functions before they are even completed. Good documentation should also be delivered with an API.

Whenever you create a file format or client/server protocol, you should also provide an API to interoperate with them.

APIs promotes, among other things, code reuse. While there are many benefits of that (e.g., reduction of code duplication) you may encounter also some difficulties. For example, if you intend to reuse a given piece of code you may need to come up with a more general interface than you intended in order to encompass clients changing requirements. 

There are also circumstances when it is better to avoid creating an API. For example, if the API is going to be used only in a single application it may not be worth an effort of planning, testing, documenting and supporting. On the other hand, you may consider creating your own API if existing APIs have some limitations such as license restrictions, not exact functionality you need, no source code, or poor documentation.


Game Physics Engine Development: How to Build a Robust Commercial-Grade Physics Engine for your Game by Ian Millington

Kindle Print Replica

July 23, 2010
Publisher: CRC Press
ISBN: 978-0123819765

The Cyclone game engine featured in the book was written specifically for this book and has been utilized in iPhone application development and Adobe Flash projects. The companion website will include the full source code of the Cyclone physics engine, along with example applications that show the physics system in operation. 


The book covers the creation of a rigid-body, iterative, impulse-based physics engine. The engine supports particle effects, flight simulation, car physics, crates, destructible objects, cloth, and ragdolls. The source code is based on the GLUT toolkit, which wraps OpenGL in a platform-independent way.

Classical mechanics are the laws that govern how large objects move under the influence of gravity and other forces. This is the physics implemented in games: particle movement (bullets, sparks, fireworks, smoke, and explosions), flight simulation, automotive physics, rigid-body, soft-body (clothes, flags, ropes), ragdoll, fluid flow (water, fire, smoke).

If you are a one-person hobbyist working on your game in the evenings, then developing a complete physics solution might take your time away from improving graphics or game play.

Engines that simulate rigid bodies are called mass aggregate engines. They treat objects as a whole. A box might be simulated as if it were made up of eight masses, one at each corner, connected by rods. Mass aggregate engines are easier to program because they don't need to understand rotations. The equations of motion can be expressed purely in terms of linear motion. The whole object rotates naturally as a result of the connections between masses.

It is very difficult to make things truly rigid in a physics engine. Extra code is needed to reconstruct the rigid body from the slightly springy set of masses. This extra code may grow in size significantly. Fortunately, we can extend a mass aggregate engine into a full rigid-body system by adding rotations.

Modern X86 Assembly Language Programming: 32-bit, 64-bit, SSE, and AVX by Daniel Kusswurm

November 25, 2014
Publisher: Apress
ISBN: 978-1484200650

From the Amazon website:

Modern X86 Assembly Language Programming shows the fundamentals of x86 assembly language programming. It focuses on the aspects of the x86 instruction set that are most relevant to application software development. The book's structure and sample code are designed to help the reader quickly understand x86 assembly language programming and the computational capabilities of the x86 platform. Book appendixes can be downloaded here.

Major topics of the book include the following:

  • 32-bit core architecture, data types, internal registers, memory addressing modes, and the basic instruction set
  • X87 core architecture, register stack, special purpose registers, floating-point encodings, and instruction set
  • MMX technology and instruction set
  • Streaming SIMD extensions (SSE) and Advanced Vector Extensions (AVX) including internal registers, packed integer arithmetic, packed and scalar floating-point arithmetic, and associated instruction sets
  • 64-bit core architecture, data types, internal registers, memory addressing modes, and the basic instruction set
  • 64-bit extensions to SSE and AVX technologies
  • X86 assembly language optimization strategies and techniques

Essential Mathematics for Games and Interactive Applications by James M. Van Verth, Lars M. Bishop

Kindle Print Replica

August 26, 2015
Publisher: A K Peters/CRC Press
ISBN: 978-0321623218


Web Resources (

  • book source code
  • supporting libraries with full source code
  • interactive demonstrations that illustrate the concepts and enable you to experiment with animation and simulation applications
  • slides and notes from the authors’ GDC tutorials
  • a core math library IvMath
  • a spline curves library IvCurves
  • collision data structures and algorithms IvCollision
  • an engine IvEngine (an application framework, basic rendering, input handling, timer functionality)
  • a low-level rendering API IvGraphics

The rendering system is implemented using OpenGL as well as Direct3D 11.

Representing real numbers: fixed-point numbers, precision and error, relative error, floating-point numbers (mantissa and exponent), scientific notation, IEEE 754 floating-point standard, comparing floating-point numbers, double precision, half precision, internal FPU precision

Biology by Robert Brooker, Eric Widmaier, Linda Graham, Peter Stiling

January 8, 2016
Publisher: McGraw-Hill Education
ISBN: 978-1259188121


  • Genomes - all the genes an organism has (the storage unit of life).
  • Proteomes - all the proteins encoded by those genes (the functional unit of life). In any particular individual, the genes in a human skin cell are identical to those in a human nerve cell. However, their proteomes are different.
  • Photosynthesis - a process of harnessing light energy by plants, algae, and certain bacteria to produce nutrients.
  • Evolutionary change occurs by two mechanisms: vertical descent with mutation and horizontal gene transfer. In some cases, horizontal gene transfer can occur between members of different species.
  • Hypothesis - a proposed idea. A hypothesis is never really proven.
  • Theory - an established set of ideas that explains a vast amount of data and offers valid predictions that can be tested. Like a hypothesis, a theory can never be proven to be true. Theories are viewed as knowledge.
  • Inorganic chemistry - the nature of atoms and molecules, with the exception of those that contain rings or chains of carbon.
  • Organic chemistry - the nature of molecules that contain rings or chains of carbon.

Engineering a Compiler by Keith Cooper, Linda Torczon

February 21, 2011
Publisher: Morgan Kaufmann
ISBN: 978-0120884780



  • Compilation
  • Scanners
  • Parsers - a parser takes a string of characters and turns it into an abstract syntax tree, a collection of objects representing the grammatical structure of the text.
  • Context-sensitive analysis
  • Intermediate representations
  • Procedure abstraction
  • Optimization
  • Data-flow analysis
  • Scalar optimization
  • Instruction selection and scheduling
  • Register allocation

Direct3D Rendering Cookbook by Justin Stenning

January 20, 2014
Publisher: Packt Publishing
ISBN: 978-1849697101

From the Amazon website:

Direct3D Rendering Cookbook is for C# .NET developers who want to learn the advanced rendering techniques made possible with DirectX 11.2. It is expected that the reader has at least a cursory knowledge of graphics programming, and although some knowledge of Direct3D 10+ is helpful, it is not necessary. An understanding of vector and matrix algebra is required.

  • Learn and implement 50 rendering techniques in Direct3D 11.2.
  • Study the source code and digital assets with a small rendering framework and explore the features of Direct3D 11.2
  • Set up a Direct3D application and perform real-time 3D rendering with C# and SharpDX
  • Learn techniques for debugging your Direct3D application
  • Render a 3D environment with lights, shapes, and materials
  • Explore character animation using bones and vertex skinning
  • Create additional surface detail using tessellation with displacement mapping and displacement decals
  • Implement image post-processing tasks within compute shaders
  • Use real-time deferred rendering techniques to implement improved shading for lighting and shadows
  • Learn to Program the graphics pipeline with shaders using HLSL implemented by Shader Model 5