Change History Below!

Full Godot 4.1.1 project source included with purchase. The artwork used in the demo comes from a free art pack provided by Pixel Frog. See credits in-game and down below for more info. 

A link to a private video can be found at the top of the main.gd file. The video is a full code review walk-through. I go through the entire project explaining everything and I even find and fix a few issues a long the way. The video can help you get a jump start on understanding how everything is hooked up.

This project utilizes a 'Finite State Machine' variant called a 'Component State Machine'. It's really interesting and powerful. Especially useful if your state machine is quite large and/or contains sub-states. 


Key Features:

  • AI Pathfinding with NavigationAgent & Avoidance w/TileMap
  • AI Enemy Detection & Tracking w/dynamic radius
  • AI Battle Simulation (units attack in this one)
  • Finite State Machine -> [Roam, Track, Attack, Think, Dead]
  • Debug Mode (Toggles)
  • Custom Pathing Lines (they display in web at runtime unlike the built in debug lines)

Other Areas Of Interest:

  • Movement Controller & Animation States
  • Spawning Units with Basic Controls
  • Global Sound System
  • On my PC (older gaming rig), I can maintain 60 frames a second up to about 160 active units. 

Key Differences:

  • You may have seen my other projects which are similar looking but they are completely different under the hood. This project is a full rewrite using a Finite State Machine. It includes many other enhancements to the pathfinding, debugging and etc. 

Credits:

Notes:

  • Check out my other projects and don't forget to follow. I'm actively updating and developing all new projects.
  • Clean readable code. I've been working with Godot for a couple years so lots of lessons learned are applied in terms of structure, call-chains, signals, awaits and etc. Always learning though. Feedback & suggestions welcome.

Change History:

  • 12/3/2023
    • Improved the Attack state. It was giving up control of state to the unit so I  fixed that so it now has full control and can cleanly exit whenever is needed.
    • Removed Rest. Now using 'Think' as rest.
    • Other minor improvements and bug fixes.

Purchase

Buy Now$3.99 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $3.99 USD. You will get access to the following files:

godot-warrior-pathfinding-demo-v0.0.2-source.zip 9.8 MB

Development log