Week 12 Wednesday
Project questions check-in
Perforce setup and team time
What are design patterns?
Sean Bouchard's Perforce workshop presentation has step-by-step instructions for:
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
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.
Here is a super cool visual animation of several data algorithms:
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
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
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.
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.
When you are ready to dig in on design patterns, I strongly recommend this book:
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.