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 pure stealth game where you use stealth takedowns and gadgets to finish objectives.
You play as an assasin/partizan sabotaging the spanish effort in Antwerp during the 80 year
in the 17th century.
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)
core behaviour tree that used a state machine to control which sub tree to run.
To get
feedbackon the
technical designI
passed it bythe
AI teamand communicated with
level desingregarding 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(Allot of smaller adjustments made by programmers and designers)
handing out "tokens" to AI actorsbased on specific variables
to allow them to peform 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 useI
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)
prototypingand preproduction phase.
Using the existing unreal perception componentas 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 perceptionin action. The
debug lines represent some of the checksdescribed above.
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
Implementationwas done
inits 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 the 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 another designer)
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
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 and 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 and with less issues I also 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 its
flow(besides minor adjustments in variables and decorators its mostly still accurate)
Agro Group Behaviour - Implementation
Implemented the 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
the behaviour tree makes active use of the Token systemI made
and Unreal's EQS(Enviormental query system). Melee and ranged
AI uses EQS to decide where to moveto at specified ranges around the player,
keeping some distancefrom eachother and the player
to not overwhelm the playerand 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 acording 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