GS2-StateMachine API Reference

State machine management feature

Manages state machines on the server side and provides a mechanism to transition states by event passing from the game.

The state machine definition uses its own GSL (GS2 States Language). For the notation of GSL, please check the separate document.

State machines are versioned and will work with the state machine definition used at startup even if the state machine definition is updated. This allows you to change the state machine definition without affecting the running state machine. If you want to make changes to the state machine that would break compatibility, use the mechanism to delete the state machine that was started with a version below the specified version in the Namespace settings. However, only the state machine is versioned by this mechanism, and the GS2-Script referenced by the state machine is not versioned.

The state machine that started can be set with an expiration time in minutes. State machines with an expiration time set will be automatically deleted when the expiration time expires.


Use in your game

Game Engine

Specifications of models and API references for GS2-StateMachine SDK for Game Engine

SDK

Specification of models and API references for GS2-StateMachine SDK for various programming languages

Configuration and integrations

Deploy/CDK

The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK

Script

Reference for event triggers that call extended scripts

Transaction Action

Specification of verify/consume/acquire transaction actions

Related documentation

GSL Format

C# Definition Reference

Specifications for states, operations, continuing processing, rewards, and random numbers written in C#

C# Definition Tutorial

A tutorial that builds a small game in the Unity Editor, edits C# rules, and operates them from the game screen

Speculative Execution Session API

APIs for calling operations, reading state, and receiving server verification from the generated C# classes

C# Definition Generation Settings

Specifications for project.json, SDK references, the reward mapping table, generated files, and GSL registration