How andreivasiliu/cybersub works
Main Components
A. Core Game Engine Layer
• Macroquad Framework Integration
• Game Loop Controller
• Resource Management System
B. Rendering System
• Shader Pipeline (multiple .glsl files indicate sophisticated rendering)
• UI System (ui.rs)
C. Game State Management
• Physics Engine (water.rs, collisions.rs)
• Object Management (objects.rs)
• State Controller (state.rs)
• Input Handler (input.rs)
D. Platform-Specific Components
• WASM Build Pipeline
• Native Desktop Build Pipeline
• Client-Server Architecture (client.rs, server.rs)
[Platform Layer (Web/Desktop)]
• ↕
[Core Engine Layer]
• ↕
[Game Systems Layer]
• ↕
[Resource Layer]
Key Relationships to Highlight
• Data flow between game_state components
• Shader pipeline's interaction with the rendering system
• Demonstrate the platform-specific compilation targets
• Resource loading and management paths
Component Relationships
[Input Handler] → [Game State] → [Physics Engine]
• ↕
[Resource Manager] ← [Renderer] → [Shader Pipeline]
Technical Details
• Macroquad as the primary framework
• WASM/JavaScript bridge for web deployment
• WebGL shader implementation
• Grid-based water simulation system