October Development Feature – AI System

Greetings Pioneers!

Looks like all you wonderful people will be getting two updates this week! As this update is a few days overdue (technical difficulties 😉 ).

So we’re shaking things up a bit with an AI feature! As you may have heard in previous blogs our AI has been getting major work to add some variations in behaviours, decreasing their zombie-like *move towards player in a straight line and attack* and making that move towards a little more interesting, introducing some flanking behaviour into the mix and generally giving them a bit more life.

Now to pass on to Marcin and Lee for more information:

There are a number of changes we made to the way AI work, some for optimisation and some to make the design process easier.

Spawning optimisations

We are in the process of creating all the AI we need in the game at the very start and not actually destroying creatures anymore because of the hits we were getting on the garbage collector. We will have a pool of creatures ready to be used and returned to the pool once they are no longer needed.

Faster Iteration

The underlying code for the AI has been streamlined so we can have a base AI blueprint which then allows designers to change and tweaks settings to create any type of AI they require in the game from flying and walking to swimming creatures. Entire families of creatures can now be created where different specimen inherit the basic functionality of the archetype, but are able to add their own flavour, such as different visual, different attacks, different animations and reactions.

AI Perception

The perception component has had some improvements and tweaks to the way it detects objects within its field of view to make it feel more real. An addition which has been added to this is to allow the designers to place points of interest within the level or on objects which will pique the interest of any passing AI. The AI can investigate sounds and look for nearby food. We have also re-designed and streamlined how the AI picks its targets and what it does when it cannot reach it.

Modular code

The planners which govern the decision making of the AI have had an overhaul which makes designers’ lives a lot easier to modify and reuse the AI code across multiple creatures. Characteristics of behaviours can be tweaked or changes to the way a behaviour works per creature can now be made from the planner blueprint. This allows us to add a lot more variety to behaviours very quickly and easily.

A side effect of the work to do with planners has enabled us to create a mini planner which we can use for one-off scripted events or in situations where we want AI to run a few set tasks with minimal overhead and processing.

Fun Combat

The most important thing of course about all this AI work is to make sure killing them is fun. Dealing damage is only one aspect of it. We want to make sure the full experience is engaging and rewarding. The combat we’ve had so far was just so relentless and repetitive it got old very quickly. There was no room to breathe, no sense of control, no reward for doing well, and no depth. We have tried very hard to make sure the player has more options and more control.

Combat improvements

You are no longer immediately attacked the instant the creature spots you. The creature will now try to scare you off first. You can back off and leave it at that, or you show them who’s boss.

Creatures now take some time to respite after attacking giving you both an opportunity to consider your next move.

You can block with melee weapons. If the combat feels overwhelming, you can stop swinging your weapon wildly and block instead. You will have the room to breathe and assess your situation.

You can parry with melee weapons. If you time your blocking just right, you can parry the creature attack. Not only does that interrupt the creature’s attack but also makes them vulnerable for a time. We are still sorting out the details of what exactly that means, but killing a vulnerable creature should be easy and rewarding.

You can run. Sometimes you don’t want to fight, either because you don’t feel you can win or because ain’t nobody got time for that. You can now run away and the creatures will eventually leave you alone.

Stability. AI creatures now have a secondary stat, called stability. It appears as a blue bar below their health bar. Being able to send creatures flying with the Blast module was fun but overpowered. Now you need to deprive the creature of its stability for it to ragdoll, which is a little harder than a single click of a button, although not by much in most cases. Some creature are easier killed than staggered, some the exact opposite. You as a player should consider the right tool for the job.

Hit reactions. Your melee attacks are now able to interrupt the attack of the creature if it’s weaker than you. Wildly flailing your melee weapon at a bunch of enemies is no longer suicidal but sometimes just what the doctor ordered.

Overall these improvements should allow us to keep AI interactions fun and rewarding while keeping it easy for us to manage and put together different behaviours for a variety of circumstances. When we’re done AI should feel more reactive to what you are doing and feel smarter without it being overwhelming.

As for when you will see these in game, it is a matter of getting it up to a level of polish that we are satisfied with and making sure we iron out the remaining bugs!
We would also be looking to deliver these changes as part of the wider feature release.
In short… when it’s ready… 😉

See you in the fray!

-Team Flix