User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 29

Thread: New Pathfinding Example (extensionless)

  1. #11
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NaitorStudios, I think the answer is yes, because he make a great exemple like navigation mesh and it works really good, there are just some little problem, but i think he definitely can make it!

  2. #12
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,446
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by NaitorStudios View Post
    MuddyMole, here's something that has always been a challenge...
    Do you think a extensionless navigation mesh pathfinder is possible?
    Yes, I do. That's basically what we're talking about with "point and click pathfinding" (it's not quite the same as the method I was using, but it's very, very similar).
    Have a look at this page: https://medium.com/@mscansian/a-with...s-246fd9e72424

    Note where it says: "You will notice that this algorithm provides a wall-hugging path, since it use the vertices to generate the path. You can fix this by deleting useless points (if you can go from A directly to C without falling off the navmesh, then the point B is useless and you can delete it)."

    If I remember correctly (it was a couple of years ago now), that was where I was getting stuck. It would work fine in most cases, but floating point errors caused occasional but unacceptable bugs (I think it was if you started a new search with a starting point exactly on the edge of a polygon, but again I don't quite remember).

    This was the last version I made: https://1drv.ms/u/s!Atq7cUIJ7uexkAis...b0GoE?e=gSUAYD

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    Posts
    406
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Absolutely Awesome. Thank you for sharing this.

  4. #14
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    Uppsala, Sweden
    Posts
    59
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Looks great!
    Say, I was under the impression that the list object is one of the slowest objects in fusion 101380-The-Clickteam-Fusion-2-5-optimisation-amp-performance-Hard-Data-thread so I'm intrigued by you using this in a performance oriented project and not just use arrays ?

  5. #15
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,446
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by contra View Post
    Looks great!
    Say, I was under the impression that the list object is one of the slowest objects in fusion 101380-The-Clickteam-Fusion-2-5-optimisation-amp-performance-Hard-Data-thread so I'm intrigued by you using this in a performance oriented project and not just use arrays ?
    Yes, sadly it is.
    LB's "Internal List" would be much better, but unfortunately it's for Windows only, so using it here would defeat the purpose, since you may as well just use a pathfinding extension.

    Unfortunately, array objects are just too different, and wouldn't work here. The main reason is that you can't delete a value, and have the other values shift to fill the gap. The A* algorithm also requires the values to be sorted, and there's no easy or efficient way to do that with an array.

    Personally, I think the most useful extension that doesn't exist, would be a kind of "List of Lists" (more like arrays in other programming languages).
    Ideally it would have an unlimited number of dimensions (referred to by value rather than X,Y,Z) - but failing that, certainly a minimum of 4 dimensions, because if you're storing map data, I find you always need X, Y, "Layer" (the same cell might contain terrain, monsters and items etc), "Properties" (again, you need to store the properties of each of those monsters or items).
    It would allow you to sort the values according to any of those dimensions. eg. "Sort by ascending dimension 0" or "Sort by descending dimension 2".
    It would allow you to delete values, and the others would automatically shift to fill the gap left.
    It would allow you to insert values, and the others would automatically shift to make space.
    It would need to work with all the exporters.

    If that extension existed, it would make things like pathfinding really quite easy and efficient.

  6. #16
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,079
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Would string parser extension may help speed things up? It already have sorting algorithms build in

  7. #17
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    14,274
    Mentioned
    279 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    Yes, sadly it is.
    We could probably add an "Internal" mode to the List object, so that you can use to choose either the current Windows control or an internal list. I'll check if this can be quickly done on all platforms (I know on some other platforms the object uses an internal list already if the control is hidden, I don't remember which ones).

  8. #18
    Clicker Multimedia Fusion 2 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Location
    Uppsala, Sweden
    Posts
    59
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Ah I see now.

    Since my current project depend on pathfinding I'm very interested in the subject.
    I've been using a solution based on @SolarB; Tower-Defence-Kit-ALL-PLATFORMS which I've modified to work with multiple targets. Basicly I'm using the Z dimension of the array to keep track of each calculated paths for each "actor" (each actor has an ID corresponding the Z value). It works great but I am worried about the number of fastloops that can potentially occur depending on map size etc. so having a solution that spreads across frames seems as the way to go but I'm unsure if I could implement in in my code or not. Maybe you have any thoughts or interest in this?

    (I'd post an example right now but it would take some time to remove my game assets but if you're interested I'll try to do it when I have time)

  9. #19
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,446
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Yves View Post
    We could probably add an "Internal" mode to the List object, so that you can use to choose either the current Windows control or an internal list. I'll check if this can be quickly done on all platforms (I know on some other platforms the object uses an internal list already if the control is hidden, I don't remember which ones).
    If it turns out to be an easy fix, then there's no reason not to
    It's not so important for this particular project though, as anyone making a Windows game can just just a pathfinding extension.


    Quote Originally Posted by contra View Post
    It works great but I am worried about the number of fastloops that can potentially occur depending on map size etc. so having a solution that spreads across frames seems as the way to go but I'm unsure if I could implement in in my code or not.
    Honestly, I'm not sure it would be so easy to retrofit to an existing system. I'd test it first, to see if performance actually is a problem - if you have a fairly small map it might be fine anyway.

    The biggest problem I can think of is that when the pathfinding process is spread over multiple frames, the objects still need to be able to navigate while it's going on.
    My example gradually overwrites the path array. The previous version used two separate arrays - the pathfinder would write values to one array, while the objects would read values from the other, and then they'd swap. Either system would be a fair amount of work to retrofit.

    The other alternative would be to make it so that as soon as the pathfinding process finishes, each object would immediately trace a path from its current location to the target, and store the entire path in an alterable string as a sequence of directions, so that it no longer needs to read data from the path array. You'd also want to trace a path from the start point to the target, to be used by any objects that get created while the pathfinding process is going on. That's not so efficient though...

  10. #20
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    Posts
    406
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Surprisingly messing with this I confused it and to many objects maxed out the mfa. This caused the outside of the entire example to be filled with the blue objects that move. FPS dropped to 30 and then it just gave up. The mfa did not crash but the objects stopped trying to reach the end.

    I drew a spiral circle from the center to roughly 25% from the borders.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. Bezier movement extensionless examples
    By SevenSails in forum Guides, Tutorials, Examples, Widgets
    Replies: 1
    Last Post: 13th September 2020, 05:32 PM
  2. Easy Pathfinding Widget (extensionless)
    By schrodinger in forum Fusion 2.5
    Replies: 206
    Last Post: 31st December 2019, 05:22 AM
  3. Projected shadow extensionless - Help
    By Crian in forum Fusion 2.5
    Replies: 0
    Last Post: 28th December 2019, 06:07 PM
  4. Extensionless Pseudorandom Number Generator Widget - PRNG
    By BartekB in forum Guides, Tutorials, Examples, Widgets
    Replies: 1
    Last Post: 12th February 2017, 01:14 AM
  5. Simple vertical door transition (extensionless)
    By alexexhowl in forum Guides, Tutorials, Examples, Widgets
    Replies: 0
    Last Post: 5th February 2017, 11:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •