I am designing a custom AI with my own custom pathing system, as requested by a client!
Here’s a video of my progress with my very own pathing system!
What you see in video is that I am dynamically generating as-large-as-possible nodes to represent open spaces of no collision in the world.
My dynamic pathing system generates whatever size shapes are required to contain collision-blocking objects, including physics simulating meshes!
My internal data representation is utterly simple, just a point and a radius, though I draw them as boxes to be easy on the engine (spheres take longer to draw in large quantity).
**Full Physics Support** In the video I keep dropping physics simulating meshes into the world and you can see how my dynamic pathing system adapts to the changing outlines of the physics meshes!! The AI I am designing will use these nodes to navigate through the world, avoiding objects with collision, to get to their chosen destinations! The larger the node is the better! This means the AI has choice as to how it wishes to path through those larger nodes. Having that much space allows the AI to customize its movement patterns so that each type of creature feels unique, and knows where it can roam free and where it has to fit through tight spaces. :)
The entire process that you see in this video is multi-threaded!
I am leveraging our modern technology for my pathing system!
The game thread is free!
The only thing the game thread is doing is drawing the results as it receives them from my dynamic navigation thread, and it wont even be doing that during normal gameplay!
The AI will also be able to be multi threaded, since my core data is USTRUCT, below the UOBJECT level.
You can’t multi thread changes to UObject data, so my entire pathing system is a series of USTRUCTS.
Several arrays inside of arrays inside of some more arrays actually
The result of staying at the USTRUCT level is that I can easily multi-thread my entire AI system!
This means maximum performance for high speed gameplay with fast and intelligent AI units!
Enjoy the video!
**Rama's Multi Threaded Pathing System With Physics Support, In Action! ** Here it is! My own pathing system which I wrote from scratch, which has fully physics support and does dynamic recalculations whenever needed by each AI unit! My system supports 400 units using it simultaneously, maintaining 60fps! I wrote this whole thing from scratch, the only interaction I have with UE4 movement code is the fact that I am applying velocity to the character movement component (which replicates by the way)! Everything else is being done by my own system! Enjooy! https://youtube.com/watch?v=YJ15cu9bmnE Rama