's Multi-Threaded Dynamic Pathing System, Full Physics Support

AI Jumping Advanced ~ Edge Detection

In video I am using Nav Mesh ray tracing to find the edge nav polys that are near the current chosen goal!

enables me to give each AI unit better instructions about the best way to jump to reach their current goal, if gaps are detected!

I’ve already got my gap detection system working :slight_smile:


**Nav Mesh Ray Tracing**

Nav Mesh ray tracing is very efficient! It is much less expensive than 3D world tracing :)

It's the same concept as regular traces but only operates within the nav mesh polys.

AI Performance

Notice how in my video my AI reaches me everywhere I go, including sequential isolated platforms!


**No Extra Helpers in Level**

The only thing in level is the basic nav mesh volume! 

I have not provided any assistance to the AI in the level itself! No nav links! 

The idea is that in my games I need support for runtime generated platforms and gaps, so the AI must figure everything out dynamically each time they wish to path, without any extra helpers.

C++ Core, BP Accessibility and Control

Everything you see in the video is me doing C++ calculations to find the best jumping paths :slight_smile:

I have exposed all the key variables of my algorithms to blueprints though, so that anyone can tweak the AI jumping, per creature!

That’s right! Anyone using my system can adjust my algorithms per individual creature!

is unit-level AI !


**Video**

https://youtube.com/VgAbYMcDjms

Enjoy!

!

is simply Amazing!

I am new to UE4 but have a lot of experience coding AI in Neverwinter Nights 1 so the AI behaves more intelligently and huge performance increases. What you are doing with is incredible!

would be a great AI system base for both Enemy and Companions. Give players a few hundred things to think about. :slight_smile:

I want/need something like ! haha!!

Krixa!

Hee hee thanks Krixa!

(sorry I read your reply earlier but forgot to respond!)

Great to hear from you!

Quick Update Video

Just a quick update video, showing how I am gathering all nav mesh areas that are non-contiguous / not directly pathable to from the goal location.

I am using test to determine which nav areas are valid to be pathed to via jumping!

Again the whole focus is nav areas which are non contiguous / jumping is required.

I am now going to use data to develop a jump-pathing system, an additional layer of pathing on top of UE4 pathing.

Enjoy!

https://youtube.com/2RWiD_epPiI

**New Video!

Branching Jump Paths Search**

Hi there!

In video I am demoing the progress of my Jump Path algorithm where I am finding jump pathways for the AI unit to follow, which necessarily involve switching between different sections of nav mesh that are not contiguous.


**Comparison**

Regular AI pathing requires navlinks to do , but I am writing my own system so I can have runtime generated geometry that the AI unit can still do jump pathing over, and there is no extra work for the level designers, I am doing it all in C++!

Efficiency?

In video you see the radial line checks I am doing.

These are not traces!

is very low level simple math calculations!

The line is being checked against a box using UE4’s related math functions, and it is very efficient!


**Tick Speed**

I am slowing down the algorithm in the video so you can see it better, and also so I can debug it as I am making it, visually seeing each phase of what it is doing.

Algorithm Overview

  1. First I am getting all of the Edge nav areas, as seen in prior videos, then I am doing radial traces from each edge to find nearby nav areas that are facing away from the start point of where I am testing.

These found nav areas are highlighted in green!

Again no traces or even nav mesh raycasts are involved, just simple box/line math calculations!


**Next step:**

Next step will be to make check run itself over each successive step in the path, find the best points for the AI unit to path to and then jump from to get to the next point

Enjoy!


https://youtube.com/WMnGyMSfbIk

That is looking very good with low perf. Great work :slight_smile:

Please tell me that you’re planning to finish whole system and either get it into a future version of Unreal Engine 4 or turn it into a plugin and upload it to the marketplace!?!?! I would die of excitement if either of those two were to happen! Good work ! :smiley:

Hee hee thanks Devero!

I can’t wait till you make all your cutting edge animation research public! * hint hint*

Hey there !

Sorry I will check out that large map you sent me at some point soon, been rather busy lately :slight_smile:

Making my AI system into a plugin would not be too hard, given that I am developing around a single class, the character class, and it is just a series of AI components + all of my C++ code :slight_smile:

But Epic is changing the whole AI component system in the very near future, so I need to see what changes in 4.5 and also wait for Marketplace plugins to be allowed by Epic!

But thank you for the feedback, hee hee!

:heart:

It’s alright lol, and oh, ok! Haha, thanks for the reply! Keep up the good work! :smiley:

**Jump Pathing System

Major Progress Update**

Major progress!

I’ve now succeeded in recursively generating paths from the ultimate goal to the unit’s current location!

As you can see in the video different paths are generated each time, and only successful ones are recorded!

Again what you are seeing are paths that involve a series of consecutive jumps, where there is no direct path to the goal!

is my Jump Pathing system!


**The Next Hop**

My next hop will be to actually make the unit follow one of the paths that gets found, once it gets found!

Performance

I slowed down the tick rate for the video so you could see what was happening, it is normally much faster :slight_smile:

https://youtube.com/v9dfxGUIdJk

Hee hee! Thanks !


**Update**

I am putting the jump pathing on hold at the moment to work on other aspects of Abatron, which Devero has just publicly announced here on the forums!

https://forums.unrealengine.com/showthread.php?45059-Abatron-the-making-of-a-UE4-Hybrid-game-)&p=151952&viewfull=1#post151952

He's done some amazing work with UE4 curves driven by C++ and Anim Blueprints!

Here I am reposting my favorite video from thread so far, for anyone new to the thread.

What you’re seeing in video is my dynamic AI jump pathing system, finding a correct path across a very irregular surface requiring multiple jumps!

All done in C++!

The AI did not get any help in the editor, was strictly my C++ AI analysis of the world environment!

Again just sharing again because it was a such a moment for me in my AI development :slight_smile:

/0GX-1x-wACI

First and so far only gif I’ve ever made, cause it was such a incredible moment for me :slight_smile:

[/QUOTE]

:heart:

Hey sorry it has been a while, but really love the progress you have made on your system! :smiley: Also congrats on becoming ‘Elite’ with your 1000th post! :stuck_out_tongue:

Have you done any analysis on the performance difference between using the nav system and your implementation, with your code only I mean, not slowing it down for so you can see how the AI is deciding it’s path (I think I read you had to slow it down for showing in video a while ago, correct me if I am wrong though)? If you are able to compare it, your system may be too advanced for a real comparison!

Looking good, keep us updated! :slight_smile:

Hi there !

Actually my current implementation is a hybrid of my own systems + UE4 nav mesh system, I am basically extending the UE4 system to do fancier things!

By subclassing and extending the base UE4 nav components I can use all of their functions and the nav mesh functions as tools to build my own complex AI systems!

It’s going very very well actually!

I even got the UE4 nav system to work for the AI units in my game that is a physics-based multiplayer game, where the AI unit is always simulating physics! I had to also use a custom character movement component for that though :slight_smile:

Great to hear from you!

:heart:

Ranged AI Units, Intense Explosiveness!

Dear Community,

I have just released a new video!

is a very sophisticated high tech demo of ranged AI units using a very special mesh provided to me by forum member !

After the first round of Sheer Intensity, you will see 's animation skills at work to animate the co…I mean ranged unit!

Many thanks to for the ranged unit model, you can find a download link to it earlier in thread!

Thanks !


**Gameplay Balance**


**Please be aware, I've carefully balanced unit, though it may require a bit more testing.**


Team Based Area of Effect Explosions

video also is a demonstration of Team-based AOE damage, where the melee allies of the ranged unit dont take damage, but opposing units are sent flying in all directions if they are not out right returned to their natural Tree-dom.

Enjoy!

https://youtube.com/EHBs5GMxxN8

That was so awesome! Fire spitting cows! :smiley:
Glad you found a use for it. :slight_smile:

That was great, good work. Now you need the flying ufos, to come in and destroy the cows. =)

Hee hee thanks again !

Ufos and Cows will join forces and to spread rainbows everywhere!

:slight_smile:

For those of you new to thread, video below and the description explains one of the core aspects of what I’ve been doing with AI in UE4, which is setting up targeting system and completely automated behavior where a human player is not even involved!

Here below you see my RTS units going and attacking RTS buildings, picking paths and spreading out to cover more surface area!

[FONT=Comic Sans MS] AI Blows Stuff Up

https://youtube.com/gjCDA_FiVxk

Everything you see in the video is completely dynamically calculated by me in the C++!

Nothing is pre-scripted!

I do not even tell the AI units what to target when they are spawned!

Everything you see is my own AI system at work

  1. all the pathing is my own pathing system, from scratch

  2. I set up an Alignment system so the AI units know who is friendly and which structures to attack

  3. The AI is told by me to spread out, and keep track of which structures other friendly units are attacking.

maximizes their usefulness to each other, as they cover maximum building surface area!

Meaning, if a new AI unit is trying to pick a target, my AI will try to pick a target that no other friendly in the area is attacking yet.

  1. Each AI unit is keeping track of all nearby friendly units during runtime, dynamically updating its personal list of friendlies every few moments.

means each AI unit is aware of all friendlies at all times, as well as all nearby structures

  1. When a structure is destroyed, each AI unit tries to find a new target

  2. Apex destructibles block the AI pathing, so they try to get around using my dynamic physics pathing system.

  3. Each AI unit is consciously deciding how far to position itself away from the target building for ideal melee range.

  4. Each AI unit is deciding when it is close enough to the surface area of its target structure and then stops moving and begins attacking.

  5. As I said, nothing is pre-arranged, as you saw I ran multiple tests! The AI is spreading and and performing to all my specifications listed above!

  6. Yay! Victory!!!

:slight_smile:

PS: the sparks are created at the precise point in the animation sequence that I specify, using an anim notify.

anim notify then calls my C++ AI function for doing damage.

So the visual appearance of doing damage is indeed triggering my C++ AI system !

The visual appearance and the C++ are linked together completely!

** AI Makes New Forests**

Hi there!

Ever wonder how forests are made?

Here’s another one of my favorite videos from thread, for your entertainment!

Features:

  1. Programmatic setting of team color, that can be completely customized in BP

  2. AI pathing around obstacles

  3. AI direct pathing to chosen target

  4. AI moving around friendly AI units to get to open spot on target

  5. AI battles!

  6. AI damage to each other

  7. AI auto targeting buildings after all defenders…transmuted.

  8. A Surprise!

https://youtube.com/QOkRnxSxUrM