00Rez's Forum Posts

  • i've encountered the same problem with going through walls and some more (sometimes no path is found even tho there clearly is one)

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

    Btw. i stole your points for the visualisation of the path ;D

    I've noticed a bug occurring which might explain the not finding a path I'll have a look into it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dl.dropbox.com/u/41931267/Pathfinder.capx

    The pathfinding seems to have severe problems... Not sure what's going on here. It seems to go through walls at a whimsy.

    Example Uses the MoveTo behavior.

    Thanks for this sqiddster.

    This is due to bounding box which I will have to look into further. The way it checks objects is through the bounding box which doesn't seem to work when rotating objects and re-sizing to size not a multiple of the cell size e.g. 32 pixels.

    For each cell on the grid the center coordinate x, y is checked to see if it lies within the bounding box of the object then sets blocking as necessary. For now I will create an action event to set cells by x and y position then you can block the map using construct events e.g. by testing overlap with a red blip or whatever. If you want to use objects as blockers don't rotate and use objects that are sized in multiples of whatever the grid size is e.g. 32 would equate to blockers sized 32, 64, 128 ... I'll have a look into a better method for blocking using objects. Sorry for the problems and I hope what I've said above makes sense.

  • Nice plugin! Is designed to make RTS game using your pathfinder plugin?

    Yes you could with a bit of messing and lerp.

  • 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.

  • 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.

  • what exactly does the auto tile one do?

    Yeah need to make an example for it. The behavior is used to change the animation frame to 0 - 15 depending on the (same) surrounding objects. Snap to grid to make sure they are set properly.

    Look here for an example and the original article it's based on. Make sure your animation frames are in the same order as the example grid and animation speed is set to zero.

  • Quick update to Pathfinder behavior, see download section. Added the missing PathLength expression for better path control and updated example file to cover this. Example saved in beta release 85.

  • 00Rez

    Thanks, I found it.

    Haha thanks Rex I'm a noob!

  • This plugin and behavior is released see first post!

  • rexrainbow

    I've uploaded an example file into the download section now.

  • 00Rez

    A sample capx will be better.

    Ah yes! Well there's a sample capx for the astar plugin and pathfinder behaviour within the repo! Will add a live demo link soon. Let me know if anything isn't working correctly and I'll rectify, thanks!

  • Hi everyone <img src="smileys/smiley1.gif" border="0" align="middle">,

    This is a list of plugins and behaviors I've made:

    Astar plugin, Pathfinder behavior (v1.0) [06/09/2012]

    Auto tile behavior (v0.10)

    Please note the Astar and Pathfinder are grid based.

    Downloads here

    Edit 15/04/2012:

    Here is a tank RTS type example. It uses lines of sight to "smooth" paths and Lerp to make the movement more fluid.

    Regards,

    Rez

    P.S. This works really well with moveTo by rexrainbow

  • 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.

  • edisone

    Pretty soon. It's on github so there's a clue...

  • Found a bug: http://dl.dropbox.com/u/39044660/path_bug.PNG

    Thanks this is to do with the heuristic I think. Added a square root should make it better.

    Here is a demonstration of the costing feature. The blue is lower than the dark green but they aren't blocked so the blip will move there. The blip will just try to avoid if possible very simple but great for AI. Combine this with rexrainbow's MoveTo behavior and it will be great!