- Game Development Patterns and Best Practices
- John P. Doran Matt Casanova
- 476字
- 2021-07-02 23:43:38
What this book covers
Chapter 1, Introduction to Design Patterns, introduces the concept of design patterns and how they can benefit our projects. We also pe into learning about the advantages of compartmentalizing our code and set up a sample project that we can use to build upon in the book.
Chapter 2, One Instance to Rule Them All – Singletons, discusses the well-known singleton pattern, explaining common arguments for and against having a single instance that’s accessible globally within our game.
Chapter 3, Creating Flexibility with the Component Object Model, explores how to create a large amount of different game object types while minimizing code duplication.
Chapter 4, Artificial Intelligence Using the State Pattern, shows the usage of states to allow a game object to change its behavior and functionality due to different stimuli in your game. We discuss and apply how we can use this concept in both player behavior and artificial intelligence.
Chapter 5, Decoupling Code via the Factory Method Pattern, explains how we separate our specific game objects from our game engine. This will allow us to reuse all or at least part of our game engine for future games.
Chapter 6, Creating Objects with the Prototype Pattern, covers another way to reduce dependencies within our game engine. We learn how to create objects through their base classes. In addition, we cover how to read object data from a file.
Chapter 7, Improving Performance with Object Pools, covers a way to improve memory costs in our games by reusing objects that we’ve created dynamically by making use of a manager to control what is and isn’t being used at the moment.
Chapter 8, Controlling the UI via the Command Pattern, discusses how to create reusable actions that can be utilized for UI button clicks or input devices such as keyboard or controller.
Chapter 9, Decoupling Gameplay via the Observer Pattern, explains multiple ways that classes can communicate and share data without using global variables.
Chapter 10, Sharing Objects with the Flyweight Pattern, discusses how we can design our objects to be as lightweight as possible by separating data that can and can't be shared. We use this knowledge to create a particle system which produces smaller objects developed to simulate things like fire, explosions, and smoke.
Chapter 11, Understanding Graphics and Animation, provides a low-level explanation of how graphics and rendering work so that you are better able to implement it in your game.
Chapter 12, Best Practices, covers a number of topics that will improve your code and game projects in the future, touching on things like how to improve your code quality, use the const keyword correctly, how iteration is a great way to improve game and code design, and when you should consider adding scripting to your game.
- 移動UI設計(微課版)
- Xcode 7 Essentials(Second Edition)
- 從程序員到架構師:大數據量、緩存、高并發、微服務、多團隊協同等核心場景實戰
- MATLAB應用與實驗教程
- Haskell Data Analysis Cookbook
- Learning Apache Cassandra
- Python3.5從零開始學
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- 軟件測試(慕課版)
- C語言程序設計
- Python輕松學:爬蟲、游戲與架站
- Python for Secret Agents
- 大學計算機基礎
- Spring Boot實戰:從0開始動手搭建企業級項目
- OpenCV 4計算機視覺:Python語言實現(原書第3版)