7
submitted 2 weeks ago* (last edited 2 weeks ago) by Whappens@lemmy.world to c/godot@programming.dev

Archived footage of star system view before the global refactoring.

How global singletons were killed, async race conditions resolved, and the door for custom player modifications opened

โŒ The Problem

  • Development stagnation: Monolithic generation and logic controller bottlenecked project progress.
  • High risks: Minor changes threatened to break completely unrelated systems.
  • Cascading failures: Removing the legacy global singleton caused endless compilation errors.
  • Pointer errors: Instantiating subsystems before scene tree attachment broke configuration loading ($NullPointer$).

๐Ÿ”„ The Struggle

  • Dead-end refactoring: Trimming the singleton without changing architecture immediately broke builds.
  • Rigid hardcoding: Directory paths only functioned within one strictly defined file structure.
  • Modding unviability: Static paths completely prevented players from installing custom user mods.

The Solution

  • Separation of concerns: Monolith split into independent submodules via Single Responsibility Principle.
  • Dependency injection: Global singletons replaced with explicit, controlled dependency passing.
  • Asynchronous readiness: Added scene tree checks before generation, eliminating race conditions.
  • Dynamic discovery: Engine now automatically locates resources regardless of folder structure.
  • Language migration: Rewrote code from GDScript to C# for efficient modular development.
no comments (yet)
sorted by: hot top new old
there doesn't seem to be anything here
this post was submitted on 27 Jul 2026
7 points (100.0% liked)

Godot

7826 readers
28 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

!roguelikedev@programming.dev

Credits

founded 3 years ago
MODERATORS