All Projects → nezvers → StateMachine_system_for_Godot

nezvers / StateMachine_system_for_Godot

Licence: MIT License
Flexible and lightweight StateMachine for Godot

Programming Languages

GDScript
375 projects

Projects that are alternatives of or similar to StateMachine system for Godot

Stent
Stent is combining the ideas of redux with the concept of state machines
Stars: ✭ 681 (+3484.21%)
Mutual labels:  machine, state
SimpleStateMachineLibrary
📚 A simple library for realization state machines in C# code
Stars: ✭ 30 (+57.89%)
Mutual labels:  state, statemachine
Kaskade
[INACTIVE] Simplifying state management
Stars: ✭ 223 (+1073.68%)
Mutual labels:  machine, state
Machinery
State machine thin layer for structs (+ GUI for Phoenix apps)
Stars: ✭ 367 (+1831.58%)
Mutual labels:  machine, state
Hal
🔴 A non-deterministic finite-state machine for Android & JVM that won't let you down
Stars: ✭ 63 (+231.58%)
Mutual labels:  machine, state
State
Finite state machine for TypeScript and JavaScript
Stars: ✭ 118 (+521.05%)
Mutual labels:  machine, state
statemachine-go
🚦 Declarative Finite-State Machines in Go
Stars: ✭ 47 (+147.37%)
Mutual labels:  state, statemachine
react-wisteria
Managing the State with the Golden Path
Stars: ✭ 18 (-5.26%)
Mutual labels:  state
atomic-state
A decentralized state management library for React
Stars: ✭ 54 (+184.21%)
Mutual labels:  state
graph-crdt
Commutative graphs made for real-time, offline-tolerant replication
Stars: ✭ 47 (+147.37%)
Mutual labels:  state
godot experiments
Some 2D, 3D & VR experiments and tutorials in Godot 3
Stars: ✭ 181 (+852.63%)
Mutual labels:  godot
space
A SCI-FI community game server simulating space(ships). Built from the ground up to support moddable online action multiplayer and roleplay!
Stars: ✭ 25 (+31.58%)
Mutual labels:  godot
TowerDefense
Simple Tower Defense Game made with Godot Engine
Stars: ✭ 32 (+68.42%)
Mutual labels:  godot
LinuxLikeConsole
Linux Like Console written in gdscript for Godot (Game Engine)
Stars: ✭ 26 (+36.84%)
Mutual labels:  godot
Godot-DialogGraphPlugin
A simple Godot plugin for dialog graph creation.
Stars: ✭ 58 (+205.26%)
Mutual labels:  godot
Texture-Fonts
Godot Plugin for creating custom Fonts from Textures
Stars: ✭ 59 (+210.53%)
Mutual labels:  godot
fmod-gdnative
FMOD Studio integration and bindings for the Godot game engine
Stars: ✭ 102 (+436.84%)
Mutual labels:  godot
godot-gameshell
Godot export templates and instructions for the GameShell portable game console and other single-board computers
Stars: ✭ 34 (+78.95%)
Mutual labels:  godot
MySQL Module
MySQL connector to Godot Engine.
Stars: ✭ 30 (+57.89%)
Mutual labels:  godot
gd-obj
Obj file parser for Godot
Stars: ✭ 32 (+68.42%)
Mutual labels:  godot

State Machine System for Godot

Flexible and lightweight StateMachine for Godot and each system related code row is commented. States are plain scripts without extending any class except default Reference what GDScript is. States are added to StateMachine through exported script Array. Decision on default State choice must be implemented per use case (Player, Camera, Pickup, Enemy).

Project is also simple use case for platformer (Idle, Walk, Jump)

Usage

  • Create StateMachine inherited script for different types of use cases (example - PlayerStateMachine);
  • Create State inherited state scripts (example - PlayerState -> PlayerIdle);
  • Use virtual functions inheritted from State (unhandled_input, physics_process, process, state_check);
  • Add State scripts into StateMachine exported script_array. PlayerStateMachine implements default state choice, you can change it to script_array[0] instead of String key.
  • For getting references to nodes or get_tree() use sm (state machine) - yield(sm.get_tree().create_timer(1.0), "timeout")

IMPORTANT

  • Each new state needs to implement:
func _init(_sm).(_sm)->void:
	name = "Idle"

Walkthrough

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].