- About
- Features
- Screenshots
- Quick Start
- Installation
- Usage
- Platforms
- Development
- Roadmap
- Contributing
- Contact
- License
Rusty2048 is a modern, high-performance implementation of the classic 2048 puzzle game. Built entirely in Rust, it delivers exceptional performance across multiple platforms while maintaining a clean, maintainable codebase.
- โก Blazing Fast: Leverages Rust's zero-cost abstractions for optimal performance
- ๐จ Beautiful UI: Smooth animations and modern design across all platforms
- ๐ Cross-Platform: Play on CLI, Web, or Desktop with a consistent experience
- ๐ค AI-Powered: Watch intelligent algorithms play or learn from them
- ๐ Analytics: Track your progress with comprehensive statistics
- ๐ง Highly Customizable: Multiple themes, languages, and configuration options
- โ Classic 2048 gameplay with smooth tile animations
- โ Undo functionality for strategic gameplay
- โ Score tracking with best score persistence
- โ Configurable board size and target score
- โ Game state persistence and auto-save
- ๐ค AI Mode: Three intelligent algorithms (Greedy, Expectimax, MCTS) with auto-play
- ๐จ Theme System: 5 beautiful themes (Classic, Dark, Neon, Retro, Pastel)
- ๐ Internationalization: Full support for English and Chinese
- ๐ Statistics: Comprehensive game analytics with visual charts (CLI)
- ๐ Replay System: Record and replay game sessions (CLI)
- ๐ฑ PWA Support: Install as a native app with offline capability (Web)
- CLI: Full-featured terminal UI with charts, replays, and AI mode
- Web: Progressive Web App with responsive design and touch support
- Desktop: Native desktop application built with Tauri
๐ For detailed feature documentation, see FEATURES.md
One-line installation:
curl -fsSL https://raw.githubusercontent.com/davismiler/rusty2048/main/scripts/install.sh | bashOr download pre-built binaries:
- Visit GitHub Releases
- Download for your platform (Linux, macOS, Windows)
- Extract and run the binary
curl -fsSL https://raw.githubusercontent.com/davismiler/rusty2048/main/scripts/install.sh | bashDownload from GitHub Releases for your platform.
git clone https://github.com/davismiler/rusty2048.git
cd rusty2048
cargo build --release -p rusty2048-cliPlay Online: rusty2048.vercel.app
Build Locally:
git clone https://github.com/davismiler/rusty2048.git
cd rusty2048/web
./build.sh
# Serve the dist folder with any static file serverBuild from Source:
git clone https://github.com/davismiler/rusty2048.git
cd rusty2048/desktop
cargo tauri build๐ For detailed build instructions, see BUILD_GUIDE.md
| Action | CLI | Web/Desktop |
|---|---|---|
| Move Tiles | Arrow Keys / WASD | Arrow Keys / WASD / Swipe |
| New Game | R |
Click "New Game" |
| Undo | U |
Click "Undo" |
| Change Theme | T or 1-5 |
Click Theme Buttons |
| Switch Language | L |
Click Language Button |
| Quit | Q or ESC |
Close Window |
- AI Mode: Press
Ito toggle AI,Ofor auto-play - Replay System: Press
Pto enter replay mode - Statistics: Press
Cto view game analytics - Help: Press
Hfor theme help
๐ For complete controls documentation, see FEATURES.md
- Best for: Developers, terminal enthusiasts, advanced features
- Features: Full AI mode, replay system, statistics charts
- Requirements: Terminal emulator
- Best for: Casual players, mobile users, quick access
- Features: PWA support, offline play, responsive design
- Requirements: Modern web browser
- Best for: Native desktop experience
- Features: Native performance, system integration
- Requirements: Tauri runtime
- Rust: 1.70 or higher
- Cargo: Rust's package manager (included with Rust)
- Node.js: 20+ (for web version)
- System Dependencies: See BUILD_GUIDE.md
rusty2048/
โโโ core/ # Core game logic library
โโโ cli/ # Command-line interface (TUI)
โโโ web/ # Web version (WASM)
โโโ desktop/ # Desktop version (Tauri)
โโโ shared/ # Shared components (i18n, themes)
Build all versions:
./build.shBuild specific version:
./build.sh cli # CLI only
./build.sh web # Web only
./build.sh desktop # Desktop only./run.sh cli # Run CLI version
./run.sh web # Run Web version (localhost:8000)
./run.sh desktop # Run Desktop version# Run all tests
cargo test
# Run benchmarks
cargo bench
# Run property-based tests
cargo test --features proptest# Format code
cargo fmt
# Lint code
cargo clippy --all-targets --all-features -- -D warnings- Core game logic and mechanics
- CLI version with full feature set
- Web version (WASM) with PWA support
- Desktop version (Tauri)
- AI mode with three algorithms (CLI & Web)
- Replay system (CLI)
- Statistics and charts (CLI)
- Multi-language support (English, Chinese)
- Theme system (5 themes)
- Auto-save functionality (Web)
- Offline capability (Web)
- AI mode for Desktop version
- Replay system for Web/Desktop versions
- Statistics charts for Web/Desktop versions
- Additional language support
- Custom theme creation
- Online leaderboards
- Multiplayer mode
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
For more details, please read our Contributing Guidelines (if available).
Project Maintainer: davismiler
- GitHub: @davismiler
- Telegram: @davismiler
- X (Twitter): @davismilerdev
This project is licensed under the MIT License - see the LICENSE file for details.
Made with โค๏ธ and Rust
โญ Star this repo if you find it helpful!


