Reaching Terminus - Dev Log
Sem Break (May 31st - July 15th)
Player Damage/Death:
When the break started, I began work on the main mechanic that was missing from my end of semester submission, which was the players health, alongside a proper death and respawn. At first I was going to make a physical healthbar in the players helmet, but I realised there are already a lot of bars that the player needs to pay attention too, so instead I opted to replicate the health system seen in COD games, where the screen gets more and more red as the players health decreases.
To make it work, I researched online how others had achieved my desired effect, and discovered the Unity Post proccessing plugin, which would allow me to easily add and alter a screen effect through simple code. So in the Player Health script, when the player is inside a collider with a Fire tag, a damage bool will be switched on and the players health float will decrease, and the insensity of the post processing effects intensity is increased, and when players leave a damage zone, both floats return to their original values.​​
Intially, the Gamemanger would control the player death bools to set off the rest of the scripts to prevent camera movement and playermovement aftre playing a camera animation. However, because the gamemanager is a static instance, the public variables from other scripts would be destroyed on the reload of a scene, which would break the game. So to avoid this, I made a seperate End Game object and script to handle this code, and the issue was resolved.
Empty Fuel Animations
I also set up some animations triggered by the fuel collectors for when the mech runs out ofuel, to make the mech feel reactive to the gameworld, and work alongside the mech's Ui to inform players of empty fuel.
​
The script checks for any inputs from the player so it knows if theyre moving, if they are, then the Mech's animator layers will enter their 'jolt' animations to add some juice to the mech losing fuel while on the move. Then the animator will transition to the fuel empty idle anim's a second later using a coroutine.
Greyboxing: Acid Lake
The break also feels like a good time to start the greyboxing the level chunks that would appear in the final game. I've begun with the Acid Lake, and decided that I want there to be more than just reaching the other side to be the entirety of this level chunk.
To engage players more, I've decided to add in a simple puzzle where players need to find a way to exit the chunk, as the end will be raised to high for the mech to walk over. In the concept sketch this was in the form of raising a bridge from under the river, but when I started greyboxing I thought about the aesthetic theme of the chunk outside of the lake itself, and thought it coule be some kind of toxic sewage pile up or trash yard, and came up with an alternative solution for exiting the lake.
Players will need to activate a crane to move a cargo container or piece of trash over the river, then shoot the crane with the mech to drop it, creating an exit ramp.
(New level chunk size comapred to starting hanger and the end zone, the extra room allows me to design the chunks to be far more intricate and engaging for players).
Greyboxing: Dark Tunnels
The second level chunk I greyboxed was the Dark Tunnels. For this one I wanted to incorporate some super simplistic metroidvania design, where players need to open the gate at the end of the tunnel to exit the chunk, but to do so they need to power the gate, which needs a battery, and the room with the battery needs a key to open it.
This chunk is about getting the player explore the side routes of the tunnel system since the mech is too big to get through them, so they can figure out what they need to open the gate.
​
The first side path is open, but if player try drive the mech through, they will realise they cannot fit, and will need to disembark out to explore further. This led to a design problem, as the mechs capsule collider would fully block players if they ran out of fuel infront of the path, soft locking them from progressing.
To fix this, I swapped the mechs capsule collider to a layer that wouldn't collide witht he player, and added a new collider onto the mechs pelvis, so now players can now crouch and move between the mechs legs, and won't clip through the model if they stop crouching along the way.​
Greyboxing: Geyser Field
The third level I've somewhat greyboxed is the Geyser Field. I got the idea for this chunk when I was testing the Acid Lake, and how nice it was to see the player health react so well to damage when the player is forced to be in a spot whetre they have to take damage continously.
The Geyser Field forces players to navigate around geysers to avoid damage, but resources will always be close to a geyser in this chunk which makes refuelling the mech require greater focus from players.
Alongside careful timing, as the script on the geysers that sets their damaging collider active occurs at random times between 1 and 5 seconds, before firing off for two seconds, then restting again.
To give players a fighting chance at not taking too much damage, when I create the actual particle system(s) for the geyser, I'll add in a visual indicator (smaller ps) to indicate the geyser is about to fire, and players can react and move to safety if they pay attention.
Player Health
Inside the Mech:
Since I want the player to be able to catch fire from inside the mech when they run out of coolant, I need to have the post proccessing effect appear on the mech camera and have the player health take damage when the mechs collider enters a fire.
​
At first I tried to add the script that checks for the fire tag onto the mech, but the script would only trigger when on the player, as the players collider is connected to the health script. So to work around this, I made a new script thats attatched to the mech that is essntially the same as the one on the player that checks for the fire tag when it's in a trigger box, but it tells the players script it's being damaged which sets everything else off instead.
All I needed was to add a Post Proccesing layer to the mechs camera, so the vingette would play, and add a lose panel when the player died, and set the empty fuel animation bools to add some visual feedback from the mech on player death.