Individual Project – Production Dairy #2

After testing out different melee combat and failing I was a little bit behind this week but not too much and I will need to do a bit more work this week but I’ll still be able to get my tasks done for this week. My tasks for this week are working on a health system for both the enemy and player controllers along with a damage system along with working on the enemy AI and enemy attacks.

Implementing a health and damage system won’t be something I will not struggle with as it is something I have done before so I will try to get this done first so I can have enough time to do more complicated features in the game like enemy AI.

The enemy being damaged by the player.

A really simple bit of programming within C# in Unity using public variables that allow me to change the health of both the enemy which allows me to have a variety of enemies with higher or lower health for more interesting gameplay rather than a set amount of health for enemies.

With both the damage and health systems done for both the player and the enemy characters, I now have plenty of time to work on enemy AI which will definitely a lot harder than the health and damage systems. To do the enemy AI I will be using NavMesh which is the built-in pathfinding system within the unity engine.

NavMesh allows me to set what is walkable for the enemy AI and what isn’t by selecting “Walkable” & “Not Walkable” within the navigation menu. I will also need to set the NavMesh within the enemy controller for the enemy to recognise what to walk on and what not to. Along with this I also need the enemy to target the player which is something I’ve also done before and is a much simpler task to implement into the game.

Enemy following player

Overall, I happy with how my enemy AI has turned out, the enemy now follows the player around along with avoiding obstacles throughout the environment. But, I wasn’t happy with how all the enemy does they reach the player is collide with them and take some health, so I decided instead of having that I would have the enemy lunge at player and go back to their original position, I’ve never done something like this before so it might fail but I’m confident in my ability to try and implement this feature into my game,

This took a long time to implement with a lot of researching and maths required to try and implement into the game by having three different states in which the enemy is in, idle, chasing and attacking with this implementation it will also me to effectively add animations for these states at a later date. Overall though, I am happy with the enemy attacks it worked well and is definitely much more interesting than the enemy just following the player.

Enemies attacking the player.

For this week I am happy with the amount of work I have got done, I was behind last week but I managed to make progress with my game, next week I plan on working on a wave system for enemies to spawn in waves which is a core mechanic of my game, I will also try to block out some level designs to make an interesting level.