This was a group effort by my college's Game Design Club
Our goal was to make a simple game over the course of a few weeks. It went into the next month due to the nature of that spring semester.
I wound up the main programmer: I programmed the dialogue, movement, timer, and camera systems.
I had not expected to shoulder so much of the game's programming, but I it was my first actual expereince with the "wiring everything together" aspect of this field that I've come to enjoy.
Dialogue System
The dialogue system was designed to facilitate interactions between players and NPCs.
I worked with our writers (of which I was one myself) to try to make our goals possible.
I implemented a proto-bytecode of sorts (though I didn't know the meaning of that word).
How it works
The dialogue lines exist as scriptable objects in Unity. Each character stores a list of dialogue lines, that can be randomized or played in order.
When the play dialogue method is called, a reference to the specific line of dialogue is passed in.
the dialogue runs by listening for user clicks to advance to the next line. Dialogue runs until a line only contains "END DIALOGUE"
To make the sort of proto-bytecode work, before displaying dialogue, the dialogue manager parses the dialogue string, and if it starts with "COMMANDS," then that line isn't displayed, and functionality is carried out.
With these commands, the dialogue manager can: play sound, make things appear or disappear on screen, wait [x] time, and "trade" an object
Other Systems
The movement system is a simple point and click system. The major issues it has come from my failure to make affordances clear, and that it is not a true pathfinding system.
The camera system changes the player's camera angle and camera they see through when the player enters a trigger collider
While the player is moving, the camera turns towards the player, so players don't have a ton of dead spots in their vision, without needing control over the camera
I also worked on the timer system, though that was a joint effort between one other person and I; the biggest issue was figuring out how to make the timer pause when the player interacts with NPCs
What I learned
I gained a vastly improved understanding of Unity and even learned some programming concepts through my work on each of these systems
For example, I learned about Scriptable Objects, Coroutines, and the Singleton programming pattern
How to set realistic expectations for what I could program when working with other sub-teams
What I could promise and deliver upon in a quick time frame
How to reuse code to meet the needs of other sub-teams, rather than making everything from scratch; the dialogue system did the majority of the functionality in the game.
What I Would Do Differently, From 2 Years Later
I would properly document the dialogue system, and explain how it works so that others could work with it when I wasn't there:
This could have been as simple as a shared google doc with a table filled with columns for class,method name, explanation, parameters, return values, and requirements
I would also explain how to make new commands, as that was one of the issues we ran into late in development when I wasn't able to be there.
I could have done something similar for the commands system too, such as "command name, what it does, what parameters it takes"
I would have ensured that affordances are properly conveyed, as right now, that is not done.
To ensure that the affordances fit with the aesthetics of the game, I would likely have used a panel to display a character's name at the top when the mouse hovers over them.
I would have implemented the actual point and click movement with an actual navmesh, since that would only need to be baked once for this game.