Enemy AI
Four enemy types and a three-pattern boss on one shared state machine, with attacks you can read.
Godot 4.7 · MIT code · CC0 art
Learn to build it: 2D Roguelike: Enemies & AI (First 3 lessons free)
Enemy code turns into a pile of if statements once it can do more than two things. A state machine gives each behaviour its own small script and one clear way to switch between them.
Free Godot 4.7 project · MIT licensed · v1.0.0
No account needed. Or download the v1.0.0 ZIP directly.
Download the project from GitHub and unzip it. In the Godot Project Manager, click Import and pick the project.godot file inside the folder.
The README on GitHub explains how each part works and how to copy it into your own game.
1dc8de0, published 2026-10-03Copying a system works until you need to change it. These quests build it with you, one small step at a time. You write the GDScript in your browser and each step is checked before you move on.
Builds this six-state machine: idle, roam, chase, the telegraphed leap, hitstun and death, with pathfinding.
First 2 lessons free
Takes the same idea into 3D.
First 4 lessons free
Four enemy types and a three-pattern boss on one shared state machine, with attacks you can read.
Godot 4.7 · MIT code · CC0 art
Learn to build it: 2D Roguelike: Enemies & AI (First 3 lessons free)
Health, hitbox and hurtbox components with one hit per swing, knockback, hit-stop and i-frames.
Godot 4.7 · MIT code · CC0 art
Learn to build it: 2D Roguelike: Combat Core (First 4 lessons free)
8-direction movement, mouse aim, a dash with i-frames and a follow camera with shake.
Godot 4.7 · MIT code · CC0 art
Learn to build it: 2D Roguelike: Top-Down Controller (Free, 8 lessons)
See all the free Godot projectsReport a problem with this project