Grid based chase ai

so, heres my game Flowlab Game Creator - New Game
if you check in the bottom of the map, youll find a “bonhomme”

my goal is to develop an ai that can navigate its way to the player throughout the castle, through grid based movement

i have an idea of how to do it, but id like your ideas first

1 Like

@chrisdakiller summoning (he did this before)

3 Likes

@thebrickccentric has a pathfinding example

3 Likes

while that seems like it works, im not sure if it will implement smoothly into an environment thats complicated and based one pure grid based movement

any thoughts on that?

1 Like

Brickccentric probably could adjust it for you to be grid based

2 Likes

What exactly do you mean by grid-based movement? Does the AI “jump” between 32x32 squares instead of moving smoothly like with with velocity?
Also are you wanting the AI to just automatically know where the player is and find a path to the player or do you want the AI to have to “encounter” the player in some way first and then follow them?

4 Likes

so for the first one, I want the enemy to jump the 32x32 gaps moving in a similar fashion to the player

and for the second one, i would like the ai to constantly be chasing after the player

2 Likes

Ok, like CodeAlpaca said I’d have to rework some things for the movement to be grid-locked, but I’ll put an example link here when it’s done (but of course feel free to go ahead and make your own in the meantime)

3 Likes