1 Priming the system

 

This chapter covers

  • The basics of software architecture and Design Patterns
  • Common problems that Design Patterns solve
  • When to use Design Patterns
  • Scope, focus, and audience for this book
  • How Design Patterns work in a Unity project

As game designers and programmers, a big part of our job is to create, implement, and integrate game elements into a cohesive product. This can be anything from moving a playable character to an adaptive AI enemy or customizable leveling mechanic. In other words, we build systems. And systems are complicated.

In this chapter, I’m going to introduce you to the world of Design Patterns. I’m also going to teach you how to leverage design patterns in Unity projects using Scriptable Objects, Prefabs, and Unity Events. Along the way, we’ll make a few stops to talk about software architecture, how design patterns are structured and categorized, how to use them in the real world, and common problems they aim to solve.

By the end of the chapter, you’ll have the necessary foundation to start implementing design patterns in your code and a clear picture of how design patterns add flexibility, reusability, and structure to your projects. Let’s begin.

1.1 A word about software architecture

1.2 What are Design Patterns

1.2.1 Pattern categories

1.3 Why use Design Patterns

1.4 When to use Design Patterns

1.4.1 Common pitfalls

1.5 Scope, focus, and audience

1.5.1 Teaching breakdown

1.5.2 The ideal reader

1.6 Mental model

1.7 Summary

sitemap