Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

feat: Create state machine module #2

@Bli-AIk

Description

@Bli-AIk

🔗 Is your feature request related to a specific issue?

Managing complex entity states (e.g., for AI, player characters, or UI) using simple boolean flags or enums becomes unmanageable, bug-prone, and leads to "spaghetti code" as complexity grows.


💡 Feature Description

Develop a generic, hierarchical finite state machine (FSM) module.

  • Expected outcome or effect: A robust, reusable, and easy-to-use system for modeling state-driven behavior.
  • Specific implementation ideas: The following definitions are for reference only and are subject to change. Implementation could include:
    • State base class with OnEnter(), OnUpdate(), OnExit() methods.
    • StateMachine class to manage the active state and handle transitions.
    • Support for hierarchical states (sub-states) to manage complexity.
    • Transitions based on conditions or events.
  • Usage scenarios or benefits: This module can be used for a wide range of scenarios:
    • AI behavior (e.g., Patrol, Chase, Attack states).
    • Player character controller (e.g., Idle, Walking, Jumping, Attacking states).
    • Complex UI flows and screen transitions.

⚖ Alternatives Considered

N/A


📝 Additional Information

N/A

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions