top of page

Witch's Garden - Programming

When this project started I stated I did not want to be the lead on this project, as I had been the lead on every other project before this, and I was currently the lead on two other games. I also wanted to try a new experience and perhaps learn from others. Inevitably I ended up filling the role of programming lead .

Lead Stuff ;-)

Started off by explaining what namespaces were to the other programmers and how we were going to use them to keep our systems clean and decoupled.

I implemented all of our key systems , connected them and showed others how to use them.

Taught other programmers about scriptable objects and I used them to set up our data structure.

Taught other programmers about data bindings with actions and delegates. Then set these up across the project, mainly exposing calls for the UI to refresh.

Taught other programmers and artists about prefabs and set up our nested prefab workflow. Allowing us to work simultaneously without source control conflicts.

Also setup the source control with some help from the professor. This was my first time using SVN instead of git.

I showed the other programmers how I make and use pseudo UMLs to plan out our systems and make sure nothings circular.

Then setup a documentation folder in the repo for these.

Sprint2_architecture.png

Architected and implemented our plant system, from the scriptable object data to initializing the runtime plant like a state machine to switch between the different models/behaviors.

MVVM

I wanted to try something different for design patterns that can handle displaying really abstract data since I architected our item system to all derive from a base IItem interface. After some research I went with a MVVM model, where the view model was to be the class responsible for unpacking the various items and casting them to the proper formats for the UI. I did this as an attempt to start making an item system that is portable to future projects.

Sprint4_code_1.PNG
Sprint4_code_2.PNG

Model view winds up a little complicated, but I was able to abstract this away from other programmers

MV_casting.PNG

Robust Spell System

I am quite proud of the scalable spell system I designed. It's feels clean and easy to work with. The thing I like most is how all the logic for concrete implementations are contained in each child class. The only part that I am unsure on is how much knowledge of other systems the context generator might end up knowing about. If given more time I am sure I could find even better solutions, but for the scope of this game, its quite nice.

Full screen the images below to see how I did it.

Generic Target Detection

I wrote an optimized target detector that can be reused. It's on the player and allows them to detect anything that implements ITargetable interface
(patches, doors, crafting station, bed, etc).
This then hooks into our hover detection system for displaying tooltips/other popups after a delay when our targets change.

WG_genericTargetDetection.png

I designed and implemented the calculations for how plant quality and yield is generated in a static class.

StaticYieldGenerator.PNG

Fun with shaders

I wrote a whimsical little circle wipe effect that triggers from a simple teleport system I also wrote.

WG_NarrativeSystemArchitecture.png

I designed and implemented a quite robust narrative event system for handling our fairy tale characters requesting potions. I recorded myself doing this just in case someone wanted to see my process.

Research System

A blog post I wrote explaining the implementation of our modular research system.

bottom of page