Pathfinding suggestion for platformers

Discussion and feedback on Construct 2

Post » Wed Apr 16, 2014 6:14 pm

Hey!
So I was wondering about a new action in the pathfinding behaviour that I reckon would be of use to those making platformer games.
I've implemented the behaviour into my game and it's going pretty well so far, but I realised that the pathfinding behaviour expects the sprite to go EXACTLY into the coordinates of the cell in order to begin travelling to the next cell. This is a bad thing with platforming, as is could be pretty unlikely that the sprite will go exactly into the cell's coordinates.
I was thinking an action "Go to next cell" would be great. This could be used with the event "Pick overlapping point", to test if the sprite is overlapping the cell's coordinates, which will then allow the sprite to begin travelling to the next cell, rather than incessantly trying to precisely hit the cell's coordinates!
Is there any shortcomings to this idea? :P
Thanks!
B
51
S
20
G
10
Posts: 571
Reputation: 9,819

Post » Wed Apr 16, 2014 6:22 pm

@Jase00 well just doing the the overlapping point test would do the trick here i think, from the moment its overlapping you call the next coordinate, a distance check could work as well
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Wed Apr 16, 2014 6:28 pm

@vtrix , hey, you're right, never thought of that! I can add an extra instance variable and increase it when each one is reached. Thanks!
B
51
S
20
G
10
Posts: 571
Reputation: 9,819


Return to Construct 2 General

Who is online

Users browsing this forum: Darknessed and 4 guests