Introduction

Deterministic Command Engine

Welcome to the Deterministic Command Engine (DCE) documentation! DCE is a powerful Unity asset for building turn-based and tick-based games with built-in replay support, command scheduling, and deterministic execution.

Key Features

  • Command Pattern Architecture - Clean, maintainable game logic with full undo/redo support
  • Deterministic Execution - Seeded randomness ensures perfect replay consistency
  • Built-in Replay System - Record and playback entire game sessions automatically
  • Flexible Scheduling - Execute commands immediately or schedule for future ticks
  • Event Broadcasting - Decoupled communication between game systems
  • Production Ready - Battle-tested patterns and comprehensive samples

Quick Start Guides

Choose the system that fits your needs:

CommandEngine

A complete framework for deterministic turn/tick-based games with full replay support.

Best for: Turn-based strategy, card games, simulations

Get Started with CommandEngine →

CommandHandler

A lightweight command execution system with undo/redo support.

Best for: Simple undo/redo, puzzle games, single-player experiences

Get Started with CommandHandler →

What Can You Build?

  • Turn-Based Strategy Games - Chess, tactics games, RPG battles
  • Card & Board Games - Collectible card games, digital board games
  • Puzzle Games - Sokoban, match-3, grid-based puzzles with undo
  • Simulations - Physics simulations, economic models, procedural systems

Why Deterministic Command Engine?

Building games with replay support or complex state management is challenging. DCE provides:

Guaranteed Determinism - Same inputs always produce same outputs
Zero Boilerplate - Minimal setup, maximum functionality
Framework Agnostic - Works with any Unity project structure
Comprehensive Samples - Learn from complete game implementations
Active Support - Regular updates and community assistance

Getting Started

  1. Install DCE - Import from the Unity Asset Store
  2. Choose Your System - CommandEngine (full features) or CommandHandler (lightweight)
  3. Follow the Quick Start - Build your first command-based game
  4. Explore Samples - Study the included Card Game and Puzzle Game examples

Need Help?

Ready to build deterministic, replay-ready games? Let's get started! 🚀