Game Overview
An innovative evolution of chess where you command and expand a white army to survive endless waves of enemies on an infinite board. Start with a compact 3×3 formation and grow via captures and smart resource management.
Core Features
Camera & Viewport
- Zoomable viewport (default 25×25), cursor-centered zoom.
- Responsive tile sizing for any resolution.
- Camera controls: Center on King, touch-drag pan on mobile.
Enhanced Starting Formation
Pawn Bishop Pawn
Queen King Rook
Pawn Knight Pawn
Visual Enhancements
- Colored borders: Cyan (you) and Red (enemies)
- Selection highlighting and valid-move indicators
- Moved-this-turn highlighting
Dynamic Army Management
- Army size scales with number of Kings owned
- Per-King limits: 8 Pawns, 2 Knights, 2 Bishops, 2 Rooks, 1 Queen
- Live piece counts and strategic expansion via new Kings
Advanced Shop System
- Earn points by defeating enemies
- Dynamic pricing: Pawn 2, Knight 6, Bishop 6, Rook 10, Queen 18, King 24
- Inventory display, limit enforcement, click-to-place purchased pieces
Enemy AI, Waves, and Systems
- Progressive waves every 3 rounds, scaling difficulty
- AI prioritizes targets and tactical positioning; vision-aware behavior
- Balanced spawning and smart positioning
- Fog of War (optional): King 4, Knight 5, Q/R/B 3, Pawn 2 sight
- Undo within the current turn
- Turn-based: move all pieces before enemy response
- Point streaks for consecutive captures
Game Mechanics Deep Dive
Turn Structure
- Player Phase: select and move each piece once
- Validation: chess rules enforced; invalid moves blocked
- Enemy Phase: AI executes optimal moves
- Wave Spawning: new enemies every 3 rounds
Enemy Wave Progression
- Wave 1 (R1–3): Pawns
- Wave 2 (R4–6): Pawns + Knights
- Wave 3 (R7–9): Pawns + Knights + Bishops
- Wave 4 (R10–12): add Rooks
- Wave 5+ (R13+): all types including Queens
Victory & Scoring
- Survival focus; no fixed win condition
- Game Over when your last King is captured
- Score: rounds survived, enemies defeated, streaks
Controls & Interface
Desktop
- Mouse Click: select/move
- Right Click: deselect
- Space: end turn
- Mouse Wheel: zoom toward cursor
Mobile/Touch
- Tap: select/move
- Long-press: deselect
- Drag: pan
- Pinch: zoom
- Double-tap: center view
- End Turn button
Sidebar
- Stats: rounds, enemies defeated, threats
- Army status: counts vs. limits
- Points & streaks; purchases
- Actions: end turn, undo, shop, camera
- Game log: color-coded events
Shop
- Point display and catalog with costs
- Limit indicators and disabled states
Strategic Gameplay
Early Game
- Maintain formation and mutual support
- Protect your King
- Earn points via safe captures
- Choose when to expand vs. save for Kings
Mid Game
- Scale with additional Kings
- Balance composition by threat
- Control territory with long-range pieces
- Leverage fog-of-war positioning
Advanced
- Multi-King redundancy
- Economy: immediate needs vs. long-term
- Adapt to wave types
- Master positioning and formations
Technical Architecture
Core Tech
- HTML5 Canvas
- Vanilla JavaScript
- Modular design
- Performance optimizations
Key Systems
- Game state management
- Event handling
- AI engine
- Rendering pipeline
- Memory management
File Structure
index.html: UI & stylesgame.js: game logicREADME.md: documentation
Getting Started
- Open
index.htmlin a modern browser - Click a piece to see green valid moves
- Click a highlighted square to move
- Move all pieces, then End Turn (or Space)
- Observe enemy moves and plan ahead
- Defeat enemies to earn points, spend in shop
- Survive as long as possible!
Pro tips: study piece limits, use Undo to experiment, watch wave patterns, balance offense/defense, and manage points for strategic King purchases.
Achievements & Scoring
- Metrics: rounds, enemies defeated, streaks, pieces purchased, army size
- Milestones: Round 10 (first escalation), Round 20 (multi-type waves), Round 30+ (max difficulty)
Future Roadmap
- Save/Load, Achievements, Piece promotion
- Environmental hazards, Multiplayer, Custom scenarios
- Statistics dashboard
- WebGL effects, Audio, Mobile optimizations, Accessibility
Development Notes
- Single-file logic in
game.js - Event-driven design
- Scalable AI modules
- Responsive UI for all sizes
- Performance: vision caching, viewport culling, memory and input optimizations
Command your forces, expand your empire, and survive the endless siege! ⚔️👑