yairm210/Unciv
50.7
Weak · 25 September 2026
119.9k
lines of production code
Kotlin
primary language
3
measurements over time
What this system is
This system is Unciv, an open-source, turn-based 4X strategy game engine that simulates civilization development, including city management, diplomacy, warfare, and technology research. It features a modular, ruleset-driven architecture that supports extensive modding, custom UI skins, and multiple map generation algorithms. The engine provides cross-platform execution via Android and desktop clients, along with a dedicated server for real-time multiplayer sessions with chat capabilities.
How it got here
2017–2020 — Core architecture and moddability overhaul
33 changes.
This period focused on restructuring the Unciv codebase to support a robust, moddable ruleset architecture, splitting monolithic game logic into specialized manager classes for cities, diplomacy, and map generation. Significant efforts were made to modernize platform integrations, including rewriting the Android app in Kotlin and enhancing desktop stability, while simultaneously expanding test coverage and refining core systems like pathfinding and notifications.
2021–2023 — Architecture refactoring and UI modernization
75 changes.
This period focused on a comprehensive architectural overhaul, extracting monolithic game logic into specialized manager classes for cities, civilizations, and units to improve modularity and performance. The codebase simultaneously underwent a major UI modernization, introducing a layered map rendering system, modular screen components, and a new event bus for asynchronous communication. These structural changes were supported by extensive test coverage and infrastructure improvements, including a new multiplayer API v2 and enhanced ruleset validation.
2024–2026 — Architecture modernization and multiplayer chat
18 changes.
This period focused on modernizing the codebase through a comprehensive View-based architecture, introducing a new View API to decouple game logic from UI rendering, and refactoring core systems like pathfinding, resource placement, and unit presentation. Concurrently, a real-time multiplayer chat system was implemented using WebSockets, while a custom expression parser was added to enhance rule flexibility. The work was supported by extensive test coverage to ensure stability across these structural changes.
Features
Added Afrikaans language support
The game now includes a new Afrikaans translation file, allowing users to switch their interface language to Afrikaans. This adds the necessary localized strings for the UI, menus, and game content for speakers of this language.
android/assets/jsons/translations · high confidence
Added Linux desktop integration files for the Unciv JAR distribution
This change introduces a shell script (Unciv.sh) and a desktop entry file (unciv.desktop) to the Linux JAR distribution. The shell script provides a user-friendly launcher that manages a local configuration directory (\~/.local/share/Unciv) and supports a --config-dir argument to override the default storage location. The desktop file registers the application in the Linux desktop environment, defining its name, icon, categories (Game;StrategyGame), and multilingual comments in Catalan and French, enabling proper integration with the system's application menu.
desktop/linuxFilesForJar · high confidence
Added SVG export helper directory
A new empty directory named SVGExport has been added to the android/ImagesToNotAddToGame location. This directory serves as a target location for PNG files generated after editing SVG assets, ensuring that export filepaths saved within SVG files have a valid destination.
android/ImagesToNotAddToGame · high confidence
Added game screenshot generation script
A new executable script named ScreenshotGenerationGame has been added to the extraImages/Screenshots directory. This tool allows users to generate screenshots of the current state of the game, which can then be used to update promotional images for platforms like Google Play and itch.io.
extraImages/Screenshots · high confidence
Barbarian encampments now spawn and manage units automatically
Barbarian encampments are now first-class game objects that spawn units on a timer and persist as 'ghosts' for 15 turns after being destroyed to prevent immediate re-spawning. The new BarbarianAutomation system handles barbarian unit behavior, prioritizing ranged units, managing upgrades, and directing captured civilians back to encampments. Encampments also notify civilizations with the Honor policy when new camps appear in their explored territory.
core/src/com/unciv/logic/automation/civilization · high confidence
Combat recording infrastructure added
The battle logic in core/src/com/unciv/logic/battle now includes a new combat recording infrastructure. This introduces dedicated classes (AttackEvent, AttackParticipant, AttackRecorder) to capture and store detailed history of unit attacks, including identity, visibility, and outcomes, alongside a new AirInterception object to handle air sweep and interception mechanics.
core/src/com/unciv/logic/battle · high confidence
Dev console gains structured command system and extensive new commands
The dev console has been refactored to use a structured command system with a new \CliInput\ class that standardizes how parameters (like names and filters) are parsed, compared, and displayed, supporting both dashed and quoted formats. This change introduces a wide range of new console commands for scenario building and debugging: \civ\ commands to add/remove civilizations, manage policies and technologies, reveal the map, and activate triggers; \city\ commands to add/remove cities and buildings, set population, rename, manage tiles, and set puppet status; \unit\ commands to add/remove units and promotions, and set movement, health, and XP; \tile\ commands to set terrain, resources, improvements, features, rivers, ownership, and spawn barbarian encampments; \diplomacy\ commands to declare war, make peace, set flags and modifiers, and manage influence; and \game\ commands to set difficulty, turn, and manage spectator mode.
core/src/com/unciv/ui/screens/devconsole · high confidence
Holiday-themed Easter eggs with floating art and special rulesets
The main menu now features moddable floating imagery and special rulesets tied to holidays. When Easter eggs are enabled, floating images appear on the main menu during specific holidays, and the background map generation uses holiday-specific rulesets (e.g., Easter Eggs, Samhain, X-Mas) with unique terrains and features.
core/src/com/unciv/ui/screens/mainmenuscreen · high confidence
Initial Android app configuration and manifest setup
This change introduces the foundational Android configuration files for the Unciv app, including the AndroidManifest, ProGuard rules, and project properties. The manifest defines the app as a game (isGame=true, appCategory=game) with support for Android TV via a leanback launcher, enables deep links for multiplayer games and general game sharing, and permits cleartext HTTP traffic to allow users to host their own servers without HTTPS. It also requests Internet and notification permissions, and configures the main activity to handle orientation changes and specific intent filters for viewing and sharing game links.
android · high confidence
Initial project scaffolding and repository configuration
This change establishes the foundational structure for the Unciv repository. It introduces essential configuration files including a Dockerfile and docker-compose.yml to enable containerized builds and execution, alongside a .dockerignore to optimize the build context. Standard development practices are enforced through the addition of .editorconfig for consistent code styling across IDEs, .gitattributes for normalized line endings, and a comprehensive .gitignore. The project also adds a LICENSE file (Mozilla Public License 2.0), a CODE\_OF\_CONDUCT.md, and a detailed changelog.md. Documentation is significantly expanded with a new README.md containing installation instructions for various platforms (Android, Linux, Windows, macOS, Raspberry Pi) and badges, as well as an mkdocs.yml for generating the project wiki.
(repo-wide) · high confidence
Introduce multiplayer chat with WebSocket connectivity and unread notifications
Players can now communicate in real-time during multiplayer games via a new chat system. This change introduces a WebSocket-based client (ChatWebSocket) that connects to the multiplayer server, handling message sending, receiving, and automatic reconnection with exponential backoff. A new ChatStore manages chat state per game, tracking unread message counts and displaying a welcome message. When new messages arrive, the chat button on the world screen flashes to indicate unread activity, and global system messages are also supported.
core/src/com/unciv/logic/multiplayer/chat · high confidence
Introduction of Base Ruleset selection and structured game setup metadata
The game now supports selecting a base ruleset (Civ V Vanilla or Gods & Kings) for new games, allowing players to choose between different rule sets from the start. This is managed through new metadata models in the core: \BaseRuleset\ defines the available rulesets, \GameParameters\ holds the new game configuration including the selected ruleset, and \GameSetupInfo\ persists the last used setup to streamline starting new games. Additionally, \GameSettingsMigrations\ handles the transition of legacy multiplayer settings into the new structure.
core/src/com/unciv/models/metadata · high confidence
Introduction of a new event bus system for game logic
A new event bus architecture has been added to the core game logic, introducing the \EventBus\ singleton and an \EventReceiver\ helper class to manage asynchronous communication between modules. This system allows components to subscribe to specific game events (such as building creation or unit death) using a type-safe, inheritance-aware mechanism that supports filtering, while utilizing weak references to prevent memory leaks when listeners are garbage collected.
core/src/com/unciv/logic/event · high confidence
Introduction of moddable ruleset objects for Beliefs, Events, and Global Uniques
The ruleset model now includes dedicated classes for Beliefs, Events, and Global Uniques, enabling these game systems to be fully defined and modified via JSON rulesets. Belief objects now support Civilopedia integration and filter matching for founder and follower types, while Event and EventChoice classes allow for triggerable narrative choices with keyboard shortcuts and unique-based effects. Global Uniques are now a distinct ruleset object that aggregates unit-wide and global effects, providing a structured way to define game-wide modifiers and their Civilopedia descriptions.
core/src/com/unciv/models/ruleset · high confidence
Major diplomacy system refactor and new diplomatic agreements
The diplomacy logic has been reorganized into dedicated files (CityStateFunctions, DeclareWar, Demand, DiplomacyFunctions, DiplomacyManager, DiplomacyTurnManager) to support new diplomatic capabilities. This includes the implementation of embassies, Declarations of Friendship, Research Agreements, and Defensive Pacts, as well as a new 'Demand' system allowing civs to request actions like stopping spying or settling near borders. City-state interactions have been expanded with personality types, election rigging mechanics, and unique unit gifts. War declaration logic now handles various war types (Direct, Defensive Pact, City-State Alliance) with specific diplomatic repercussions and notifications.
core/src/com/unciv/logic/civilization/diplomacy · high confidence
Map Editor UI restructured with autosave and Wesnoth import support
The Map Editor screen has been refactored into a modular component structure, introducing dedicated classes for the main tab pager (MapEditorMainTabs), the scrollable tools drawer (MapEditorToolsDrawer), and the map view holder (EditorMapHolder). This restructuring introduces automatic map autosave, which saves changes every 10 seconds to prevent data loss. Additionally, a new import tool has been added to load maps from the game 'Battle for Wesnoth', handling terrain and feature translation via a dedicated importer class. The file selection interface for loading and saving maps has also been updated to support double-click actions and display mod-specific map folders.
core/src/com/unciv/ui/screens/mapeditorscreen · high confidence
Moddable UI skin system with fallback support
The game now supports fully moddable UI skins. Users can install custom skins via JSON configuration files, which define colors, tints, and nine-patch images for UI elements. The system includes a fallback mechanism, allowing skins to inherit styles from a base skin if specific elements are not defined. Additionally, multiple skins can be combined or layered, with later skins overriding earlier ones, enabling users to create complex, customized visual themes.
core/src/com/unciv/models/skins · high confidence
Multiplayer chat with unread indicators and nation-colored messages
The game now supports multiplayer chat, accessible via a new Chat button on the World Screen that displays an unread message badge and flashes orange to indicate new activity. Opening the chat popup reveals a message history where sender names are colored according to their civilization's nation colors (with high-contrast fallbacks), while the message body remains white for readability.
core/src/com/unciv/ui/screens/worldscreen/chat · high confidence
New Android image packing build task and build configuration
The build system now includes a new Gradle task for packing Android texture assets into atlases to improve rendering performance, alongside a new BuildConfig object that defines the application name, version (4.22.3), and package identifier.
buildSrc · high confidence
New Multiplayer v2 API implementation
This change introduces the core networking stack for the new Multiplayer v2 protocol, replacing the previous implementation. It adds a new \ApiV2\ class that manages HTTP and WebSocket connections to servers, including session authentication, automatic reconnection, and compatibility checks. The update brings support for real-time multiplayer features such as lobby management, game state synchronization via WebSocket, and in-game chat, all handled through a new set of API endpoints and data structures.
core/src/com/unciv/logic/multiplayer/apiv2 · high confidence
New UI component extension library
A new set of Kotlin extension functions has been added to the UI components package to standardize and simplify common interface tasks. This includes helpers for formatting resource costs and availability, displaying signed numbers, and formatting time durations. It also introduces a reusable framework for music player controls (volume sliders, track selection, and playback buttons) and provides utilities for managing button states, color manipulation, and scene graph positioning.
core/src/com/unciv/ui/components/extensions · high confidence
New Unique Builder screen and improved language picker
The game now includes a Unique Builder screen, accessible from the mod checker, which allows users to construct and preview unique text strings with support for modifiers, parameter selection, and search filtering. The initial language picker has been refined to improve usability, including better scrolling behavior and keyboard selection support. Additionally, the game start screen now displays the banner image immediately without a fade-in effect.
core/src/com/unciv/ui/screens · high confidence
New View API for game state access
The game now exposes a new View API (e.g., GameView, CivView, CityView, MapUnitView) that wraps internal logic objects to provide data and actions from the perspective of the current player. This ensures that UI components only access information the player is actually allowed to see (such as fog of war, espionage, and spectator modes) and centralizes how game state is presented to the interface.
core/src/com/unciv/view · high confidence
New World Screen Status Bar and AutoPlay Controls
The World Screen now features a dedicated status bar (StatusButtons) that consolidates the Next Turn button with new status indicators and controls. This includes an AutoPlay button with a context menu for starting multiturn automation or single-turn military/civilian/economy automation, a Multiplayer status button that displays turn indicators and loading states for online games, and a Small Unit button for cycling or skipping idle units with due production. The Next Turn button itself has been refactored to use a NextTurnAction enum to dynamically display context-specific actions (such as picking policies, tech, or great people) and includes a visual progress bar during turn processing.
core/src/com/unciv/ui/screens/worldscreen/status · high confidence
New bottom-bar UI components: Battle Table, Tile Info Table, and helpers
The bottom bar of the World Screen now includes a dedicated Battle Table that displays combat simulations, modifiers, and animated attack/damage effects for units and cities, alongside a Tile Info Table that shows tile stats and descriptions with a clickable breakdown popup. These components replace previous inline or less structured UI elements, providing a more consistent and visually rich experience for viewing combat outcomes and tile details.
core/src/com/unciv/ui/screens/worldscreen/bottombar · high confidence
New expression parser for unique rules with math functions and safe division
The game now uses a custom expression parser for evaluating unique rule conditions and effects, replacing previous ad-hoc logic. This allows modders to use mathematical expressions including addition, subtraction, multiplication, division, exponentiation, and modulo, as well as unary operators like negation, square root, absolute value, floor, and ceiling. New functions max() and min() are available for comparing values. Division by zero is handled safely by defaulting to zero, preventing crashes. The parser supports countables (game state values) enclosed in square brackets, named constants like pi and e, and function calls with multiple arguments. This change improves the flexibility and robustness of unique rule definitions.
core/src/com/unciv/models/ruleset/unique/expressions · high confidence
New pathfinding algorithms and carrier slot matching logic
The map logic now includes dedicated A\* and Breadth-First Search (BFS) implementations for more flexible and efficient pathfinding, alongside a new bipartite matching system for carrier slot allocation. Additionally, map parameters have been updated to support a 'Flat Earth Hexagonal' shape and a 'Spiral' map type, with mirroring options expanded to include four-way and center-based mirroring.
core/src/com/unciv/logic/map · high confidence
New popup UI components and context menu system
This change introduces a new, reusable popup architecture for the game UI. It adds a base Popup class with flexible scrolling modes (none, all, or content-only) and a new AnimatedMenuPopup for context menus that animate open/close and can be anchored to specific screen positions or actors. Specific new popups include AskNumberPopup and AskTextPopup for standardized user input, AuthPopup for server authentication, CityScreenConstructionMenu for managing city construction queues, ConfirmPopup for yes/no dialogs, LoadingPopup for brief loading states, ToastPopup for transient notifications, and UnitUpgradeMenu for unit upgrades. The context menu system also adds visual indicators for available right-click actions on Android and desktop.
core/src/com/unciv/ui/popups · high confidence
New reusable UI widget components for consistent styling and interaction
This change introduces a suite of new UI widgets in the core components library to standardize and enhance the user interface. AutoScrollPane enables mouse-wheel scrolling on hover without requiring prior focus, improving navigation in scrollable lists. ExpanderTab provides animated, collapsible sections with keyboard accessibility and state persistence. KeyCapturingButton allows users to bind and display keyboard shortcuts directly in settings. ColorMarkupLabel and ShadowedLabel offer robust support for colored, translated text with proper layout handling and visual effects. LoadingImage provides a configurable, animated loading indicator. SortableGrid offers a generic, reusable table component with built-in sorting capabilities. BorderedTable and ScalingTableWrapper assist with consistent visual framing and responsive scaling of nested UI elements. LanguageTable streamlines the language selection interface. These components collectively improve UI consistency, responsiveness, and maintainability across the application.
core/src/com/unciv/ui/components/widgets · high confidence
Unciv Server now supports multiplayer chat and configurable deployment
The Unciv Server has been updated to include real-time multiplayer chat functionality via WebSocket, allowing players to communicate during games. This change also introduces a new Linux deployment package featuring a shell script and desktop entry for easier installation, along with a packr configuration to optimize the Java runtime. The server now exposes command-line options to enable or disable authentication and chat features independently, and defaults to port 8080.
server · high confidence
Architecture
Automated unit logic reorganized into specialized automation classes
The automated unit logic has been refactored from a monolithic structure into distinct, specialized classes for better maintainability and clarity. This change introduces dedicated automation handlers for specific unit types: AirUnitAutomation for fighters, bombers, and nuclear units; CivilianUnitAutomation for workers, settlers, and great people; EspionageAutomation for spy operations; and BattleHelper for unified attack decision-making. Additionally, CityLocationTileRanker now handles settler city-founding logic separately, and HeadTowardsEnemyCityAutomation manages military movement towards targets. This reorganization ensures that each unit type's automation rules are isolated, making the code easier to debug and extend without affecting unrelated unit behaviors.
core/src/com/unciv/logic/automation/unit · high confidence
Centralized constants and unified GUI access layer
The core application logic now uses a centralized \Constants\ object for hardcoded strings (such as terrain names, unit types, and UI labels) and a new \GUI\ object to provide a single entry point for screen navigation and state queries. This refactoring replaces scattered static references and direct \UncivGame\ access with a cleaner, more maintainable structure for managing game-wide data and UI interactions.
core/src/com/unciv · high confidence
City logic refactored into dedicated manager classes
The city logic in the core game engine has been reorganized to improve maintainability and performance. The previous monolithic \City\ class has been split into specialized components: \CityConstructions\ now handles the production queue and construction logic, \CityResources\ manages resource generation and modifiers, and \CityFocus\ defines the AI and automation priorities for worker assignment. This separation isolates concerns, making the city simulation easier to extend and optimize.
core/src/com/unciv/logic/city · high confidence
City logic refactored into specialized manager classes
The city management logic has been reorganized from the main City class into dedicated manager classes within the \core/src/com/unciv/logic/city/managers\ package. This refactoring introduces \CityConquestFunctions\ to handle city capture, puppeting, and annexation; \CityEspionageManager\ to manage spy movements during city changes; \CityExpansionManager\ to handle tile ownership and border growth; \CityFounder\ to manage city founding and naming; \CityPopulationManager\ to handle population growth and specialist allocation; \CityReligionManager\ to track religious pressure and adoption; and \CityTurnManager\ to process turn-start and turn-end events. This change improves code modularity and performance by isolating specific city behaviors into their own components.
core/src/com/unciv/logic/city/managers · high confidence
City screen UI refactored into modular view components
The City Screen interface has been restructured into a set of dedicated, modular UI components (such as BuyButtonFactory, CityConstructionsTable, CitizenManagementTable, and CityStatsTable) to improve code organization and maintainability. This change centralizes the logic for specific screen areas—like construction purchasing, citizen focus management, and resource display—into their own classes, while the main CityScreen class now acts as a coordinator for these widgets. Users will experience this as a more stable and responsive city management interface, with improved handling of UI updates and reduced risk of visual glitches or freezes during complex interactions.
core/src/com/unciv/ui/screens/cityscreen · high confidence
Map generation logic is refactored into specialized, modular components
The monolithic map generation process has been split into distinct, dedicated classes to improve code clarity and maintainability. Elevation generation (mountains and hills) is now handled by MapElevationGenerator, landmass creation by MapLandmassGenerator, resource placement by MapResourceSetting, natural wonder spawning by NaturalWonderGenerator, and river creation by RiverGenerator. Additionally, a new MapGenerationRandomness class centralizes all random number generation and Perlin noise calculations, ensuring consistent and reproducible map seeds across all generation steps.
core/src/com/unciv/logic/map/mapgenerator · high confidence
New Game screen UI components are extracted into dedicated classes
The New Game screen's user interface has been refactored by extracting specific UI widgets into their own files (such as GameOptionsTable, MapOptionsTable, ModCheckboxTable, and NationPickerPopup). This change organizes the screen's layout and interaction logic into reusable, modular components, improving code maintainability and separation of concerns without altering the visible features or user experience.
core/src/com/unciv/ui/screens/newgamescreen · high confidence
New dedicated managers for Espionage, Golden Age, Great People, Policy, Religion, Ruins, Tech, and Threat logic
The core game logic previously held within the Civilization class has been extracted into eight new, dedicated manager classes (EspionageManager, GoldenAgeManager, GreatPersonManager, PolicyManager, ReligionManager, RuinsManager, TechManager, and ThreatManager). This refactoring centralizes the handling of specific systems—such as spy operations, golden age tracking, great person point generation, policy adoption, religion mechanics, ruin rewards, technology research, and threat detection—into their own files, improving code organization and maintainability.
core/src/com/unciv/logic/civilization/managers · high confidence
New game logic and backward compatibility infrastructure
The core game logic has been restructured to support a new ruleset and modding architecture. A new \GameStarter\ class now handles the initialization of new games, including map generation, civilization placement, and starting unit assignment. A dedicated \BackwardCompatibility\ module has been added to manage transitions from deprecated game elements, ensuring that saves from older versions or games with modified mods load correctly by cleaning up missing references to units, buildings, and technologies. Additionally, an \AlternatingStateManager\ utility has been introduced to handle state toggling with delays, and holiday date calculations for easter eggs have been centralized.
core/src/com/unciv/logic · high confidence
Refactored MapUnit logic into specialized sub-managers
The core MapUnit class has been restructured to improve code organization and maintainability by extracting specific responsibilities into dedicated manager classes. Unit movement and turn-based logic (start/end turn, healing, terrain damage, citadel effects) now reside in UnitTurnManager. Unit promotion handling, including XP calculation, promotion acquisition/removal, and trigger activation, is managed by UnitPromotions. Unit upgrade logic, including cost calculation and the upgrade execution process, is handled by UnitUpgradeManager. Additionally, a new MapUnitCache class centralizes the caching of movement-related unique properties (such as terrain costs, zone of control, and embarkation rules) to optimize performance during pathfinding and movement calculations.
core/src/com/unciv/logic/map/mapunit · high confidence
Refactored world map UI to use a View-based architecture
The world map interface has been restructured to use a new View pattern (MapUnitView, TileView, etc.) instead of direct logic object references. This change introduces a new \OverlayButtonData\ system for floating action buttons and a \WorldMapHolder\ to manage map interactions, resulting in cleaner separation between game logic and UI rendering. Users will experience this as a more stable map interface with improved performance during scrolling and zooming, and consistent behavior for unit selection and action overlays.
core/src/com/unciv/ui/screens/worldscreen/worldmap · high confidence
World screen UI components reorganized into dedicated files
The WorldScreen UI has been refactored by extracting its internal components into separate, dedicated files (AlertPopup, NotificationsScroll, TechPolicyDiplomacyButtons, TradePopup, UndoHandler, etc.). This change improves code maintainability and readability by grouping related logic, without altering the user-facing behavior of the game.
core/src/com/unciv/ui/screens/worldscreen · high confidence
Behavioural changes
27 commits (1 fix) modifying android/assets/sounds
A change to existing behaviour in android/assets/sounds — 27 commits (1 fix), 51 files.
android/assets/sounds · medium confidence · unverified
AI city work and specialist ranking logic restructured with performance timing
The automation logic for ranking tiles for city work and specialists has been rewritten to more accurately weigh Food against other stats, particularly Production. The new implementation handles food-to-production conversion, adjusts weights based on city size (prioritizing food in small cities), and accounts for global issues like negative gold or happiness. Additionally, a new Timers utility has been added to the automation package, allowing developers to profile specific code spans (like \rankStatsForCityWork\) to measure performance impact.
core/src/com/unciv/logic/automation · high confidence
AI construction automation rework with personality and performance improvements
The city construction automation logic has been significantly reworked to improve AI decision-making and performance. The AI now incorporates a 'Personality' system that influences building choices through specific modifiers (e.g., military focus), and can respect 'WillNotBuild' uniques to avoid certain constructions. Performance is enhanced by caching building stats and using efficient iteration methods, reducing next-turn computation time. Additionally, the AI's evaluation of military units, workboats, and victory-related buildings has been refined to better prioritize infrastructure and strategic needs based on city production levels and empire-wide context.
core/src/com/unciv/logic/automation/city · high confidence
Android platform code rewritten in Kotlin with modernized display, font, and save handling
The Android launcher and core platform integrations have been rewritten in Kotlin, introducing dedicated implementations for display management, font rendering, and file saving. The new AndroidDisplay class enables users to control screen orientation and fullscreen mode, while also properly handling display cutouts (notches) on modern devices. Font rendering now leverages Android's native font APIs (API 23+) to support custom mod fonts and improved glyph fallback, ensuring better text appearance. The AndroidSaverLoader utilizes the Android Storage Access Framework, allowing users to save and load game files in external storage locations. Additionally, the app now supports deep links for multiplayer games and friends, and includes a new AndroidTvLauncher for Android TV compatibility.
android/src · high confidence
City button UI components restructured into dedicated view classes
The city button display on the WorldScreen has been refactored into a modular set of UI components (AirUnitTable, CityTable, DefenceTable, InfluenceTable, StatusTable) that are now driven by the new ForeignCityView abstraction. This change ensures that the visual indicators—such as air unit counts, defense strength, population growth, construction progress, and city-state influence—are consistently rendered based on the current viewing context, fixing previous layout regressions and ensuring correct behavior for both owned and foreign cities.
core/src/com/unciv/ui/components/tilegroups/citybutton · high confidence
Civilopedia and UI descriptions for units, buildings, improvements, nations, resources, and technologies are now generated in dedicated description classes
The logic for generating user-facing descriptions has been moved from the ruleset model classes into new, dedicated files in the \objectdescriptions\ package (e.g., \BaseUnitDescriptions\, \BuildingDescriptions\, \ImprovementDescriptions\, \NationDescriptions\, \ResourceDescriptions\, \TechnologyDescriptions\). This change centralizes how text is rendered for the Civilopedia, city screens, and tech pickers, ensuring consistent formatting and allowing for more complex display logic, such as showing differences between unique replacements, handling resource stockpile availability, and correctly linking related objects like units, buildings, and technologies.
core/src/com/unciv/ui/objectdescriptions · high confidence
Civilopedia screen restructured with new categories and search
The Civilopedia screen has been refactored to support a more comprehensive and organized reference experience. A new \CivilopediaCategories\ enum defines the available sections, including additions for Unit Types, Unit Names, Personalities, Difficulty levels, Eras, and Speeds, while filtering Victory Types to show only those active in the current game. The screen now features a robust search popup that supports regular expressions and allows filtering by mod, enabling users to quickly locate specific entries across the entire ruleset. Additionally, the underlying rendering engine has been updated to use a new \FormattedLine\ system, which supports advanced text styling, inline icons, and internal linking, providing a richer and more consistent display for all Civilopedia content.
core/src/com/unciv/ui/screens/civilopediascreen · high confidence
Desktop platform stability and automation improvements
The desktop client now features a robust clipboard implementation that bypasses the previous stack-size limitations by using AWT, ensuring copy-paste works reliably for large text. Audio playback is hardened to catch and handle codec errors that previously caused crashes, while window management is improved to correctly respect taskbars and screen insets on Windows and macOS. Additionally, a new CLI mode allows for headless game creation from JSON configuration files and supports automated simulations, enabling mod testing and CI workflows without a graphical interface.
desktop/src · high confidence
Diplomacy screen UI refactored into modular components
The DiplomacyScreen UI has been restructured into distinct, reusable components to improve layout and maintainability. The main screen now delegates specific sections to new classes: CityStateDiplomacyTable and MajorCivDiplomacyTable handle the action buttons and relationship details for their respective civ types, while LeaderIntroTable displays leader portraits and greetings. The trade interface is now managed by TradeTable, which coordinates with OfferColumnsTable to display the four-column trade layout (our items, their items, our offer, their offer) and OffersListScroll to render individual tradeable items with proper grouping and highlighting. This change ensures consistent behavior across different diplomacy contexts and supports better responsiveness on various screen sizes.
core/src/com/unciv/ui/screens/diplomacyscreen · high confidence
Empire Overview screen restructured with modular tabs and persistent state
The Empire Overview screen has been refactored to use a modular tab-based architecture, allowing each category (Cities, Stats, Trades, Units, Politics, Resources, Religion, Wonders, Notifications) to be managed as independent, persistable components. This change enables the Empire Overview to save and restore its state (such as the active tab and scroll positions) across game launches, and provides a cleaner foundation for future individual tab migrations. The Cities tab now utilizes a sortable grid with detailed columns including status, construction, garrison, and defense, while the Politics tab offers both a diagram and a table view with persistent user preferences.
core/src/com/unciv/ui/screens/overviewscreen · high confidence
Improved crash reporting and stability for the crash screen
The crash handling UI has been refactored to prevent out-of-memory errors when displaying the crash screen itself. The visible error report now excludes heavy save game and mod data, which are only included when the user explicitly copies the full report to the clipboard. The report now includes the last active screen type and whether A-star pathing is enabled to aid debugging. Additionally, a new extension function standardizes uncaught exception handling across the application.
core/src/com/unciv/ui/crashhandling · high confidence
Improved text rendering and expanded language support
The font system has been refactored to support languages with complex diacritics (such as Thai) by mapping multi-codepoint sequences to single glyphs, ensuring correct display in translated text. Additionally, font rendering quality on high-resolution displays has been improved by introducing mipmapped font textures, which reduce blurriness when text is scaled. The system now also allows modders to include custom font files in their mods, making these available in the font selection menu.
core/src/com/unciv/ui/components/fonts · high confidence
Map Editor UI restructured into dedicated sub-tabs
The Map Editor interface has been reorganized to improve usability and clarity. The previous monolithic layout is replaced by distinct, dedicated tabs for editing (Terrain, Features, Natural Wonders, Resources, Improvements, Rivers, Starting Locations), generating maps (New Map, Partial Generation), and managing files (Load, Save, Mods, Options, View). This change introduces specific tools like a brush size slider, keyboard shortcuts for quick tab switching, and a new Wesnoth map import feature, while also adding clipboard actions for map parameters and an overlay image tool for visual reference.
core/src/com/unciv/ui/screens/mapeditorscreen/tabs · high confidence
Map generation refactored into specialized components for improved performance and moddability
The map generation logic in the core module has been split from a monolithic MapRegions class into dedicated files: MapGenTileData, Region, RegionStartFinder, StartNormalizer, MinorCivPlacer, and resource placement logics. This refactoring introduces a MapGenTileData class that pre-evaluates tile qualities (food, production, junk, etc.) during map generation, replacing previous runtime checks and significantly reducing map generation latency. It also separates the concerns of region division, start position finding, start normalization (ensuring viable yields), and minor civ placement into their own classes, making the system more maintainable and allowing for easier modification of specific map generation behaviors.
core/src/com/unciv/logic/map/mapgenerator/mapregions · high confidence
Map rendering restructured into dedicated tile layers
The map rendering system has been refactored to use a layered architecture, separating visual elements into distinct classes such as TileLayerTerrain, TileLayerUnitSprite, TileLayerUnitFlag, TileLayerCityButton, TileLayerBorders, TileLayerFeatures, TileLayerResource, TileLayerYield, and TileLayerOverlay. This change introduces lazy initialization for actor lists to reduce memory usage and improves performance by allowing the rendering engine to short-circuit hit and act checks at the layer boundary. Users will experience faster map updates and lower memory consumption, particularly when interacting with the map or when units move.
core/src/com/unciv/ui/components/tilegroups/layers · high confidence
Minimap UI restructured with dedicated overlay toggle buttons
The minimap interface has been refactored to improve layout and performance. A new MapOverlayToggleButton component unifies the behavior of the five map overlay controls (unit movements, yields, worked tiles, resources, and improvements), which are now displayed as a vertical column of green toggle icons to the left of the minimap. The minimap rendering itself has been optimized using a NonTransformGroup to reduce memory allocations and avoid ANRs during drag operations, while scroll position indicators are now explicitly disabled from blocking clicks. Additionally, the maximize button has been repositioned to the top-right corner to ensure compatibility with displays featuring rounded corners.
core/src/com/unciv/ui/screens/worldscreen/minimap · high confidence
Mod Manager UI refactored into modular components
The Mod Manager screen has been restructured to improve maintainability and responsiveness. The previous monolithic implementation has been split into distinct, reusable components: ModDecoratedButton handles the display of individual mod entries with dynamic status indicators (such as update availability and visual mod status); ModInfoAndActionPane manages the right-hand detail pane, including preview image loading, metadata display, and action buttons; ModManagementOptions centralizes the filtering and sorting logic with a dedicated UI expander; and ModUIData serves as a lightweight, non-UI data model that safely transfers state across screen resizes. This change ensures that the Mod Manager's layout and data handling are more robust and easier to extend.
core/src/com/unciv/ui/screens/modmanager · high confidence
Mod download now shows real-time progress and uses streaming extraction
The mod download process has been updated to provide users with a visible progress percentage while files are being fetched from GitHub, replacing previous behavior where progress might have been missing or inaccurate. Additionally, mod archives are now extracted in a streaming fashion during the download, which improves robustness and reduces memory usage. The underlying GitHub API integration has also been refactored to use Ktor for handling requests and rate limits, ensuring more reliable mod retrieval and display.
core/src/com/unciv/logic/github · high confidence
Movement cost logic extracted to dedicated module with escort formation support
The movement calculation logic has been refactored into a new \MovementCost\ object, separating it from the main \UnitMovement\ class to improve code organization and performance. This change introduces support for unit escort formations, where movement costs between tiles are now calculated by considering the combined constraints of both the unit and its escort (e.g., using the maximum cost of either unit). The \UnitMovement\ class now delegates to this new module for adjacent tile cost calculations and integrates with the existing pathfinding systems, including A\* and BFS, while maintaining caching optimizations.
core/src/com/unciv/logic/map/mapunit/movement · high confidence
Multiplayer UI restructured into dedicated screens and components
The multiplayer interface has been refactored to improve usability and maintainability. The main MultiplayerScreen now features a dedicated GameList component that displays games with status indicators for turn order and errors, and automatically updates via event listeners. A new Friends management system includes ViewFriendsListScreen, AddFriendScreen, and EditFriendScreen, allowing users to add, edit, and delete friends by name and player ID, with validation and toast notifications. The AddMultiplayerGameScreen has been updated to use the new UncivTextField component and improved error handling. Helper functions in MultiplayerHelpers now provide a richer game preview description, including the current player's descriptor (You, friend name, or Unknown), average turn time, and time remaining before force resign. The UI also now supports auto-downloading missing mods when joining a game.
core/src/com/unciv/ui/screens/multiplayerscreens · high confidence
Multiplayer architecture refactored with API versioning and friend lists
The multiplayer system has been restructured to support multiple server API versions (APIv0 for Dropbox, APIv1 for standard servers, and APIv2 for advanced REST/WebSocket servers) via automatic detection logic in ApiVersion.kt. A new FriendList class allows users to manage a persistent list of friends by name and player ID, while the core Multiplayer class now separates local file handling (MultiplayerFiles) from server communication (MultiplayerServer) and utilizes Kotlin coroutines for background updates. Additionally, a ServerFeatureSet model is introduced to track server capabilities like authentication and chat support.
core/src/com/unciv/logic/multiplayer · high confidence
New BaseScreen architecture with Scene2D debug tools and FPS counter
The BaseScreen class has been restructured to serve as the central foundation for all game screens, introducing a unified keyboard shortcut dispatcher and a new TutorialController that manages tutorial triggers and rendering. A built-in FPS counter is now available for performance monitoring when enabled in debug mode. Additionally, a comprehensive Scene2D debug tool has been added, allowing developers to visualize actor hierarchies, draw coordinate axes, and log click events to aid in UI debugging.
core/src/com/unciv/ui/screens/basescreen · high confidence
New Era and Technology model classes with era-based filtering
The tech ruleset now includes dedicated \Era\ and \Technology\ model classes that support era-based filtering via \matchesFilter\ methods. Eras define starting units, costs, and associated technologies, while technologies link to their era and support conditional availability checks. This enables era-specific logic in the tech tree and Civilopedia display.
core/src/com/unciv/models/ruleset/tech · medium confidence
New UI component infrastructure and stability improvements
This update introduces several new UI components to the core engine: a generic framework for sortable grids (ISortableGridContentProvider) to enable column sorting in lists like the Unit Overview; a reusable particle effect system (ParticleEffectAnimation) that powers the new WLTK+ fireworks visual; a new Maya Calendar component to display dates using the Long Count system for the Maya civilization; and a new UncivTooltip replacement that fixes sticky tooltip issues on Android with physical keyboards. Additionally, an InputDisabling utility is added to prevent Application Not Responding (ANR) crashes during heavy background calculations, and a NonTransformGroup class is introduced to optimize rendering performance for static UI groups.
core/src/com/unciv/ui/components · high confidence
New conditional and countable evaluation framework for unique modifiers
The unique system now uses dedicated \Conditionals.kt\ and \Countables.kt\ modules to evaluate filtering conditions and dynamic value parameters. This introduces support for complex state-based checks—including era, difficulty, game speed, religion, espionage, and victory type conditions—as well as dynamic countable values (e.g., population, resources, buildings) that can be used in unique parameters. Users will see more granular control over when and how unique effects apply, with improved performance through caching and validation, and enhanced moddability via standardized conditional and countable syntax.
core/src/com/unciv/models/ruleset/unique · high confidence
New core game model classes for counters, colors, constants, and entities
This change introduces several new foundational model classes in the core game logic. A specialized \Counter\ class replaces generic maps for tracking integer-based quantities, automatically removing entries when they reach zero to keep save files compact. An \ImmutableColor\ class prevents accidental modification of color objects, and a \ModConstants\ class centralizes all moddable game parameters (such as city strength, spy ranks, and map generation settings) with reflection-based merging for mod compatibility. Additionally, new model classes define the data structures for \Religion\ (including belief management), \Spy\ (with action states and tech-stealing logic), \TutorialTrigger\ events, \UncivSound\ definitions, and \UnitAction\ types (including icons, sounds, and keyboard bindings).
core/src/com/unciv/models · high confidence
New image handling infrastructure and moddable portrait system
The image subsystem has been restructured with new components: AtlasPreview validates ruleset texture atlases to prevent crashes from missing or empty files; ImageAttempter provides a chainable fallback mechanism for resolving image paths; ClippingImage and ImageWithCustomSize fix layout issues where images spill outside bounds or ignore custom sizing; IconCircleGroup and IconTextButton offer standardized UI widgets for icons with text. Additionally, the Portrait class introduces a moddable system allowing custom portraits for units, buildings, techs, resources, and other entities, with specific implementations for Resources, Techs, Units, and Buildings that apply era-specific coloring and fallback logic.
core/src/com/unciv/ui/images · high confidence
New in-game menu and music player popups
The in-game main menu (accessed via the hamburger button) has been restructured into a new popup that dynamically adjusts its layout based on screen size and game state. It now includes an 'Exit' button to close the application, a 'Developer Console' button (visible only in expert mode), and a 'Music' button that opens a dedicated music player popup. The new music player popup features a scrollable list of tracks organized by mod, a history of recently played tracks, and controls for playback, with sizing adapted to the user's screen resolution settings.
core/src/com/unciv/ui/screens/worldscreen/mainmenu · high confidence
New multiplayer file storage backend and Dropbox integration
The multiplayer storage layer has been restructured to support a new API v2 and Dropbox as file storage backends. A new \FileStorage\ interface defines the contract for saving, loading, and deleting game data, with implementations for \UncivServerFileStorage\ (using the new API v2) and \DropBox\ (integrating directly with the Dropbox API). The \MultiplayerServer\ class now routes file operations to the appropriate storage backend based on the configured server URL, handling authentication and error states like rate limits or file not founds more explicitly. Additionally, a transition helper \ApiV2FileStorageEmulator\ is provided to bridge existing code to the new storage mechanism.
core/src/com/unciv/logic/multiplayer/storage · high confidence
New ruleset models for City-States, Difficulties, and Leader Personalities
The game now supports richer customization for city-states, game difficulties, and leader personalities through new data models. City-states can now define specific bonuses for friends and allies, along with custom colors. Game difficulties expose granular modifiers for both player settings (such as research and unit costs) and AI behavior (including city growth, maintenance costs, and starting units). Additionally, leaders can now be assigned a personality that defines their statistical biases (e.g., militaristic, scientific) and diplomatic tendencies (e.g., willingness to declare war or denounce), which influences AI decision-making and is displayed in the Civilopedia.
core/src/com/unciv/models/ruleset/nation · high confidence
New simulation statistics and performance tracking
The simulation engine now collects detailed performance metrics during automated runs, including average victory turns, population, production, and city counts at specific intervals. This change introduces a new MutableInt helper class for thread-safe counter updates and refactors the Simulation and SimulationStep classes to aggregate these stats across multiple concurrent threads, enabling better analysis of AI behavior and game balance.
core/src/com/unciv/logic/simulation · high confidence
New tile logic classes and road status enum
The tile logic layer has been restructured with the introduction of several new classes: RoadStatus (an enum defining road/railroad upkeep and movement values), TileHistory (recording ownership and city center changes for replay), TileImprovementFunctions (handling improvement buildability and setting), TileNormalizer (validating tiles against the current ruleset), and TileStatFunctions (calculating tile yields). These changes centralize tile-specific logic and improve moddability and performance.
core/src/com/unciv/logic/map/tile · high confidence
New tile ruleset model classes for resources, improvements, and terrain
The game now uses dedicated model classes in the \core/src/com/unciv/models/ruleset/tile\ package to manage tile-related ruleset data. \ResourceSupplyList\ aggregates resource supply and demand by origin, handling additions, subtractions, and modifier applications. \ResourceType\ defines the three resource categories (Luxury, Strategic, Bonus) with associated colors. \Terrain\ and \TerrainType\ handle terrain properties, civilopedia generation, and filter matching. \TileImprovement\ manages improvement build times, filter matching, and constructor unit logic. \TileResource\ handles resource visibility, improvement unlocking, and natural generation conditions.
core/src/com/unciv/models/ruleset/tile · high confidence
New tileset configuration and caching system
The tileset system has been refactored to support modular configuration and fallbacks. Users can now define fallback tilesets for missing images, adjust the scale of hex tiles, and customize colors for fog of war and unexplored tiles. The new caching mechanism ensures that tileset configurations from active mods are merged deterministically, preventing crashes when a configured tileset cannot be loaded and ensuring settings reset correctly when a mod is deleted.
core/src/com/unciv/models/tilesets · high confidence
Notifications restructured with categories, icons, and round-robin actions
The notification system has been refactored to support richer, more interactive alerts. Notifications are now grouped into categories (General, Trade, Diplomacy, Production, Units, War, Religion, Espionage, Cities) for better organization in the log. They can display multiple icons (e.g., unit, building, or resource portraits) and support multiple clickable actions. When a notification with multiple actions is clicked, the game cycles through them round-robin style, allowing users to choose between options like viewing a location, opening a civilopedia entry, or initiating diplomacy. This change also introduces new alert types for demands (e.g., 'Don't spy on us', 'Don't spread religion') and popups for events like Golden Ages and tech completions.
core/src/com/unciv/logic/civilization · high confidence
Options popup reorganized into dedicated tabs
The Options popup has been restructured from a single scrollable list into a tabbed interface with dedicated tabs for About, Advanced, Automation, Debug, Display, Gameplay, Key Bindings, Language, Mod Check, and Multiplayer settings. This change improves navigation and clarity by grouping related settings into logical categories, such as moving screen orientation and display preferences to the Display tab, consolidating automation controls in the Automation tab, and providing a dedicated view for key bindings and mod validation.
core/src/com/unciv/ui/popups/options · high confidence
Picker screens refactored into a shared UI framework
The picker screens (CityRename, DiplomaticVote, GreatPerson, Improvement, Pantheon, Policy, and Promotion) have been refactored to use a new shared \PickerScreen\ base class and \PickerPane\ component. This change standardizes the layout across all picker interfaces, providing a consistent split-pane design with a scrollable choice list, a description area, and action buttons. It also introduces unified input handling, including keyboard shortcuts (like F1 for Civilopedia) and double-click support for quick actions, while ensuring consistent visual styling and behavior for user interactions.
core/src/com/unciv/ui/screens/pickerscreens · high confidence
Quest system restructured with modular implementation classes
The quest logic has been refactored to use a sealed class hierarchy where each quest type (such as ClearBarbarianCamp, ConquerCityState, and Route) now has its own dedicated implementation class. This change introduces an \AssignedQuest\ data class to manage quest state and an \IQuestImplementation\ interface to standardize how validity, completion, and obsolescence are checked. As a result, quest behaviors are now more modular and easier to extend, with specific logic for tasks like clearing barbarian camps or conquering city-states isolated in their respective classes.
core/src/com/unciv/logic/civilization/managers/quests · high confidence
Redesigned UI skin and consolidated asset atlases
The game's visual interface has been updated with a new 'Minimal' skin, introducing rounded-edge rectangles and distinct button states (normal, pressed, disabled, positive, negative) for a cleaner look. To support this and improve performance, all game assets have been reorganized into dedicated, separate texture atlases (such as ConstructionIcons, Tech, and UnitPromotionIcons) rather than a single large file, and a new fireworks particle effect has been added for victory celebrations.
android/assets · high confidence
Redesigned save and load game screens with improved feedback and clipboard support
The save and load game interfaces have been restructured to provide better user feedback and usability. The load screen now supports loading games directly from the clipboard and from custom file locations, with visual indicators (such as button state changes and loading popups) to show when these operations are in progress. The save screen allows copying the current game state to the clipboard and saving to custom locations. Both screens feature improved error handling for corrupted files or permission issues, and the save list widget now includes keyboard navigation (arrow keys, page up/down, home/end) and double-click actions for faster interaction.
core/src/com/unciv/ui/screens/savescreens · high confidence
Refactored JSON serialization infrastructure with custom serializers
The JSON handling core has been updated to use valid, pretty-printed JSON output instead of the previous minimal format, improving file readability and compatibility. This change introduces dedicated serializers for specific types: \Duration\ is now serialized as a string, \HexCoord\ uses a custom format, and string values are interned to reduce memory usage. Additionally, a new \LastSeenImprovement\ class handles the serialization of map keys (Hex coordinates) that previously caused deserialization issues, ensuring game state is saved and loaded correctly.
core/src/com/unciv/json · high confidence
Refactored Unit Table UI and added AutoPlay threading
The Unit Table component has been refactored to use a presenter-based architecture, supporting distinct views for units, cities, spies, and a summary state when no unit is selected. This change introduces dedicated presenters (UnitPresenter, CityPresenter, SpyPresenter, SummaryPresenter) to manage the display logic, improving code organization and maintainability. Additionally, a new AutoPlay class has been introduced to handle multiturn auto-play operations, ensuring that turn processing runs on a separate thread to prevent blocking the main UI thread, with proper state management for turn progress and job execution.
core/src/com/unciv/ui/screens/worldscreen/unit · high confidence
Refactored World Screen unit details into specialized presenters
The World Screen's unit information panel has been restructured to use dedicated presenter classes (UnitPresenter, CityPresenter, SpyPresenter, and SummaryPresenter) instead of a single monolithic implementation. This change introduces a new Summary view that displays a count of idle and waiting units when no specific unit is selected, and it ensures that promotions and statuses marked as 'Not shown on world screen' are correctly hidden from the UI. Additionally, the presenter now supports multi-unit selection logic and handles the display of city health and spy ranks with specific visual indicators.
core/src/com/unciv/ui/screens/worldscreen/unit/presenter · high confidence
Refactored capital connection logic and civ transient state into dedicated classes
The logic for determining which cities are connected to a civilization's capital has been extracted into a new \CapitalConnectionsFinder\ class, which now uses a Breadth-First Search (BFS) algorithm to efficiently map cities to their connection mediums (Road, Railroad, Harbor). Additionally, transient state management for civilizations has been split out: \CivInfoTransientCache\ now handles caching of unique units/buildings, resource usage tracking, and viewable tile updates, while \CivInfoStatsForNextTurn\ centralizes the calculation of unit maintenance, transportation upkeep, and unit supply. This refactoring improves performance by reducing memory allocations and simplifying the main \Civilization\ class.
core/src/com/unciv/logic/civilization/transients · high confidence
Refactored file handling with new platform-agnostic save/load architecture
The file management system has been restructured to improve reliability and platform support. A new \PlatformSaverLoader\ interface allows platform-specific implementations to handle file I/O via streams, enabling safer saving and loading on Android (using SAF) and Linux X11 without memory spikes. A new \FileChooser\ widget replaces native dialogs to prevent crashes on X11 desktops. Additionally, \FileConversions\ centralizes JSON serialization with optional gzip compression, and \IMediaFinder\ standardizes how mods and built-in assets are located for sounds, music, and images.
core/src/com/unciv/logic/files · high confidence
Refactored map rendering into a layered, view-based architecture
The map display has been restructured to use a new layered rendering system where individual tile visuals (terrain, features, yields, units, etc.) are managed by distinct layer classes within a unified TileGroup. This change introduces specific components for the City Screen (CityTileGroup) and World Map (WorldTileGroup), separating their update logic to handle context-specific visuals like city ownership states, blockades, and worked-tile indicators. The underlying TileGroupMap now aggregates these layers into shared container groups for more efficient drawing and culling, improving map performance and memory usage while providing a cleaner separation between the map view and the city view.
core/src/com/unciv/ui/components/tilegroups · high confidence
Refactored pathfinding engine with fixed-point arithmetic and split modules
The pathfinding logic in the core map module has been restructured into separate files (PathingMap, AStarPathfinder, RouteNode, etc.) and now uses a new FixedPointMovement class based on base-30 arithmetic. This change replaces previous floating-point movement calculations to avoid heap allocations and improve performance during A\* pathfinding, while ensuring precise representation of movement costs like road fractions.
core/src/com/unciv/logic/map/pathingmap · high confidence
Refactored resource placement into dedicated logic classes
The map generation logic for strategic, bonus, and luxury resources has been reorganized into three new dedicated classes: LuxuryResourcePlacementLogic, StrategicBonusResourcePlacementLogic, and MapRegionResources. This change extracts the complex algorithms for assigning luxury resources to regions, placing major and minor strategic/bonus deposits, and handling resource frequency and weighting into modular, reusable components. For users, this ensures that the underlying mechanics for how resources are distributed across the map remain consistent while improving the maintainability and performance of the map generation process.
core/src/com/unciv/logic/map/mapgenerator/resourceplacement · high confidence
Refactored stats model with new interfaces and immutable annotations
The stats model in core/src/com/unciv/models/stats has been restructured to improve code purity and type safety. New interfaces (GameResource, INamed) and classes (NamedStats) were introduced to standardize how stats are named and identified. The core Stats class now uses explicit property accessors and operator overloads for cleaner manipulation, while the Stat enum was updated to include metadata like notification icons and colors. Additionally, a new SubStat enum was added to handle specific stat types like Golden Age points and Stored Food. These changes support better immutability guarantees through purity annotations and provide a more robust foundation for stat calculations and notifications.
core/src/com/unciv/models/stats · high confidence
Refactored translation system with dedicated file reader/writer and entry model
The translation subsystem has been restructured to improve mod support and maintainability. A new \TranslationEntry\ class now models individual translatable strings, while \TranslationFileReader\ and \TranslationFileWriter\ handle the parsing and generation of \.properties\ files, including support for completion percentages and Fastlane metadata. The \Translations\ collection now explicitly manages mod-specific translation sets, allowing mod translations to be loaded and resolved independently of the base game strings.
core/src/com/unciv/models/translations · high confidence
Reorganized core utility infrastructure with new concurrency and collection utilities
The \core/src/com/unciv/utils\ package has been restructured into a set of dedicated utility modules. A new \Concurrency\ module introduces a centralized coroutine-based threading system with distinct daemon, non-daemon, and GL thread dispatchers, automatically wrapping operations in crash handling to improve stability during background tasks. \CollectionExtensions\ adds new extension functions for weighted random selection, immutable list/set modifications, and efficient GDX array conversions, while \Randomness\ provides deterministic hashing and pseudo-random UUID generation. Additionally, \DebugUtils\ exposes new toggles for visual debugging (such as FPS display and tile coordinate overlays), and \Display\ introduces a platform abstraction for managing screen modes and orientation settings.
core/src/com/unciv/utils · high confidence
Replaced legacy audio system with new MusicController and CityAmbiencePlayer
The audio subsystem has been rewritten to use a new MusicController that manages background music with fade-in/out, mood-based track selection (Peace, War, Victory, etc.), and overlay support for city ambience and leader voices. City ambience sounds are now handled by a dedicated CityAmbiencePlayer that plays looping ambient tracks when a city view is opened and stops them when closed. The new system also includes a SoundPlayer with improved Android compatibility, handling sound caching and playback retries to prevent silent failures on mobile devices.
core/src/com/unciv/ui/audio · high confidence
Ruleset validation system refactored into modular components
The ruleset validation logic has been reorganized into a set of dedicated classes to improve maintainability and separation of concerns. The core validation flow is now managed by \RulesetValidator\, which delegates specific checks to a new \BaseRulesetValidator\ for complete rulesets. A new \ModCompatibility\ object handles declarative mod requirements (such as \ModRequires\ and \ModIncompatibleWith\) and audio-visual detection. Error reporting is centralized in \RulesetErrorList\, which now supports mod-controlled warning suppression via the \SuppressWarnings\ unique. Additionally, \UniqueAutoUpdater\ provides automatic migration for deprecated uniques, and \TextSimilarity\ enables misspelling suggestions for invalid parameters.
core/src/com/unciv/models/ruleset/validation · high confidence
Trade logic restructured into dedicated core classes
The trade system's core logic has been reorganized into a new set of dedicated files within the \core/src/com/unciv/logic/trade\ package. This change introduces \Trade\ and \TradeRequest\ to manage offer structures and serialization, \TradeEvaluation\ to handle validity checks and AI acceptability scoring, \TradeLogic\ to determine available offers and execute trade acceptance (including gold, resource, city, and treaty transfers), and supporting classes like \TradeOffer\, \TradeOfferType\, and \TradeOffersList\ to define offer types and manage offer collections. This refactoring centralizes the trade mechanics, separating them from UI and broader game state management to improve code clarity and maintainability.
core/src/com/unciv/logic/trade · high confidence
Unified input system with customizable keyboard shortcuts and gesture support
The input handling in the UI components has been refactored into a dedicated package, introducing a centralized system for managing keyboard shortcuts, mouse clicks, and touch gestures. Users can now customize key bindings across the main menu, world screen, city screen, and unit actions via the game settings. The new system supports gesture equivalence (e.g., long-press and right-click) for consistent mobile/desktop interaction, allows mapping extra mouse buttons to virtual keys, and ensures that disabled actors no longer trigger activation events via keyboard shortcuts.
core/src/com/unciv/ui/components/input · high confidence
Unit actions restructured into a modular, modifier-driven system
The unit actions system has been refactored to separate action definitions from their execution logic and modifiers. A new \UnitActionModifiers\ object now centrally handles action availability checks, movement costs, and side effects such as consuming units, deducting stats, or spending stockpiled resources. This allows actions like Founding a City, Spreading Religion, and Pillaging to support new modifiers (e.g., limited uses, stat costs) and display these side effects in the UI. The \UnitActions\ object now serves as a dispatcher, mapping action types to specific handler files (e.g., \UnitActionsGreatPerson\, \UnitActionsReligion\) and introducing dynamic paging to better organize the growing number of unit actions on the World Screen.
core/src/com/unciv/ui/screens/worldscreen/unit/actions · high confidence
Unit ruleset models refactored into dedicated classes
The core unit ruleset data structures have been reorganized into specific classes: BaseUnit now handles unit stats and cost calculations (delegating to BaseUnitCost), UnitType defines movement domains (Land, Water, Air), Promotion manages prerequisites and UI layout hints, and UnitNameGroup links historical figures to units. This change improves moddability and code clarity by separating unit definitions, their types, promotions, and name groups into distinct, focused components within the ruleset model.
core/src/com/unciv/models/ruleset/unit · high confidence
Victory screen restructured with new tabs, charts, and replay features
The Victory screen has been reorganized into a tabbed interface featuring new sections for Global status, Illustrations, Demographics, Rankings, Charts, and Replay. Users can now view historical performance via interactive line charts that support zooming and multiple ranking types (including non-vanilla options like Tiles Explored), and watch a turn-by-turn replay of the game on a minimap that respects exploration visibility. The screen also displays detailed demographic statistics (Best, Average, Worst) for major civilizations, with values frozen to turn-start snapshots for accuracy, and presents victory progress through illustrative animations and milestone tracking.
core/src/com/unciv/ui/screens/victoryscreen · high confidence
World screen top bar layout and stats display restructured
The World Screen top bar has been refactored to improve layout stability and information density. The stats row (gold, science, culture, faith, happiness) and resources row are now distinct components that scale to fit the available width. On narrow screens or portrait orientations, the floating civilization and overview buttons automatically shift below the stats and resources lines to prevent overlap, using filler cells to maintain the background shape. The resources row now displays strategic resource amounts with per-turn production indicators where applicable, and clicking the turns label opens the Maya Calendar or Victory Screen. The stats row provides more detailed context, such as turns to the next policy for culture and golden age status for happiness, and clicking stat icons opens the corresponding overview or picker screens.
core/src/com/unciv/ui/screens/worldscreen/topbar · high confidence
Test coverage
Added comprehensive unit tests for battle logic components; Added memory regression test for TileGroup allocations; Added tests for EventBus inheritance handling; Added tests for FasterUIDevelopment tool; Added tests for Natural Wonder generator terrain conversion; Added tests for city logic and conquest mechanics; Added tests for mod font scanning and native bitmap font mipmap handling; Added tests for movement history perspective and ranking type serialization; Added tests for movement history visibility and view purity rules; Added tests for settler escort automation logic; Added tests for victory availability rules and countable milestones; Added tests for worker automation logic; Added unit tests for Golden Age and Threat managers; Added unit tests for LineChart label generation; Added unit tests for city management logic; Added unit tests for civilization logic, diplomacy, and city connections; Added unit tests for diplomacy and gold gifting mechanics; Added unit tests for game logic components; Added unit tests for game logic filters; Expanded test coverage for map logic, pathfinding, and generation; Expanded test coverage for uniques, countables, and ruleset validation; New test infrastructure and helper utilities.
Dependencies
Build system migrated to Gradle Version Catalogs and upgraded to Kotlin 2.4.10 and AGP 9.2.0
The project's build configuration has been refactored to use Gradle Version Catalogs (defined in gradle/libs.versions.toml), centralizing dependency management across all modules. This change upgrades the Android Gradle Plugin to 9.2.0, Kotlin to 2.4.10, and LibGDX to 1.14.2, while also raising the Android target SDK to 36. The migration includes restructuring the build into distinct modules (core, desktop, android, server, tests) and updating the desktop and server packaging tasks to use packr for creating standalone executables.
(dependencies) · high confidence
Configurable texture packing settings for UI skins
The android/Images.Skin module now includes a TexturePacker.settings file that defines specific parameters for generating UI skin atlases. This configuration sets padding to 8 pixels, enables duplicate padding, limits atlas dimensions to 2048x2048, and uses linear filtering, allowing for more consistent and optimized rendering of skin assets.
android/Images.Skin · high confidence
Upgraded Gradle wrapper to version 9.4.1
The Gradle wrapper configuration has been updated to use Gradle distribution version 9.4.1. This change ensures that the build process utilizes this specific version of the Gradle build tool, replacing any previous version configured in the wrapper properties.
gradle · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 48 → 51 (+2.7)
- Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 83 → 78 (-4.8)
- Architecture 96 → 100 (+3.1)
- Maturity 74 → 87 (+13.7)
- Readiness 27 → 33 (+6.2)
- Security 53 → 48 (-5.0)
Resolved (420)
- All entries are feature/task tickets with no context/problem and no decision; the title is a placeholder ("Implement 'wait' command - by doublep") (fastlane/metadata/android/en-US/changelogs/716.txt)
- All four elements (context/problem, explicit decision, consequences/trade-offs, informative title) are absent; the entries are all patch notes with no narrative (fastlane/metadata/android/en-US/changelogs/903.txt)
- All four elements are present but the context/problem and consequences/trade-offs sections are missing; only a 'Fix:' line with no problem statement and no trade-off discussion appear in any visible text (fastlane/metadata/android/en-US/changelogs/908.txt)
- All four elements present but the context/problem and consequences/trade-offs are thin/omitted; only the decision list is visible (fastlane/metadata/android/en-US/changelogs/738.txt)
- All four entries are feature/behavior titles with no context/problem statement, no explicit decision, and no consequences/trade-offs; the visible text is a list of unqualified labels (fastlane/metadata/android/en-US/changelogs/1198.txt)
- All four entries are feature/bug fixes tagged to a modding author but the context/problem and consequences/trade-offs sections are missing (only titles appear) (fastlane/metadata/android/en-US/changelogs/1195.txt)
- All four entries are task tickets with no context/problem and no consequences; the title is a placeholder ("BaseUnit unique-finding always takes Type uniques into account") (fastlane/metadata/android/en-US/changelogs/894.txt)
- All three ADRs are single-paragraph decisions with no context/problem and no consequences; the title is uninformative (fastlane/metadata/android/en-US/changelogs/1151.txt)
- All three titles are placeholder stubs (Norwegian Ski Infantry, Mehal Sefari, Carolean) and the author names; no real subject or decision is visible (fastlane/metadata/android/en-US/changelogs/858.txt)
- Consequences/trade-offs are absent despite a strong context and decision list; the document does not address trade-offs such as mod-difficulty for non-players or how AI filters affect gameplay balance (fastlane/metadata/android/en-US/changelogs/928.txt)
- Consequences/trade-offs are absent despite a strong context and decision; the body is a list of bug fixes with no trade-off section (fastlane/metadata/android/en-US/changelogs/926.txt)
- Consequences/trade-offs are absent despite a strong decision (forbidding capital city indicators entirely) (fastlane/metadata/android/en-US/changelogs/998.txt)
- Consequences/trade-offs are absent despite the decision naming a real problem (fastlane/metadata/android/en-US/changelogs/910.txt)
- Consequences/trade-offs are not present in the visible text (fastlane/metadata/android/en-US/changelogs/1206.txt)
- Consequences/trade-offs are not present in the visible text (fastlane/metadata/android/en-US/changelogs/967.txt)
- Consequences/trade-offs are not present in the visible text (fastlane/metadata/android/en-US/changelogs/970.txt)
- Context/problem and consequences are absent; only a vague 'user option' title plus two unrelated patches (road priority rework, spectators seeing diplomacy screen) appear (fastlane/metadata/android/en-US/changelogs/959.txt)
- Context/problem and consequences are absent; only task lists (fix crash, add unique) appear (fastlane/metadata/android/en-US/changelogs/939.txt)
- Context/problem and consequences are absent; the body is a list of arbitrary game mechanics with no narrative framing (fastlane/metadata/android/en-US/changelogs/984.txt)
- Context/problem and consequences are absent; the body is a list of arbitrary items with no narrative ordering (e.g. 'Worker will now replace improvements...') (fastlane/metadata/android/en-US/changelogs/873.txt)
- …and 400 more
New (1027)
- AStarPathfinder.calculateNeighborNode (cognitive 22) (core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt)
- AStarPathfinder.calculateNeighborNode (cyclomatic 18) (core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt)
- AStarPathfinder.findDamageFreeAnchor (cognitive 16) (core/src/com/unciv/logic/map/pathingmap/PathingMapAStarPathfinder.kt)
- AirUnitAutomation.automateFighter (cognitive 17) (core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt)
- AirUnitAutomation.getNukeLocationValue (cognitive 46) (core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt)
- AirUnitAutomation.getNukeLocationValue (cyclomatic 23) (core/src/com/unciv/logic/automation/unit/AirUnitAutomation.kt)
- All four elements are present but the context/problem and consequences/trade-offs sections are missing from a list of only short, unstructured modding/fix notes (fastlane/metadata/android/en-US/changelogs/1195.txt)
- All four entries are feature/behavior titles with no context/problem statement, no explicit decision, and no consequences/trade-offs; the title alone gives no signal (fastlane/metadata/android/en-US/changelogs/1198.txt)
- All three ADRs are single-paragraph decisions with no context/problem and no consequences; the titles alone give no signal of intent (fastlane/metadata/android/en-US/changelogs/1151.txt)
- ApiV2.handleWebSocket (cognitive 38) (core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt)
- ApiV2.handleWebSocket (cyclomatic 21) (core/src/com/unciv/logic/multiplayer/apiv2/ApiV2.kt)
- ApiVersion.detect (cognitive 16) (core/src/com/unciv/logic/multiplayer/ApiVersion.kt)
- Automation.allowSpendingResource (cognitive 27) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.allowSpendingResource (cyclomatic 18) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.chooseMilitaryUnit (cognitive 24) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.chooseMilitaryUnit (cyclomatic 20) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.rankStatsForCityWork (cognitive 24) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.rankStatsForCityWork (cyclomatic 20) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.rankTileForExpansion (cognitive 26) (core/src/com/unciv/logic/automation/Automation.kt)
- Automation.rankTileForExpansion (cyclomatic 19) (core/src/com/unciv/logic/automation/Automation.kt)
- …and 1007 more
Changes since last survey
- 300 commits — 242 feature/other, 58 fixes
By area
- core/src — 241 commits
- android/assets — 30 commits
- (root) — 6 commits
- tests/src — 5 commits
- .github/workflows — 4 commits
- android/src — 3 commits
- buildSrc/src — 3 commits
- (repo) — 2 commits
- desktop/src — 2 commits
- android/AndroidManifest.xml — 1 commit
- docs/Credits.md — 1 commit
- extraImages/Icons — 1 commit
- fastlane/metadata — 1 commit
Notable commits
- fix: Attempt to fix broken Android CI
- fix: Attempt to solve #15434 - Apply "dispose screen after handling current events" fix across all screens
- fix: Fix "Connect road" with A-Star pathing enabled (#15466)
- fix: Fix Future Tech not counting for Contest Technologies quest (#15446)
- fix: Fix ImprovementPicker not offering Improvements needing a removal (#15445)
- fix: Fix WLTKD demand rewrite mid-celebration (#15400)
- fix: Fix city founding tile ranker "Oasis" test (#15264)
- fix: Fix crash on Options re-open with force-close, e.g. toggling "Enable out-of-game turn notifications" (#15455)
- fix: Fix defensive pact count motivation clamp (#15278)
- fix: Fix equalizeColumns for empty lower tables (#15494)
- fix: Fix forEachTriggeredUnique/forEachLocalTriggeredUnique and add BaseUnit.forEachMatchingUnique override (#15604)
- fix: Fix health of units recruited from encampments (#15580)
- fix: Fix improvement picker hiding researchable improvements and failing to hide others (#15188)
- fix: Fix map reveal in new games (#15415)
- fix: Fix mod fonts missing from Font family selection (#15613)
- fix: Fix movement history perspective (#15544)
- fix: Fix overflow in trade evaluation (#15537)
- fix: Fix packed images mixing filtermag settings since settings were shared between different threads
- fix: Fix possible crash when scrolling to the selected construction queue entry (#15570)
- fix: Fix ruleset validator tests
- …and 280 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
yairm210/Unciv was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 299bce2c60ba28b11ffc295545db4457adebc7c2 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-dd72cc24c749.