Loop
Loop
The session is a stack of scopes. Each scope runs until it returns, then the parent decides what comes next.
What the player can do
SlumberState starts the app scope. SessionState shows the title and, after a profile is chosen, builds a Player scope and runs PlayerState. PlayerState is the level-select hub: play a level, open inventory, or leave back to the title. Playing a level builds a Level scope and runs LevelState. LevelState resolves the loadout, builds a Gameplay scope, and runs GameplayState until that life ends.
What ends it
GameplayState writes a GameSessionResult and returns. LevelState then ends the life on IQuestService, may show the quest reward, and on a scored death shows the leaderboard. Restart from the leaderboard runs another gameplay scope in the same level. Co-op end skips the leaderboard and returns toward the lobby. Leaving level select returns to the title. Activating Quit on the title exits the game process and returns a Steam-launched player to the Steam client.
What is saved
The loop itself stores nothing. Profile, inventory, quest lifetime, and submitted scores are written by the chapters below. A match seed and a seat kit exist only for that co-op run.
Numbers
Generated snapshot
Loop
Generated from the Unity project. Do not edit this file. Regenerate: Deep Forest Labs → Slumber → Wiki → Write snapshots, or call WikiSnapshot.WriteAll().
Owns
States
DebugGameplayState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/DebugGameplayState.csGameplayState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/GameplayState.csLevelState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/LevelState.csPlayerState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/PlayerState.csSessionState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/SessionState.csSlumberState(DeepForestLabs.Slumber.States) —Assets/Scripts/States/SlumberState.cs
Service interfaces
IGameplayServicesTick(DeepForestLabs.Slumber.States) —Assets/Scripts/States/IGameplayServicesTick.cs
Factories
_None._
Config types
_None._
Enums
_None._
Assets
_None._
Wired in
Assets/Scripts/AppContainerFactory.csmentionsSlumberStateAssets/Scripts/Factories/GameplayContainerFactory.csmentionsDebugGameplayStateAssets/Scripts/Factories/GameplayContainerFactory.csmentionsGameplayStateAssets/Scripts/Factories/GameplayContainerFactory.csmentionsIGameplayServicesTickAssets/Scripts/Factories/LevelContainerFactory.csmentionsLevelStateAssets/Scripts/Factories/PlayerContainerFactory.csmentionsPlayerStateAssets/Scripts/Factories/PlayerContainerFactory.csmentionsSessionStateAssets/Scripts/Factories/SessionContainerFactory.csmentionsSessionState