Blazing-fast, on-chain PvP game engine powering real-time grid battles on Solana.
๐ฃ Xplode - On-Chain PvP Grid Engine for Strategy Games
๐ See Xplode in Action: Blazing-Fast On-Chain Gameplay
๐ฅ Full End-to-End Gameplay
๐ Watch the complete end-to-end gameplay on X (Twitter)
See the entire Xplode experience, from start to finish, as featured by MagicBlock!
๐ Overview
Witness Xplode's blazing-fast Mines Battle Royaleโwhere every move is transparent & strategic.
Xplode is a revolutionary take on the classic minesweeper game, combining real-time multiplayer gameplay with blockchain technology. Players can bet using real cryptocurrencies, have their moves recorded on-chain at lightning speed, and compete for prizes in a provably fair gaming environment.
No lag. No gas. Just pure adrenaline ๐ฎ
Powered by MagicBlock's ephemeral rollups, Xplode achieves sub-50ms latency and 1ms block times, making on-chain gaming feel like Web2 while maintaining full blockchain transparency and security. Every move is recorded instantly on Solana without compromising speed or user experience.
โจ Key Features
- โก Lightning-Fast On-Chain: Sub-50ms latency with MagicBlock's ephemeral rollups
- ๐ฏ Real-time Multiplayer: WebSocket-based gaming with instant move synchronization
- ๐ฐ Multi-Currency Support: SOL, USDC betting with zero gas fees
- ๐ Transparent Blockchain: Every move recorded on Solana at Web2 speeds
- ๐ Competitive Gaming: Leaderboards, PnL tracking, and tournament support
- ๐จ NFT Messaging: Mint special NFTs for in-game communication and expressions
- ๐ Provably Fair: Cryptographically secure random number generation
๐๏ธ Architecture
graph TD
%% Client Layer subgraph Client Layer Client[Web Client] end
%% Game Server subgraph Game Server GS_API[REST/WebSocket API] GS_Engine[Game Engine] GS_Cache[Redis Interface] GS_DB[DB Interface] GS_Xplode[Xplode Moves Client] end
%% Wallet Server subgraph Wallet Server WS_API[REST API] WS_DB[DB Interface] WS_Solana[Solana Adapter] WS_EVM[EVM Adapter] end
%% Worker subgraph Worker DepositWorker[Deposit BG Worker] end
%% Infra Layer subgraph Infra Redis[Redis Cache] DB[(PostgreSQL DB)] end
%% External Services subgraph External Services XplodeMoves[Xplode Moves API] SolanaRPC[Solana RPC Node] EVMDeposits[EVM Bridge] end
%% Ephemeral Rollup Layer subgraph Ephemeral Rollup Layer RollupClient[Ephemeral Rollup Client] EphemeralRollup[Ephemeral Rollup Node] end
%% Blockchain subgraph Blockchain Solana[Solana Blockchain] end
%% Client Connections Client --> GS_API Client --> WS_API
%% Game Server Flow GSAPI --> GSEngine GSEngine --> GSCache GSEngine --> GSDB GSEngine --> GSXplode GS_Cache --> Redis GS_DB --> DB GS_Xplode --> XplodeMoves XplodeMoves --> RollupClient RollupClient --> EphemeralRollup EphemeralRollup --> Solana
%% Wallet Server Flow WSAPI --> WSDB WSAPI --> WSSolana WSAPI --> WSEVM WS_DB --> DB WS_Solana --> SolanaRPC WS_EVM --> EVMDeposits
%% Worker Flow DepositWorker --> DB DepositWorker --> SolanaRPC
๐ง Core Services
| Service | Port | Description | |---------|------|-------------| | Game Server | 3000 | WebSocket-based multiplayer game logic with geo-localized matchmaking | | Wallet Server | 8080 | HTTP API for deposits, withdrawals, user management, and transaction handling | | Deposit Worker | - | Background service for processing blockchain deposits | | Discovery Service | - | Redis-based service for intelligent server routing and player matchmaking |
๐ฎ How It Works
- Blazing-Fast Matchmaking: Intelligent server localization redirects players to servers closest to game creators
- Game Creation: Players create or join game rooms with customizable parameters
- Betting: Set bet amounts in supported cryptocurrencies (SOL, USDC)
- Lightning Gameplay: Take turns revealing cells in a minesweeper grid with sub-50ms response times
- Instant Blockchain Recording: Each move is recorded on Solana blockchain via MagicBlock's ephemeral rollups
- Real-time Settlement: Winners receive the pot instantly with zero gas fees
- NFT Messaging: Mint special NFTs for in-game communication and player expressions
- Instant Rematch: Real-time rematch confirmations feel almost instantaneous
๐ LIVE on Devnet! Experience the future of on-chain gaming with Web2-level performance.
๐ฏ Game Mechanics
- Intelligent Matchmaking: Server localization for optimal latency based on game creator location
- Grid Sizes: Customizable from small (8x8) to large grids
- Bomb Density: Adjustable number of mines per game
- Turn-Based: Players alternate moves until someone hits a mine
- Time Limits: Configurable time limits to keep games moving
- Instant Rematch: Real-time rematch confirmations with sub-second response times
- NFT Communication: Express yourself through mintable in-game NFT messages
๐ ๏ธ Technology Stack
Core Gaming Infrastructure
- Language: Rust ๐ฆ
- Web Framework: Actix-web
- WebSocket: tokio-websockets
- Database: PostgreSQL with SQLx
- Cache: Redis
Blockchain Infrastructure
- MagicBlock Ephemeral Rollups: 1ms block times, sub-50ms latency
- Solana Blockchain: Base layer for final settlement
- Anchor Framework: Smart contract development
- Xplode Moves API: Custom game state management
Infrastructure
- Containerization: Docker with multi-region deployment
- Deployment: Fly.io with intelligent server localization
- Monitoring: Built-in health checks and metrics
- Scalability: Horizontal scaling with Redis-based discovery and geo-routing
- Load Balancing: Smart player routing to optimal game servers
Blockchain Integration
- MagicBlock Ephemeral Rollups: Sub-50ms latency for real-time on-chain gaming
- Solana Program: Custom program for game state management via Xplode Moves API
- Lightning Move Recording: Each game move recorded on-chain at Web2 speeds
- Zero Gas Fees: Gasless transactions for seamless user experience
- Secure RNG: Cryptographically secure random number generation
- Multi-Signature: Treasury management with multi-sig support
๐ Quick Start
Prerequisites
- Rust 1.70+
- PostgreSQL 14+
- Redis 6+
- Solana CLI tools
Installation
- Clone the repository
git clone https://github.com/your-username/mines-backend.git
cd mines-backend
- Set up environment variables
cp .env.example .env
Edit .env with your database and blockchain configurations
- Database setup
# Create database and run migrations
psql -f migrations/create_schema.sql
- Build and run
# Build all services
cargo build --release
Run game server
cd server && cargo run
Run wallet server (in another terminal)
cd wallet && cargo run
๐ Game Features
Supported Currencies
- SOL: Native Solana token
- USDC: USD Coin stable currency
Game Modes
- Quick Match: Blazing-fast matchmaking with intelligent server localization
- Private Rooms: Create custom games with friends on optimized servers
- Tournaments: Structured competitive events with real-time progression
- Practice Mode: Free play for learning without gas fees
NFT Communication System
- Express Emotions: Mint GIF-based NFTs for in-game reactions
- Player Interactions: Send NFT messages during gameplay
- Community Building: Collect and trade unique communication NFTs
- Achievement Unlocks: Special NFTs for gameplay milestones
๐ Security Features
- On-Chain Verification: All game moves recorded on blockchain
- Multi-Signature Treasury: Secure fund management
- Rate Limiting: Protection against abuse and spam
- Input Validation: Comprehensive validation of all user inputs
๐ Deployment
The project is designed for cloud deployment with Docker containerization:
# Deploy game server
docker build -f server/Dockerfile.game-server -t xplode-game .
docker run -p 3000:3000 xplode-game
Deploy wallet server (handles all wallet functionality)
docker build -f wallet/Dockerfile.wallet-server -t xplode-wallet .
docker run -p 8080:8080 xplode-wallet
๐ค Contributing
We welcome contributions!
Development Guidelines
- Follow Rust best practices and conventions
- Add tests for new functionality
- Update documentation for API changes
- Ensure all tests pass before submitting
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Links & Community
- Website: playxplode.xyz
- Twitter: @xplode_game
๐ Acknowledgments
Shoutout to MagicBlock for making on-chain gaming real-time
MagicBlock's ephemeral rollups have revolutionized our gaming experience, enabling:
- Sub-50ms latency for real-time blockchain gaming
- Zero gas fees for seamless user experience
- Horizontal scaling for massive multiplayer support
Built with โค๏ธ using Rust, Solana & MagicBlock
Bringing blockchain gaming to the mainstream, one mine at a time ๐ฅ