How rageking8/planar-engine works
Main Components Identification
The system should be divided into these major components:
a) Engine Core (Runtime)
• Graphics System (OpenGL-based)
• Audio System (SoLoud-based)
• Input System (GLFW-based)
• Asset Management
• Scene Management
• Component System
• Math/Physics
b) Editor
• UI System (ImGui-based)
• Project Management
• Build System
• Script Management
• Asset Import/Export
• Scene Editor
c) Scripting Interface
• C# Runtime (.NET 8)
• Component Scripting
• Native Bindings
[Editor Layer]
• ↑↓
[Engine Core Layer]
• ↑↓
[Platform Layer (Windows)]
Component Relationships
Key relationships:
a) Editor → Engine Core
• Scene manipulation
• Asset management
• Component editing
• Runtime preview
b) Engine Core → Platform
• Graphics (OpenGL)
• Input (GLFW)
• File system
• Audio (SoLoud)
c) Scripting System → Engine Core
• Component behavior
• Game logic
• Event handling
Detailed Component Breakdown
For each major system, show:
a) Graphics Pipeline
• GLFW Window Management
• OpenGL Rendering
• Sprite Management
• Camera System
• UI Rendering (ImGui)
b) Asset System
• Asset Database
• Resource Loading
• Asset References
• Import/Export
c) Component Architecture
• Transform2D
• SpriteRenderer
• AudioSource
• Camera2D
• Script Components
• Custom Components
d) Editor Windows
• Scene View
• Game View
• Inspector
• Hierarchy
• Project Browser
• Console
Data Flow
Critical paths:
a) Asset Pipeline:
[Asset Files] → [Asset Import] → [Asset Database] → [Runtime Components]
b) Script Compilation:
[C# Scripts] → [.NET Compiler] → [Script Assembly] → [Runtime Binding]
c) Scene Management:
[Scene Editor] → [Scene Serialization] → [Runtime Scene] → [GameObject Hierarchy]
Integration Points
Integration with:
• OpenGL (via GLAD)
• GLFW
• ImGui
• SoLoud
• .NET Runtime
• YAML (for serialization)
• Native File Dialog
Remember to emphasize the modular nature of the engine, showing how components can be extended or replaced while maintaining the core architecture.
This structure reflects the engine's focus on 2D game development with a robust editor toolset and scripting capabilities, while maintaining clear separation between editor and runtime components.