GameState.run_seed defaults to 123, silently producing identical worlds #1

Closed
opened 2026-08-15 11:36:18 +01:00 by liamjd · 0 comments
Owner

scripts/GameState.gd declares:

var run_seed: int = 123

Nothing writes to it yet, so any code that reads GameState.run_seed gets 123 and generates an identical world every run, with no indication that the seed was never set.

The whole terrain and threat-cycle design rests on seeded determinism, so an unset seed silently masquerading as a valid one is the worst failure mode here — it looks like it works.

Make the unset state either loud or honest:

  • default to 0 and treat that as "not set" (assert or warn at the point of use), or
  • have GameState randomise in _ready(), so an unset seed is at least genuinely random rather than a fixed constant.

Blocks meaningful testing of world generation.

`scripts/GameState.gd` declares: ```gdscript var run_seed: int = 123 ``` Nothing writes to it yet, so any code that reads `GameState.run_seed` gets `123` and generates an identical world every run, with no indication that the seed was never set. The whole terrain and threat-cycle design rests on seeded determinism, so an unset seed silently masquerading as a valid one is the worst failure mode here — it looks like it works. Make the unset state either loud or honest: - default to `0` and treat that as "not set" (assert or warn at the point of use), or - have `GameState` randomise in `_ready()`, so an unset seed is at least genuinely random rather than a fixed constant. Blocks meaningful testing of world generation.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
liamjd/UntitledColonyBuilder#1
No description provided.