User Tag List

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

Thread: Yet Another Pathfinder example

  1. #11
    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)
    I think I'm done for now. It turned out better than expected though, so I may eventually convert it into an RTS pathfinding system that handles multiple units efficiently.
    Download: https://1drv.ms/u/s!Atq7cUIJ7uextFL_...aj0_3?e=xMv5ey


  2. #12
    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,566
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Lovely, it does look really nice!
    Thank you for the update.

  3. #13
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,837
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Looking forward to the RTS pathfinding system MuddyMole.

    Marv

    Quote Originally Posted by MuddyMole View Post
    I think I'm done for now. It turned out better than expected though, so I may eventually convert it into an RTS pathfinding system that handles multiple units efficiently.
    Download: https://1drv.ms/u/s!Atq7cUIJ7uextFL_...aj0_3?e=xMv5ey

    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #14
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Incredible exemple as usual!!!
    You can add the feature if you click inside a polygon the charachter move to the closest point?
    And another question, what's the diffrence beetwen this and the old exemple?

    Btw, thanks for your great job!!!

  5. #15
    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)
    Nope, there's no way to make it move to the nearest reachable point.

    The previous version was based on polygons and vectors. All collision detection was done using pure maths, by calculating the intersection of line segments. That made it more complicated, both for me to create and for anyone to use.

    This version does collision detection by scaling and rotating a detector object into the shape of a line connecting two nodes (or a node and the unit/target), and then just using Fusion's built-in collision detection (the "Object is overlapping backdrop" condition). It's a bit of a hack that people have been using for line-of-sight tests for years. That makes it much simpler, but probably also slower (I haven't benchmarked them).

    Aside from that, there's not much difference - it's still the same A* algorithm, just implemented slightly differently. It's not supposed to be a replacement for the old version, or any kind of upgrade - just an experiment really.

    I'm giving up on the multi-unit version. I discovered a fundamental flaw in my plan (it would only work for navigating on square grids), as well as what I think might be a bug in the way Fusion scopes instances. I guess it's probably easier to just check for groups of nearby units, and run the pathfinder once per group, and then have the whole group follow the same path.

  6. #16
    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,566
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    @Muddymole, using the new features (or old ones even) it is in fact possible to go to the nearest node.
    Here's a quick edit:
    https://drive.google.com/file/d/17o-...ew?usp=sharing

  7. #17
    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)
    Quote Originally Posted by NaitorStudios View Post
    @Muddymole, using the new features (or old ones even) it is in fact possible to go to the nearest node.
    Here's a quick edit:
    https://drive.google.com/file/d/17o-...ew?usp=sharing
    Nice, but I don't think that's what ciaciosacchetti means. In the previous version, if you clicked inside an obstacle, it would find the closest point outside the obstacle that could be reached, which usually isn't at a node, but part way along a wall between two nodes. I can't see any practical way to do that using the new system, other than to copy that part from the previous system, or to use some kind of dirty hack (like shooting detectors out in all directions, and seeing which stops overlapping the obstacle first).

  8. #18
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Exactly Muddy, anyway your old example is perfect for me, I was just curious to understand the differences between this and the old one!

  9. #19
    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)
    Probably the easiest way would be to create a series of points along a spiral that radiates outwards from the mouse click, and check the collision mask at each point as you go, stopping when you find a point that doesn't overlap an obstacle. It's not going to be pixel-perfect, and it could get slow for large obstacles, but it might be good enough...
    Or instead of a spiral, you could have nested loops to create concentric rings, but it's the same difference.

    For example: https://1drv.ms/u/s!Atq7cUIJ7uextFNV...m_wzx?e=OwhJaR


  10. #20
    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,190
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    what about a simulated ray trace between the clicked point and the object, and its intersection with the poly is the point? (closest to the target)

Page 2 of 3 FirstFirst 1 2 3 LastLast

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
  •