Capitol Conquest - Strategic Hexxagon Game
Overview
Capitol Conquest is a modern, Hexxagon-style strategy game built with Phaser 3. Two parties compete for control on a hexagonal grid through tactical moves that duplicate or jump pieces and convert adjacent opponent tiles. The game includes adaptive AI with multiple difficulty levels, real-time online multiplayer, built‑in chat, analytics, and responsive UX across devices.
Game Features
🔷 Hex-Based Strategy
Turn-based play on a hexagonal board with duplicate (range 1) and jump (range 2) moves. Adjacent enemy tiles auto-convert after a move.
🎮 Game Modes
Single-player vs AI, local two-player on one device, and real-time online multiplayer with matchmaking.
🤖 AI Difficulties
Normal (even start), Hard (AI advantage), and Expert (strong AI advantage) with distinct evaluation weights.
� In-Game Chat
Party-colored chat in online matches (red for Republicans, blue for Democrats) with clean, scrollable UI.
📊 Global Stats
Online games recorded to global statistics: wins/losses, durations, modes, and difficulty—leaderboard ready.
� Mobile & Desktop
Fully responsive UI, touch-friendly controls, dynamic viewport handling, and enhanced visuals on desktop.
🎵 Audio System
Background music with toggle and distinct SFX for duplicate, jump, and conversion actions.
⚡ Smooth UX
Keyboard navigation in menus, clear visual feedback, and smart defaults for quick start.
AI Implementation
The computer opponent uses a greedy, single-depth heuristic that balances multiple factors. Each candidate move is simulated and scored using a weighted combination of:
- Material advantage (piece differential)
- Limiting opponent mobility (reduce their next moves)
- Central control (prefer positions closer to the board center)
- Risk avoidance (penalize exposed positions)
- Small randomness (jitter) to prevent repetition
Different difficulty levels adjust weights and starting advantages to create distinct play styles and challenge levels.
Online Multiplayer System
Real-time multiplayer features include instant matchmaking, synchronized turns via WebSockets, and reliability features for production use.
- Instant matchmaking with room-based pairing (two players per room)
- Live turn updates and server-side validation of game state
- Reconnection handling and disconnect win assignment
- Waiting room UI with loading animation
- Party-colored chat available throughout the match
Architecture highlights:
- Socket.IO server with Express.js backend
- Room management and turn validation on the server
- PM2 configuration for production uptime
Statistics & Analytics
Global and per-mode stats are captured for online matches:
- Real-time write to Google Sheets via Google Apps Script
- Win/loss tracking, game duration, difficulty, mode, and timestamps
- Recent games view and performance analysis
- Analytics via Google Tag Manager for user engagement and performance
User Interface & UX
- Branded title and themed party colors throughout the UI
- Responsive menus with hover/touch feedback and clear state indicators
- Keyboard support (arrow keys, Enter) and accessible defaults
- Mobile optimizations for dynamic viewports, touch targets, and typography
Technical Architecture
Deployment & Performance
- Client hosted as a static site (GitHub Pages) with CDN assets
- Automated deployments via GitHub Actions
- Efficient rendering and lazy asset loading for performance
- Backend deployed to GCP compute instance
- Mobile performance optimizations and caching strategies
Game Rules
Objective
Control more tiles than your opponent when all playable hexes are filled.
How to Play
- Choose your side (🔴 Republicans or 🔵 Democrats)
- Select a mode (Single Player, Local Two-Player, or Online)
- For single player, pick a difficulty: Normal, Hard, or Expert
- On your turn, either:
- Duplicate to an adjacent hex (distance 1), or
- Jump up to two hexes (distance 2)
- After moving, adjacent enemy tiles flip to your color
- The game ends when no moves remain; majority wins
Controls
- Mouse/Touch: tap/click to select and move
- Keyboard: arrow keys to navigate menus, Enter to select
- ESC: return to menu; F: toggle fullscreen
- Music control available in the UI; chat in online matches
Try the Game
Audio Credits
- Sound effects from Freesound.org (Creative Commons licensed)
- Background music generated with AIVA (Artificial Intelligence Virtual Artist)
About MXM Consulting’s Web Development Expertise
This project demonstrates MXM Consulting’s strength in interactive web development, AI implementation, and real-time systems:
- Interactive web apps and game development with modern frameworks
- AI/algorithm design and performance optimization
- Real-time networking, analytics, and production deployment
- Mobile-first design with accessible, responsive UX
Need Interactive Web Development?
Contact MXM Consulting to discuss how we can develop engaging, interactive web applications for your specific requirements.
Get in Touch