Tilemaps + Pathfinding grid help

Get help using Construct 2

Post » Sun Jan 08, 2017 3:02 pm

Alright 99, to be honest, you helped me a lot, but at the end, I do not want some perfect map collision of obstacles, just what you said, that they follow the path correctly.

I'll try this: "Or in you case: cell size = tile size of the tilemap holding the solids. Border size = half the size of the moving sprite , and to be experimented."

And i'll look around on the forum to see tips for making the pathfinder correctly.

I do have event sheet where I can see myself the collision cells! but yours is interesting too.
B
9
S
2
G
2
Posts: 21
Reputation: 1,567

Post » Sun Jan 08, 2017 3:15 pm

How do you get half of the sized of the object for cell border in order to follow the path, If I even put 0 border, they will not follow properly.

edit: Heya, I made a .capx for you to visualize more deeply my problem with 16x16 tilesets and the cell size of 16.
8 size is too small for the job, and it won't be optimal.

check it out if you want please!

https://www.dropbox.com/s/ywset1901frys ... .capx?dl=0

Press 'M' to show the collision map cells.
B
9
S
2
G
2
Posts: 21
Reputation: 1,567

Post » Mon Jan 09, 2017 8:50 pm

I did't realise that you grid is this tight.
Got to loosen the grid some, and then path finding with the official plug in is possible.

https://www.dropbox.com/s/1gxmepuzkvsv9 ... .capx?dl=0

To my knowledge, however, it is not possible to force it to find a path each short period of time, in such a tight grid. The curvy paths will force the moving object into as obstacles marked cells. And from there it will not be able to find a new path.

You going to have more luck with:
roguelike-plugin-c2-rot-js-interface_t118452
or
behavior-easystar-js-pathfinding-for-tilemap_t129056
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Jan 09, 2017 10:06 pm

Thanks, so, you're telling ME that I can't official plugin pathfinding in a 16 size tilemap? that's HELLA weird!

Really there's no way to do it? every short periods -> Follow the player?
what If I increase the cell size even if my tilemap is 16x16?
I'm really trying to avoid using third party plugin of this kind. pathfinding is something really important in the game right now. :/

@Ashley could you help me on this? Maybe I'm doing something wrong in order to use the pathfinding plugin!
B
9
S
2
G
2
Posts: 21
Reputation: 1,567

Post » Mon Jan 09, 2017 11:40 pm

The 'curves' depend on the 'turn speed'. But they will stay a bit 'absolute'.

You can of-course code your own Dijkstra algorithm, or use a flood fill.
flood-fill-and-path-finding_t170394

But in the end, that is what the plugins do, but optimised.

You can try (i never tried that) use a like 100 pixels grid. And scale the layer. Its easyer for a path to make a turn round a 100 pixel corner then round a 8 pixel corner, thats what you do.

I am always this stupid to dive into this things, but i got this urge to tell YOU about things YOU ask.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jan 10, 2017 1:30 am

Not working. :/ it's so weird this. I even being 32 cell size my guys don't follow the path properly, what I'm doing wrong? How I should make them find the path with player?
B
9
S
2
G
2
Posts: 21
Reputation: 1,567

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 24 guests