To begin, i made a simple test scene which just included three objects on a plane. This was done in Unity, the software that is being used to make the game. Below is a screen shot of this scene.
The box is the enemy, while the semi circle is the player. The semi circle is controlled using the mouse and it was a test to try and get the enemy to respond to the player. For the enemy to see the player, I needed the outcome to be that the player had to be:
- In range
- In sightline
- In field of vision
This test was a success and the enemy only recognised the player when all three of the above aspects were working fully.
Next I decided to implement these features into the full working test scene within our game. The requirements were the same as stated above, so the player must be within the range, sightline and field of vision of the enemy. Below is a screen shot of the two characters with the code applied.
The enemy now follows the player when it recognises him. If the player is behind an object, behind the enemy or too far away, the enemy will cease to chase him.
Having set all this up, I then spent time altering the speed of the enemy and the turning circle. It is clear that the game will need a lot of play testing to get to a stage where our target market will be able to play it. Just increasing or decreasing the enemy speed gives the game a whole different level of difficulty and this must be taken into account when planning levels.
The next stage of the AI development will be to get the enemy to attack the player and damage their health. Also, one of the main stages next will be to get the enemy to follow paths around the level. This is unfortunately unavailable to me at the moment due to me needing extra software. I hope to get this soon and get enemy navigation implemented quickly after.
Posted by Philip Rozier
Hi Phil
ReplyDeletethis is progressing well. You might want to blog a proper annotated bibliographic reference, re the reply i sent Tom last week so i know you are on track with this, would be good if Tom did the same.
rob
Thanks Rob, I will wait until you check it today. Tom
ReplyDeleteOk, thanks for the feedback Rob. I will post on both the bibliographic reference and the dissertation proposal for your review on Sunday.
ReplyDeletePhil