Rummage - MTG Commander Game Engine Documentation
Welcome to the official documentation for Rummage, a robust end-to-end tested Magic: The Gathering Commander format game engine built with Bevy 0.15.x.
About Rummage
Rummage is a modern, open-source implementation of the Magic: The Gathering Commander format, focusing on correctness, performance, and extensibility. Built on Bevy's Entity Component System (ECS) architecture, Rummage provides a solid foundation for complex card interactions while maintaining deterministic gameplay essential for networked multiplayer.
Our goal is to create a comprehensive digital implementation that faithfully reproduces the Commander experience while leveraging modern game engine technologies.
Documentation Structure
The documentation is organized into interconnected sections that guide you from understanding MTG rules to technical implementation details:
- MTG Rules Reference - High-level explanations of Magic: The Gathering rules, serving as a bridge between official rules and our implementation
- MTG Core Rules - Implementation of fundamental Magic: The Gathering rules that form the foundation of all gameplay
- Game Formats - Format-specific rules implementation, currently focusing on the Commander format
- Game UI - User interface systems for visualizing and interacting with the game state
- Networking - Multiplayer functionality using bevy_replicon for synchronized gameplay
- Card Systems - Card representation, effects, and interactions that drive gameplay
- Testing - Comprehensive testing framework to ensure rule correctness and system reliability
- Development - Guidelines and tools for contributors to the Rummage project
- API Reference - Technical documentation of Rummage's code structure and interfaces
These sections follow a logical progression:
- The MTG Rules Reference explains what the rules are
- The MTG Core Rules and Game Formats explain how we implement these rules
- The remaining sections cover the technical systems that support this implementation
Getting Started
If you're new to the project, we recommend exploring the documentation in this order:
- MTG Core Rules Overview - Understand how Rummage implements the fundamental MTG rules
- Commander Format Overview - Learn about the Commander-specific rules and mechanics
- Development Guide - Set up your development environment
- Bevy ECS Guide - Learn how we use Bevy's Entity Component System
- Testing Overview - Understand our testing approach and methodology
Technical Architecture
Rummage integrates several key technologies:
- Bevy 0.15.x - Entity Component System (ECS) game engine that provides the architectural foundation
- Bevy Replicon - Networking and state synchronization for multiplayer gameplay
- Rust - Memory-safe, high-performance language for reliable game logic
Our architecture follows these principles:
- Entity Component System - Game elements are composed of entities with components, providing a flexible and performant structure for representing cards, players, and game state
- Event-driven Architecture - Systems communicate through events, enabling loose coupling and flexible interactions
- Data-oriented Design - Optimized for cache coherence and performance, critical for handling complex board states
- Deterministic Game Logic - Ensures consistency across network play by maintaining predictable state transitions
- Snapshot System - Enables game state serialization for networking, replays, and save/load functionality
Implementation Status
This documentation represents both implemented features and design specifications for planned features. Components are marked as follows:
- ✅ Implemented and tested
- 🔄 In progress
- ⚠️ Planned but not yet implemented
Development Standards
The Rummage codebase adheres to the following standards:
- Bevy 0.15.x Compatibility: Using non-deprecated Bevy APIs (e.g., Text2d instead of Text2dBundle)
- End-to-End Testing: Comprehensive test coverage for all features
- Documentation-First Development: New features are documented before implementation
- Performance Focus: Optimization for smooth gameplay even with complex board states
Contributing
If you're interested in contributing to the Rummage project, please review:
Reference Materials
The implementation is based on official MTG rules:
A local copy of the comprehensive rules is available in this repository: MagicCompRules 20250207.txt.
This documentation will evolve as the project progresses. Last updated: March 2025.