0 votes

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.

in Engine by (22 points)

1 Answer

+2 votes

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:

https://gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732

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

by (20,677 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.