"Manual" Ticks & Pathfinding

Just started using Construct 2? Post your questions here

Post » Sun Jan 25, 2015 9:25 pm

So probably a real dumb question, but how would i simulate manual ticks when it comes to pathfinding?

I've figured out how to do it for the player, simply tying all applicable actions in the scene to the player's movement commands (Keyboard > On X Pressed), and having a Set Position of +/- X pixels tied to the player location, etc. Then all "ticks" only occur when the player moves his sprite.

But from what I can tell AI pathfinding's "Move along path" seems to assume the ticks aren't manual, and I'm not sure how to make them function the same way.

Ideally I'd have a "Move along path X pixels then stop" option, but I'm new and don't know how to simulate that.

To make things more complicated, the world's laid out in tiles, where movements are from tile-to-tile, not fluid and natural.

Anyway, not looking for anyone to do it for me, just looking for tips and ideas.
B
3
Posts: 4
Reputation: 183

Post » Mon Jan 26, 2015 7:11 am

Here thread suggestion from my post:
viewtopic.php?t=121710&p=870976#p870976
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Mon Jan 26, 2015 3:46 pm

That appears to be too advanced for me, plus it seems to more revolve around manual path creation for player sprites to then follow, rather than automatic path creation for AI to follow, I just want them to follow it one "step" at a time per "manual tick".
B
3
Posts: 4
Reputation: 183

Post » Mon Jan 26, 2015 7:46 pm

There is an example using Construct Classic. It appear using hexagonal path
viewtopic.php?f=164&t=64591&p=552731&hilit=hexagonal+pathfinding#p552731

Another CC sample but more simple and close to what you wanted
viewtopic.php?t=63206&start=0
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Tue Jan 27, 2015 2:15 am

The first I can't open in Construct 2, and the second appears to've been removed from Dropbox. :(

I've tried a few more things, but I can't quite figure it out. The engine really doesn't seem to be designed to allow for non-fluid actions.
B
3
Posts: 4
Reputation: 183

Post » Tue Jan 27, 2015 3:46 am

Basically pathfinding rely on flood-fill technique. So tracing a goal position is done by checked neighbour tiles then fill them one by one. Creating stepped move shouldn't be hard, you just need to understand the system.

That may refer to "quick grid movement":
viewtopic.php?f=147&t=107209&p=792510&hilit=quick+grid#p792510
ImageImage
B
108
S
49
G
23
Posts: 783
Reputation: 22,611

Post » Tue Jan 27, 2015 4:17 am

That looks more like what I'm looking for with player control, I'll see if I can relate it to AI pathfinding.
B
3
Posts: 4
Reputation: 183


Return to Beginner's Questions

Who is online

Users browsing this forum: gyurto and 1 guest