Grid based pathfinding?

For questions about using Classic.

Post » Wed Apr 09, 2008 5:22 pm

How do you do grid based pathfinding? I mean where objects move like they're on squares of a chess board?

It's my understanding that pathfinding uses cells anyway, but the current pathfinding seem largely intergrated into RTS style movements, not surprising as it's an RTS object.

I raised the issue before how i thought the mouse and keyboard object shouldn't need to be added but the response was construct uses only whats necessary, so shouldn't there be a pathfinding object rather than an RTS object?
B
37
S
19
G
18
Posts: 613
Reputation: 10,231

Post » Wed Apr 09, 2008 5:40 pm

The RTS movement internally uses a grid for pathfinding. I think a good solution would be to build in to the RTS movement some kind of functionality to return a list of cells to a destination without moving, or something? It'd save copying and pasting most of the RTS movement code in to a new plugin for this, heh.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,554

Post » Wed Apr 09, 2008 5:52 pm

Yes, that sounds good. :D
B
37
S
19
G
18
Posts: 613
Reputation: 10,231

Post » Wed Apr 09, 2008 7:13 pm

I worked around it by adding an obstacle to each vertex, and then using a cloned object bound by the grid in relation to the hidden path-finder.

Kept the path-finder from cutting straight corners.
B
2
S
2
G
5
Posts: 391
Reputation: 2,432

Post » Fri Jul 04, 2008 9:07 pm

is it possible yet to do grid based pathfinding movements, or do we have to do the workaround jewsen describes?
B
37
S
19
G
18
Posts: 613
Reputation: 10,231


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests