PhD Blog The Return

Its been a while since I made one of these but that’s because I’ve been busy working on my PhD and some real progress as been made.

First thing I’ve developed the scenario in which the agents will operate in. I’ve not written the narrative yet but the idea is you are a ships AI computer and there is some dramatic narrative going on with the ships crew. Being the ships AI will allow you to influence the crew and narrative.

The ship is split up into two decks, first is operation deck, engineering, medical, bridge etc, second is the prison level, containing prison general area, cells and security.

Every behaviour is written using the CUBG (Character Utility Behaviour Graphs). This is a hybrid of Infinite Axis Utility System and Hierarchal Finite State Machines. You can read about the basics in a chapter I wrote for Game AI Uncovered: Volume One: 1

Below is how the prisoner behaviour currently looks using the CUBG system. There are many other behaviours that operate on this character but these are loaded in and out at runtime, making it extremely modular and flexible.

Along with the visual scripting system to create the behaviours I also wrote a number of debug tools to go along with it. An example is below (with a few bugs remaining :P, I also apologise for the size, I have a super wide screen monitor)

The green lines shows the current behaviour path, when that line turns red it means that path is locked and cannot be changed until the action that locked the path lets it go. You can double click on any node and it will break into code at that point, extremely useful for debugging. Hovering over the node will also display its contents in memory.

Some footage of the game in action is below. This shows how ship state changes affects behaviours. Here we see the prisoners having lunch until the ships alert status is changed to red. This causes the prisoners to return to their cells and the prison officer locking the cell doors. This can only be done from the security control panel. The control panel itself is a smart object and contains the CUBG for its operation, when the agent reaches this location that behaviour is run and attached to the agent at run time. Because of the natural modular nature of CUBG I’ve used them for all of the ships systems and objects.

There are a few bugs to fix but its really coming along nicely now. Next article I will go over the personality modules and how that fits in the CUBG, and then onto the narrative ai planner.

Leave a comment

Your email address will not be published. Required fields are marked *