[Request] Pathfinder Behavior

Post your work in progress addons and get feedback

Post » Thu Jan 14, 2016 4:17 pm

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?
viewtopic.php?t=68958&start=0
Last edited by austinblackbelt on Fri Jan 15, 2016 3:36 pm, edited 1 time in total.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,783

Post » Thu Jan 14, 2016 4:21 pm

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

https://www.scirra.com/forum/behavior-easystar-js-pathfinding-for-tilemap_t129056
B
43
S
23
G
20
Posts: 735
Reputation: 12,027

Post » Thu Jan 14, 2016 7:02 pm

Image
This is what my tilemap looks like. There are no walkable vs non-walkable tiles.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,783

Post » Mon Jan 18, 2016 2:53 am

Anyone? I need this plugin for my game, fans are waiting.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,783

Post » Mon Jan 18, 2016 10:05 pm

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.
B
92
S
32
G
110
Posts: 5,298
Reputation: 71,507

Post » Mon Jan 18, 2016 10:19 pm

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.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Post » Mon Jan 18, 2016 11:36 pm

R0J0hound wrote: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.
Last edited by austinblackbelt on Mon Jan 18, 2016 11:43 pm, edited 2 times in total.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,783

Post » Mon Jan 18, 2016 11:40 pm

Ashley wrote: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.
Check out my online game Space Arena at space-arena.com!
B
61
S
24
G
7
Posts: 36
Reputation: 7,783

Post » Tue Jan 19, 2016 12:21 am

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
B
92
S
32
G
110
Posts: 5,298
Reputation: 71,507

Post » Tue Jan 19, 2016 2:35 am

Great example R0J0 !! Clean and responsive pathfinding I appreciate it.
ImageImage
B
109
S
50
G
23
Posts: 783
Reputation: 22,736

Next

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 1 guest