An overview of a Sonolus level's lifecycle.
Preparation runs once and only once before the start of a level, and prepares the level for gameplay. Subsequent restarts of the level will not run preparation again.
Preparation consists of preprocessing system, spawn ordering system, and optimization system.
Preprocessing system is responsible for setting up or modifying blocks to be used throughout the gameplay.
Optimization system is responsible for optimizing nodes to improve code performance.
Spawn Ordering System
Spawn ordering system is responsible for calculating the spawn order of each entities and order them into spawn queue.
Update cycle runs continuously every frame during the gameplay.
Update cycle consists of spawning system, initialization system, sequential update system, input system, parallel update system, despawning system, and presentation system.
Spawning system is responsible for spawning entities that are ready.
Initialization system is responsible for initializing newly spawned entities.
Sequential Update System
Sequential update system is responsible for updating active entities sequentially.
Input system is responsible for processing user inputs for active entities.
Parallel Update System
Parallel update system is responsible for updating active entities in parallel.
Despawning system is responsible for despawning to be despawned entities.
Presentation system is responsible for presenting skin sprites, effect clips, and particle effects.