A complete framework for Godot to create beautiful and complex AI motion. Works both in 2D and in 3D.
Go to file
2023-01-13 11:02:01 +01:00
assets Update the banner 2020-02-08 13:33:57 -06:00
godot Fix issues. 2023-01-13 11:02:01 +01:00
.gitignore Bring in my tooling. 2023-01-13 10:46:36 +01:00
build.config.example Bring in my tooling. 2023-01-13 10:46:36 +01:00
CHANGELOG.md Fix angular velocity clamped to accel 2021-06-14 20:26:31 -04:00
editor.sh Bring in my tooling. 2023-01-13 10:46:36 +01:00
ged.sh Update the quick open script. 2023-01-13 10:47:35 +01:00
HEADS Bring in my tooling. 2023-01-13 10:46:36 +01:00
LICENSE Add MIT license 2020-01-18 18:42:48 +01:00
module_config.py Bring in my tooling. 2023-01-13 10:46:36 +01:00
README.md Update README.md 2023-01-01 22:16:18 +01:00
reference.json Split project, turn framework into submodule 2020-05-14 13:45:46 -04:00
SConstruct Bring in my tooling. 2023-01-13 10:46:36 +01:00

Godot Steering AI Framework

Project banner

This project is a framework to code complex and smooth AI movement in the Godot game engine, in GDScript, using steering behaviors. It works in both 2D and 3D games.

➡ Follow us on Twitter and YouTube for free game creation tutorials, tips, and news! Get one of our Godot game creation courses to support our work on Free Software.

It supports all essential steering behaviors like flee, follow, look at, but also blended behaviors, group behaviors, avoiding neighbors, following a path, following the leader, and much more.

Getting the framework

This repository contains the framework and some demos for learning purposes.

If you want just the framework with nothing else to get in the way or to create a Git submodule, use the Godot Steering AI Framework Submodules repository.

Introduction

In the 1990s, Craig Reynolds developed algorithms for common AI behaviors. They allowed AI agents to seek out or flee from a target, follow a pre-defined path, or face in a particular direction. They were simple, repeatable tasks that could be broken down into programming algorithms, which made them easy to reuse, maintain, combine, and extend.

While an AI agent's next action is based on decision making and planning algorithms, steering behaviors dictate how it will move from one frame to the next. They use available information and calculate where to move at that moment.

Joining these systems together can give sophisticated and graceful movement while also being more efficient than complex pathfinding algorithms like A*.

The framework

This project is a framework for the Godot game engine. It takes inspiration from the excellent GDX-AI framework for the LibGDX java-based framework.

Every class in the framework extends Godot's Reference type. There is no need to have a complex scene tree; you can contain that has to do with the AI's movement inside GDScript classes.

How it works

In GSAI, a steering agent represents a character or a vehicle. The agent stores its position, orientation, maximum speeds, and current velocity. The agent stores a steering behavior that calculates a linear or angular change in velocity based on its information.

The coder then applies that acceleration in whatever ways is appropriate to the character to change its velocities, like RigidBody's apply_impulse, or a KinematicBody's move_and_slide.

Documentation

The framework's documentation and code reference are available here: Godot steering AI framework documentation

Contributing

If you encounter a bug or you have an idea to improve the tool, please open an issue.

If you want to contribute to the project, for instance by fixing a bug or adding a feature, check out our:

  1. Contributor's guidelines.
  2. GDScript style guide

Support us

Our work on Free Software is sponsored by our Godot game creation courses. Consider getting one to support us!

If you like our work, please star the repository! This helps more people find it.

Join the community

  • You can join the GDQuest community and come chat with us on Discord
  • For quick news, follow us on Twitter
  • We release video tutorials and major updates on YouTube