Devlog #5 - UI & Polish


So this has been a huuuuge week, and I’ve spent many hours trying to get things implemented, fixed, and improved.

Stuff Added:

Lighting using URP 

This includes a Global Volume, Spot and Freeform 2D lights, emissive sprites using secondary emission spritesheets, and bloom. As a result of this, we now have glowing lava, glowing laser shots from the gun, glowing eyes on the blobs & monsters, glowsticks to highlight the intended path in caverns/caves, and also flexibility to add more glow and lighting wherever relevant. Some more areas I’d like to add glow to are the buttons/panels/computers/terminals, given the time.

Some examples of glow effects and bloom - Left to Right: Monsters; Glowsticks; Laser Projectile & Splash.

Sounds! 

This has been a huge task, turns out sourcing sound files that fit the theme and purpose is kind of hard. I don't have any GIFs for these, can't really show sound.

  • First, I set up a mixer and different channels for SFX and background music, based on the same tutorial I used back when making the Pong clone - How To Add Sound Effects the RIGHT Way by Sasquatch B Studios on Youtube (Link). This system uses a sound controller script that runs as an instance, and spawns prefabs from other Game Objects (at the point of the GO transform that spawned them), that play sounds the duration of the sound clip and then destroy themselves. Works super well.
  • Next, player footsteps. I didn’t want a canned footstep sound that plays at a fixed speed whenever the player is moving, though this probably would have been easier to implement. No.. I wanted footsteps that scale in frequency with player speed, and can also have different footstep sounds for different areas (ie, more of a hard footstep in the base, compared to a crunchy footstep on dirt). ChatGPT was a huge help in this, and after much instruction and modification, we have a FootStep controller than can do just that.
  • Then, SFX for all the things (well, some of the things; finding, editing, then adding sounds for every little thing has been ridiculously time consuming).
  • For acid/lava and other environmental sounds, I wanted a way to have a set point (or area using a collider) on a game object, with a script added to calculate the distance from the player to the edge of the point or collider, then play a sound (with scaled volume the closed the player got) if the player was within a specified radius. Again, ChatGPT. Super useful, couldn’t have done as much as I have done in just a few weeks without it.
  • Feedback on sounds from play test sessions has been extremely good, with multiple people commenting that they work extremely well, fit the theme, and are generally just very satisfying. There's definitely room for improvement with more sounds, and I have since updated/added a few since the testing on Friday (writing this on following day Sat 25/5/2025)
"Sfx on the lava is very polished likes the radius SFX and death animations" - Anonymous Feedback

Lava/Acid sound emitter, blue box is where it plays at 100% volume, down to 0% at yellow outer zone - works rather well

Menus and additional UI

There’s now a Main Menu, Pause Menu with stats, Death Menu with stats

Main Menu - Created an entire second scene & level for this. There's a slight easter egg if you let it scroll for long enough

Player Death

Further implemented and refined player health system, and finally linked everything up with death animations, respawn functions, and checkpoints as below. One particular sticking point was death in acid, I wanted the player to sink slowly and have a slight delay before dying, which wasn't an issue in itself - we just have a zone where on trigger it detects that the player has entered zone, start a coroutine to delay death, and manually clamp or override fall speed. Easy right? I spent 2h trying to figure out why my player wasn't sinking in lava at a specified clamped speed, figuratively tearing my hair out, until I finally realised that despite a float being set to -1f in the script, I must have at some point updated it in the inspector to -0.01f , so it never updated from the script when I was testing different values. The player was sinking the whole time, just imperceptibly slow.

Anyways, end result, the player now dies when health drops to zero or falls in acid. There's also appropriate animations and sound effects too.

Checkpoints and Respawn

Added a checkpoint system. There’s a CheckpointManager script to centralise a place to call other respawn/reset functions and also keep track of which checkpoint is current, and a prefab game object with a Checkpoint script that sets the checkpoint to the transform position of the checkpoint using CheckpointManager.Instance.SetCheckpoint(transform); Also needed to link up button OnClick events in the UI to call the RespawnPlayer function.

Pause Menu & Death Menu

Text Popups

These were much needed to give the player some information, context, and direction. The system uses a game object with script as a trigger zone to instantiate a prefab canvas that is in world space. I also added a script on the TMP text object in the canvas to add a nice typing effect, rather than just have it pop up all at once. 


Multi-Page Popup with user interaction using [E] key

Security System Override

Added a system where the player can approach the main security terminal in the base & unlock the door panels. I wanted to somehow have people spend more time in the base exploring, as frequently players would manage to skip the entire lower level by blasting their way through all the doors and going straight to the end. Presently though, this doesn't seem intuitive, and needs additional work & possibly further hints.

Bigger world

I've expanded a bit more on the game world, primarily at the start. There's still more I would like to do (with some more side options/caves, and maybe security outposts or something), but for now, I feel the level is sufficiently big enough for a minimally decent amount of exploration and play time.


Fixed some bugs:

Shooting Not Quiiiite Accuate:

One player during testing pointed out that the aiming/gun actually shot every so slightly higher than where the mouse actually was on-screen. On investigation, I found that the aimDirection was calculated using mouseWorld – transform.position, which is actually the position of the arm, not the firepoint of the gun. Correcting to using aimDirection = (mouseWorld - firePoint.position); corrected this issue, and the gun is now accurate!

Accurate shooting

Monster Sprite Flip/Jitter:

Previously, when the player was directly above or below a monster, it would rapidly flicker between left/right flipped sprite direction, and also almost “vibrate” as it tried to match the players X position. Sprite flipping was fixed by adding a check and only flipping if  player.position.x - transform.position.x was greater than 0.5. At the same time, I also added logic to scale down the velocity the monster is chasing the player at, so that it starts at full speed from 1f away, down to 0f at 0.2f away on X, preventing the weird vibration/jittering when monster X and player X positions are almost the same.

Monster AI Chase Logic:

Whilst fixing above, I also figured it was worth updating the chase logic a little, had some changes made so that the monster can only see the player with direct line of sight (using raycasts), and also added some stealth logic so that the monster only detects/chases the player if within 30% of regular detection range if approaching from behind. Unfortunately in doing above the already sketchy jump mechanic of the enemy is now even less functional. To be fixed.

Not a good example GIF, but was hard to get one that a) showed anything useful, and b) fit into 3MB

New Bugs:

  • Gun arm wigs out when mouse is within 1 game unit of rotation point. This one just appears based on some other change I made, and it baffles me.

Feedback:

the gun also was a bit hard to aim as it shot above where i expected it to

Fixed this! See above comments in "Shooting Not Quiiiite Accuate"

Disliked aspects with the movement a little bit, the ladder was a bit awkward to jump onto with double jump and cut the flow a bit abruptly, as well as slightly awkward collision with other objects and roofs allowing for more jumps

Kind of agree with this feedback. I plan on making it so the player is able to jump when in a ladder zone, as presently that's not possible. Feels a bit off.

enemy's would get stuck on corners when trying to jump up a level.  when standing above an enemy their sprites would constantly flip directions

Yep, that is/was definitely an issue, and i've only made it worse - as per above section on monster AI. This is related to the same issue that causes the player to stick to walls when against a wall with velocity actively applied. An ongoing issue.

(should) make it slightly clearer where you're meant to be going 

This was definitely an issue, and something I am actively trying to balance. Adding the text popups as above has been huuugely helpful in this, and i've also corrected some flow/logical stuff with locked/unlocked doors.

Leave a comment

Log in with itch.io to leave a comment.