[Request] Pathfinder Behavior

0 favourites
  • 15 posts
From the Asset Store
2D Tile Set
$2.99 USD
Tile map for your 2d platformer games, custom sets available on request
  • There is a very good pathfinding plugin that was made by 00Rez. I really need this plugin for my tank AI because the AI has to dodge bullets and navigate a maze towards the player all at once. This is not possible with C2s current pathfinding system. I dont think 00Rez is still on this forum and refuses to respond to anyone on the forum asking him to update it. Can someone here please help to update it so that it supports tilemaps?

  • Have you tried Easystar pathfinding instead? It works with a tilemap.

    https://www.scirra.com/forum/behavior-easystar-js-pathfinding-for-tilemap_t129056

  • This is what my tilemap looks like. There are no walkable vs non-walkable tiles.

  • Anyone? I need this plugin for my game, fans are waiting.

  • I don't think a plugin could be made to understand a tilemap like that. Your image is vague but I guess the walls are on the edge of the tiles? No idea if you can do this with existing behaviors, but what you'd need to do is loop over all the tiles of the tilemap and build a mesh of movable area and then pass that to the behavior.

    Or if the existing plugins can't do that, it's possible to do it with events.

  • Why can't the built-in pathfinding behavior do what you want? It could handle the kind of map you showed, providing you used a small enough cell size.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't think a plugin could be made to understand a tilemap like that. Your image is vague but I guess the walls are on the edge of the tiles? No idea if you can do this with existing behaviors, but what you'd need to do is loop over all the tiles of the tilemap and build a mesh of movable area and then pass that to the behavior.

    Or if the existing plugins can't do that, it's possible to do it with events.

    My tilemap is made out of those 6 tiles, some are rotated. You can take a look at what they look like by checking out my game here: https://www.scirra.com/arcade/action-ga ... uble-2-155 or by taking a look at the mazes being generated for use in-game here: http://bit.ly/tt2mazegenerator

    Can you give me an example on how I would 'build a mesh'? I tried to use sprites but it proved to be very laggy because of the amount of sprites on-screen.

  • Why can't the built-in pathfinding behavior do what you want? It could handle the kind of map you showed, providing you used a small enough cell size.

    The reason I wanted to use the custom behavior is because I need the pathfinder to be able to calculate quickly when objects block the path, see my original message. Also, I need a rocket that can calculate a path quickly as its moving so that it can keep up with the player inside the maze.

  • Well, I was thinking of a complete event solution. I've done the astar algorithm many times before so it was pretty easy to get going with thin walls. It only works with one object and isn't setup to go as fast as possible so it may not be useful. In it the nodes collide with other nodes it's connected to.

    https://dl.dropboxusercontent.com/u/542 ... nwall.capx

  • Great example R0J0 !! Clean and responsive pathfinding I appreciate it.

  • Hello,

    This example was very useful to me. Thanks

    I would like to extend it will "one way " nodes. Nodes that can be go through from one side but not from the other.

    Please check the image posted.

    Any solution?

  • paala

    One possible solution is writing your own path finding logic, or try my pathfinding plugin of my board system.

  • Your plugin doesn't seam to offer one way tiles and the sample capx requires 5 additional plugins just to test.. DO you have a demo online somewhere?

  • I manage to solve this problem :

    what I did:

    1. add a new instance variable to the other family : onewayhelper: 0 default

    2. add a new sprite: ONEWAYHELPERSPRITE with a instance variable onewayhelper:

    this sprite will be positioned at the nodes that you want one way behavior: with the insance variable of 1 and 2. you can't go from 1 to 2.

    modify this events like this:

  • paala

    Edit the cost function (event 8) to reach your goal.

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