Due to its current age as a Confoederatio project, Naissance is in a mildly severe need of a concurrent refactor as of 16 May 2025, and the following plan has been put forwards to help deal with its technical debt through to August.
The overall file structure for Naissance should be merged to be similar to a Paradox-style grand-strategy game which modders and mappers can quickly get acquainted and familiar with to ease migration cost. Remember also that we should rely less on state variables in the future, with a migration towards a global style functional structure.
- We should have a FileManager that imports files and directories in a specific order, akin to what there is for config to reduce overhead and unnecessary imports. This way, files would be fully dynamic.
- Refactor file structure:
- ./config/ should be refactored into ./common/, mainly home to various non-UI scripting files.
- ./core/ should contain the main game engine. We are currently suffering from file overload, and so it should be sorted into the following modules.
- Files should be flattened per class, with underscores denoting namespace. These classes should be as follows:
- Brush
- Entities
- Lines
- Parsing
- Points
- Polygons (rename Polity to Polygon)
- TileLayers
- ./interfaces/ should contain both config interfaces as well as genuine UI code. This would be accomplished by cramming as many APIs into a single context menu object as possible outside of barebones HTML/CSS layout.
- Only five namespaces should be made available: topbar, leftbar, rightbar, bottombar, map.
- Config-only files would be laid out with the suffix
_config.js
.
- They would otherwise end with
_ui.js
.
- ./UF/ should remain where it is as a surface-level directory.