WRLDGN
Start with one province and grow it into a nation in this offline 4X strategy game for Android. Explore unknown lands, choose a world from the bundled map gallery or let the game pick one, colonize new territory, and decide whether your rivals become trading partners or targets for conquest. Every campaign is different, and you can play it all offline.
Build your nation. Shape the world.
- 🌍 Reveal terra incognita, settle new provinces, and develop their potential.
- 🤝 Trade with rival nations, establish relations, and buy maps—or prepare for war.
- ⚔️ Recruit armies, build barracks, research military technology, and negotiate the peace after battle.
- 💰 Invest in factories, markets, and universities to strengthen your economy, research, and expansion.
Campaigns work for quick sessions or longer runs. It’s just you, the map, and your growing empire.
Android implementation
WRLDGN is written in Kotlin for Android 6.0 and later and runs in landscape orientation. The interface uses Android Views, Fragments, XML layouts, ViewBinding, and Material 3. ViewModels expose setup and menu state through StateFlow and SharedFlow, while Koin supplies application services. Coroutines handle local file and map work, and Gson handles save serialization.
Simulation architecture
The project is split into three Gradle modules. The Android app contains the interface, map renderer, assets, storage, and platform adapters. An Android-free core module owns the world model, economic formulas, AI, warfare, and game actions. A separate JVM tool trains Q-learning tables for an experimental AI path. During each game tick, a central lifecycle processes income, trade, construction, integration, province development, research, unit movement, battles, and rival turns in a fixed order. The same mutex protects state changes and save serialization.
AI and game rules
Normal campaigns use trait-driven rivals that explore, colonize, build, research, repair weak economies, recruit armies, defend capitals, and plan wars. Player actions and AI decisions go through the same core handlers, so both sides follow the same rules. The Q-learning module is development tooling. It produces a table that the experimental runtime can read and is not exposed as a selectable game mode.
Map rendering and local saves
A custom MapView draws visible tiles directly to an Android Canvas. Separate drawing strategies handle countries, terrain, goods, buildings, borders, integration, and selection highlights. Horizontal wrapping uses modular coordinates, while country labels are prepared in the background and cached as bitmap-style text. Maps are compact bundled text assets containing province data, neighbours, and tile coordinates. Campaigns are saved every second epoch as compact Gson JSON files in app-private storage, with converters that keep older save formats readable. The game declares no Internet permission and has no account, server-sync, or cloud-save layer.