State of the Game #248: Slow but Steady

This week my progress has been slightly slower than normal. However, I have been able to address lots of things!

One of the big issues I fixed was the AI, their aiming system, and how they were dirty little cheaters without me even knowing it!

First, the cheating.

In doing some play tests, I noticed the AI didn’t seem to be affected by cockpit impact recoil at all! This was a big surprise to me, as gone through quite a bit of effort to ensure that the AI played the game through the same inputs as a human player. This means they don’t get to set their aim directly, they have to input controls to the same input system a player uses. Well, I happened to be digging through this piece and noticed a small code branch that wasn’t updated to account for the mouse stability. This mistake was allowing the AI to input values 1000 times larger than should be allowed! While the actual turning force applied to the cockpit was still properly limited, that large input force did mean the AI counter acted cockpit impact forces instantly and thus was able to minimize the movement they caused.

So, to address this I added a simple ‘Reaction Time’ to the AI. This gives me a tune-able value that will adjust the general amount of time that it will take the AI to react to a ‘cockpit shake’ event. In addition, when they do react it’s possible they start to react to quickly with the wrong/not optimal input values which will give them a slight reeling look. This has now put the AI back on par with players in terms of dealing with all the affects of combat in MAV.

So, this change made the AI pretty easy. It became faily easy to stun lock them with high impact force weapons and winning an Arena match against 4 AI’s without dieing was becoming fairly common for me [your mileage may vary 😉 ]. Lucky for us, I found another bug in the aiming code!

This issue dealt with what the AI does as it get close to the ‘optimal’ aim point for hitting you with it’s weapon. There is an built in threshold around the optimal aim point in which the AI will still fire it’s weapon as well. This gives a really good user experience as it will generate a lot of near misses and with the randomness of some weapons will even allow the AI to hit more often! The problem though was that the AI would enter this ‘close but not there’ zone and then stop trying to correct it’s aim. Or more accurately, it would try to correct the AIM, but it would do it with increasingly small input values, ensuring it would near actually get there. This was really apparent in support AI that could not properly hit a base, always aiming a bit to high, or a sniper that always lands close but never hits you.

Good news, I fixed the issue!

Bad new, the AI got gud:

That was me vs 4 random AI and I was using the same build I played the dev stream with. And I was TRYING to win! I was able to barely squeak out the win, but from the damage numbers and the part kills, you can tell the AI is doing something much different!

In other news, I tracked down in issue in the MAV camo shader that was causing issues with 4 color camo patterns. I got this fixed as well! I also created a new installer pipeline, so I will be able to keep the installer updated, in spite of MAV growing past the 2GB limit of my last installer solution.

That’s all for this week!

Comments 4

  1. Making the AI less of a pushover is a great way for players to experience the game. It gets us to be more creative and crafty in our tactics rather than having a cake walk too often.

    Great update Cyber!!

Leave a Reply