VisualFSM

An asset by shoulddev
The page banner background of a mountain and forest
VisualFSM hero image

Quick Information

0 ratings
VisualFSM icon image
shoulddev
VisualFSM

A visual finite state machine editor plugin for Godot. (alpha)Features: - Visualize and edit your finite state machines with this intuitive editor. - Trigger based transitions to simplify your states' logic. - Use prebuilt triggers, or script your own. - Minimal setup required. Just add a VisualFSM node below the node you want controlled and start building your graph!This tool is still in alpha. If you encounter issues or would like to propose changes, submit an issue on github: https://github.com/BernardCloutier/VisualFSM/issues

Supported Engine Version
3.2
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

VisualFSM

A visual finite state machine editor plugin for Godot. README

Features

  • Visualize and edit your finite state machines with this intuitive editor.
  • Trigger based transitions to simplify your states' logic.
  • Use prebuilt triggers, or script your own.
  • Minimal setup required. Just add a VisualFSM node below the node you want controlled and start building your graph!

Tutorial

  • Add a VisualFSM node as a child to the node you want to control.
  • Click on the VisualFSM node: a panel opens in the bottom dock.
  • Drag a connection from the start node to create your first state.
  • Give it a meaningful name and press enter.
  • Click the script icon to edit this state's script. The "object" parameter corresponds to the parent node.
  • Click on the "Add trigger" dropdown and select the trigger type.
  • A new connection is added to the right of the trigger: drag it to connect to a new state.
  • If you added a timer trigger, click on the timer icon to adjust the duration.
  • If you added an input action trigger, click on the icon to select the actions to react to.
  • If you added a scripted trigger, click on the script icon to edit it. Return true in is_triggered when the transition should occur.

Planned features

  • In-editor tutorial
  • Hierarchical state machine. Turn a state into an FSM.
  • Unit tests.
  • Save scripts as files (all scripts are currently built into the fsm resource)
  • Allow duplication of finite state machine resource when copying VisualFSM node. (see related issue)
  • More demos

Why another FSM plugin for Godot?

As your finite state machine (FSM) grows, managing transitions between states becomes a pain. This is especially true when states are responsible for triggering their own transitions. This approach violates the single responsibility principle, since on top of their own control logic they must correctly select the next state. You can easily end up with a messy structure that makes bugs harder to find than they should.

This plugin's main goal is to visually edit your FSM and identify potential problems at a glance. States and their transitions are easily editable in a GraphEdit based editor. Furthermore, your states and transitions are decoupled to allow for a cleaner structure. Each tick, the current state's triggers are visited and the first to fulfill its condition causes the FSM to switch to the corresponding next state.

Links

Primer on finite state machines and their uses in games: https://gameprogrammingpatterns.com/state.html

The finite state machine implementation was inspired by this article.

A visual finite state machine editor plugin for Godot. (alpha)

Features:
- Visualize and edit your finite state machines with this intuitive editor.
- Trigger based transitions to simplify your states' logic.
- Use prebuilt triggers, or script your own.
- Minimal setup required. Just add a VisualFSM node below the node you want controlled and start building your graph!

This tool is still in alpha. If you encounter issues or would like to propose changes, submit an issue on github: https://github.com/BernardCloutier/VisualFSM/issues

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
VisualFSM icon image
shoulddev
VisualFSM

A visual finite state machine editor plugin for Godot. (alpha)Features: - Visualize and edit your finite state machines with this intuitive editor. - Trigger based transitions to simplify your states' logic. - Use prebuilt triggers, or script your own. - Minimal setup required. Just add a VisualFSM node below the node you want controlled and start building your graph!This tool is still in alpha. If you encounter issues or would like to propose changes, submit an issue on github: https://github.com/BernardCloutier/VisualFSM/issues

Supported Engine Version
3.2
Version String
0.1
License Version
MIT
Support Level
community
Modified Date
3 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers