A Unity-based game engine for grand strategy games, built around a dual-layer architecture that separates deterministic simulation from GPU-accelerated presentation.
APIs should be stable by 2026 Q1. Until a release pops up, production use is discouraged.
Quick Links:
- Getting Started - Setup and first steps
- Your First Game - Build a working game
- Cookbook - Quick API recipes
- Architecture Overview - System design
- Feature List - Complete feature list
Note: Game data (maps, scenarios) is not included - you'll need to provide your own or use the StarterKit's template data.
2D map loaded using Europa Universalis 4 data.
Grand strategy is notorious for being extremely complex. Even for experienced studios it's a daunting task to set everything up. It essentially has given monopoly to Paradox, with only exceptionally few coming close to their quality and scale. And for good reason.
Some extreme hurdles for Paradox-like grand strategy:
- Vector like graphics to scale infinitely
- Create beautiful maps from simple bitmaps/pngs
- Fixed-Point arithmetic & deterministic simulation
- Data oriented design (not OOP)
- AI, Diplomacy, Military, Economy as core pillars
- Modifiers, resources, relations, unit movements, sparse storage
- Modding capability
I could go on.
Archon-Engine is designed to be generic infrastructure, providing everything you need from day 1. You can focus on creating content rather than researching the 1% topics barely anyone knows about.
This not a dunk on Paradox. I love their games. I just wish they didn't lag so goddamn much.
This does NOT mean it will be easy developing. I've tried my best to make it approachable with Wiki, StarterKit, API page, various docs etc. However Grand Strategy is inherently complex and it will still take a LONG time to get going.
cd YourUnityProject/Assets
git submodule add https://github.com/YourUsername/Archon-Engine.git Archon-Engine- Download/clone the repository
- Copy the
Archon-Enginefolder into your Unity project'sAssets/folder
- Open your Unity project - let it import and compile
- Install required packages via Window → Package Manager → + → Add by name:
com.unity.nuget.newtonsoft-json(JSON parsing)com.unity.transport(Multiplayer networking)
- Open the StarterKit scene:
Assets/Archon-Engine/Scenes/StarterKit.unity - Press Play to verify everything works
- Unity 6000+ (2023.3+, latest LTS recommended)
- Universal Render Pipeline (URP)
- Burst Compiler enabled
- UI Toolkit
Dual-Layer Design
┌──────────────────────────────────┐
│ Map Layer (Presentation) │
│ - Texture-based rendering │
│ - GPU compute shaders │
│ - Single draw call │
└───────────┬──────────────────────┘
│ Events (one-way)
↓
┌──────────────────────────────────┐
│ Core Layer (Simulation) │
│ - 8-byte province structs │
│ - Fixed-point deterministic │
│ - Command pattern │
└──────────────────────────────────┘
Key Design Decisions
- Fixed-size data: 8-byte
ProvinceStatestructs prevent late-game performance degradation - Deterministic math: Fixed-point calculations (no floats) for multiplayer-ready simulation
- Texture-based map: Provinces rendered as pixels, not GameObjects (single draw call)
- GPU compute shaders: All visual processing (borders, effects) on GPU
- Command pattern: All state changes go through commands for determinism and networking
- Zero allocations: Hot paths use pre-allocated memory and value types
Rendering Performance:
- Single draw call for entire map
- 3D MAP TO BE DETERMINED
Multiplayer:
- Lockstep command synchronization (working)
- Player-hosted sessions with lobby system
- Time sync across all clients
- Automatic desync detection and recovery
- Deterministic fixed-point math (no floats in simulation)
Stress test (2026-02-04):
15000x6500 map, 97.5M pixels, 50k provinces, 665 countries. Ran in editor with i9-14900K & RTX 4070 S
Mapload
- Full load in ~10 seconds
- Aggressive raw caching: skip decompression on repeat loads (<100ms cache hits)
- GPU-direct: compute shader samples textures already on GPU, zero CPU conversion
Stability
- 100 game-years at 100x speed: avg 570-621 FPS, no late-game degradation
- Monthly tick: avg 1.8-2.8ms
- Memory stable: ~1430MB managed, ~3530MB total - flat over 100 years
Using StarterKit systems (economy, AI, buildings, diplomacy) on a large dataset — not a full game complexity scale. Real games with more systems and mechanics will have higher overhead.
Assets/Archon-Engine/
├── Scripts/
│ ├── Core/ # Deterministic simulation layer
│ ├── Map/ # GPU-accelerated presentation
│ ├── Network/ # Multiplayer networking
│ └── StarterKit/ # Scripts to start from/look at
├── Shaders/ # Compute shaders for rendering
└── Docs/
├── Engine/ # Architecture documentation
├── Planning/ # Future features
└── Log/ # Development journal
A complete 7,000+ line game template demonstrating all ENGINE patterns. Use it as a learning reference or starting point for new games.
Scene: Assets/Archon-Engine/Scenes/StarterKit.unity
What's Included:
- EconomySystem - Gold economy with province income and building bonuses
- UnitSystem - Military units with movement and visualization
- BuildingSystem - Province buildings with construction and effects
- AISystem - Goal-oriented AI (economy, expansion)
- DiplomacySystem - War, peace, relations, and opinion modifiers
- Multiplayer - Lobby, country selection, lockstep sync, time sync
- Command Pattern - All state changes through validated commands
- Map Modes - Political, economic, diplomatic visualization
- UI Components - Country selection, resource bar, province info, unit management, tooltips
Data Files:
- Unit types:
Template-Data/units/*.json5 - Building types:
Template-Data/buildings/*.json5
See Scripts/StarterKit/README.md for implementation details.
Template data shown - provide your own game data for production use.
Core Engine (Complete):
- Dual-layer architecture with hot/cold data separation
- Province, Country, Diplomacy, Unit, and Pathfinding systems
- Resource & modifiers system
- Save/load system with command pattern
- Zero-allocation EventBus and performance optimizations
- AI system with goal-oriented behavior
Multiplayer (Complete):
- Lockstep command synchronization
- Player-hosted sessions with lobby UI
- Country selection and ready/start flow
- Time synchronization across clients
- Desync detection and automatic recovery infrastructure
Map Layer (In Progress):
- Vector like borders, razor thin
- 3D terrain tessellation and smart texturing for realistic terrain
Simple province terrain, auto terrain assignment from texture
Planned Features:
- Steam transport (currently using DirectTransport for LAN/IP)
- Host migration
- Modding API (scripting support)
Getting Started:
- Getting Started - Installation and setup
- Your First Game - Step-by-step tutorial
- Cookbook - Quick API recipes
Feature Guides: Docs/Wiki/
- Commands, Events, Economy, Buildings, Units, Map Modes
- AI, Diplomacy, Time System, Save/Load, Modifiers
- Queries, Pathfinding, Map Rendering, UI Patterns
Troubleshooting: Docs/Wiki/
- Performance issues, GPU/rendering, common mistakes
Architecture:
- Architecture Overview - Quick overview
- Master Architecture - Complete reference
- Core FILE_REGISTRY - Core layer catalog
- Map FILE_REGISTRY - Map layer catalog
MIT License - See LICENSE file for details.


