Player State Machine (Test)

Version 34.3 by Alexandros Mloukie on 2025/12/11 02:47

Table of Contents


0 - Introduction

This document outlines the Finite State Machine infrastructure inherent to the Player Character. It contains and defines:

  • Player States & Overarching Architecture
  • State Transitions
  • State Actions

The player's Finite State machine defines the states and capabilities of the Player Character within the game. Each state is self-contained, and can be transitioned to when certain conditions are met. The state capabilities, transition requirements, and relations to one another are defined within this document.

0.1 - Disclaimer

This document is subject to change as part of the evolving nature of the game's development, and updates will be made accordingly. If anything is not correct or requires further explanation, contact Adam Janus to get further guidance.

0.2 - Terminology

TermMeaning
PCPlayer Character

FSM

Finite State Machine

1 - Core Concepts

There are 4 key concepts inherent to the FSM

ConceptDefinition
State

The different, distinct, and self-contained conditions the PC can be in. The PC can only be in one state at any given moment.

Action

Describes the different actions, mechanics, and elements the player can engage with.Multiple States can have access to the same Actions.

Some Actions will Transition from the current State to a new one.

Actions can induce Statuses on the player.

Status

Describes an external effect (e.g. buff/debuff) that affects the player (e.g. Blindness, Crippled)

Statuses can affect the capabilities of the player (e.g. reduce speed), and prevent or allow certain Actions taking place (e.g. no sprinting when Crippled).

Statuses can prevent or allow the player's Transitions to another State.

TransitionA Transition refers to the act of moving from one State to another, usually as a result of an Action or Status.

2 - Player States

StateDescription
IdleDefault player State. Allows for most of the movement and combat actions the player can partake in.
Controlled FallThe player is mid-air, but maintains control over the PC.
Freefall

The player is mid-air, but has lost control over the PC.

SkatingThe player is skating on top of a rail.
Rock ClimbingThe player is clung onto a climbable rock surface.
Rope ClimbingThe player is currently on a climbable rope.
GrapplingThe player is currently utilizing a Grapple Hook tool.
MountedThe player is mounting a vehicle/ridable mob.

3 - Actions

3.1 - Traversal Actions

For details on any of the following actions please refer to: Traversal - Technical Design

Walk Sprint Crouch Jump Fall Skate Rock Climb Rope Climb Grapple

3.2 - Combat Actions

For details on any of the following actions please refer to: Combat System - Technical Design

 Attack Block Parry Dodge Use Off-Hand

3.3 - Interaction Actions

For details on any of the following actions please refer to: Crafting System - Technical Design

 Interact Construct


4 - Statuses

4.1 - Status List

StatusBlocks the following Actions
BlindedSkate Grapple Attack Parry Interact Construct
CrippledSprint Jump Skate Rock Climb Dodge
CrouchingSprint Dodge
SprintingCrouch Rock Climb Rope Climb Grapple Attack Block Parry Dodge Use Off-Hand Interact Construct
AttackingSprint Rock Climb Rope Climb Grapple Attack Block Parry Dodge Use Off-Hand Interact Construct

4.2 - Action Induced Statuses

ActionApplies the following Status
SprintSprinting
CrouchCrouching
AttackAttacking

5 - Transitions

5.1 - High-Level Transition Diagram

1765417604690-575.png