Thumbnail 16_9.png

This state machine system provide a general template for game elements with state based behaviors like characters, enemies, and UI. Providing a highly extendable system for many use cases, while providing debug tools to enhance editor workflow.

Demo

https://jasonxxr.itch.io/modular-combat-fsm-demo - Playable Demo

https://youtu.be/ic8AlUNyBHA - Video Demo

GitHub

https://github.com/jasonxuDrop/Modular-Combat-FSM

Technical Documentation

State Machine Architecture

image.png

image.png

Editor Setup

image.png

[Player]
  ├── StateMachine
  │    ├── (Any)
  │    │    ├── Transition Any -> Jump
  │    ├── State Idle
  │    │    ├── Action Idle
  │    │    ├── Transition Idle -> Walk
  │    │    ├── Transition Idle -> Run
  │    ├── State Walk
  │    │    ├── Action Walk
  │    │    ├── Transition Walk -> Run
  │    │    ├── Transition Walk -> Idle
  │    ├── State Jump
  │    │    ├── Action Jump
  │    │    ├── Transition Jump -> Idle

Execution Flow

Update

  1. Update Current State Action
  2. Check Transition

Change State

  1. Invoke StateMachineEvent of type ChangeStateBegin.
  2. Exit previous state.