This book introduces the reader to the necessary programming skills for developing 2D and 3D computer games. The book lists a number of common game mechanics, and illustrates through examples how these mechanics can be bound to each other to both give the required behavior and allow the player to interact with game elements. Additionally, there is a set of exercises at the end of each chapter that solidify reader's understanding of the content. Chapter and sections are arranged in a non-linear way, which allows the reader to go smoothly from one chapter to another picking only topics of interest. Since programming is the main focus of the book, other content such as 3D graphics might look too simple to be useful for real game development. On the other hand, the code is neatly commented and organized to follow the best practices, which make it reusable, easily modifiable, and scalable for real projects.