The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

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 (23 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 (22,191 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 Frequently asked questions and 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 [email protected] with your username.