
Project Roles:
Lead Programmer
Mechanics Designer
UI Integration
Post Processing
Team Project: Group of 25
Produced Spring 2024 with a 2 month timeframe
Game Link : https://jarednovy.itch.io/mystery-meat
Mystery Meat was developed for the capstone team project of Lake Washington Institute of Technology’s associates program in Digital Gaming and Interactive Media.
I was this project’s sole gameplay programmer. This being the case our team was pushed to create a game mechanic that was both interesting yet remain in scope.
What we landed on was Mystery Meat, a game in which you play as an amateur journalist investigating a meat packing plant, taking pictures of evidence to see what the factory is hiding from the public.
Taking Photos: Recognizing Evidence Objects
Short Explanation
Determine if a player can take photos
Switching between walking and photo mode
Check bounding boxes of camera and evidence objects. Then test for line of sight.
Filter information to find the best target and display results
Taking photos is the main objective of Mystery Meat and so it was very important to get this mechanic feeling right. This feature became a lot more expansive as development continued so please bear with me as I explain how everything works (for the most part).
Firstly, the player is not always able to take photos. This is done by toggling the camera mode by pressing ‘C’. When toggling into camera mode, the game first fades in a black panel to prevent the switch from being to jarring for players. Then as the screen is black a few things happen behind the scenes. The footsteps audio is muted, the player’s head bob animation is frozen, the player’s walking controller is disabled, a viewfinder UI image is set active, and finally the global volume profile is switched out to a post-processing profile that imitates looking through a camera lens. The reverse is done when switching back into walking mode.
Since there can be multiple objects the player can see, additional information filtering is done to check if the evidence is too far / close, if the object has already been photographed, and if there are multiple good objects, returning the closest one. This evidence object is then marked as old and information is displayed to the player about the object, received from a description string on the object itself through the EvidenceObject script.
Other actions that the EvidenceObject script performs is marking other similar objects as old as well, defined by a list in Unity’s inspector. An evidence check-off list can also be found in the pause menu and the EvidenceObject script adds a checkmark / cross-out to this list based on an evidence ID number.
A running total of the number of correct evidence photos the player has taken is kept track of and certain doors in the game require the player to have taken a certain number of photos in order to open them.
The main mechanic of taking photos itself is achieved through a useful feature of Unity’s GeometryUtility class which allows you to calculate the frustum planes of the camera, create a bounding box around an object, and then test if they overlap. On start, every object in the scene tagged as evidence is added to an array. Then, when the camera is clicked, the GeometryUtility bounding box overlap function is utilized to test which evidence objects the camera could theoretically see. However, since the bounding box test only checks for overlap and doesn’t use colliders, an additional linecast check is performed to see if the player can truly see the evidence item. Each evidence object that the player can see is added to a new “EvidenceInView” list.
Worker NPC Behavior
Short Explanation:
Worker groups are pre-assigned a list of work stations they can travel to
When a worker randomly chooses a station it gets removed from this list
When a worker reaches a station they work for a random time within a range and then return the station to the list
The workers of “Meat and More” are prominent characters you encounter during your time at the factory. In order to give them extra life I wanted to give them some basic AI behavior that lets them walk around the factory and perform work at different stations.
AI Workers are assigned an empty game object which includes children that are work stations that worker is allowed to visit. This game object also contains the WorkStationManager script which is in charge of keeping track of which work stations are currently available (as in there isn’t an AI worker assigned to it).
When the game starts each worker asks its work station manager to provide it with a work station. When a station is assigned, it is removed from the available stations list so only one worker can be assigned to a station at a time. Then the worker walks to its assigned station utilizing Unity’s NavMesh system. The worker stays at this station for a random amount of time determined by a minWorkTime and maxWorkTime variable. Then, after this timer runs out, the work station is added back to the available stations list and the cycle continues.
This feature is not a part of the current build however will be likely in future updates.
Custom Inspector for Event Triggers
Being a horror game, Mystery Meat was pretty much required to have specialized event triggers for playing sounds, animations, or destroying / spawning game objects. I wanted to use this opportunity to create an event trigger script that would allow me to do all of these things, yet remain designer friendly by only allowing you to assign variables to a function that you were using. (Ex: You would only be able to assign an audio source to play if you decided that event trigger should play a sound).
This desire led me down a rabbit hole of custom inspector creation in Unity however I am very thankful to have done so because I learned so much from the process.
This feature is not a part of the current build however will be likely in future updates.