How theshaggydev/unto-deepest-depths-prototype works
Project type and purpose
• This is a Godot 4 prototype for a turn-based tactical game (“Unto Deepest Depths Prototype”).
• It demonstrates the core game loop, battle scenes, unit composition, map handling, and global services (event bus, navigation).
File structure
• Top level: project.godot (main Godot project), README, license, .gitignore.
• src/
• battle/: battle scene (battle.tscn + battle.gd) and units sub-nodes
• global/: singleton-style scripts (config.gd, event_bus.gd, navigation.gd)
• maps/: tilesets (.tres), highlight scene, test map
• unit/: unit scene (unit.tscn + unit.gd), art (spriteframes), definitions (.tres + unit_definition.gd), components (health bar), type_components (per-class ability generators), action_collection/definition
README
• Confirms this is an early learning example of how to structure a turn-based game in GDScript.
a. Main components
• Godot 4 Engine (runtime host)
• Scenes & Node Hierarchies
– BattleScene (BattleManager + UnitContainer + MapContainer)
– UnitScene (Unit node + Components + Sprite)
– HighlightScene (visual feedback)
• Global Services (singletons)
– EventBus (pub/sub for turn events, actions)
– Navigation (grid graph, pathfinding)
– Config (game settings, constants)
• Data Assets
– .tres resources (unit definitions, abilities DB, tilesets, spriteframes)
• Type-specific Components
– MageAttackGenerator, etc., attached under unit nodes
b. Relationships and interactions
• BattleManager loads MapContainer and spawns UnitScenes based on unit_definition resources.
• On each turn, BattleManager emits events via EventBus (“unit_selected”, “action_performed”).
• UnitScene scripts subscribe to EventBus, query their ActionCollection/Definition to execute abilities.
• Navigation singleton calculates paths for movement on Map grid.
• HighlightScene listens to EventBus for “tile_hover”/“move_range” and renders overlays.
c. Architectural patterns & principles
• Node-scene composition (Godot’s scene graph) as a form of ECS: each unit is a root node with child “component” nodes.
• EventBus for decoupled messaging between controllers, view (scenes), and model (definitions).
• Resource-driven definitions (separate data .tres assets from logic scripts).
d. Key technologies, frameworks & libraries
• Godot 4 engine, GDScript
• .tscn scene files and node hierarchies
• .tres resource files for data assets
• Godot’s built-in navigation API (or custom grid nav in navigation.gd)