Polishing, Win/Lose Conditions, Main Menu Setup and some other Bug Fixes
Polishing, Win/Lose Conditions, Main Menu Setup and some other Bug Fixes
This post is all about polishing the game experience, implementing win/lose conditions, and finally setting up a Main Menu to give the game a proper flow. Most of the mechanics were in place already, but now it’s about making sure everything feels smooth, responsive, and coherent.
TileMap Pain (and Progress)
First off: the TileMap slicing issue. I originally imported a tileset with incorrect grid settings, so some tiles weren’t aligned properly, causing seams and offset visuals in the scene. I went back, re-sliced everything using the correct pixel-per-unit and grid cell size, and re-painted the level. It was tedious but absolutely worth it. The environment feels more consistent now, and small things like tile alignment really DO affect how polished the game looks. Below is the final view of how the "FirstPlayable" level looks like.
Win/Lose UI
Next, I implemented the Victory and Defeat screens. Now, when all enemies are dead and the player is still alive, a "WinCanvas" appears showing a win message, along with options to restart or quit. On the other hand, if the player dies, the pause menu is repurposed into a death screen with the text "YOU DIED!!!" replacing the normal UI. I could have created another canvas for the losing condition, but I thought that reusing the pause menu was "faster" to do. However, thinking in the long run, I think I should have created a new one so the logic and the structure looks cleaner.
To avoid weird behavior, I added checks to make sure this message ONLY appears when the player dies (not when you pause normally). That meant separating pause logic from death logic and making the UI respond accordingly.
Fixing Friendly Fire
Another huge bug that I finally fixed: enemy bullets damaging other enemies. Initially, I had no way to tell who shot what. So a ranged enemy could end up wiping out their own allies by accident. I solved this by assigning a "shooterTag" to every bullet when it's spawned (e.g., "Player" or "Enemy"), and adding logic in the bullet collision that checks the tag of the target. If the tag doesn't match the intended target group, the bullet is ignored. This ensures that enemies won’t shoot each other.
Gameplay UI System
This was something I had been postponing but was absolutely necessary: I created a dedicated "GameplayUI" script to handle all the real-time player feedback on screen. It displays the number of remaining enemies, manages the ammo count, shows/hides weapon icons, and handles both the Victory and Defeat UIs. Now, whenever an enemy dies or the player picks up a gun, the UI updates automatically.
Main Menu and Scene Flow
I finally created a Main Menu UI that appears when you launch the game. It includes Start and Quit options, and cleanly transitions into the game scene. I had to tweak the "InputSystemUIModule" and make sure the arcade setup could still navigate through the UIs.
There's a consistent flow now: from Main Menu → Gameplay → Win/Lose Screen → back to Menu or Restart.
General Polish
Beyond that, I did a general pass of polish: added sounds to firing weapons and background music, fixed some buggy input behaviors, and I even made sure that ammo UI only appears when you’re actually holding a gun. Now that I am writing this, I feel like I could have implemented the same architecture and logic I did for the weapons, but for the enemies as well. Sadly, I am running out of time, but it is worth it to mention.
Next Post
For the next blog post, I will document if the game successfully works (or not) on the arcade machine. Exited and scared at the same time.








Comentarios
Publicar un comentario