codebase-game-loop

Document main game loop, turn processing, and system call order.

Updated Dec 13, 2025
One-click install
npx skills add https://github.com/EliasVahlberg/saltglass-steppe --skill codebase-game-loop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-game-loop
Source: https://github.com/EliasVahlberg/saltglass-steppe/tree/main/.kiro_snapshot_2026-04-04_1209/skills/codebase-game-loop
Command: npx skills add https://github.com/EliasVahlberg/saltglass-steppe --skill codebase-game-loop

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured guide to the main game loop, per-turn processing, and the system call order used by the deterministic turn-based engine. It helps developers reason about the sequence of actions, state updates, and event handling that drive each turn.

Core Features & Use Cases

  • Per-turn orchestration: outlines how the main loop progresses, including input handling, rendering, and state transitions.
  • Action dispatch mapping: documents how actions like Move, EndTurn, Wait, AutoExplore, and others are routed to corresponding systems.
  • Debug and extension guidance: explains how to extend or debug per-turn logic and system order for new features.

Quick Start

Run the main game loop to observe per-turn processing and system order in action.

Frequently Asked Questions about codebase-game-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug turn-based game loop execution order in Rust?

Debug turn-based game loop execution order in Rust by mapping the sequencing of update, end_turn, and event processing systems to ensure deterministic state transitions. This Skill documents the main loop, action dispatch, and system call order to help reason about per-turn logic.

What is the correct system call order for turn processing in a deterministic game loop?

The correct system call order for turn processing in a deterministic game loop follows a strict sequence of input handling, update, end_turn, and event processing. Modeling these dependencies and sequencing ensures deterministic understanding of state updates and action routing.

How do I add new per-turn features to a turn-based engine without breaking execution order?

Add new per-turn features to a turn-based engine without breaking execution order by following the documented action dispatch mapping for systems like Move, EndTurn, and Wait. The Skill provides extension guidance to route new actions through the correct update and event processing phases.

Can I use this game loop documentation for non-turn-based or real-time event processing?

This game loop documentation is specifically designed for deterministic turn-based engines, focusing on per-turn orchestration and discrete action dispatch. It is not intended for real-time event processing or continuous game loops outside a turn-based context.

Why does my turn-based logic produce non-deterministic results during event processing?

Turn-based logic produces non-deterministic results during event processing when system dependencies and sequencing in the update loop or end_turn order are not strictly modeled. This Skill maps the exact execution order across update and event phases to resolve such state transition conflicts.