CTIN 583

Week 12 Wednesday

Today

  • Project questions check-in

  • Perforce setup and team time

  • What are design patterns?

Perforce Setup

Perforce Setup

Sean Bouchard's Perforce workshop presentation has step-by-step instructions for:

  • setting up a Perforce workspace
  • checking in a practice file
  • connecting Perforce to a Unity project

Design Patterns

Abstraction

Computer science is not about programming. It is about identifying abstract patterns of problems and abstract solutions.

 

For example:

Sorting a set of data

Searching a set of data

Finding a path within a graph

Finding matching data within a set

Algorithms

Once a pattern is identified, computer scientists can come up with abstract solutions to the problem.

 

For example, there are several algorithms for sorting a set of data, with names like Bubble Sort, QuickSort, or MergeSort.

 

Some are faster than others, and some work better with certain kinds of data sets.

Algorithms

Here is a super cool visual animation of several data algorithms:

 

https://www.youtube.com/watch?v=kPRA0W1kECg

Cool Code Stuff

As you get better at doing basic things with Unity and C#, you will eventually run into problems where you feel like you are missing something.

 

That is the point when you will want to explore more advanced code concepts, such as:

inheritance

interfaces

event systems

Cool Code Stuff

There are also exciting data structures that will help you do the stuff you want to do in a less awkward way. Some examples are:

dictionaries

graphs

structs

stacks

queues

Design Patterns

You don't actually need to know much about algorithms to make games, though it can be helpful!

 

But once you start making bigger projects with more than a few C# classes, you will want to understand design patterns.

Design Patterns

Here is a great website that describes patterns frequently used in game development:

https://gameprogrammingpatterns.com/

 

It is fairly abstract, so we'll look at a couple of examples in class.

Design Patterns

When you are ready to dig in on design patterns, I strongly recommend this book:

 

Head First Design Patterns

 

It is written using Java for examples, and you'll need to understand a little bit about inheritance to make full use of it.

 

Also, it's out of print. It is still the best resource I know of.

CTIN 583 - W12 Wed Apr 6 - 2022 Spring

By Margaret Moser

CTIN 583 - W12 Wed Apr 6 - 2022 Spring

An introduction to algorithms and design patterns.

  • 190