|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | + # ✅ Engine MVP Design Document (v0.1.0) |
| 4 | + |
| 5 | +</div> |
| 6 | + |
| 7 | +## ⚙️ Engine |
| 8 | + |
| 9 | +- **OS:** Windows 10+ |
| 10 | +- **Framework:** .NET 9.0+ |
| 11 | + |
| 12 | +### 🧱 Architecture |
| 13 | + |
| 14 | +- Clean/onion-based architecture with clear separation between core logic and platform-specific layers. |
| 15 | +- Modular package structure optimized for testability and maintainability. |
| 16 | +- Visual Studio templates included to streamline project creation and setup. |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## ✨ Core Engine Features |
| 21 | + |
| 22 | +## 🖼️ Rendering |
| 23 | + |
| 24 | +### 🎨 Rendering Pipeline |
| 25 | + |
| 26 | +- Abstracted rendering system using **OpenGL 4.6** backend |
| 27 | +- Forward rendering pipeline for direct and efficient lighting |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +### 🧩 Geometry and Models |
| 32 | + |
| 33 | +- **Mesh Rendering** for 3D geometry |
| 34 | +- **Model Loading** using **Assimp** for importing complex models |
| 35 | +- **2D Sprite Batching** to optimize multiple sprite draws into single calls |
| 36 | + |
| 37 | +--- |
| 38 | + |
| 39 | +### 🎥 Camera and View |
| 40 | + |
| 41 | +- **Camera System** for scene viewing and transformation |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +### 🧱 Material and Shading |
| 46 | + |
| 47 | +- **Material System** supporting: |
| 48 | + - Diffuse mapping |
| 49 | + - Specular mapping |
| 50 | + - Normal mapping |
| 51 | + - Emissive mapping |
| 52 | + - Parallax mapping |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +### 💡 Lighting |
| 57 | + |
| 58 | +- **Lighting System** implementing: |
| 59 | + - Blinn-Phong lighting model for realistic shading |
| 60 | +- **Light Sources**: |
| 61 | + - Directional lights |
| 62 | + - Point lights |
| 63 | + - Spot lights |
| 64 | +- **Global Illumination** via ambient lighting to simulate indirect light |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +### ✨ Visual Effects |
| 69 | + |
| 70 | +- **Skyboxes** for immersive environmental backgrounds |
| 71 | +- **Blending** support for transparency and visual composition effects |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | +### 🖌️ Post-Processing |
| 76 | + |
| 77 | +- **Post-Processing Framework** including: |
| 78 | + - Gamma correction for accurate color output |
| 79 | + - High Dynamic Range (HDR) rendering for improved lighting realism |
| 80 | + - Anti-aliasing to reduce jagged edges |
| 81 | + - Fog effects: |
| 82 | + - Linear fog |
| 83 | + - Exponential fog |
| 84 | + - Exponential squared fog |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +### 🎮 Input |
| 89 | + |
| 90 | +- Keyboard and mouse input with: |
| 91 | + - Event-based device layer |
| 92 | + - Polling-based high-level layer |
| 93 | +- Input mapping system with simple action bindings: |
| 94 | + - Bind named actions to keys or buttons (e.g., `"Attack"` → `Space`, `A`, `MouseLeft`) |
| 95 | + |
| 96 | +### 🔊 Audio |
| 97 | + |
| 98 | +- Core audio abstraction with: |
| 99 | + - Play, stop, pause, volume, and loop control |
| 100 | + - Positional audio (2D simulation via stereo panning and distance attenuation) |
| 101 | +- Global/master volume control |
| 102 | + |
| 103 | +### 🧠 Entity Component System (ECS) |
| 104 | + |
| 105 | +- Custom ECS architecture with: |
| 106 | + - Support for user-defined components and systems |
| 107 | + - Event hooking: |
| 108 | + - `Initialize`, `LoadContent`, `Update`, `Render`, `UnloadContent` |
| 109 | + - Includes custom event firing |
| 110 | +- Built-in systems: |
| 111 | + - Sprite rendering |
| 112 | + - Text/GUI rendering |
| 113 | + - Audio emitters and listeners |
| 114 | + - Orthographic camera rendering |
| 115 | + - WASD camera movement |
| 116 | + |
| 117 | +### 🌍 Screen Management |
| 118 | + |
| 119 | +- Scene-based structure with: |
| 120 | + - Scene loading and unloading |
| 121 | + - Support for switching between scenes |
| 122 | + - Each scene maintains its own local resource manager |
| 123 | + |
| 124 | +### 📚 Resource Management |
| 125 | + |
| 126 | +- Dual-scope resource handling: |
| 127 | + - Global and screen-specific resource managers |
| 128 | +- Reference-counting system to manage lifetime and unloading |
| 129 | +- Loader registration system to support multiple resource formats |
| 130 | + |
| 131 | +### 🖋️ GUI System |
| 132 | + |
| 133 | +- Basic text-based rendering for GUI |
| 134 | +- Features include: |
| 135 | + - Font scaling |
| 136 | + - Text alignment |
| 137 | + - Color customization |
| 138 | +- No interactive components (e.g., buttons, sliders) in MVP |
| 139 | + |
| 140 | +### 🎞️ Animation |
| 141 | + |
| 142 | +- Sprite sheet animation support |
| 143 | + - Adjustable frame speed per animation |
| 144 | +- Integration with ECS (e.g., animated sprite components) |
| 145 | + |
| 146 | +### ➗ Math Utilities |
| 147 | + |
| 148 | +- Uses `System.Numerics` for vector and matrix manipulation. |
| 149 | +- Included `MathHelper` for common operations. |
| 150 | + |
| 151 | +--- |
| 152 | + |
| 153 | +## 🌐 System Features |
| 154 | + |
| 155 | +### 🪟 Windowing |
| 156 | + |
| 157 | +- Abstracted window system |
| 158 | +- Support for: |
| 159 | + - Windowed and fullscreen modes |
| 160 | + - Title, size, visibility, and window state management |
| 161 | + |
| 162 | +### 🧾 Configuration |
| 163 | + |
| 164 | +- Environment-based configuration system |
| 165 | + - Supports standard `appsettings.{Environment}.json` pattern |
| 166 | + - Engine auto-detects and applies correct environment settings |
| 167 | + |
| 168 | +### 🪵 Logging |
| 169 | + |
| 170 | +- Built-in structured logging system using `Microsoft.Extensions.Logging` |
| 171 | + - Integration with application-level configuration |
| 172 | + - Logging levels configurable per category |
| 173 | + |
| 174 | +### ⚠️ Error Handling |
| 175 | + |
| 176 | +- Localized exception handling within individual engine systems |
| 177 | +- No global error handler or crash recovery in MVP |
| 178 | + |
| 179 | +--- |
| 180 | + |
| 181 | +## 📦 Supported File Formats |
| 182 | + |
| 183 | +- **Texture/Image Formats:** |
| 184 | + - Bmp |
| 185 | + - Gif |
| 186 | + - Jpeg |
| 187 | + - Pbm |
| 188 | + - Png |
| 189 | + - Tiff |
| 190 | + - Tga |
| 191 | + - WebP |
| 192 | + - Qoi |
| 193 | + |
| 194 | +- **Audio Formats:** |
| 195 | + - .Ogg |
| 196 | + - .Mp3 |
| 197 | + |
| 198 | +--- |
| 199 | + |
| 200 | +<div align="center"> |
| 201 | + |
| 202 | + # ✅ Editor MVP Design Document (v0.1.0) |
| 203 | + |
| 204 | +</div> |
| 205 | + |
| 206 | +## 🎯 Target Platform |
| 207 | + |
| 208 | +- **OS:** Windows 10+ |
| 209 | +- **Framework:** .NET 9.0+ |
| 210 | + |
| 211 | +### 🧱 Architecture |
| 212 | + |
| 213 | +- MVVM-based **Windows Forms** application |
| 214 | +- Modular layout with docking/resizable panels |
| 215 | + |
| 216 | +--- |
| 217 | + |
| 218 | +## ✨ Core Editor Features |
| 219 | + |
| 220 | +### 🧩 Scene Hierarchy |
| 221 | + |
| 222 | +- Entity listing with **no** parent-child structure |
| 223 | +- Simple right-click actions (rename, delete) |
| 224 | + |
| 225 | +### 🧱 Entity & Component Editing |
| 226 | + |
| 227 | +- Add/edit/remove components from entities |
| 228 | +- Create/rename/delete entities |
| 229 | +- Modify translation, rotation and scale via gizmos. |
| 230 | +- Supports editing common types: |
| 231 | + - Integers, strings, booleans, tec |
| 232 | + - Vectors |
| 233 | + - Enumerations |
| 234 | + - Colors |
| 235 | + |
| 236 | +### 📁 Resource Management |
| 237 | + |
| 238 | +- Displays all project resources (textures, fonts, audio) |
| 239 | +- Assign resources to components via drag-and-drop |
| 240 | +- Uses shared `IResourceManager` |
| 241 | +- Synchronous loading and display |
| 242 | +- Supported asset previews (e.g., texture thumbnails) |
| 243 | + |
| 244 | +### 🪵 Logging & Console |
| 245 | + |
| 246 | +- Displays logs from runtime and editor |
| 247 | +- Filter by severity (info, warning, error) |
| 248 | +- Scrollable with auto-scroll toggle |
| 249 | + |
| 250 | +### ⚙️ ECS Management |
| 251 | + |
| 252 | +- ECS system listing |
| 253 | +- On/off toggle for built-in systems |
| 254 | +- Modification of system properties |
| 255 | + |
| 256 | +### ↩️ Undo/Redo |
| 257 | + |
| 258 | +- Basic command pattern with undo stack |
| 259 | +- Linear undo/redo (Ctrl+Z / Ctrl+Y) |
0 commit comments