Platformer advanced AI pathfinding

Hey everyone,
Is anyone by any chance interested in a propper yet very easy to make AI with dynamic pathfinding for platformers, that can climb ladders, jump over obstacles and find the player on any X and Y-axis in any room?
Haven’t seen anything similar to this made in Gdevelop on the entire youtube

Here’s the video exmple Example of Gdevelop AI - YouTube

Nice would you upload to itch or something?

I’ll make a tutorial. Can also upload to itch, yep.


To be frank, there’s no clever coding involved (almost no coding at all). It’s more like a tutorial how to limit the crazyness of the original pathfinding behaviour due to it was originally made for top-down games.

Well as I always say if my work can help others there will be something that I’m doing right.
Anyway it would be great to watch the tutorial and sneak and peek the code.

1 Like

You may think no clever coding, but that’s just your opinion. Usually it’s how existing functions are utilised that is the clever/cunning part, which is all part of coding :smile:

It appears like you are using pathfinding, but the “how is that done” part for most viewers is how the red chasers go down the ladders rather than just fly diagonally across and straight to the green target.

The community would benefit from a tutorial on this, and a look at the code.

@TeamDisgrace, there’s another member on the forum who could do with the AI you created (in this thread). Any chance of sharing it the events you used to achieve the pathfinding?

Yep. I kinda promised sharing it but scrapped the idea for now cause i’m trying to make it better (cuz it’s a really ugly solution). But i’m gonna describe it here. This is achieved via default pathfinding plugin. You just block all the area above the ground with invisible objects so that enemies that are following you wouldn’t fly. Than you compare the X position of the next node that enemy should reach. If it’s less than enemie’s X position, the enemy goes to the left and so on. If the next node is at 45 angle, they would jump.

1 Like

Heh, you were right, it is a simple solution, but genius at that. Thanks for the explanation. :smiley:

I would like to see a little more of the code, I would certainly be interested and it could be of great help to me since your artificial intelligence moves very naturally.