Sunday, October 6, 2013

MicroDude Log 2: AI Challenges

One of the first big hurdles I had to overcome when I was programming MicroDude was the main stealth mechanic. How were enemies going to sense that the player was near? I ended up going with a system that would spew sensor objects from the enemy npc in a different direction depending on where the enemy was facing. When the sensor objects would collide with the player, it would set the enemy into an alert state where it would stop in its current position then fire a projectile toward the player. The flaws of this method were that since the sensor objects would spawn on a timer, the player could jump through gaps in the sensors and avoiding detection in plain sight. One I made the sensors invisible though it became much more difficult to do. Another flaw was that the sensors move at a certain speed and it is actually possible for the player to out run the sensor before the sensor deletes itself. The advantage to this method of stealth system was that enemies could not detect the player through walls which was the reason that I chose this system. I originally though that a system that checked the relative position of the player would suffice but there was no way to not detect the player through walls.

No comments:

Post a Comment