Game Development Patterns with Unity 2021: Explore practical game development using software design patterns and best practices in Unity and C#,2nd Edition
by: David Baron
Publisher finelybook 出版社: Packt Publishing; 2nd edition (July 30,2021)
Language 语言: English
Print Length 页数: 246 pages
ISBN-10: 1800200811
ISBN-13: 9781800200814
Book Description
By finelybook
Discover practical design propositions to resolve game programming challenges in Unity
Key Features
Get an overview of Unity engine architecture and coding model
Refactor the real code of a fully playable game prototype with design patterns
Build a complete racing game using software design patterns and understand how to implement them in Unity
Unity has a particular coding model and architecture that requires knowledge of common software design patterns. This means that to be able to optimally code a game in Unity in the same way you do in other engines,you’ll have to adapt to programming techniques including design patterns.
This second edition is redesigned to update all the code examples present in each chapter to make it easier to understand the process of building a complete game. This approach will help you refactor your codebase by: using a specific list of design patterns. Some of the notable additions to the book include chapters on game design document (GDD),object-oriented programming (OOP) techniques,and code optimization with Entity Component System (ECS).
The book starts by: explaining Unity engine’s architecture and demonstrates its application in designing games and making better technical decisions. Throughout the book,you’ll build a complete game project,Super Ultra Turbo,and a racing game. You’ll also discover tried-and-tested software patterns with Unity using C#. Finally,the book will help you to identify bad designs to help you avoid unexpected negative impact on your game project.
by: the end of this Unity book,you’ll have developed the skills you need to build exciting games with Unity using industry-standard development patterns.
What you will learn
Structure your Unity code using industry-standard development patterns to make it look professional
Identify the right patterns for implementing specific game mechanics or features
Discover anti-patterns to avoid making common bad design choices
Review practical OOP techniques and learn how they’re used in the context of a Unity project
Optimize your code using Unity’s ECS
Analyze the current state of your codebase and plan a refactoring process
Table of contents
1. Before We Begin
2. The Game Design Document
3. A Short Primer to Programming in Unity
4. Implementing a Game Manager with the Singleton
5. Managing Character States with the State Pattem
6. Managing Game Events with the Event Bus
7. Implement a Replay System with the Command Pattern
8. Optimizing with the Object Pool Pattern
9. Decoupling Components with the observer Pattern
10. Implementing Power-Ups with the Visitor Pattem
11. Implementing a Drone with the Strategy Patten
12. Using the Decorator to Implement a Weapon System
13. Implementing a Level Editor with Spatial Partition
14. Adapting Systems with an Adapter
15. Concealing Complexity with a Facade Patten
16. Managing Dependencies with the Service Locator Patten