User Tag List

Results 1 to 4 of 4

Thread: Pathfinding Object Slow Down

  1. #1
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Pathfinding Object Slow Down

    It works fine except when my destination object (which moves by the way, so the find path action has to be used constantly) is like 200 pixels or closer to the top of the frame. Then it begins lagging my game heavily where I lose like 10FPS per object using pathfinding.

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Why does it need to find the path constantly? If it finds the path, won't it just move along the path it found? Why would it need to keep finding the path? Pathfinding is resource heavy so you should try to do it as infrequently as possible.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Yes, like Konidias says, pathfinding is very slow, so you need to try to optimize it as much as possible. Lowering the map resolution (ie. making each grid square bigger) will help a lot - don't even think about trying to make it pixel perfect. If you have multiple objects, try to spread things out so you never have to find a path for more than one object per frame. Things like that...
    Even if the destination object is moving, you don't need to "always" find a path - once or twice per second is more than enough.

  4. #4
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah yeah good point about that. I actually found the culprit, it was that I had movement costs way too high. But now I found that developing for XNA or iOS doesn't even have a pathfinding object available to use. Is there any way I can do pathfinding without a pathfinding object?

Similar Threads

  1. slow rotate object .. mod 360?
    By Johnny in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th September 2012, 07:59 PM
  2. pathfinding object
    By westray in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th April 2012, 11:30 PM
  3. pathfinding object
    By borgi in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 29th October 2008, 08:48 AM
  4. PAthfinding object?
    By Rushino in forum Extension Development
    Replies: 1
    Last Post: 8th September 2006, 04: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
  •