Skip to content

Architecture & Data Flow

FatherNoTimeGames edited this page Oct 9, 2026 · 1 revision

Architecture & Data Flow

The game will use a modular, data-driven architecture. Data, logic, and presentation are kept separate so that systems can be authored in the editor and reused across procedural generation.

1. Data Layer

Almost every game object will be represented by a Godot Resource.

Expected core Resource types include:

  • ItemData
  • EquipmentData
  • WeaponData
  • SkillData
  • ActionData
  • BuffData
  • DisciplineData
  • AbilityData
  • CharacterData
  • CharacterGenerationData
  • GlobalLevelData
  • StatGrowthData
  • StatSet
  • WeaponScalingData
  • EnemyData
  • EnemyVisualPoolData
  • EncounterData
  • MissionStructureData
  • LootTableData
  • AffixData
  • BattleSummaryData
  • BattleCameraPresetData
  • ProficiencyGainEvent

Important clarified types

WeaponData

Extends equipment data and defines:

  • Weapon type.
  • Base damage.
  • Primary scaling stat.
  • Secondary scaling stat.
  • Primary scaling weight.
  • Secondary scaling weight.
  • Special behavior tags.

MissionStructureData

Defines a mission:

  • Total encounters.
  • Boss positions.
  • Safe room positions.
  • Difficulty curve.
  • Loot rules.
  • Shop rules.
  • Failure/checkpoint rules.

BattleSummaryData

Defines what appears after an encounter:

  • Items obtained.
  • Global XP gained.
  • Discipline XP gained.
  • Global level-ups.
  • Discipline level-ups.
  • Skill points gained.
  • Possibly special unlocks.

2. Logic Layer

Key systems:

  • TurnManager
    Owns combat state, turn queue, timeline updates, action execution, and turn signals.
    For the prototype, this should be a dedicated node inside the battle scene.

  • MissionManager
    Tracks the active mission, encounter index, safe room states, boss states, and mission completion.

  • CheckpointSystem
    Takes snapshots of party state upon entering a Safe Room or starting a mission.
    Restores party state, including consumables, when the party wipes.

  • HubManager
    Handles the meta-area between missions.

  • RunManager
    Tracks broader run persistence, party state, and failure/retry flow.

  • EncounterGenerator
    Produces an encounter from procedural rules and current difficulty.

  • LootGenerator
    Generates loot drops, shop stock, and crafted outputs using loot tables and affix rules.

  • ProgressionSystem
    Tracks discipline proficiency, discipline levels, unlocked abilities, generic skill points, and purchased abilities.

  • GlobalLevelSystem
    Tracks global XP, global levels, and stat growth application.

  • StatSystem
    Calculates final stats from base values, equipment, buffs, abilities, global level growth, and procedural scaling.

  • WeaponDamageCalculator
    Applies weapon scaling splits to compute physical or hybrid damage.

  • PartyGenerator
    Future system for generating random starting characters, their base stats, and their starting equipment.

  • EquipmentVisualizer
    Updates visible character meshes and bone attachments when equipment changes.

  • BattleSummaryBuilder
    Collects encounter results and creates the summary screen data.

  • CameraDirector
    Handles battle camera presets and transitions.

  • BattleInputController
    Prototype-scoped input handler for battle commands and target selection.
    Later, global input management may become an autoload or broader manager.

3. Presentation Layer

Major presentation areas:

  • Battle scene with party and enemy 3D models.
  • Combat UI: timeline, action menu, target selection, health/mana bars, buffs/debuffs.
  • Battle summary screen.
  • Safe room UI overlay.
  • Hub UI.
  • Visual effects, hit reactions, and animation states.
  • Character preview in menus, if supported.
  • Responsive UI layouts for portrait and landscape.

4. Communication Strategy

Systems should communicate through explicit method calls and signals.

Examples:

  • TurnManager emits when a combatant’s turn begins.
  • TurnManager emits when the timeline changes.
  • TurnManager emits when an extra turn is granted.
  • ActionData effects emit when damage, healing, or status application occurs.
  • ProgressionSystem emits when a discipline level changes.
  • GlobalLevelSystem emits when a global level is gained.
  • BattleSummaryBuilder listens for encounter-end events.
  • CheckpointSystem listens for safe-room entry and mission start.
  • EquipmentVisualizer listens for inventory/equipment changes.
  • BattleInputController listens for input actions and routes them to active UI mode.

Related pages:

Clone this wiki locally