User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: Pathfinding without the PO object? Ideas?

  1. #1
    No Products Registered

    Join Date
    Apr 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pathfinding without the PO object? Ideas?

    Is there a way tomake custom pathfinding, without the PathfindingObject? It is buggy. I was thinking about using loops, detectors and checking the distance between point A and point B, but can't really find an interesting idea how to get all of this to work. Have any of you constructed something like this? Could you spare an example, or at least give a few ideas?

  2. #2
    No Products Registered

    Join Date
    Apr 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    I hope that i posted this in a good forum.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Pathfinding is a really big problem.

    What's the problem you have with the object ? It works very well in the last version...

  4. #4
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Well, I guess for a type of pathfinding you can use x,y greater than less than events.
    Like:

    +X("Active")< Xmouse
    Set X of active to X("Active")+1

  5. #5
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    That's not a pathfinding... A pathfinding is really really complicated and several algorithms exist... Usually, it's the A* which is used in the games (it's the algorithm which is used in the PF object I think) but the better algorithm is djikstra which is slow (but with modern computers, more and more games use it with some optimizations).

    See this good wikipedia article : http://en.wikipedia.org/wiki/Pathfinding

  6. #6
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Is Djikstra really that much better? I thought that A* always gave the optimal route.

    I'd imagine that A* would be just about possible to do in MMF itself through fastloops, but it's definitely the kind of thing that I'd prefer to hand over to an extension.

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Location
    Land of raging rockets
    Posts
    1,231
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Depending on what you need the pathfinding for, the are various solutions. Although I don't think any of them is really better than using the pathfinding extension.

    * use detectors to avoid small obstacles (e.g. check if there's a route around them, to the left or right)
    * use node objects that are places throughout the map that check in the beginning if they have sight contact and store the IDs of nodes they can see. Then if your objects needs a path you can run through the nodes to find one that leads to your target
    * use nodes that contain information, which directions are possible at their position and when your object reaches that node, use the direction that will most likely go to the target
    * if it's for enemies that are just supposed to track the player for a bit, use "last seen"-coordinates that stem from line-of-sight with the player (if player is not visible, go to where you've last seen him and there go the direction you've last seen him going).. this is quite reliable and makes for cool and realistic enemies

  8. #8
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Quote Originally Posted by DavidN
    Is Djikstra really that much better? I thought that A* always gave the optimal route.
    Djikstra is always guaranteed to be the optimal route, A* is guaranteed optimal as long as the heuristic is good.

    Quote Originally Posted by DavidN
    I'd imagine that A* would be just about possible to do in MMF itself through fastloops, but it's definitely the kind of thing that I'd prefer to hand over to an extension.
    Somewhere in the old forum I think I posted an example of pathfinding without the pathfinding object, but the events definitely weren't pretty and it was pretty slow.

    EDIT: Found it! http://www.clickteam.com/CTforum/showthreaded.php3?Cat=&Board=upload&Number=179097& Search=true&Forum=upload&Words=Dynasoft&Match=User name&Searchpage=3&Limit=25&Old=allposts&Main=17909 7

    EDIT2: I can't remember if that file is Djikstra or A* pathfinding. I know I did one for Jamagic that was definitely Djikstra, and I've definitely written an A* pathfinder in c++, but I can't remember what that MMF one is and I can't open it here

  9. #9
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    Sphax's Avatar
    Join Date
    Jun 2006
    Location
    Paris, France
    Posts
    4,454
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    Djisktra is a lot better in results than A* but Djisktra, if coded whithout algo optimization, is pretty slowest than A*.

    Djikstra is the algorythm used for routes finding in roads networks (PnD or websites like Mappy.com).

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pathfinding without the PO object? Ideas?

    http://www.policyalmanac.org/games/aStarTutorial.htm

    This is a good tutorial on the A* algorithm --- much more easy to understand than the wikipedia article. I think that you could implement this in MMF but you would need to find a good way of implementing an "open list" and a "closed list" (maybe arrays)? From there, it'd just be a matter of using fastloops. I don't think it would drag down performance too much if you used it carefully.

    From what I've read, A* gives identical results (shortest path) as the Djikstra algorithm when the heuristic is good and you know the exact point you're searching for. In the above example, I would change the heuristic to measure the distance when moving diagonally is allowed (this should give a perfect heuristic).

Page 1 of 2 1 2 LastLast

Similar Threads

  1. pathfinding object
    By borgi in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 29th October 2008, 08:48 AM
  2. Pathfinding object
    By Stephen38 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 21st February 2008, 06:09 PM
  3. Pathfinding Object
    By Guitaristinmakin in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 28th October 2007, 01:32 PM
  4. Pathfinding object
    By Jarzka in forum Extension Development
    Replies: 11
    Last Post: 7th July 2006, 07:49 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
  •