[Behavior]PathFinder

0 favourites
  • This is fantastic. Not only is it a great behaviour but the Cap explains something else I have been trying to get right as well! Thanks

  • This looks great... but how do I get an object to move along the path?

  • The idea is to move it from the Sprite's position to PathList(nextCell)'s position (object.PathFinder.getCtX(CurrentCell + 1), object.PathFinder.getCtY(CurrentCell + 1)).

    I'm working on this for my current game, I'll try to make an example capx out of it.

  • Changelog:

    13-09-2011: Reuploaded PFDemo.capx and the C2runtime.js from the demo to fix a bug when clicking the GUI panel button, if the panel was showing/hiding and/or the commands fading in/out.

    Update to the PathFinder behavior runtime itself (setCellSizeSide). It appeared that the PathFinder was looking for a path out of the layout boundaries.

    Let me know if you experience any trouble.

  • I am still eager to find an easy way for an object to move along a path. Also will this kill my performance if i want to have multiple instances of an object tracking a moving target? Would it work if I just tell them to calculate a path twice, 4 times a second instead?

  • Does anyone know a way to make an object move along a path?

  • Squiddster, I already said I was going to release some .capx at some point.

    I just need time to set it up effectively.

    If you are in such a hurry, use the informations previously given and try using the "simulate" actions from a 8 directions behavior (as this is probably going to be the method I'll display in the capx).

  • Sorry for being impatient, I look forward to seeing your .capx. Thanks for being such a help to the community!

  • VERY VERY USEFUL...tnx a lot ^^

  • You are my hero!

    Many thanks!! :)

  • I don't know now how I can use this. But I thinking about strategy games and terrain, this can be really useful. Great Work man =)

  • Very interesting! Though, really, using it with 8-direction would be a walk in the park compared to using it with, say, the Platform behaviour.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Great Behaviour.

    But could you please make a little capx, how to move an object framebased along the generated path from S to D, with some static obstacles in the way?

    There are few things in the Demo capx, that doesnt really matter for this simple setup, i guess.

  • actually trying to find a solution for the performance and routing problem, and guess i found a bug.

    not all obstacles are recognized. i defined multiple objects as such, and some are ignored...the path goes right through them.

    the problem shows different path solutions per each algorithm, but all of them seem to ignore spaces smaller than the defined cell size side for the path plugin.

    i think its not that useful in this state, especialy not for realtime path rout'n'walk stuff.

  • All you are saying and asking was already reported in this topic.

    For now I'm working on an entry for the C2 comp, I'll look into the PF after.

    The multiple obstacle bug is known, and can be worked around. For the sizes, you have to keep the same size for every elements. It is explained in the topic too.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)