How yairm210/unciv works
Unciv is a moddable Civilization V-style 4X game for Android and desktop. Players set up or load a world, manage cities, civilizations, and units, then advance turns toward victory; the game also supports AI automation, ruleset-driven content, and online multiplayer. The graph highlights those product stages and the shared game/runtime layers. Some links are dashed because the relevant implementation was not excerpted; documented capabilities and the source index help identify subsystems but do not prove every runtime call.
Main entry points: GameInfo.kt Game state · UncivGame.kt Game runtime · UncivServer.kt Multiplayer server · Civilization.kt Civilization
Components 22
Client and presentation
- Game runtime
core/src/com/unciv/UncivGame.kt - Android client
android/src/com/unciv/app/AndroidLauncher.kt - Desktop client
desktop/src/com/unciv/app/desktop/DesktopLauncher.kt - Game view
core/src/com/unciv/view
Game session
- Game state
core/src/com/unciv/logic/GameInfo.kt - Turn progression
core/src/com/unciv/logic/civilization/managers/TurnManager.kt - Civilization
core/src/com/unciv/logic/civilization/Civilization.kt - City management
core/src/com/unciv/logic/city/City.kt - AI automation
core/src/com/unciv/logic/automation - Save and load
core/src/com/unciv/logic/files/UncivFiles.kt
World and rules
- Rulesets and mods
core/src/com/unciv/models/ruleset/Ruleset.kt - Rule effects
core/src/com/unciv/models/ruleset/unique/Unique.kt - Units
core/src/com/unciv/logic/map/mapunit/MapUnit.kt - Hex map
core/src/com/unciv/logic/map/tile/Tile.kt - Combat
core/src/com/unciv/logic/battle/Battle.kt - Game statistics
core/src/com/unciv/models/stats/Stats.kt
Online play
- Multiplayer client
core/src/com/unciv/logic/multiplayer/Multiplayer.kt - Network API
core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt - Multiplayer server
server/src/com/unciv/app/server/UncivServer.kt - Server storage
core/src/com/unciv/logic/multiplayer/storage/UncivServerFileStorage.kt
Other components
- Player
- Remote players
Connections 24
- Player → Android client: plays on
- Player → Desktop client: plays on
- Android client → Game runtime: starts
- Desktop client → Game runtime: starts
- Game runtime → Game state: loads state
core/src/com/unciv/UncivGame.kt - Game runtime → Rulesets and mods: loads rules
core/src/com/unciv/UncivGame.kt - Game state → Game view: presents
- Game view → Player: shows game
- Game state → Turn progression: advances turn
core/src/com/unciv/logic/GameInfo.kt - Civilization → AI automation: uses
core/src/com/unciv/logic/civilization/Civilization.kt - Turn progression → Civilization: updates
- City management → Civilization: belongs to
core/src/com/unciv/logic/city/City.kt - Rulesets and mods → Rule effects: defines effects
core/src/com/unciv/models/ruleset/unique/Unique.kt - Units → Civilization: owned by
core/src/com/unciv/logic/map/mapunit/MapUnit.kt - Units → Hex map: occupies
core/src/com/unciv/logic/map/mapunit/MapUnit.kt - Combat → Units: resolves combat
- City management → Game statistics: produces yields
- Game state → Save and load: persists
- Player → Multiplayer client: joins online
- Multiplayer client → Network API: uses API
- Remote players → Multiplayer server: sends turns
- Multiplayer server → Multiplayer client: uses services
server/src/com/unciv/app/server/UncivServer.kt - Multiplayer server → Server storage: stores files
core/src/com/unciv/logic/multiplayer/storage/UncivServerFileStorage.kt - Server storage → Multiplayer server: serves requests
core/src/com/unciv/logic/multiplayer/storage/UncivServerFileStorage.kt