So, more mission AI. Made sure that on a defense mission, player characters will move back to their original position when they aren’t engaging an enemy. But what was engaging an enemy?
If an enemy’s in range, you’d shoot them. If they’re not in range, you go home. So it becomes a completely static fight and your guys never move. Boring.
But we have the psychological stat, aggression. Sounds like a more aggressive soldier would leave to pursue, right?
So we tie aggression to pursuit range, if the enemy is within max range PLUS aggression, you move to engage, otherwise you return home/stand your ground.
A lot of little bugs ironed out with that, but that’s implemented. Likewise, during the escape mission, your players will move after every shot, then make a break for it when they’ve passed all enemies. In addition, I added a point blank bonus for all firing. It seemed odd that the player could get next to an enemy and they’d be blazing away, missing repeatedly.
For future thought, perhaps people trying to escape should stand and fight if they get within a certain critical range. Because even if you were trying to escape, probably wouldn’t run RIGHT through a guy/tank with a gun, right?
Another long break in updates, but the holidays get the best of us.
I’ve been working on AI and mission types. So before randomized missions were implemented in kind and when you looked at them, but the actual missions were just the same every time. Now there are (nonsensically) randomly generated enemies for missions, as well as the assassination and defend mission types implemented. (By implemented I mean it highlights the target, ends the mission if it’s killed, and there’s different targeting AI for both.) However, I still need to implement the win/loss scenario for the defend mission mode, as well as different movement for defend and infiltrate missions. (Currently thinking that players and enemies will alternate between firing and moving when they’re trying to get somewhere yet are fighting.) It’s a fascinating process, thinking what would be the best possible thing for an AI to do given a scenario.
A good game design exercise is trying to limit what you look at to make decisions. For the AI in a defend scenario, you can look at whether the enemy is under fire, whether he’s in range, what range he is from the edge of the board, range from the player, if another soldier is vectoring in on him, relative running speed, health percentage, armor vs your weapon damage… there’s a world of data which you need to decide from, some important in some situations, some in others. It’s not making stuff up which is difficult as a game designer so much as what to care about, what to fudge, what to model, what to ignore. So fascinating.
The game continues, but I worry about being able to SHINE it in the time I’ve allocated. Finishing a working game is all good and fine, but not having the little bells and whistles done just right… Don’t have the experience so making educated guesses, but we’ll see. Oh, we’ll see….