[50] Patrols And Paths
Antorum
06/10/2025, 09:29pm
365 views
Lately I've been putting more work into NPCs and their interactions with the world and player. One cool thing you can do now is create and assign paths - perfect for patrolling guards, wildlife, cutscene choreography, and other fun stuff. It all works through the new PatrolPathComponent.
The new Component is pretty straightforward: it manages a list of waypoint positions/nodes. NPCs can reference this Component on a target Entity (via a UUID) and then follow that path. Initially, I thought about creating a more atomic node Component, and then implementing paths such that each node is another Entity with that Component, referencing the next like a sort of linked list. In the end, though, I kept it simple and took the monolithic approach. Gotta keep moving.
Aside from defining the path itself, there are three path types to choose from:
- Loop: Travel to each node in order, then go back to the beginning. Repeat.
- Ping Pong: Travel to the end of the path, then reverse direction. Repeat.
- Random: Travel to a random Node. Repeat.
The tooling for this was a bit of a grind. I ended up using a similar pattern that Unity does, creating an interface for custom inspectors based on Component types, then using that to create new UI as well as override the wireframe rendering of certain Component types entirely. This means Entities like the Player Spawner can have a specific visual representation in the editor (a wireframe character model), and others like Patrol Paths can render each Node as a wire sphere, along with a custom inspector for adding, removing, and jumping to Nodes. I also added brand new transformation gizmos using the super cool Runtime Transform Gizmos package. Moving things around the game world is very intuitive now.


Another neat thing I finally did was upgrade to Unity 6, as well as update our dependencies and convert over to the new input system. It is nice to be back on a stable release. This fixed some annoying issues — particularly one where the engine was keeping some gamepad polling thread active, keeping the game executable from ever actually closing. Hopefully it will be a while before I have to do this again.
In other news... there is a wiki now! It will be a technical hub for scripting guides, specs, documentation, tutorials, etc. I hope it will help keep things clear and accessible for anyone interested in modding Antorum. It isn't public yet, but it will be available soon, with the first new playable build of the game in years.

Lastly, somewhat unrelated to Antorum, Rat Wizard has launched a new game called Glorbio. We are awaiting word from the Chamber of Commerce on the exchange rate between Glorp and Antorum Standard Credits. Praise Glorath.
More updates to come. Thanks for reading.
- Declan (@dooskington)