Enemies/Interaction/Puzzles


This is the third devlog for my game Last Stand and it's on Enemies/interaction/Puzzles.

For this checkpoint, I have obtained sprites that are zombies which also came with animation, which can be found here (Anwar2077, 2023). There are regular and brute version but I made another version which I'll call speedy which I made it smaller than the regular. So there are 3 variations of zombies: the zombie, brute and speedy and each have different speed, different amount of health and do different amount of damage to the player. In the game, there will be spawners set to spawn these zombies randomly. 

Image: Brute(on the left), Speedy(on the middle) and Regular(on the right).


On each variation, I have added the Seek script which was provided from the practicals and set the speed that feels appropriate and made the player a target. They'll follow the player constantly until they are killed. The alternative approach was using the pursuit script but the prediction aspect of the script doesn't give me the result that I wanted. 

They can use a gun they started with which is a pistol. The ammo sprite come from (Fightswithbears, 2023) which I clip off to make it look like one bullet and will use this sprite for ammo and health kit pickups. They can shoot at zombies, with each bullets doing 15 damage to the zombies. I implemented this by making a script for zombies health and health can be set in the inspector. Then I made it detect the tag from game object like "Pistol" which is a bullet from the pistol and if detected will decrement health by 15. When the zombie lose health, they will go red for a tiny duration, giving visual feedback that the zombie has taken damage which I did by using Sprite Renderer to change the colour and back to original colour after the set timer for showing red is done which is about 0.2 seconds. The alternative approach was to make the bullet handle the health decrement instead of the zombie script managing the health reduction. Make it so the bullet is responsible for determining the damage.

GIF: Zombies taking damage.

The player can take damage from the zombies if it bites you (touches you). Player starts with 100 health and if it reaches zero, it's game over. Each variation of zombies do different damage. Regular do 20 damage, Speedy do 10 damage and Brute do 40 damage. (These will be different from different difficulty). To implement this, I made a script for player health, which health can be set in the inspector and made it so it detects the tag from different zombies like "Zombie" (Regular), "Speedy" and "Brute" and decrement health by the value corresponding to each variation. Also has a visual feedback when it takes damage, similar to zombies taking damage, which again was done by using Sprite Renderer to change colours. The alternative approach is similar to the zombie, which I make the zombies handle the health decrement instead  of the player script. 

GIF: Player taking damage.


The feedback I have received from various members include statements saying they like how there are variations of enemies with different size, health and speed and like the colour change when either zombie or player is damaged but they say the games too easy and they were unable to die fairly easy but that due to difficulty being static and gun having unlimited ammo and can shoot unfairly fast. Some other feedbacks are that enemies "freak out" when they are stuck in the wall, likely due to their velocity constantly being changed and they think it's strange to be pushed by an enemy and said player shouldn't be pushed at all and the zombies should be spawned relative to player position rather than a static location in the world. The planned improvements is to make the game less easier by implementing rate of fire on each guns, ammo capacity on guns and having to carry limited ammo and also to implement random spawners that spawn enemies relative to player and make the game get increasingly difficult.  


References:

Anwar2077. 2023. Itch.io. [online]. Available at: https://anwar2077.itch.io/zombie-top-down

Fightswithbears. 2023. Itch.io. [online]. Available at: https://fightswithbears.itch.io/2d-health-and-ammo-pickups

Leave a comment

Log in with itch.io to leave a comment.