Skip to main content

match Folder

Folders Index

foldercomponents
folderevents
folderrules
foldersystems
foldertypes

Files Index

filehelios/engine/mechanics/match/_module.ixx

Match state management module for the helios engine. More...

fileMatchStateManager.ixx

Type alias for match state manager. More...

Description

helios::engine::mechanics::match

Match state management for the helios engine.

This module provides domain-specific types and bindings for managing match states (Warmup, Start, Countdown, Playing, PlayerDefeated, GameOver). It uses the generic helios::engine::state framework.

Components

ComponentDescription
MatchStateManagerType alias for StateManager<MatchState>
MatchStateEnum defining match/round lifecycle states
MatchStateTransitionIdEnum defining valid transition triggers

Submodules

SubmodulePurpose
rules/Default transition rules and guards
systems/Systems for match flow and rules
types/Core types, enums, and type trait specializations

Architecture

MatchStateManager is a type alias for StateManager<MatchState>:

The generic StateManager provides:

  • Rule-based transitions with optional guards
  • Listener notifications on state changes
  • Command-driven state changes via StateCommand<MatchState>

Match Flow

 ┌───────────────┐ WarmupRequest ┌───────────────┐
 │ Undefined │ ─────────────────► │ Warmup │
 └───────────────┘ └───────────────┘
 
  StartRequest
 
 
  ┌───────────────┐
  │ Start │
  └───────────────┘
 
  CountdownRequest
  (guarded)
 
 
  ┌───────────────┐
  │ Countdown │
  └───────────────┘
 
  PlayerSpawnRequest
 
 
  ┌───────────────┐
  │ Playing │
  └───────────────┘
 
  PlayerDied
 
 
  ┌────────────────┐
  │PlayerDefeated │
  └────────────────┘
  │ │
  CountdownRequest GameOverRequest
  (has life left) (no life left)
  │ │
  ▼ ▼
  Countdown ┌──────────┐
  │ GameOver │
  └──────────┘

Usage

 using namespace helios::engine::state;
 
 // Create manager with rules
 auto manager = std::make_unique<MatchStateManager>(matchStateRules);
 
 // Add listeners
 manager->addStateListener(std::make_unique<LambdaStateListener<types::MatchState>>(
  /* onExit, onTransition, onEnter callbacks */
 ));
 
 // Submit transition via command
 commandBuffer.add<StateCommand<types::MatchState>>(
  StateTransitionRequest<types::MatchState>{
  }
 );


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.