Improved Enemy AI (for real this time)
- John Greaves
- Nov 11, 2020
- 1 min read
Updated: Nov 11, 2020
After class, we discussed how we are going to handle the progress to the beta build, basically, we need to have it so that there are multiple enemies and most of the systems we have in place need to be ironed out. For this week, we decided it would be best to iron out the systems we have in place so that it is ready for the beta. I was tasked with updated the enemy AI so that they are more of a threat, and they are more challenging altogether.
In order to get the enemy AI to be more of a threat, as well as making to true to the theme that they want your package. I made it so that once they see you they will start to follow you. I also changed it so that they only begin shooting at you once they have you in their sights, that way they don’t just shoot random bullets for no reason. Finally, in order to make it so that the bullets actually fire at you, I needed to use some math. I decided it would make more sense, instead of having the enemy look at you, that I would create a bullet with a vector that would go in the direction of the player’s position (at the time of fire). This way, it looks like they are trying to shoot at you and if the player stands still they will get hit, no matter what. Overall, this is a huge improvement and is definitely ready for the beta.



Comments