Summary
Level 0 stairs to the Poolrooms (lobby_to_poolrooms_stairs) currently spawn in every origin chunk (0, 0) with 100% probability. This was left in place for debugging and playtesting during Level 1 development, but it is not the intended long-term behavior. Players should have to explore and build up some corruption before the route to Level 1 appears.
Current Behavior
Level0Generator._place_poolrooms_stairs unconditionally places stairs in chunk (0, 0)
- A TODO comment in
scripts/procedural/level_0_generator.gd acknowledges this: "Currently forced in origin chunk for debugging. Should scale spawn probability with corruption"
Proposed Behavior
- Stairs to Level 1 should be rare at low corruption and become more likely as corruption increases
- The spawn probability should be tunable per level config
- Tutorial stairs (
tutorial_to_lobby_stairs) should remain guaranteed — the tutorial must always have an exit
- Level 1 return stairs (
poolrooms_to_lobby_stairs) should remain guaranteed in chunk (0, 0) — you always need a way back
- This design should work alongside future two-way persistent stairwells (see issue 78)
Acceptance Criteria
Related Issues
Context
- PR 75 introduced the explicit stair routing system and the
lobby_to_poolrooms_stairs entity
ChunkManager tracks corruption per level via corruption_tracker
- Level configs already define
corruption_per_chunk for each level
Technical Notes
ChunkManager._check_player_chunk_change increases corruption when entering a new chunk
ChunkManager.get_corruption(level_id) returns the current corruption value
- The generator has access to
world_seed for deterministic RNG
- Consider adding a
stair_spawn_probability or exit_rarity field to LevelConfig or ProceduralLevelConfig
Summary
Level 0 stairs to the Poolrooms (
lobby_to_poolrooms_stairs) currently spawn in every origin chunk (0, 0) with 100% probability. This was left in place for debugging and playtesting during Level 1 development, but it is not the intended long-term behavior. Players should have to explore and build up some corruption before the route to Level 1 appears.Current Behavior
Level0Generator._place_poolrooms_stairsunconditionally places stairs in chunk(0, 0)scripts/procedural/level_0_generator.gdacknowledges this: "Currently forced in origin chunk for debugging. Should scale spawn probability with corruption"Proposed Behavior
tutorial_to_lobby_stairs) should remain guaranteed — the tutorial must always have an exitpoolrooms_to_lobby_stairs) should remain guaranteed in chunk(0, 0)— you always need a way backAcceptance Criteria
Level0Generatorno longer unconditionally placeslobby_to_poolrooms_stairsin every origin chunklevel_0_config.stair_spawn_probabilityor similar)base_probability + corruption * scaling_factor, clamped to a maxRelated Issues
Context
lobby_to_poolrooms_stairsentityChunkManagertracks corruption per level viacorruption_trackercorruption_per_chunkfor each levelTechnical Notes
ChunkManager._check_player_chunk_changeincreases corruption when entering a new chunkChunkManager.get_corruption(level_id)returns the current corruption valueworld_seedfor deterministic RNGstair_spawn_probabilityorexit_rarityfield toLevelConfigorProceduralLevelConfig