From defc1cb7956b6c1f4bfad7e8bbcc6c75c4081097 Mon Sep 17 00:00:00 2001 From: CatChow0 Date: Sat, 6 Sep 2025 18:59:42 +0200 Subject: [PATCH] Minor - Implements scene saving and loading - V12.10.0 Adds scene saving and loading functionality, using a component factory for dynamic component creation and serialization. This allows users to save and load the state of entities, including their components and textures. A new component factory is introduced to register and create different component types. Each component implements serialization and deserialization methods, which are used to store and restore the component's state. A new .ker scene file format is introduced to serialize entity data and to load it back into memory to restore the scene. Also adds a DemoScene_V12.9.0.ker file to showcase the engine. --- .../.idea/workspace.xml | 16 +- enginecustom/DemoScene_V12.9.0.ker | 8 + enginecustom/enginecustom.vcxproj | 1 + enginecustom/imgui.ini | 14 +- .../src/inc/system/ecs/ComponentFactory.h | 54 ++ .../ecs/components/identity_component.h | 53 +- .../ecs/components/model_path_component.h | 31 + .../system/ecs/components/physics_component.h | 38 ++ .../system/ecs/components/render_component.h | 22 + .../system/ecs/components/shader_component.h | 22 + .../ecs/components/transform_component.h | 44 ++ enginecustom/src/inc/system/scene_manager.h | 7 + enginecustom/src/src/system/scene_manager.cpp | 582 ++++++++---------- 13 files changed, 518 insertions(+), 374 deletions(-) create mode 100644 enginecustom/DemoScene_V12.9.0.ker create mode 100644 enginecustom/src/inc/system/ecs/ComponentFactory.h diff --git a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml index 6cf7b6f..c97c5e2 100644 --- a/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml +++ b/.idea/.idea.KhaoticEngineReborn/.idea/workspace.xml @@ -5,11 +5,17 @@ + + - - + + + + + + + + @@ -241,6 +249,10 @@ + + + +