Pathfinding for Platform Games

Discussion and feedback on Construct 2

Post » Sat Feb 09, 2013 10:14 am

Hi,

is it feasible to use the pathfinding behaviour on platform games ?

I can see how it could be used where a continuous path is available such as ladders etc but how about jumping gaps or platforms?

Thanks
B
49
S
16
G
9
Posts: 1,098
Reputation: 11,222

Post » Sat Feb 09, 2013 10:51 am

Here's what the ancestors had to say:

http://www.scirra.com/forum/the-hunt-for-the-ultimate-platFormer-ai_topic34717_page1.html

Basically:

[QUOTE=QuaziGNRLnose] fake it, going for some A* system would work well for sure, but its definitely way more complicated than it needs to be. keep it simple.[/QUOTE]
B
151
S
75
G
20
Posts: 1,793
Reputation: 22,749

Post » Sat Feb 09, 2013 11:01 am

"Here's what the ancestors had to say:"

Hehe

Thanks
B
49
S
16
G
9
Posts: 1,098
Reputation: 11,222

Post » Tue May 30, 2017 6:50 am

I have used Dijkstra's algorithm for shortest path which enables bots to find their way across a 2D platform game setup. It doesnt use any 3rd party plugins and is all native C2 events.
At the beginning of the level, the algorithm executes and starts calculating paths between all connected nodes. A static tree is created in a 3D array object.
The bot then uses this to reach a destination platform given its current platform.

Play the game here to see it in action: http://www.newgrounds.com/portal/view/694088
Image
Please help by sharing your comments and feedback at Newgrounds!
Image

Read more here: viewtopic.php?t=186038
Checkout my tutorial on smooth swipe with inertia.
Play the game jam winning game Kontrazt
B
30
S
9
G
6
Posts: 29
Reputation: 6,685


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests