DevLog 15: The One About the DOTS IAUS Repo

Apparently an update is way overdue. I’ve seen a lot of people start to follow me on GitHub as well as followed various projects I’m working on. However I was not sure how much of it was genuine interaction versus people waiting for a potential free product to use on their next game. This is mainly because I don’t see any issues being logged by user. If you’re running into bugs or have questions about how or why something was written the way it was, please log an issue on the repo. I can’t guarantee a quick answer as  this is a secondary job. But I will do my best to answer as thoroughly as possible. 

Based on recent alerts on my Unity forms account, I think it’s time for me to do an overview and kind of getting started guide on the work with dots and the infinite access utility AI system. For those of you that are unaware what utility AI is, the linked GDC Talks by Dave Mark will give you a complete overview of the system in ways that I could never do justice.

2013 GDC talk by Dave Mark 

Architecture Tricks: Managing Behaviors in Time, Space, and Depth starts at 33 min mark

So What is the IAUS System Repo?

The IAUS Repo is my attempt at Dave Mark’s Infinite Axis Utility AI using Unity’s Data Oriented Tech Stack’s implementation of ECS. This is to be the main AI used in the upcoming Open World Action RPG I am currently working on codenamed Project Rebirth. Beyond just being highly performant and more realistic AI, this project is focus on have an easy to implement and modify States, simple to implement AI states, and high degree of variety in AI agent with relatively little work. At this time, Dreamer’s Inc Studios is a passion project for most of the developers involved. We have primary jobs that pay the bills. So having a system that is not a nightmare to work with takes priority over refined intricate solutions. I say that because I know there are areas where there are better solutions and that I should be targeting a Pure ECS solution.

What is my system doing?

Going forward, I am assuming that you are knowledgeable of ECS, Unity DOTS as well as IAUS or have watched the videos linked above. This project is a work in progress, so expect changes to the workflow. A ScriptableObject Editor based workflow is being developed currently. Also an influence map system is all being created to work with this system. 

Editor

For simplicity, the system can be broken into 2 parts, Editor and Runtime. 

For the editor portion, I want to maintain a simple to easy that is highly customizable. For that reason, each state is implemented as a component. This allows the user to modify the response curves of each AI state on a per entity. To get IAUS running on a npc, all the user needs to do is add the Base AI Authoring class, NavMeshAgent class, assuming npc can move, and the desired AI States.  

Certain states do have help class and IComponentData that are required for functionality. Example are the PatralWaypointBuffer required for the Patrol State and AI Sense class require for the Move To Target state.(Side note: Most of the Enemy npc AI states are still under development). Once all the desired states are added with their state value, simply run the game and everything “should” work accordingly. 

Runtime and Scripts 

There are definitely efficient ways of handling IAUS or why didn’t I do it this way. At this time, the focus is on functionality. Also based on recent testing, the NavMesh system is a larger bottleneck to performance. In recent testing of 500 IAUS Agent running, the entire ECS code running on this system takes under .66ms. So for now, I am not going after anymore performance.

Everything starts with BaseAIAuthoring Class which adds the IAUSBrain, StateBuffer, and temporary SetupIAUS components to each AI Entity. The SetupIAUS component allows for the SetupIAUS Tag causing the IAUSBrainSetupSystem to run. Based on the AI State components added, a state buffer is added to the entity and the additional component required for the state operation are either verified or added to the entity. From there, each state score of each state. Currently this is done in a separate system for each state. This is probably change to an single multi job system in the future. Once that has been completed, IAUSBrainUpdate is called and the highest scoring state’s Action tag is added if it is different from the current state tag. 

Now we reach, the cause of Alpha 0.7, The implementation of a Generic Reactive System, which was Developed by WAYN_Games on the Unity forum.(link). In a nutshell, with the addition of this system, I am able to run specific jobs when the AI State Action tag are added or removed. 

This entry was posted in Dev Log, Development, Information, Unity, Updates, WIP and tagged , , , . Bookmark the permalink.

2 Responses to DevLog 15: The One About the DOTS IAUS Repo

  1. Pingback: Game Dev Digest — Issue #105 - Double Stuffed - Game Dev Feed - Abu Sayed

  2. Pingback: Gamasutra: Mike Marrone's Blog - Game Dev Digest Issue #105 - Bigmoneyclix - Iň Oňat SEO Gurallaryny Alyň We Onlaýn Pul Gazanmagy öwreniň

Leave a comment