Broken Arrow: How to fix a broken enemy
Every month we bring gamers into our office who have never played Retrovirus before, and we get their feedback on the most recently developed content.
We call these forums ‘design meetings’ where gamers get to voice their concerns and praise in a way that can and does actually change our game design. These meetings are one of the most important metrics by which we measure if our game development process is on the right track.
At the most recent design meeting, we consistently got the feedback that one of the enemies was ‘not threatening.’ Initially I was confused as to what that even meant, but after placing one of these guys alone in a room with me it was clear. I could go about my business, and he would consistently fail to chase me down.
The enemy in question is called the ‘Shield Bearer’ – he is immune to damage from the front and has an exo-skeletal shield which he will fan out. He will then choose to charge and smash his face into you, knocking you around.
The trouble was: he would not always be facing towards you when he charged and this behavior could compound on itself. He would end up just sitting in a corner smashing his face into a wall. Let’s take a look at our AI Behavior and see what is going wrong.
Yup, there’s your problem right there. The Charge Node only has three pre-conditions:
1. He can’t already be charging
2. He can’t have his shield up
3. He must have a target
But – he needs to be facing his target too! So, I add in a fuzzy variable describing his angle towards his target:
And then added a fuzzy precondition on his AI Behavior Node:
Some of you might be thinking: why would I go to all of the trouble of making a fuzzy variable with hysteresis points and multiple terms just to check if he is facing you or not. Well, the goal is to make the behaviors in Retrovirus a little bit less predictable and more organic. If we simply measure the angle and say ‘must be less than 10 degrees’ then the engagements become more clinical. Fuzzy variables with hysteresis allow me to specify variables that become more or less true over time and which, once true, will hold their value for a while. This has the effect of making our enemies less predictable and more reactive to the situation.
After this change, the Shield Bearer no longer derps in the corner; smashing his helmet into lamp posts. He only charges when facing right at you! This makes him much more challenging to engage and ensures that he actually hits you more frequently.