A lightweight, cross-platform MTG Commander game client built with Kotlin and Compose Multiplatform.
Support this project:
π° Crypto Donations
Bitcoin (BTC)
3QVD3H1ryqyxhuf8hNTTuBXSbczNuAKaM8
Ethereum (ETH)
0xaFE28A1Dd57660610Ef46C05EfAA363356e98DC7
Solana (SOL)
6uWx4wuHERBpNxyWjeQKrMLBVte91aBzkHaJb8rhw4rn
Monero (XMR)
8C5aCs7Api3WE67GMw54AhQKnJsCg6CVffCuPxUcaKoiMrnaicyvDch8M2CXTm1DJqhpHKxtLvum9Thw4yHn8zeu7sj8qmC
- Commander-focused: Designed specifically for EDH/Commander format
- Hotseat Multiplayer: 2-6 players on the same device
- Network Multiplayer: Host or join games over local network (2-6 players)
- Multi-format Deck Import: Load decks from Cockatrice (.cod), .dec, .dek, .txt, .mwDeck formats
- Clipboard Paste: Paste deck lists directly from clipboard on desktop and Android
- Commander Selection: Interactive dialog when importing decks without explicit commander
- Cross-platform: Runs on Windows, macOS, Linux, and Android
- Offline Card Cache: 500MB+ Scryfall bulk data for instant deck loading
- Settings Persistence: Player name and network settings saved between sessions
- Keyboard Shortcuts: 120+ shortcuts for fast gameplay
Download the latest release from GitHub Releases.
- Download
Commander.MTG-X.X.X.msi - Run the installer
- Launch "Commander MTG" from the Start Menu
Or download dongadeuce-windows-X.X.X.jar and run with java -jar dongadeuce-windows-X.X.X.jar
- Download
Commander.MTG-X.X.X.dmg - Open the DMG and drag to Applications
- Launch from Applications folder
First launch: Right-click β Open to bypass Gatekeeper
Debian/Ubuntu:
sudo dpkg -i dong-a-deuce_X.X.X_amd64.deb
dong-a-deuceOther distributions:
java -jar dongadeuce-windows-X.X.X.jarAndroid APK builds are available from GitHub Releases. Full touch support with drag-and-drop battlefield, gesture-based card interactions, and feature parity with the desktop version.
- Click "Download Cache" to get card data (~500MB, one-time)
- Load a deck file (examples included in repo)
- Start a hotseat or network game
dongadeuce/
βββ shared/ # Shared game logic and models
β βββ models/ # Card, Deck, GameState, Player, Zone
β βββ network/ # WebSocket server/client, network protocol
β βββ settings/ # User settings persistence
β βββ game/ # Game logic, deck parser
βββ desktop/ # Compose Desktop UI
β βββ ui/ # UI components (game screen, zones, cards)
β βββ viewmodel/ # ViewModels with StateFlow (MVVM architecture)
β βββ utils/ # Image cache, utilities
βββ resources/ # Icons and assets
This project follows the MVVM (Model-View-ViewModel) pattern:
- Models (
shared/models/): Domain objects like Card, Deck, Player, GameState - ViewModels (
desktop/viewmodel/): Manage UI state with Kotlin StateFlowGameViewModel: Manages game state, player actions, card movementsMenuViewModel: Handles menu navigation, deck loading, lobby management
- Views (
desktop/ui/): Composable UI components that observe ViewModel state
Benefits:
- Clean separation of concerns
- Testable business logic
- Reactive state management with StateFlow
- Easy to integrate P2P networking (ViewModels handle network events)
- JDK 11 or higher
- Gradle (wrapper included)
cd dongadeuce
./gradlew desktop:run# macOS .dmg
./gradlew desktop:packageDmg
# Windows .msi
./gradlew desktop:packageMsi
# Linux .deb
./gradlew desktop:packageDebDesktop: 99% Complete - Fully Playable! β Android: 99% Complete - Fully Playable! β Network Mode: 100% Complete - Fully Playable! β
Core Gameplay:
- Turn/Phase System - Full MTG phase cycle with visual indicator
- Commander Damage Tracking - Complete UI with 21-damage lethal detection
- Card Context Menus - Right-click menus for all zones with comprehensive actions
- Library Search - Full search/filter dialog with card manipulation
- Zone Viewers - Interactive dialogs for graveyard, exile, command zone
- Drag-and-Drop Battlefield - Grid-based card positioning system
- Card Images - Async loading with 500MB+ offline cache
- Tap/Untap - Double-click and context menu support
- Counters - Add/remove +1/+1, charge, and custom counters
- Card Attachments - Aura/Equipment attachment system
- Flip Cards - Full flip card support
- Face Down Cards - Morph/manifest support
- Life Tracking - Automatic loss detection
- Draw from Empty Library - Automatic loss detection
- All Zone Operations - Move cards between any zones
- Library Operations - Draw, mill, shuffle, search, tutor, mulligan, peek top/bottom N
- P/T Modifications - Increase/decrease/set/reset/flow power and toughness
- Card Annotations - Custom text notes on cards
- Token Creation - Create tokens via Scryfall search or custom
- Card Copy/Clone - Clone cards with visual indicator
- Player Counters - Poison, energy, experience, and custom counters
- Die Rolling - D4, D6, D8, D10, D12, D20, D100, custom dice, coin flip
- Game Log - Real-time event logging with 21 event types
- Chat Messages - In-game chat between players
- Give Control - Transfer control of permanents between players
Hotseat Multiplayer:
- 2-6 Player Support - Full local multiplayer
- Per-Player Deck Loading - Each player loads their own deck
- Automatic Player Rotation - UI rotates to show active player
- Hand Privacy - Only active player sees their cards
- Turn Passing - Automatic player advancement
Network Multiplayer:
- Host/Join Games - WebSocket-based networking over local network
- Lobby System - Player ready status, host can kick players
- Real-time Sync - Full game state synchronization
- 35+ Network Actions - All game actions supported over network
- Disconnect Handling - Game pauses on player disconnect
- Action Validation - Server-side cheating prevention
- Unique Player Names - Auto-rename duplicate names
Settings & Persistence:
- Settings Dialog - Gear icon in main menu for configuration
- Player Name - Persisted between sessions
- Server Address - Last used address saved
- Server Port - Custom port configuration
- Default Deck Directory - File picker remembers last location
- Cross-platform Storage - Windows: %APPDATA%, Linux/macOS: ~/.commandermtg
Technical:
- MVVM architecture with StateFlow (100% compliant)
- Ktor WebSocket server and client
- Scryfall API integration
- Bulk card cache with progress UI
- Multi-format deck parser (Cockatrice, .dec, .dek, .txt, .mwDeck)
- Sideboard support with deck loading
- 223+ passing unit tests
- Comprehensive input validation
- Cross-platform packaging (Windows, macOS, Linux, Android)
Keyboard Shortcuts (120+ implemented):
- Game Phases: F5-F10 for phases, Ctrl+Space/Tab for next phase, Ctrl+Enter for pass turn
- Card Actions: T to tap, Ctrl+U untap all, Del to graveyard, Ctrl+X to exile
- Power/Toughness: Ctrl/Alt +/- for P/T, Ctrl+Alt+=/- for both
- Counters: Ctrl+./, Alt+./, for colored counters A-F
- Library: Ctrl+D draw, Ctrl+M mulligan, Ctrl+S shuffle
- View Zones: F3 library, F4 graveyard, Ctrl+W peek top
- Selection: Ctrl+A select all, Ctrl+Shift+X select row
- Arrows: Alt+A draw arrow, Ctrl+R remove arrows
- Mana Counters: W/U/B/R/G/X for mana pool tracking
- Stack Until Found: Ctrl+Shift+Y to reveal cards until match
Missing Features:
- Game Save/Load - Games meant to be played in one session
- Desktop: ~99% complete (fully playable)
- Android: ~95% complete (fully playable)
- Network Mode: ~96% complete (fully playable)
- Kotlin: Primary language
- Compose Multiplatform: Cross-platform UI framework
- Ktor: Networking (server + client)
- kotlinx.serialization: JSON serialization for network protocol
- Scryfall API: Card data and images (planned)
The UI includes all Commander zones:
- Command Zone: Your commander
- Library: Draw deck
- Hand: Cards in hand
- Battlefield: Permanents in play
- Graveyard: Discarded/destroyed cards
- Exile: Exiled cards
- Stack: Spells/abilities being resolved (not visible yet)
See TODO.md for development roadmap and feature status.
- Animations - Card movement and tap animations
- Sound Effects - Audio feedback for actions
- Themes - Light mode, custom card backs
- Deck Builder - In-app deck creation and editing
- Spectator Mode - Watch games in progress
Result: Feature-complete Commander experience