For this week, I've improved the design of our projectile system. Previously, the projectile only fire to the player's position when first fired. This, of course, wouldn't be very logical as one wouldn't fire where he was, but rather where he was going.
Thus, I added a prediction system for the AI to use that allows the AI to gather the player's forward orientation and predict where the player will be in x amount of seconds (it is currently set to about 1 second). The implementation was a bit complicated, and nailing down the precise formula was difficult (3D space is infinitely harder to work with than 2D space). However, I was pretty happy with the results at the end. Now, if the player runs in the same direction when the AI fires, the player will be hit (with some error built in for good measure).
In addition to that, I've worked on re-modeling the projectile class as not just a part of the enemy class, but rather an ability that can be extended from and used for both AI and player alike. I've implemented the basics of how the class will be set up, but I need to do some pair programming with our other ability programmer, Blake. We need to get together and solidify the ability class, so that it properly extends to both the player and AI in a reasonable manner. Hopefully, we'll have a robust ability class that will serve well until the end of the project.
No comments:
Post a Comment