Making the Enemy AI
When I was making the AI for the enemy in "Watched", I had a couple of options:
- Make the enemy follow waypoints, and deviate from them if it sees the player.
- Make the enemy go to the player's current position on an interval, and chase the player if it sees them.
Both of these methods had their downsides though. If I just used waypoints, the enemy might feel too predictable, and might be too easy to avoid. Making the enemy travel to the player's position on an interval might make the player encounter the enemy too often, or not often enough if they are moving around the map a lot.
I decided to go with a hybrid of these methods. The enemy picks a random waypoint, and starts going there. If on its way it spots the player, it will chase the player until it loses sight of them. However, the enemy will also get the player's position on an interval. Usually by the time it gets there, the player will have moved somewhere else. But this method makes the enemy's position more unpredictable, and it might run across the player while going to a player's previous position.
Files
Get Watched
Watched
The power's out. You get the feeling that you're not alone...
Status | Released |
Author | TheGamerASD |
Tags | 3D, Atmospheric, First-Person, Ghosts, Horror, Low-poly, Pixel Art, Retro, Singleplayer, Unity |
Languages | English |
More posts
- Update 1.0.1Sep 20, 2020
Leave a comment
Log in with itch.io to leave a comment.