Project period: 2023 - 2024, for an entire school year.
My role: AI Programmer & assisting AI designer.
My contribution:
- AI Architecture
- AI Investigation state
- AI Group Behaviour
- AI Audio detection & detection rules
- Some AI design
- Unreal World Partitioning
The Game
Sicaria is a stealth game where you use takedowns and gadgets to navigate through the levels and complete objectives.
You play as an assassin/partizan sabotaging the Spanish effort in Antwerp during the 80 years war.
Investigation for single & group AI
- Both
implementation and design work Designed and implementedthe flow of thebehaviour treeImplemented audio cuesandanimationsEQS(Environmental query system) teststo find valid positions
Summary:
The
Implementationwas done
init's dedicated
investigation sub behaviour tree. Any AI can respond to a noise or something it saw with a group related voice line but only the closest AI investigates, both
actions are determined using a token system.
To find a pointthat is
at a valid distanceand
in line of sightof what triggered the behaviour
we use EQS.
I also
took on part of the designsince the person assigned to this was already busy with other aspects of the AI.
To verify the quality and directionof the work I did,
and to learna bit
about designing AIin the process,
I passed my work by the AI designer for feedback and iteration.
AI reacting to soundand only
one of them investigating(breaks up a scripted event made by a designer)
Agro Group Behaviour - Implementation
Implemented a token-based combat loopas defined by the designAI surrounds targetOne melee AI attacksat a timewith cooldownOne ranged AI attacksat a timewith cooldownOther details defined by the designthat I implemented
Summary:
The flow in
the behaviour tree makes active use of a Token systemI made
and Unreal's EQS(Environmental query system). Both the melee and ranged
AI use EQS to decide where to move to, at specified ranges around the player,
keeping some distancefrom each other and the player
to not overwhelm the playerand to allow them to try and run. By only assigning one melee and ranged attack token to a group,
the token system is used to avoid overwhelming the playerby only
allowing one enemy to attack at a time.
This was all
done according to the designI made but it was still
passed by our AI designer to verifyit worked and
fit the game in the way they expected from my design.
AI behaviour showcasedin my test world using geometry from the main level
AI Architecture
Technical designdocumented in MiroImplementedthe whole systemRobustandeasy to adjustCentralisedfunctions foreasy debuggingLow levelcomponents inC++(Only programmers touch this)High levelcomponents inBlueprints(Programmers and designers touch this)
Summary:
The system was made using a
core behaviour tree that used a state machine to control which sub tree to run.
To get feedback on the technical design I passed it by the AI team andcommunicated with
level designregarding their needs for the AI.
After the project I learnedthat while a state machine does work, part of
benefit of using a behaviour tree is no longer needing to not maintain a state machine. I used a behaviour tree, as intended, in a later project and
through this experience I learnedto-do a bit
more research into systemsbefore using them,
even if you think you know how they work.
technical designas documented in Miro.
Group Behaviour / Token System Architecture
Technical designdocumented in MiroImplementedthe whole systemGroupsthatmanages actors and tokensTokensused thatallow AI to actReleasing and returning tokens in C++(Only minor adjustments needed)Specific checksfor releasing tokensin blueprint(A lot of smaller adjustments made by programmers and designers)
Summary:
The system works by
handing out "tokens" to AI actorsbased on specific variables
to allow the actor to perform specific actions, this way you can for example have one or more enemy’s attack at a time or have only one enemy in a group investigate some sound they heard. The core of the group behaviour was based on a simple token system as explained by one of our lecturers.
To verifythe system was
clear and easy to use I passed it by level designsince they would be
adjusting it the most.
technical designas documented in Miro:
Audio Perception
Custom noise componentfor trigger an audio signal on any objectLine traceandpathfindingchecksCheckifwalls block audioCheckif audio canpass throughthe wallCheckif audio canpass overthe wallCheckif audio canpass aroundthe wall(pathfinding)
Summary:
The audio perception was developed during the
prototypingand preproduction phase.
Using the existing unreal perception component as a basis, we wanted to test how we could handle audio perception, if we needed to make something new for it and to what detail we should make perception checks. The perception stayed mostly the same as the prototype with the
core of the system in C++and a
modular structure in blueprint for the specific checks. This way design could
easily add on to and adjustthe flow of the checks
without having to dive into the code.
I passed my work by the AI team but
primarily checked in with Level Design to address the needs of the level.
audio perception with it's relevant checksin action.
Agro Group Behaviour - Design
Researched group behaviourin other gamesEvaluatedaspects ofthe behaviour and how it would fit in our game- Made a
visual representationin Miroto support the design
Summary:
I picked this task up because the other designers and specifically the AI designer was too busy with the other aspects of the AI, and I was interested in practising some design anyway. I
researched similar gamesto ours like Assassin's Creed Black Flag and Dishonored 2 to see
how they handled group behaviour, took notes and
evaluated why and howthey implemented certain aspects of the group behaviour, and
assessed their suitability in the context of our game, including the "feel" we wanted for our AI. I
compiledthese findings
in a documentand
passed it by our AI designer.
After iterating on the feedback and making a visualizationof the design I got a
final pass by the designersince they still had the final say on the details.
To make implementation easier, with less adjustments and with less issues I created a flow diagram for the structure of the behaviour tree.
Visualized designof the group behaviour for both melee and ranged enemies,
does not include some of the reasonings that would be described in the research document
technical designfor the
behaviour treeand it's
flow, besides some minor adjustments to variables it's mostly accurate to the final product