Application Overview
Astra starts here. The Application module is the central singleton that manages the main loop and ensures subsystems like the Window and Engine are ready before the first frame runs.
Architecture
Initialization Sequence
The Application follows a strict boot order to satisfy module dependencies:
- Project Loading - Load configuration and resource paths.
- Window Creation - Establish the rendering context.
- Engine Initialization - Set up the ECS and core systems.
- Subsystem Initialization - Renderer, Physics, and Editor in order.
- System Registration - Register game-specific logic.
- Main Loop Start - Begin frame processing.
Main Loop
The application drives the game loop with precise timing:
Key Responsibilities
- Lifecycle Management - Initialize, run, and shutdown all modules
- Frame Timing - Provide consistent delta time across systems
- Event Distribution - Route window and input events
- Module Coordination - Ensure proper update order
- Global Access - Singleton instance available throughout codebase
Usage
Access the singleton instance from anywhere in the codebase:
cpp
Application& app = Application::get();The module handles lifecycle management, frame timing, and event distribution across all systems. For implementation details, see Application.