We may earn an affiliate commission when you visit our partners.
Penny de Byl and Penny Holistic3D

Want to create code that is robust, optimized and reusable? Then you need to learn about programmming design patterns.

Read more

Want to create code that is robust, optimized and reusable? Then you need to learn about programmming design patterns.

Game Programming Design Patterns are templates for building modularised code that are generally a repeatable solution to a commonly occurring mechanic applied in computer games. They are general solutions that aren’t tied to a particular problem, making them reusable. One such pattern is object pooling. Whether a game needs an onslaught of constantly spawning zombies or bullets fired from a gun or asteroids to pummel the player’s spaceship, an object pool is a group of classes that can be reused, exactly as they are, across not only these scenarios but a plethora of others whenever game objects need a spawn manager.

In this course, Penny will take you through the top 12 game programming design patterns with C# and the Unity Game Engine using her internationally acclaimed Holistic teaching style and expertise from over 25 years teaching, researching and writing about games. Throughout the course you will follow along with hands-on workshops designed to teach you these core programming concepts that will take your games to the next level.

Learn how to program and work with patterns such as:

  • commands

  • flyweight

  • observer

  • prototype

  • singleton

  • states

  • object pools

  • game loops

  • updates

  • components

  • ...and more.

Contents and Overview

The course begins with a brief introduction and then you are straight into hands-on exercises, working through each of the design patterns as listed above. There are a variety of scenarios you will work on in both 2D and 3D from an asteroid shooter, to a radar object finding system to a programmable prototype prefab system. All starter files and Unity assets (including models and scenes) are provided for you.

If you want to become a knowledgeable and skilled game developer, then this course is for you.

What students are saying about Penny's courses:

  • Excellent course. I am already in game development industry and there is one quote here from the course that says it all "Whenever you are not able to solve complex problem, its the right time to get back to the BASICS".

  • She is the best teacher ever in this platform

  • I do like Penny de Byl's courses and way of teaching, they are much more specific than your average "master Unity" kind of courses and usually you don't learn just the engine, but also how things work behind the scenes (albeit briefly, at least it gives you an idea if you want to investigate more on your own). She's really amazing.

Enroll now

Here's a deal for you

We found an offer that may be relevant to this course.
Save money when you learn. All coupon codes, vouchers, and discounts are applied automatically unless otherwise noted.

What's inside

Syllabus

By the end of this section you will understand what the content of the course is and have answers to some of the fundamental questions asked by students.
Read more

This lecture gives you an overview of the content of the course and the concepts you will learn about.

H3D has a bustling online student community.  Here's how to get involved.

How to contact us

Regularly asked questions you should check out before starting the course.

While this course was developed in a previous version of Unity, we've tested the projects and they work with Unity 6. This video is a guide to help you adjust your learning in this course to use Unity 6.

In this lecture we look at the command design pattern and start building an abstract class to encompass it's simple functionality.

In this lecture we will finish creating the initial version of a command class and use it to control the animations of two animated characters.

In this video we will extend the command pattern by adding replay and undo functionality.

In this video we complete the undo facility to generate animations that run backwards when they are taken away from the replay list.

In this lecture we will begin with a small experiment that illustrates the importance and workings of the flyweight design pattern.

In this lecture we will walk through the process of making a scriptable object and adding them to an existing project to store data about game objects.

In this section tutorial on examining scriptable objects you will learn how to grab the data added to a prefab from them and display it on the screen.

In this lecture we will a Perlin landscape from cube prefabs readying for a comparison with Unity's ECS System.

In this lecture we will begin putting together the game objects and components that will become entities in an ECS.

This lectures completes our brief look at how ECS conforms to the Flyweight design pattern and compares performance between using GameObjects versus Entities.

In this lecture we will optimise the performance of the ECS with a little rendering trick and then take a drive around the scene with the camera.

In this lecture the observer pattern will be introduced and a project setup to apply it.

In this lecture we will complete the egg spawner and create the base classes for Events and Event Listeners.

In this lecture we will begin using the events and listeners to pass messages as well as extend this to have items appear on the radar.

In this video we will add in other objects to appear on the radar as well as work at taking them away.

In this video we will complete the process to take items away from the radar system as well as perform a challenge to display popup text on the screen.

In this lecture we will start to examine the prototype pattern. Most game engines automatically take care of this functionality themselves, though we will try our best to illustrate the old way of doing things.

In this video you will learn how to turn your procedurally created cube into a cloneable object.

In this lecture you will learn how to create a dynamic game object that you can save into your assets folder as a prefab.

In this video you will be introduced to the singleton pattern and we will start working on a project to put it to good use.

This lecture introduces the state design pattern and starts setting up a project for building a finite state machine for a patrolling and attacking NPC.

In this lecture we will create the state base class and build an idle state that inherits from it.

In this lecture we will add in the patrolling state and set the npc to walk around a set route.

In this lecture we start writing the pursue and attack states to add to the NPCs behaviour.

In this video we will complete the code for getting the NPC to pursue and attack the player.

In this video you will be given a challenge to add a new state to the NPCs behaviour.

In this lecture we will cover object pooling and start building a classic game scenario in which pooling is critical for memory management and performance.

In this lecture we will add the code for an object pool to take care of the asteroid and bullet spawning.

In this video we will extend the object pool to make it expandable.

In this lecture we will examine some of the most powerful game programming design patterns that you use everyday without realising.

Some final worlds from Penny

You've finished this course.... what now?

Traffic lights

Read about what's good
what should give you pause
and possible dealbreakers
Uses C# and the Unity Game Engine, which are industry standards for game development, making it highly relevant for aspiring and current game developers
Taught by Penny de Byl, who has over 25 years of experience teaching, researching, and writing about games, suggesting a high level of expertise and practical knowledge
Provides hands-on workshops and starter files, including models and scenes, which facilitates practical application of learned design patterns
Covers design patterns like commands, flyweight, observer, and object pools, which are essential for creating modular and reusable code in game development
Requires Unity, which may require a subscription depending on the user's needs and revenue, potentially posing a barrier for some learners
Developed in a previous version of Unity, but projects have been tested and confirmed to work with Unity 6, which may require some adjustments during learning

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Reviews summary

Design patterns for unity game programming

According to learners, this course provides a solid foundation in applying essential design patterns to Unity game development. Students praise the instructor, Penny, for her clear explanations and engaging teaching style. The course is particularly valued for its practical hands-on workshops, which help solidify understanding of complex concepts like object pooling, states, and the command pattern. While generally well-received for intermediate developers, some reviewers note that the pace can be fast and may require prior Unity and C# experience. The inclusion of content addressing Unity 6 compatibility is seen as a positive effort to keep the material current.
Can be fast-paced for some.
"Sometimes the pace feels a bit quick, requiring pausing and rewatching."
"Moves through topics fairly rapidly."
"Fast-paced but very informative."
Best suited for intermediate learners.
"While the course is excellent, it does assume you have a decent understanding of Unity and C# beforehand."
"Definitely not for absolute beginners, come prepared with some coding experience."
"Good course if you already know the basics of Unity."
"Assumes familiarity with core Unity concepts and C#."
Updated for Unity 6.
"While this course was developed in a previous version of Unity, we've tested the projects and they work with Unity 6. This video is a guide to help you adjust..."
"It's good that they provide guidance for Unity 6."
"The projects worked fine in the latest Unity version following the compatibility notes."
Covers essential patterns for games.
"Learn how to program and work with patterns such as: commands, flyweight, observer, prototype, singleton, states, object pools, game loops, updates, components..."
"Design Patterns for Game Programming (Unity 6 Compatible)"
"Helped me improve my code structure using these patterns."
"The selection of patterns is very relevant to common game development challenges."
Hands-on workshops solidify learning.
"Throughout the course you will follow along with hands-on workshops designed to teach you these core programming concepts..."
"straight into hands-on exercises, working through each of the design patterns..."
"The practical projects are very helpful in understanding how to implement the patterns."
"Learning by doing with the provided assets was a huge plus."
Highly praised for clear teaching style.
"She is the best teacher ever in this platform..."
"Penny de Byl's courses and way of teaching... She's really amazing."
"Penny does a great job explaining complex concepts simply."
"Excellent instruction, very clear and easy to follow."

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Design Patterns for Game Programming (Unity 6 Compatible) with these activities:
Review C# Fundamentals
Strengthen your understanding of C# syntax and concepts. A solid foundation in C# is crucial for implementing design patterns in Unity.
Browse courses on C# Programming
Show steps
  • Review C# data types, variables, and operators.
  • Practice writing simple C# programs.
  • Study C# control flow statements (if, else, loops).
Review 'Head First Design Patterns'
Broaden your understanding of design patterns with a general overview. This book provides a visual and engaging introduction to the core principles of each pattern.
Show steps
  • Read the chapters related to the design patterns covered in the course.
  • Compare the book's explanations with the course's explanations.
  • Identify the real-world examples of each pattern.
Review 'Game Programming Patterns'
Deepen your understanding of game programming patterns. This book provides detailed explanations and examples of the patterns covered in the course.
Show steps
  • Read the chapters related to the design patterns covered in the course.
  • Compare the book's examples with the course's examples.
  • Identify the pros and cons of each pattern.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement a Simple Object Pool
Gain hands-on experience with the Object Pool pattern. Implementing this pattern will solidify your understanding of memory management and performance optimization in Unity.
Show steps
  • Create a script to manage the object pool.
  • Implement methods to spawn and despawn objects.
  • Test the object pool with a simple game object.
Create a Design Pattern Cheat Sheet
Consolidate your knowledge of design patterns. Creating a cheat sheet will help you quickly recall the key aspects of each pattern.
Show steps
  • Summarize each design pattern in a few sentences.
  • Include a diagram illustrating the pattern's structure.
  • Provide a code snippet demonstrating the pattern's implementation.
Refactor Existing Code with Design Patterns
Apply design patterns to improve existing code. Refactoring will help you understand how patterns can enhance code maintainability and reusability.
Show steps
  • Identify areas in your existing code that could benefit from design patterns.
  • Choose appropriate design patterns to address the identified issues.
  • Refactor the code to implement the chosen patterns.
Present a Design Pattern Case Study
Demonstrate your mastery of design patterns. Presenting a case study will require you to analyze a real-world problem and apply appropriate patterns to solve it.
Show steps
  • Choose a game development problem that can be solved with design patterns.
  • Analyze the problem and identify the appropriate patterns.
  • Implement the patterns and evaluate their effectiveness.
  • Prepare a presentation summarizing your findings.

Career center

Learners who complete Design Patterns for Game Programming (Unity 6 Compatible) will develop knowledge and skills that may be useful to these careers:
Game Programmer
A game programmer brings games to life by writing code for gameplay mechanics, artificial intelligence, and user interfaces. This course helps build a foundation in essential design patterns, and these patterns are templates for building modularized code that are generally a repeatable solution to a commonly occurring mechanic applied in computer games. For example, the course covers object pooling, which is critical for managing game objects like bullets or enemies efficiently. The course's hands-on workshops using C# and Unity provide practical experience directly applicable to a game programmer's daily tasks. If you want to create optimized and reusable code, this course may be useful. The course focuses on the top 12 game programming design patterns and working through each of the design patterns.
Unity Developer
Unity developers specialize in creating games and interactive experiences within the Unity engine. Design patterns are critical for writing clean, maintainable, and efficient code, and this course focuses specifically on design patterns tailored for game programming in Unity. The course covers patterns like commands, flyweight, observer, and state, which directly relate to the architectural decisions a Unity developer makes. If you want to enhance your Unity development skills, this course may be useful. The course's use of C# and Unity 6, along with provided assets and scenes, ensures that the knowledge gained is immediately applicable to real-world Unity projects.
Gameplay Engineer
Gameplay engineers focus on implementing the interactive elements and core mechanics of a game. This course helps build a strong skillset in design patterns. The course covers patterns such as command, state, and observer. The course's hands-on workshops, using the Unity engine, will allow students to learn how to create dynamic, responsive, and engaging game experiences. This course's focus on reusable code, coupled with practical exercises creating game scenarios, builds a foundation in the tools and techniques needed to be a successful gameplay engineer.
Software Engineer
Software engineers design, develop, and maintain software systems, and game development is a specialized area within that field. This course introduces design patterns, which provide reusable solutions to common software design problems. The course covers patterns such as singleton, object pools, and flyweight, which are applicable across various software engineering domains. The course's approach of teaching design patterns through hands-on workshops using C# helps software engineers apply these concepts in practical scenarios. If you want to improve your code's structure and maintainability, this course may be useful.
Technical Designer
Technical designers bridge the gap between design and programming, implementing game mechanics and features using scripting and visual tools. The course focuses on game programming design patterns and provides a strong foundation in object-oriented programming principles. You will learn how to create modular and reusable code using patterns like commands, states, and object pools. This course, with its emphasis on hands-on workshops and practical examples using C# and Unity, helps technical designers quickly prototype and iterate on game mechanics.
AI Programmer
An AI programmer specializes in creating the artificial intelligence that controls non-player characters and other dynamic elements in a game. This course provides a strong foundation in design patterns. These design patterns are useful for creating modular, scalable, and maintainable AI systems. This course covers patterns like the state pattern, which is fundamental for implementing AI behaviors. The course's hands-on approach, using C# and Unity, will enable students to put these patterns into practice. If you want to craft intelligent and engaging game AI, this course may be useful.
Tools Programmer
Tools programmers develop specialized software and editors that streamline the game development process. This course may be useful for you. The course focuses on game programming design patterns and helps build a foundation in object-oriented and modular programming. You will learn how to create reusable components and systems using patterns like the singleton and flyweight. The course's emphasis on hands-on exercises and practical examples will enable students to build effective and efficient tools. If you want to automate tasks, improve workflows, and enhance collaboration within a game development team, this course may be useful.
AR/VR Developer
Augmented reality and virtual reality developers create immersive and interactive experiences using specialized hardware and software. This course can be helpful for you. The concepts of game programming design patterns, as modularized code, covered in this course may be critical for optimizing performance and managing complexity in AR and VR projects. You will learn how to use patterns like object pooling and flyweight to efficiently handle resources and improve frame rates. The course's hands-on workshops using C# and Unity will enable students to apply these patterns to create compelling AR and VR applications.
Mobile Game Developer
Mobile game developers specialize in creating games for smartphones and tablets. This course may be useful for you. The course focuses on game programming design patterns and helps build a foundation in efficient and optimized coding practices. You will learn how to use patterns like object pooling and flyweight to minimize memory usage and improve performance on mobile devices. The course's emphasis on hands-on workshops and practical examples using C# and Unity will enable students to create engaging and high-performing mobile games.
Simulation Engineer
Simulation engineers create realistic and interactive simulations for training, education, and research purposes. This course may be useful for you. The course focuses on game programming design patterns and provides a strong foundation in modular and reusable code. You will learn how to use patterns like the state pattern and observer pattern to model complex systems and interactions. The course's emphasis on hands-on workshops and practical examples using C# and Unity will allow students to build realistic and engaging simulations.
Software Architect
Software architects are responsible for the high-level design and structure of software systems. The course provides insight into design patterns and helps build a foundation in software design principles. You will learn about patterns like singleton, flyweight, and command, and will be able to make informed decisions about system architecture. You may need an advanced degree for this role. The course's focus on practical examples and C# implementation helps to bridge the gap to software design.
Data Scientist
Data scientists analyze and interpret complex data to extract meaningful insights. This course on design principles in C# may be useful. While not directly related to data science, the principles of design patterns may help students structure their code more effectively and improve the maintainability of data analysis pipelines. The course's emphasis on modular code and reusable components can also be applied to data processing tasks. You may need an advanced degree for this role.
Web Developer
Web developers build and maintain websites and web applications. This course may be useful. While not directly related to web development, learning design patterns may enhance your ability to write cleaner, more organized, and maintainable code. This can be useful for structuring complex web applications and improving team collaboration. Many concepts from the course have analogs in web frameworks. This course's focus on C# and software design principles provides a foundation that can be applied to various web development technologies.
Project Manager
Project managers oversee the planning, execution, and completion of projects. While not directly related, understanding software design patterns may give project managers insight into the technical challenges faced by their development teams. This can facilitate better communication and decision-making. This course may improve a project manager's ability to manage projects in game development or other software-related fields.
Quality Assurance Tester
Quality assurance testers ensure the functionality, stability, and performance of software products through systematic testing. This course can be helpful for you. The course on design patterns may expose you to the underlying structure and logic of game code, helping you develop more effective test strategies and identify potential issues. The course's examples of common game programming patterns can give you a deeper understanding of how games are built, improving your ability to find bugs and ensure a high-quality user experience.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Design Patterns for Game Programming (Unity 6 Compatible).
Provides a comprehensive overview of design patterns specifically tailored for game development. It covers many of the patterns discussed in the course, offering practical examples and explanations. It serves as an excellent companion to the course material, providing deeper insights and alternative perspectives. This book is commonly recommended for game developers seeking to improve their code architecture.
Offers a more general introduction to design patterns, using a visual and engaging style. While not specific to game development, it provides a solid foundation in the core principles of each pattern. It is particularly helpful for learners who prefer a more intuitive and less technical approach. This book is often used as a supplementary text in software engineering courses.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser