remvst Posted November 15, 2013 Share Posted November 15, 2013 In this series of articles, I'm going to describe how I created the enemies' artificial intelligence in my game Infiltration. The first step was to determine how enemies should move throughout the levels when they do not interact with the player. Having them take random patterns was not an option, because I wanted them to take the exact same path every time the user plays the same level. Read more tackle and Luis Felipe 2 Quote Link to comment Share on other sites More sharing options...
remvst Posted January 11, 2014 Author Share Posted January 11, 2014 Here is the second part, a bit late but better late than never In my previous article, Building Logic for AI in Games – Part 1: Simple Movement, I discussed how I made enemies follow certain paths in my HTML5 game, Infiltration. I then had to figure out how to make enemies see the player. In order to check if an enemy sees the player, I first perform a simple distance check. Indeed, if an enemy is too far from the player, I consider that he shouldn’t be able to see him.Then, I perform the angle check. I have two angles: the direction towards which the enemy looks, and the angle from the enemy directly to the player. Considering that the enemy has a 90° field of view, I have to check if the difference between these two angles is below or above 45°. ... Read more tackle 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.