Feature Flags & Debug Flags
All flags are Charm atoms — they can be toggled at runtime via the debug UI.
Feature Flags
Defined in src/shared/feature-flags.ts. These control game systems:
| Flag | Default | Purpose |
|---|---|---|
DevelopmentMode | false | Enables dev spawn, sandbox mode |
SandboxMode | false | Free camera, debug tools (auto-enabled by DevelopmentMode) |
ChunksEnabled | true | Chunk generation system |
ChunksDebug | false | Chunk debug visualizations |
ConfinedChunksDebug | true | Thorned-ring rendering for confined chunks on the planner minimap |
ChunkUnloadingEnabled | true | Trailing chunk cleanup |
EnemySpawningEnabled | true | Natural enemy spawning (debug spawns unaffected) |
DevourEnabled | true | Devour enemy idle-spawn behavior |
PathMonsterChaseEnabled | true | PathMonster sweep cadence |
RavineEnabled | false | Boundary-loop ravine pits |
RocksEnabled | true | Flippable rock interactables |
ForceOpenInteractableSpawn | false | Debug: force every chunk to spawn Crate / FlippedTable |
LightingEnabled | true | Lighting system startup |
DayNightCycleEnabled | true | Progressive day/night based on chunk progression |
DecoreVisible | true | Decorative foliage rendering |
DebugModeEnabled | false | Unlocks mouse, enables debug UI (auto-enabled by SandboxMode) |
DevToolsEnabled | true | Dev testing tools in debug menu |
GamePhase | "game" (Studio) / "lobby" (live) | Current phase |
VFXEnabled | false | Visual effects |
SoundsEnabled | true | Audio |
ParticlesEnabled | false | Particle systems |
TreeSwayEnabled | true | Tree sway animation |
TreeKnockoverEnabled | true | Tree knockover physics |
FoliageSwayEnabled | true | Foliage sway animation |
WindLinesEnabled | true | Wind line VFX |
WispsEnabled | true | Wisp entities |
Phase 8 — Director Feedback Loops
The RunDirector accumulates runtime signals (deaths, chunk clears, low-health exits) in a FeedbackState and feeds them through flag-gated policies that adjust per-marker pressure. Both flags default OFF so the accumulator runs harmlessly during a bake window; flipping them on enables the actual pressure mutation.
| Flag | Default | Purpose |
|---|---|---|
FeedbackDeathEase | false | Enables DeathAwareEasingPolicy — eases pressure on the 3 markers following a player death (0.85 → 0.90 → 0.95 multiplier). |
FeedbackStreakPressure | false | Enables StreakPressurePolicy — adds a small pressure bump (up to ×1.10) after a 4+ marker clean clear streak. |
When both flags are off, RunDirector.getFeedbackPressureMultiplier() returns 1.0 so callers can read it unconditionally. See Director Feedback Loops for the full system.
Debug Flags
Defined in src/shared/debug-flags.ts. These gate log output:
| Flag | Default | Purpose |
|---|---|---|
ChunkLogs | false | Chunk generation logging |
LightingLogs | false | Day/night transition logging |
EnemyLogs | false | Enemy spawn/despawn logging |
FlowerTrapLogs | false | Flower trap behavior logging |
DangerZoneLogs | false | Danger zone creation logging |
QuirkymalLogs | false | Character system logging |
DeathLogs | false | Death/respawn logging |
WatcherLogs | false | Watcher boss logging |
SafeZoneLogs | false | Safe zone detection logging |
PathDebug | false | Path node debug visualization |
QueueDebug | false | Queue system logging |
ForestLogs | false | Client-side forest generation logging |
Usage Pattern
import debugFlags from "shared/debug-flags";
// Gate expensive logging behind flag check
if (debugFlags.EnemyLogs()) {
print(`[EnemyService] Spawned ${type} at ${position}`);
}
All flags are toggleable in the debug UI at runtime via renderFlagCheckbox() in debug-controller.ts.