itch.io is community of indie game creators and players

Devlogs

Self-study 4.1 (Simple Games)

UTAS KIT207 Portfolio
A browser game made in HTML5

This is the devlog for the first part of the self-study 4 of my portfolio.

I have to create a simple game that involves player getting chased by and enemies that spawns, losing health when hit by an enemy, regain health when picking up health packs and ending the game when player's health is dropped to 0. 

I downloaded an asset that was provided and contained a script for spawning enemies, player's health, and a trigger detection (I already have this script).  The first thing I did was modify the spawner script so enemies would get the player's position when they spawn. I created an object and put the script on the object and ensured it contain an enemy object and would chased the player when it spawned in. 

Once I got that working, I moved on to decreasing the health of the player when the enemy hits it. I used the trigger detection script and used that script on the enemy object. I then linked the trigger detection script to the player health script so I could get the player health to decrease when the enemy hits the player.   

Lastly, I displayed a game over text when player reaches 0 health. By adding in a text from unity and displaying it when the health is 0 or less. 

Enemies spawning and chasing
Losing and Gaining Health
Game Over Screen

References:

Health Pack - https://assetstore.unity.com/packages/3d/props/small-survival-pack-20565#content

Leave a comment