Write maintainable, fault-tolerant, and cleaner game code by understanding the standard development patterns and battle-tested practices
- Get up to speed with the different game development anti-patterns
- Explore popular patterns such as Observer, Singleton, State, and Factory
- Leverage the power of C# coding to create robust architectures for your game projects
Traditional building blocks of a robust architecture, such as design patterns, cannot be applied in Unity without being adapted to the engine's unique way of functioning. With this book, you'll not only get up to speed with design patterns that are currently used by professional game programmers in indie, mobile, and AAA studios, but also examine the anti-patterns.
The book begins by explaining Unity Engine's architecture and demonstrates how you can use it for designing games. This will include understanding its fundamental aspects, which will help you in making better technical decisions. You'll then learn about the game industry's most popular software design patterns and delve into classic patterns such as Singleton; modern patterns such as Event Bus; and even rare patterns such as the Spatial Partition. Right from exploring the initial concepts through to their implementation, you'll learn every detail in the context of common industry use cases. All along, you'll discover tried and tested software development patterns with Unity using C#. Finally, the book will cover the dark side of design patterns by exposing recognizable patterns that tend to emerge in codebases and have an unexpected negative impact.
By the end of this book, you will have developed the skills you need to build exciting games with Unity using industry-standard development patterns.
What you will learn
- Discover the core architectural pillars of the Unity game engine
- Learn about software design patterns while building gameplay systems
- Develop the skills you need to recognize anti-patterns and understand how to prevent them from affecting your codebase
- Get to grips with managing a growing codebase
- Gain a thorough understanding of Unity's API by writing well-designed code
- Explore tips and tricks from professional game developers
Who this book is for
This book is for game developers who want to get hands-on with industry-standard software development patterns and techniques to create engaging and exciting games with Unity 2019. Basic knowledge of Unity development is necessary to make the most out of this book. Prior experience with C# will also be helpful.
Table of Contents
- Engine & Game Architectures
- Game Loop and Update Method
- Abstract Factory
- Event Bus
- Service Locator
- Dependecy Injection
- Object Pool
- Spatial Partition
- The Anti-Patterns