Basic A.I. for enemies.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jaiden

I am fairly new to Godot and recently decided to make a game. I need basic A.I. movement for the enemies. Basically moving around the screen in a random yet smooth fashion. And when player in view, follow. I would also like it to bounce of platforms. I have tried to do so on my own with little success. What would be the best way of accomplishing this?

There is not much info on this topic for some reason. Any and all help much appreciated.

:bust_in_silhouette: Reply From: kidscancode

Not much info? There is a wealth of information on coding AI behaviors in games, dating all the way back to Pac-man. Game AI is a very broad subject, and there are many approaches depending on how complex your needs are.

If you’re looking for “smooth”, natural-looking movement, a good place to start is with a category of algorithms called “steering behaviors”. This site has a great introduction to them:

As does this one (basically the bible for this subject):
https://natureofcode.com/book/chapter-6-autonomous-agents/

Can it be well combined with pathfinding?