[PLUGIN] Fast path finding (preview)

0 favourites
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • Looks excellent? Have you tried a stress test to see how far it can go (i.e. multiple objects tracking a moving object).

  • Looks excellent? Have you tried a stress test to see how far it can go (i.e. multiple objects tracking a moving object).

    Not yet max I tried is seven. will test later.

  • This plugin and behavior is released see first post!

  • yayyyyyyyyyyyyyyyyyy ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Awesome plugin, thank you!

  • Is it possible to loop through the found list of nodes somehow?

    I'd like to start from the goal and loop back to the current node and then combine the pathfinder with line of sight to skip some "useless" nodes ;)

    That would make the movement smoother (i already use the moveTo behavior) so it won't move as blocky as it moves right now... cause you can still see it uses a grid for the calculation of the path.

  • Is it possible to loop through the found list of nodes somehow?

    I'd like to start from the goal and loop back to the current node and then combine the pathfinder with line of sight to skip some "useless" nodes ;)

    That would make the movement smoother (i already use the moveTo behavior) so it won't move as blocky as it moves right now... cause you can still see it uses a grid for the calculation of the path.

    The download section should be updated with version 0.21 of the pathfinder behavior which has PathLength expression. You can use this with "for" to have more control like above. Another thing is using Lerp, hide the pathfinder then use a second object to follow the pathfinder this time using Lerp to "smooth" the movement. Mess about! Let me know if you see any bugs or things that need adding/removing. Will be adding a few more expressions etc soon.

  • Ize

    I would like to implement a path smoothing algorithm eventually. I made a Bresenham line algorithm plugin a while back see if I can find it.

  • Cool :)

    I've implemented a basic LOS without looping through the array for now and it looks pretty neat actually:

    dl.dropbox.com/u/45711709/testPath.capx

    However i found that the pathfinder doesn't always find a path :(

    If you click for example at the middle right and then again at the place where you started it won't find one... or if you click outside of the background sprite.

    Sometimes it even moves through the set obstacle :/

  • Cool :)

    I've implemented a basic LOS without looping through the array for now and it looks pretty neat actually:

    http://dl.dropbox.com/u/45711709/testPath.capx

    However i found that the pathfinder doesn't always find a path :(

    If you click for example at the middle right and then again at the place where you started it won't find one... or if you click outside of the background sprite.

    Sometimes it even moves through the set obstacle :/

    See this post Ize!

  • The costing needs some instruction. I am trying to have the source object prefer to stay to the road, so I give the road a cost of 25 and grass (everything else except blocks)a cost of 99. It seems to prefer the road that way, but I still want the shortest route. I want it to find the shortest distance, and choose the path that travels that distance covering the most road along the way. 25/99 may go 8 blocks extra just to hit more road.

    What numbers would come closest to what I am looking for? also what's the difference between the "Add" and "replace?"

    edit: 00Rez

  • hello,

    sorry if this is a noobish question but how do i associate an object (sentry) with an astar object ? Whenever i try pathfinding with this behaviour it says : inst:sentry(10) is not associated with an astar object.

  • I'm also getting this. It's strange because the example files run fine and the code is the same.

  • Looks like this plugin is not compatible with the latest stable version of construct. If you delete the behaviour in the examples and apply it again and resave then you get the errors.

    Such a shame as the inbuilt pathfinding is no good for TBS or grid based games, it seems only geared for RTS.

  • Works fine here. Just remember to reset path position each time you generate a new path.

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