Examples of programming design patterns in Unity3D C#
Thanks to Robert Nystrom's Game Programming Patternsand the examples found on Rivello Multimedia's website.Each pattern is contained in a separate folder. Inside these are a folder ('structure') to show what classes are used in the pattern's structure and a folder ('example') showing a real-world example of using the pattern in Unity3D along with a scene showing it in action.
As these are accomplished I plan to do a blog article on each. Once the articles are done they will be referenced in each pattern's readme.md.
Details on each pattern can be found in the Readme.md file in each pattern's folder.
Design patterns are used to represent some of the best practices adapted by experienced object-oriented software developers. A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem.
Patterns done:
Contributors Welcome
Please check out contributors.md if you'd like to help out with this project. It will take me forever to do all of these on my own and I'd love to have some help!
Patterns to do:
- Prototype
- Singleton (Monobehaviour derived and non-derived)
- Adapter
- Bridge
- Composite
- Facade
- Proxy
- Chain of Responsibility
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor
A running collection of all terms used in the analyses that might need a separate definition. The page is currently undefined, and will be updated as new terms are employed/devised.
- “Save the World”: A plot point included in many “Narrative-Based Games”. The main objective is to Save the World from a threat of any kind, with the favorite threat being destruction.
- “Narrative-Based Game”: A game that places a premium of narrative or telling a story.
- Mediated Navigation: An avatar control scheme in which players use an in-game cursor to select a point to move to, after which the game’s pathing AI navigates the player avatar to the indicated spot.
- QTK: “Quick-time Kills”. Similar to the Quick-time Event, the QTK is a brief game mode wherein players are prompted to perform certain actions in rapid succession. Unlike the QTEs, which served as cinematic boss-ending sequences, QTKs can be initiated at any point against any sufficiently weakened enemy. Players are rewarded with both momentary invincibility as they perform the QTK, as well as increased point bonus to their score, should the game include such a mechanic.
- MDA Framework: http://www.cs.northwestern.edu/~hunicke/MDA.pdf
- Traversal systems: game mechanics systems that deal with how a player proceeds through a level. A combination of both navigation, combat, and similar systems.