Announcement

Collapse
No announcement yet.

DoN's 3D-Pathfinding / Flying-AI system (with full source!)

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

  • replied
    Originally posted by VSZ View Post


    Try this workaround:

    1. Open the project, choose File -> "New C++ class", create any dummy class
    2. Restart the editor.
    3. Try packaging again.
    I will try that today. Thanks.

    Originally posted by VSZ View Post

    This workaround has been suggested in the forums for Blueprint-only projects that need to use C++ plugins. Maybe it works for me because I have Visual Studio installed, really not sure.
    I have visual studio 2015 installed.


    Originally posted by VSZ View Post

    Another thing - are you packing with build configuration of "Development" or "Shipping"?
    Sorry, I forgot to mention - I packed with shipping

    Originally posted by VSZ View Post

    Both work for me, although shipping needs a workaround described in this answer hub post (without which it throws a "failed to open descriptor file" error).
    I didn't know that. I'll try, thanks.


    Originally posted by VSZ View Post
    Hmm...I'm not using anything substance related in this project at all! That's really odd.

    Did it tell you which assets were problematic? None of the Epic content in the project (eg: the bots) seem to use the Susbtance plugin either. The Substance plugin is free in any case, but still I'm not sure why the project seems to need it.




    Not really, but I assume it's T_MacroVariation. When I'm unpacking your zip file I have this error and can't copy this file:

    Click image for larger version

Name:	copy error.jpg
Views:	1
Size:	41.6 KB
ID:	1102597

    And when I launch editor I got load errors, probably because this asset

    Click image for larger version

Name:	load errors.jpg
Views:	1
Size:	79.7 KB
ID:	1102598

    Leave a comment:


  • replied
    Can someone who's also downloaded v1.1 confirm what [MENTION=16530]hamsterPL[/MENTION] is seeing please?

    That would be really helpful to narrow down the issue as I'm not able to reproduce it

    Originally posted by hamsterPL View Post
    When I try to launch packaged game, I recieve this message: <pic>
    Try this workaround:

    1. Open the project, choose File -> "New C++ class", create any dummy class
    2. Restart the editor.
    3. Try packaging again.

    This workaround has been suggested in the forums for Blueprint-only projects that need to use C++ plugins. Maybe it works for me because I have Visual Studio installed, really not sure.

    Another thing - are you packing with build configuration of "Development" or "Shipping"?

    Both work for me, although shipping needs a workaround described in this answer hub post (without which it throws a "failed to open descriptor file" error).

    Originally posted by hamsterPL View Post
    I had to disable substance plugin to run, because I don't have it.
    Hmm...I'm not using anything substance related in this project at all! That's really odd.

    Did it tell you which assets were problematic? None of the Epic content in the project (eg: the bots) seem to use the Susbtance plugin either. The Substance plugin is free in any case, but still I'm not sure why the project seems to need it.

    Leave a comment:


  • replied
    Yes, I downloaded this yesterday.

    I had to disable substance plugin to run, because I don't have it.
    First packaging failed because assets had too long names - fixed that.
    Then I packaged 64 bit build for windows - build successfull.

    When I try to launch packaged game, I recieve this message:


    Click image for larger version

Name:	error.jpg
Views:	1
Size:	28.7 KB
ID:	1102556

    When I'm launching from standalone game or pie it works.
    Last edited by hamsterPL; 03-16-2016, 04:27 PM.

    Leave a comment:


  • replied
    Are you using the latest version of the sample project - v1.1? The previous version had an issue with packaging that was fixed.

    I just tested the latest version lying in my comp and it packaged and ran fine; I'm using 4.10.4 too.

    Leave a comment:


  • replied
    Thank you for great work!

    What version of engine you are using?

    I tried to package your sample project and run but I've got a error that engine can't find plugin module.
    I tried this on 4.10.4

    I'm assuming you are using different version, that why it doesn't work.

    Leave a comment:


  • replied
    Originally posted by rsfx View Post
    is it possible to have more DON managers in one scene and if so can you pass from one manager to the other?
    Self-contained managers should work with a small fix for "Fly To" node to smartly lookup the right manager for a pawn instead of blindly using the first one (that's how it works now). I'll look into this in a week or two, should be an easy fix that will deliver great value. For people who're using direct API calls instead of the "Fly To" node you can just tell the API which manager to use yourself.

    Again, each manager is self-contained; a pawn in one navigation zone can only pathfind within that zone. Inter-zone/Inter-Manager navigation could be a nice strategy to support large maps so I might investigate that mid-term. The Octree voxel approach suggested by others is probably a better long-term investment but it has "Giant time-sink, Developer beware!" written all over it so I'll instead try to support multiple zones for now.

    Originally posted by rsfx View Post
    By the way, I watched the DoN The Nature Game – 30 minute gameplay video! and it´s amazing! And the Vivaldi is the best choice that could accompany your game presentation. I wish you make this nature sim as perfect as possible. The work you've done is amazing.
    Thanks a lot for checking out my game! I hope to make it an all-encompassing Nature Sim and as long as I can sustain development I'll keep inching slowly towards that goal.

    Steam Greenlight was supposed to happen last month but releasing this plugin took so much more energy than I expected that I couldn't work on the game for almost a month at that time.

    Vivaldi's music fuels both development and the promos! There is little doubt in my mind that some 300 years ago the inspiration for his Four Seasons Music draws from the same fountain that I'm tapping into today. Now whether my game ends up at least a wee bit as good as Vivaldi's compositions, only time will tell

    Leave a comment:


  • replied
    Originally posted by VSZ View Post
    Eg: what happens if 10 bots need to travel through a narrow crevice where there's only room for one bot to squeeze through! So if I implement this at the plugin level, all possible usecases need to be understood, performance profiled, tested, etc. Also, the "Fly To" node may be a better candidate for housing a full-blown neighbor avoidance solution as locomotion is its primary duty.
    I understand that but my case is slightly different than this: a scene level with various obstacles (debris) in a open space and some bots trying to get to a some goals (distributed to each bot, by an AI, depending on the number of bots). We´re talking about dog fighting (I've just put it in a more complicated way ) I also understand your position in giving the most cleaner solution so that every one could change it to it´s needs and I am 100% with you!
    I will like to bother you with one more question: is it possible to have more DON managers in one scene and if so can you pass from one manager to the other?

    Thank you for your time.

    Edit:
    By the way, I watched the DoN The Nature Game – 30 minute gameplay video! and it´s amazing! And the Vivaldi is the best choice that could accompany your game presentation. I wish you make this nature sim as perfect as possible. The work you've done is amazing.
    Last edited by rsfx; 03-12-2016, 04:03 PM.

    Leave a comment:


  • replied
    v1.1 released

    v1.1 contains a major bugfix, make sure you download v1.1 of both plugin and samples if you plan to use this for your game.

    Bugfix MSPaint-ed

    Imagine a flying creature landing on a hard surface (eg: for resting) and then flying away. Because it squats on a red voxel, the system starts pathfinding from the closest green voxel instead (whose center becomes the "effective origin"). This bugfix ensures that the pawn travels to the effective origin first instead of directly traveling to the next segment (and thus bumping into something on the way!)

    Click image for larger version

Name:	v1.1 bugfix illustration.jpg
Views:	1
Size:	95.8 KB
ID:	1102263
    Last edited by VSZ; 03-12-2016, 07:42 AM.

    Leave a comment:


  • replied
    Originally posted by KinDaKreator View Post
    I salute you, sir.
    You are the epitome of human generosity.
    Lol not really... After years of benefiting from the system in the form of free open source software, free wikis, free tutorials, guides and forum support from so many people, not just in Unreal, but everywhere, you start to feel guilty that you haven't given back anything to the system from which you took so much. If this plugin is used successfully by other games I would feel some relief in knowing that I've hopefully given something back.



    Originally posted by rsfx View Post
    Is it posible to trigger a second (to nth) path querry that doesn´t intersect with that which calculated before?
    Interesting idea. Just try modifying ADonNavigationManager::CanNavigateByCollisionProfile from this:

    Code:
    if (!CanNavigate(Volume))
    		return false;
    to

    Code:
    if (!CanNavigate(Volume) || Volume->DynamicCollisionNotifyees.Num())
    		return false;
    ...this might work. We are leveraging the fact that any active path solution will leave a trail of dynamic collision notifyees on the voxels.

    Try it out if you need it, I won't get the time to test this myself any time soon and I'm also wary of implementing this as a formal solution because it's not very generic across usecases.

    Eg: what happens if 10 bots need to travel through a narrow crevice where there's only room for one bot to squeeze through! So if I implement this at the plugin level, all possible usecases need to be understood, performance profiled, tested, etc. Also, the "Fly To" node may be a better candidate for housing a full-blown neighbor avoidance solution as locomotion is its primary duty.

    ==

    Neighbor Avoidance and Octree voxel solution (for supporting larger maps) are long-term features I would love to support some day, but expect at least 4-6 months before I can revisit this!

    I'll release bugfixes occasionally whenever I find them in my own game (which uses this plugin), but for now I need to focus on my personal project and can't commit to new features. The source code is there for people to implement anything they like though!
    Last edited by VSZ; 03-12-2016, 07:42 AM. Reason: Moving v1.1 updates to new post

    Leave a comment:


  • replied
    Originally posted by VSZ View Post
    Not yet I'm afraid - not formally at least. You could override AddMovementInput for your pawn or implement my AddMovementInputCustom interface (either of which the "FlyTo" node will use) with your own neighbor avoidance logic and depending on how complex your paths are this might be a viable strategy.

    Another option is to use the dynamic collision repathing that I have for regular meshes (dynamic obstacles) for the neighbor pawns (by adding "Pawn" to "Obstacle Query Channels" in the manager) but there are some messy complications with this:

    1. It would recalculate paths each time an obstacle occupies it, which is great for regular obstacles but not very efficient for neighbors who're travelling along a similar path as you (because of potentially frequent recalculations of the entire query).

    2. The system requires both pathfinding origin and destination to be in empty space and if not, it will reject the query. Now if we add "Pawn" as a collision object type and your neighbor has reached the goal before you (thus occupying space around the goal) then your pathfinding query will simply fail with a message that the goal is invalid and cannot be reached!

    In the sample project the bots often merge into each other because of lack of neighbor avoidance and also because their pawn collision is set to only overlap pawns instead of blocking them.
    Is it posible to trigger a second (to nth) path querry that doesn´t intersect with that which calculated before?

    Leave a comment:


  • replied
    I salute you, sir.
    You are the epitome of human generosity.

    Leave a comment:


  • replied
    @ VSZ : thanks for the hints! I try to design my stuff to be game designer friendly, so I use e.g. data assets created from csv files for my RTS group formations (and other little blueprints derived from my C++ classes), but I think at the moment content in plugins is not supported, thus probably shipping the plugin with a sample project - as you did - is the best to show how to use a it.

    Leave a comment:


  • replied
    Originally posted by rsfx View Post
    is the pawn aware of it´s neighbours?
    Not yet I'm afraid - not formally at least. You could override AddMovementInput for your pawn or implement my AddMovementInputCustom interface (either of which the "FlyTo" node will use) with your own neighbor avoidance logic and depending on how complex your paths are this might be a viable strategy.

    Another option is to use the dynamic collision repathing that I have for regular meshes (dynamic obstacles) for the neighbor pawns (by adding "Pawn" to "Obstacle Query Channels" in the manager) but there are some messy complications with this:

    1. It would recalculate paths each time an obstacle occupies it, which is great for regular obstacles but not very efficient for neighbors who're travelling along a similar path as you (because of potentially frequent recalculations of the entire query).

    2. The system requires both pathfinding origin and destination to be in empty space and if not, it will reject the query. Now if we add "Pawn" as a collision object type and your neighbor has reached the goal before you (thus occupying space around the goal) then your pathfinding query will simply fail with a message that the goal is invalid and cannot be reached!

    In the sample project the bots often merge into each other because of lack of neighbor avoidance and also because their pawn collision is set to only overlap pawns instead of blocking them.

    Leave a comment:


  • replied
    Oh my gosh ... is this real ??? I want it. I used to create cheated paths (precalculated) for the AI when was need it to avoid obstacles but this ... I need to test it. Thank you! One question: is the pawn aware of it´s neighbours?

    Leave a comment:


  • replied
    [MENTION=22887]MatzeOGH[/MENTION], [MENTION=11208]n00854180t[/MENTION] - Great! It would make me really happy to see other games use this system.

    Let me know if you face any setup issues.

    [MENTION=3020]sivan[/MENTION] - thanks, I hope you find it useful. I went through the same route, before I made it a plugin, this was deeply coupled with my own game's classes and I had to refactor, rename and eliminate unwanted dependencies to make it a separate plugin module. Making the plugin itself was easier than I'd expected, I just used the UObject plugin under Engine\Plugins\Developer\UObjectPlugin as a template and that had me covered for the most part.

    Leave a comment:

Working...
X