User Tag List

Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 37

Thread: Polygon-based A* Pathfinding Example (extensionless)

  1. #11
    Clicker Fusion 2.5 (Steam)
    Linky's Avatar
    Join Date
    Mar 2020
    Location
    Egypt
    Posts
    167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is cool as heck!

  2. #12
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, I have a little observation to do. When you click inside a polygon and the closest point outside the polygon to the mouse is outside the screen, it would be nice if the pathinding doesn't take this into consideration and redirects to the point closest to the mouse inside the screen. If it were easy to do, I think it would be a great improvement.

    P.s. I have started to mount the pathfinding in my game and it continues to work great, and I never encountered any bugs yet!

  3. #13
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleFirefly 3D Module
    MEHRDAD's Avatar
    Join Date
    Jan 2009
    Location
    Iran
    Posts
    504
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ ciaciosacchetti

    Great!. Please If you don't mind sharing your pathfinding. I need it for my adventure game

  4. #14
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ciaciosacchetti View Post
    Hi, I have a little observation to do. When you click inside a polygon and the closest point outside the polygon to the mouse is outside the screen, it would be nice if the pathinding doesn't take this into consideration and redirects to the point closest to the mouse inside the screen. If it were easy to do, I think it would be a great improvement.

    P.s. I have started to mount the pathfinding in my game and it continues to work great, and I never encountered any bugs yet!

    That's actually quite a bit of work to do properly. I made a simple fix here though:
    https://1drv.ms/u/s!Atq7cUIJ7uextB6m...vnVFB?e=GZBIJO
    (there are some other very minor changes, such as updated comments that now actually match the code!)

    Note that you MUST place a node wherever a polygon exits the screen:



    Any wall where one or both end nodes lie outside the frame, will be ignored (exactly on the edge counts as inside).
    So in the example above, walls 1>2 and 4>5 are okay, but walls 2>3 and 3>4 will be ignored.

  5. #15
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it quickly because today I had very little time, but your simple fix is ​​better than anything I could do, and it works great!
    As usual thank's a lot for everything.

    @Mehrdad, i really don't understand what you mean, maybe is my english, but for my game I use MuddyMole's pathfinding, so is simply here

  6. #16
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleFirefly 3D Module
    MEHRDAD's Avatar
    Join Date
    Jan 2009
    Location
    Iran
    Posts
    504
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @ciaciosacchetti
    Sorry, I think you made another pathfinding. And maybe I'm wrong but @MuddyMole example use surface object and it's not cross-platform, right?

  7. #17
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MEHRDAD View Post
    And maybe I'm wrong but @MuddyMole example use surface object and it's not cross-platform, right?
    The surface object is only for debugging purposes, so that you can easily check you have your polygons set up correctly - you can safely remove it without affecting the pathfinding at all.
    The only objects that are essential for it to work are Active, Array and List objects, so it should work with any and all exporters, though I personally don't have a means of testing that.

  8. #18
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,490
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Since several people have asked me now, I've made yet another slight modification here:
    https://1drv.ms/u/s!Atq7cUIJ7uextB8q...E6Efs?e=78ZMoJ

    The only changes are to the debug mode.
    It now uses scaled & rotated actives to draw the polygon outlines, so even if you delete the Surface object (the only object in use that isn't supported by all exporters), the debug mode is still fully functional - it's just that the polygon won't be filled.
    Also, if you mouseover a node, all other nodes that are directly reachable from it will be highlighted, which is handy for spotting issues (very small polygons with very acute angles can occasionally be problematic - after adding this feature, I noticed that it was possible to sail right through the Isle of Wight in previous versions, for example!).

  9. #19
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleSWF Export ModuleXNA Export ModuleFirefly 3D Module
    MEHRDAD's Avatar
    Join Date
    Jan 2009
    Location
    Iran
    Posts
    504
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    The surface object is only for debugging purposes, so that you can easily check you have your polygons set up correctly - you can safely remove it without affecting the pathfinding at all.
    The only objects that are essential for it to work are Active, Array and List objects, so it should work with any and all exporters, though I personally don't have a means of testing that.
    Great!!!. I test it on Android now and works perfectly for me. Mush appreciated!. Great engine.
    And I have two different questions please: I need it for an adventure point and click.
    1) How can use graphic left /right/up/.... for the player?
    2) Is it possible "turn before walking" too?

  10. #20
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export Module
    VBEinc's Avatar
    Join Date
    Oct 2015
    Posts
    496
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Very cool.

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. New Pathfinding Example (extensionless)
    By MuddyMole in forum Fusion 2.5
    Replies: 28
    Last Post: 17th January 2022, 01:19 PM
  2. Easy Pathfinding Widget (extensionless)
    By schrodinger in forum Fusion 2.5
    Replies: 206
    Last Post: 31st December 2019, 04:22 AM
  3. Pathfinding using nodes of a polygon
    By voodooidiot in forum Fusion 2.5
    Replies: 4
    Last Post: 6th August 2018, 04:35 PM
  4. Polygon-based Shadowcaster
    By MuddyMole in forum File Archive
    Replies: 9
    Last Post: 31st October 2013, 01:41 PM
  5. Tree-Based Pathfinding Example (VERY basic WIP)
    By Dines in forum File Archive
    Replies: 15
    Last Post: 11th July 2007, 06:09 PM

Posting Permissions

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