User Tag List

Page 3 of 3 FirstFirst 1 2 3
Results 21 to 29 of 29

Thread: Yet Another Pathfinder example

  1. #21
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Consider an obstacle like this:



    The closest node to the target is #3, but the closest point to the target that lies outside the obstacle, is actually on the edge between nodes #1 and #4, so node #3 is irrelevant.
    Unless you force the user to strategically place extra nodes just to account for this (which I don't want to do), you have to assume that the closest point could be in any direction, on any of the edges between two nodes - and then you'e back to explicitly listing the walls that define each polygon, which is what the previous version did.

    Although the spiral method seems a little inefficient, as it's likely to require up to maybe 200 fastloop iterations (hopefully not much more than that), I would imagine that depending on the map complexity, the overall pathfinding system is probably going to use a few thousand iterations (I really ought to test that!), so the overall impact may not be that bad.

  2. #22
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have another idea, i try to explain with my basic english, if you click inside an obstacle the system automaticly draw a big spiral without loop, and then a loop start to find the closest spiral node outside the obstacle close to the mouse click.
    Sorry if you don't understand, i try to do my best

  3. #23
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,573
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    The problem isn't the loop, it's the amount of actions lol
    If you just create the spiral without a loop, you most likely would create more than necessary since you can't break actions.

  4. #24
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,194
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MuddyMole View Post
    Consider an obstacle like this:



    The closest node to the target is #3, but the closest point to the target that lies outside the obstacle, is actually on the edge between nodes #1 and #4, so node #3 is irrelevant.
    Unless you force the user to strategically place extra nodes just to account for this (which I don't want to do), you have to assume that the closest point could be in any direction, on any of the edges between two nodes - and then you'e back to explicitly listing the walls that define each polygon, which is what the previous version did.

    Although the spiral method seems a little inefficient, as it's likely to require up to maybe 200 fastloop iterations (hopefully not much more than that), I would imagine that depending on the map complexity, the overall pathfinding system is probably going to use a few thousand iterations (I really ought to test that!), so the overall impact may not be that bad.
    what i was saying, was something like this, but in the direction/line with the actual object moving to it.
    it could be a simple as firing a pixel (using 360 degree angle) - at the original object from the click (and when it is NOT on an obstacle) that is the point.

  5. #25
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    There are still going to be some odd cases where it doesn't work right.
    An extreme example would be something like this:

  6. #26
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,194
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    what about constantly or periodically doing that pick

  7. #27
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    There's no real advantageto that, and it's going to mean that the stored heuristic values for each node are going to be wrong because the target is changing, which is very likely to break the whole thing.

  8. #28
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,194
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    OK, you may as well prevent the user from targeting inside an obstable - (or) - if they do, push the target out of the obstacle - toward to the objects - this is something anyone could modify regardless;
    its a great example of pathfinding that looks nice to start with

  9. #29
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,553
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Agreed. If it's a case of pointing and clicking, like in an adventure or strategy game, I'd probably just change the cursor to a red cross or no-entry sign or whatever, and ignore the player's click.
    There are cases where that isn't going to work - like maybe you have some ground units that you want to have chase a flying unit, which can go places they can't - but yes, that can be left to the game designer to figure out...

Page 3 of 3 FirstFirst 1 2 3

Similar Threads

  1. Will there ever be a pathfinder plugin to htnl5?
    By warlords in forum HTML5 Export Module 2.5
    Replies: 1
    Last Post: 26th October 2020, 07:23 PM
  2. Missing a Pathfinder Object to Android?
    By warlords in forum Android Export Module 2.5
    Replies: 0
    Last Post: 18th October 2018, 06:02 AM
  3. Trying to create my own Pathfinder need help...
    By warlords in forum Fusion 2.5
    Replies: 1
    Last Post: 12th September 2014, 02:57 PM
  4. My crappy pathfinder
    By SoftWarewolf in forum File Archive
    Replies: 4
    Last Post: 10th April 2013, 10:40 PM
  5. PathFinder Demo Errata Corrige
    By Dave78 in forum File Archive
    Replies: 4
    Last Post: 3rd February 2009, 06:59 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
  •