Announcement

Collapse
No announcement yet.

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

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Jacky View Post
    That was so awesome! Fire spitting cows!
    Glad you found a use for it.
    Hee hee thanks again Jacky!

    Originally posted by Devero View Post
    That was great, good work. Now you need the flying ufos, to come in and destroy the cows. =)
    Ufos and Cows will join forces and to spread rainbows everywhere!



    Rama
    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    ♥ Rama

    Comment


      For those of you new to this thread, this 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!

      Rama AI Blows Stuff Up



      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.

      This 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.


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

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

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

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

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

      8. 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.

      9. 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!

      10. Yay! Victory!!!



      Rama

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

      This 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!
      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

      ♥ Rama

      Comment


        Rama AI Makes New Forests

        Hi there!

        Ever wonder how forests are made?

        Here's another one of my favorite videos from this 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!

        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          Just revisiting this fun video of my success with getting UE4 AI system working with physics simulating rolling balls, hee hee!

          there's no Matinee or tracks or splines in the editor involved here!

          This is all done via C++ AI system, and I am picking destinations for the AI units to move to and then they are going their!

          I also made my own AI Jump volume, which tosses the balls into the air, forcing them to retrace their way back to their chosen destination.

          Rama's Physics Character Pathing System

          I just had a major AI Victory!

          I overrode and rewrote large portions of Epic's Character AI Pathing system to work with physics simulating characters!

          There's no native support for this, but using some of my own functions that I've been writing for my physics multiplayer game, I was able to do it!

          Epic very nicely exposed as virtual all the functions I needed to override, thank you Epic!


          Here is the result!





          Rama
          UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

          ♥ Rama

          Comment


            @Rama - sounds like you have everything needed to make a truly dynamic character controller. All that's left mainly is making the character "walk on raycasts" (use two per foot IMO) to determine when they are falling/in air, and also a center of gravity calculation. If the COG is not over the feet, make the character fall/ragdoll in the direction of the COG. It's possible to do some extremely awesome stuff with a truly dynamic character like that. You'd want to use the PhAT collision rather than a capsule in that case as well, to get even more out of it.
            Storyteller - An immersive VR audiobook player

            Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

            Comment


              Originally posted by n00854180t View Post
              You'd want to use the PhAT collision rather than a capsule in that case as well, to get even more out of it.
              Lovely to hear from you n00854180t !!

              Actually these characters are simulating physics already so they are using PhAT collision, you are talking about the rolling spheres or something else?



              Great to hear from you!



              Rama
              UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

              ♥ Rama

              Comment


                Dynamic AI Jumping For Shortcuts

                In this video I am demonstrating the use of Navigation Mesh Point Projection to identify shortcuts for the navigation path that require jumping!

                When you see my AI jump to take shortcuts to their goal in this video, it is not pre-determined!

                I am dynamically calculating whether the AI should take a shortcut by jumping, and then overriding their normal pathing system so that they pursue the shortcut instead.

                Toward the end of the video you will see them jumping pretty high to reach their goal that is on higher ground!


                I did all the coding for this in C++ in my custom navigation component classes and the character class


                When the AI unit is following the jumping shortcut I do the code in the character class, and turn normal pathing off.

                While in normal pathing, I am running my own custom navigation point project line tests to check for shortcuts, which is what those lines of dots are!

                I stop as soon as higher ground is found that has pathing on it, and redirect the AI to use this shortcut!

                ~~~

                Navigation Point Projection

                This involves taking a 3D world space point, and using a volume extent to check if there are any nearby points in the navigation mesh that are within the z value of the extent.

                In this way I can check if higher or lower ground has pathing, and is thus viable to path to via a jump!

                Finding the best shortcuts and telling the AI to use them involved a loooot of C++ coding on my part hee hee!

                Thank you to Epic for USTRUCTS so I could expose all of this to Blueprints and keep the data organized in code without creating additional classes!

                ~~~

                Video


                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                ♥ Rama

                Comment


                  This is impressive, nothing else would I expect from you Rama ^^
                  As I assume it's fit for your client needs and will be only available to him/her (at least this is what I assume), I do wonder if it worked with custom movement like double jumps or dashing or more accurate how hard would it be to implement?
                  But as I said: impressive work, keep it up!

                  Comment


                    That's pretty impressive. Will your pathfinding become part of UE4 engine ? Why Epic is not hiring you ?

                    Comment


                      Looking great as always Rama, great work. I like the new butterflies in your signature! =)
                      W3 Studios

                      Comment


                        Originally posted by Dakraid View Post
                        This is impressive, nothing else would I expect from you Rama ^^
                        As I assume it's fit for your client needs and will be only available to him/her (at least this is what I assume), I do wonder if it worked with custom movement like double jumps or dashing or more accurate how hard would it be to implement?
                        But as I said: impressive work, keep it up!
                        It would not be hard for me to get the AI to use all kinds of custom abilities, which is what I'll be doing for Abatron!

                        But I agree it will require tailoring and tweaking of various settings.

                        My entire AI system is exposed to BP for tweaking though, so this works out just fine!



                        Originally posted by Galeon View Post
                        That's pretty impressive. Will your pathfinding become part of UE4 engine ? Why Epic is not hiring you ?
                        Hee hee!

                        Nice to hear from you Galeon

                        Originally posted by Devero View Post
                        Looking great as always Rama, great work. I like the new butterflies in your signature! =)
                        Hee hee!

                        Butterflies!



                        Rama
                        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                        ♥ Rama

                        Comment


                          Hey Rama, how much C++ code have you had to parse thru and write to get all this stuff working? I'm probably about to go down a similar route and am glad to see that it's not impossibly difficult to go deep down into the pathfinding system and override stuff in C++. Any advice on what classes and functions to look out for on that journey? I'm also running into the need for weird pathfinding on dynamically generated terrain with agents that will need to find jump points and such. I thought I was going to have to dynamically generate nav link proxies, but it seems your solution is equally robust as a different option.

                          Comment


                            Originally posted by Ruffian View Post
                            Hey Rama, how much C++ code have you had to parse thru and write to get all this stuff working? I'm probably about to go down a similar route and am glad to see that it's not impossibly difficult to go deep down into the pathfinding system and override stuff in C++. Any advice on what classes and functions to look out for on that journey? I'm also running into the need for weird pathfinding on dynamically generated terrain with agents that will need to find jump points and such. I thought I was going to have to dynamically generate nav link proxies, but it seems your solution is equally robust as a different option.
                            I did everything using just PathFollowingComponent!

                            I did a lot of calculations in Character class, and that's about it!

                            I think you should just get started and see how it goes!

                            Here's a wiki tutorial on using a custom PathFollowingComponent (by Mieszko)

                            https://wiki.unrealengine.com/Unreal...Path_Following

                            ~~~

                            Video Of Rama's Jump Pathing AI

                            In this video, my AI is dynamically finding jumping routes without any help from nav links, runtime-created or placed in the editor!

                            I could make a whole new level setup in about 5 min and they would perform in the same way they do in this video!





                            Rama
                            Last edited by Rama; 12-17-2014, 04:43 PM.
                            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                            ♥ Rama

                            Comment


                              Very slick, Rama. Keeping an eye on this for sure.
                              @thereisnoscotty
                              Grand Marshal of the Parade of Madfellows

                              Comment


                                Really am loving all the updates
                                It is a shame I cannot frequent the forums more.
                                Sooo much eye candy and knowledge in your threads (and others).

                                -Jeremy-
                                Portfolio
                                UE3 - Advanced FX Masterclass Part 1 DVD
                                UE3 - Advanced FX Masterclass Part 2 DVD

                                Comment

                                Working...
                                X