First playable version


Hello folks and welcome to my very first DevLog! I'm a beginner game developer using Unity and this is my first game build from scratch to working prototype that is not a tutorial. Wink


To finish my game development course, I was tasked with creating a game that teaches people about MRSA bacteria in hospitals. The education goal is that by using good hygiene, infections can be prevented. I decided to go for a 2D tower defense game where the player can build wash table towers that shoot soap at bacteria. The bacteria try to reach and infect patients.

The early concept design looked like this:

Early design

The idea is that the user can build stuff using the menu on the right and place it on empty tiles. Bacteria move inside the hospital towards the people on the beds. By building towers, soap is shot to the bacteria to defeat them. The other items slow the bacteria down, reduce the infection rate, reduce time or something else. Money is used so the user cannot build everything and money is awarded when bacteria are defeated and you lose money when patients get infected.

Using this design, I stated the Minimum Viable Product for this game as follows:
- enemies move towards targets on a 2d grid
- towers can be buld on this 2d grid that shoot the enemies
- towers cost money that is earned by defeating enemies and lost by enemies that reach their targets
- game is lost when X number of enemies reach the target and game is won when the player prevented this for X amount of time

The first step was creating a 2D grid with enemies that move towards targets. I decided to implement a path-finding algorithm at this stage because I thought it would be cool to let the enemies choose different paths toward different targets. Using a breadth-first algorithm I got the "enemies move towards targets on a 2d grid" working.

Next step was the shooting towers part. I build this by instantiating bullets that move at a set speed towards a target and use collision detection to damage the enemies. At this stage I also added some assets to represent bacteria enemies, flying soap bars and wash tables.

First shooting towers

I decided to implement the user interface at this point to show important game data like money, time left and infections. This was very straight forward to build and I challenged myself by adding a RTS-like build menu on the right side of the screen. At the moment this only contains the wash tables as build option but it's cool to get this part working.

User interface done

The game win/lost conditions where are also easy to implement by adding a Win and Lost screen in separate scenes. The max number of infections is a fixed number, but I'm not sure if this should be present on the User Interface.
Next was the task of creating a level that looked like a 2D hospital so I went to search for some pixel art on https://opengameart.org/ and https://www.deviantart.com/ and find some free assets to use. (credits to kelvinshadewing.net and https://www.deviantart.com/milkian/gallery) After some puzzling with scaling stuff to 32x32 pixels, I got something that looks more or less like a hospital:

First version completed

My MVP goals where completed but to add some polish, I added some sound & music, a main menu with an instruction screen and prevented the bacteria from going through walls. A few graphic effects where added like the particle effect when an enemy is destroyed.
 
Short term future plans are preventing the soap from going through walls, more visual feedback for the user and balancing the level better. Long term goals are more levels with more stuff to build, more types of enemies and bigger levels.

Files

HospitalDefender Play in browser
Aug 23, 2023

Leave a comment

Log in with itch.io to leave a comment.