Trial of the Aisles
Defeat grocery-themed bosses in this boss rush game submitted for the Boss Rush Jam 2024.
Defeat grocery-themed bosses in this boss rush game submitted for the Boss Rush Jam 2024.
Started as a Game Jam Submission for the Boss Rush Jam 2024 with the theme of "Exchange". Our interpretation of the theme was that the bosses throw projectiles at the player to which the player can pick up and send back at them. Exchanging projectiles.
🔵 Roles: Programmer, in-engine developer, AI Programmer, Tools Programmer
🔵 Collaborators: Ashton McKenzie, Kien Ho, Sarah Chambers
🔵 Year: 2024
🔵 Timeline: 1 month
Make future expansion quick by programming a tool to simply create new bosses. The Finite State Machines should seamlessly incorporate this tool with as little steps as possible on the designer's end.
Make it visually appealing for the designers to enjoy tuning values!
Have all shared boss behaviour data be displayed in the tool
A Custom Inspector tool to help designers create unique projectile attacks for our bosses.
There's 3 main goals I outlined when programming this tool:
Make a designer-friendly interface with no programming required
Use Scriptable Objects to store each projectile pattern
Ability to stack modifiers to create unique effects
The idea to make this tool started 1 week before our team had to showcase Trials of the Aisles at the CNE 2024. There was no way we would be able to create many unique projectile patterns for our bosses if we hard-coded the outputs, so we thought of this tool as a solution. My teammate sent me this video series of making a projectile pattern tool using PICO8. My job was to implement this in Unity, a difficult challenge since I had to interpret all the code to C# and Unity specifically with Editor Scripting.
Since we were creating a boss rush game in a limited time, I proposed creating an inspector tool for the team that would allow us to quickly add new bosses and adjust their parameters. Thus, the Boss Profiler tool was born! Below are 3 of our game's bosses, each with their unique attacks, phases, throwable projectiles, and more! This is a tool that stores data, and the Finite State Machine (seen below) is where the Boss Profiler is referenced and its values used. This way, by simply changing the referenced Boss Profiler Scriptable Object I can completely change how the boss behaves! This allows for quick iteration and play-mode testing as the values don't reset on edit mode.
As seen in the screenshot below, or in the Boss Profiler screenshots above, each boss' Scriptable Object has a custom preview icon. I achieve this by using the override Texture2D RenderStaticPreview() function with Unity Editor Scripting. I create a new Texture2D for the dimensions, then grab the target's Profile Picture field and use that as the icon. This is the only way to have a Scriptable Object display different icons despite sharing the same script.
Here's a video of me playing with the Boss Profiler settings for one of our bosses.
Each boss has their own FSM, however the states are very similar across the board.Â
All of our bosses share similar patterns of throwing projectiles, so all the states except for the ones underlined in red are shared behaviours. This streamlines the boss creation process as we can copy over this FSM template and then program in the unique attacks.
Each FSM takes in a Boss Profile scriptable object (top right variable) and we use the values the designer inputted to the tool as the input parameters of the boss. This makes iteration efficient as we don't need to exit play mode.Â
It is best practice to use "Serialized Properties" when using editor scripting to set variable values instead of public getters and setters and referencing the base script. With Serialized Properties, accessing its value demands extra steps, so in the OnEnable function I first Find the associated variable in the base script and assign it.
I learned how to position custom shapes and labels in the inspector screen. The function Screen.width() is used to get the current width of the inspector even if it scales. For the y position of the rect I use GUILayoutUtility.GetLastRect() to get the y position after the "Boss Phases" title text, and then add an amount to set the position.