Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/serialization rewrite #387

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,932 changes: 0 additions & 1,932 deletions applications/sandbox/assets/scenes/Scene Test.cornflake

This file was deleted.

1,779 changes: 0 additions & 1,779 deletions applications/sandbox/assets/scenes/Scene.cornflake

This file was deleted.

Binary file added applications/sandbox/assets/scenes/scene1.bson
Binary file not shown.
96 changes: 96 additions & 0 deletions applications/sandbox/assets/scenes/scene1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"scene": {
"type_name": "legion::core::ecs::entity_data",
"name": "Root",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "7",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "8",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 0
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "9",
"active": true,
"children": [],
"components": []
}
],
"components": []
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "10",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "11",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 1
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "12",
"active": true,
"children": [],
"components": []
}
],
"components": []
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "13",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "14",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 2
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "15",
"active": true,
"children": [],
"components": []
}
],
"components": []
}
],
"components": [
{
"type_name": "example_comp",
"value": 1
}
]
}
}
71 changes: 71 additions & 0 deletions applications/sandbox/assets/scenes/scene1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
scene:
type_name: legion::core::ecs::entity_data
name: Root
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 7
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 8
active: true
children:
[]
components:
- type_name: example_comp
value: 0
- type_name: legion::core::ecs::entity_data
name: 9
active: true
children:
[]
components:
[]
components:
[]
- type_name: legion::core::ecs::entity_data
name: 10
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 11
active: true
children:
[]
components:
- type_name: example_comp
value: 1
- type_name: legion::core::ecs::entity_data
name: 12
active: true
children:
[]
components:
[]
components:
[]
- type_name: legion::core::ecs::entity_data
name: 13
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 14
active: true
children:
[]
components:
- type_name: example_comp
value: 2
- type_name: legion::core::ecs::entity_data
name: 15
active: true
children:
[]
components:
[]
components:
[]
components:
- type_name: example_comp
value: 1
Binary file added applications/sandbox/assets/scenes/scene2.bson
Binary file not shown.
96 changes: 96 additions & 0 deletions applications/sandbox/assets/scenes/scene2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"scene": {
"type_name": "legion::core::ecs::entity_data",
"name": "Root",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "7",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "8",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 0
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "9",
"active": true,
"children": [],
"components": []
}
],
"components": []
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "10",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "11",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 1
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "12",
"active": true,
"children": [],
"components": []
}
],
"components": []
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "13",
"active": true,
"children": [
{
"type_name": "legion::core::ecs::entity_data",
"name": "14",
"active": true,
"children": [],
"components": [
{
"type_name": "example_comp",
"value": 2
}
]
},
{
"type_name": "legion::core::ecs::entity_data",
"name": "15",
"active": true,
"children": [],
"components": []
}
],
"components": []
}
],
"components": [
{
"type_name": "example_comp",
"value": 1
}
]
}
}
71 changes: 71 additions & 0 deletions applications/sandbox/assets/scenes/scene2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
scene:
type_name: legion::core::ecs::entity_data
name: Root
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 7
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 8
active: true
children:
[]
components:
- type_name: example_comp
value: 0
- type_name: legion::core::ecs::entity_data
name: 9
active: true
children:
[]
components:
[]
components:
[]
- type_name: legion::core::ecs::entity_data
name: 10
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 11
active: true
children:
[]
components:
- type_name: example_comp
value: 1
- type_name: legion::core::ecs::entity_data
name: 12
active: true
children:
[]
components:
[]
components:
[]
- type_name: legion::core::ecs::entity_data
name: 13
active: true
children:
- type_name: legion::core::ecs::entity_data
name: 14
active: true
children:
[]
components:
- type_name: example_comp
value: 2
- type_name: legion::core::ecs::entity_data
name: 15
active: true
children:
[]
components:
[]
components:
[]
components:
- type_name: example_comp
value: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"":{"name":"World","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"Skybox","alive":true,"active":true,"children":[],"components":[{"legion::core::scale":{"x":1.0,"y":1.0,"z":1.0}},{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"Ground Plane","alive":true,"active":true,"children":[],"components":[{"legion::core::scale":{"x":1.0,"y":1.0,"z":1.0}},{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"Camera","alive":true,"active":true,"children":[],"components":[{"legion::core::scale":{"x":1.0,"y":1.0,"z":1.0}},{"legion::core::rotation":{"x":-0.0,"y":-0.0,"z":-0.0,"w":1.0}},{"legion::core::position":{"x":0.0,"y":3.0,"z":-30.0}}]}},{"legion::core::ecs::entity":{"name":"Sun","alive":true,"active":true,"children":[],"components":[{"legion::core::scale":{"x":1.0,"y":1.0,"z":1.0}},{"legion::core::rotation":{"x":0.115916907787323,"y":-0.8804763555526733,"z":0.2798481583595276,"w":0.3647052049636841}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"6","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"7","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"8","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"9","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"10","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"11","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"12","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"13","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"14","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"15","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"16","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"17","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"18","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"19","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"20","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"21","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"22","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"23","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}},{"legion::core::ecs::entity":{"name":"24","alive":true,"active":true,"children":[{"legion::core::ecs::entity":{"name":"25","alive":true,"active":true,"children":[],"components":[{"legion::core::rotation":{"x":0.0,"y":0.0,"z":0.0,"w":1.0}},{"legion::core::example_comp":{"value":1}}]}}],"components":[{"legion::core::example_comp":{"value":1}},{"legion::core::position":{"x":0.0,"y":0.0,"z":0.0}},{"legion::core::velocity":{"x":0.0,"y":0.0,"z":0.0}}]}}],"components":[]}}
8 changes: 4 additions & 4 deletions applications/sandbox/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ Size=450,444
Collapsed=0

[Window][###]
Pos=46,71
Size=268,967
Pos=5,20
Size=383,1033
Collapsed=0

[Window][Edit Transform]
Expand All @@ -49,7 +49,7 @@ Size=424,457
Collapsed=0

[Window][Edit Entity]
Pos=1355,192
Size=472,453
Pos=902,64
Size=538,832
Collapsed=0

6 changes: 3 additions & 3 deletions applications/sandbox/sandbox.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>-Werror=return-type %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>-Werror=return-type %(AdditionalOptions)</AdditionalOptions>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)lib\;$(SolutionDir)deps\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>legion-core-d.lib;legion-application-d.lib;legion-rendering-d.lib;legion-audio-d.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;Voro++D.lib;OptickCore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>legion-core-d.lib;legion-application-d.lib;legion-rendering-d.lib;legion-audio-d.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;Voro++D.lib;OptickCore.lib;yaml-cpp-d.lib;%(AdditionalDependencies)</AdditionalDependencies>
<!--
<AdditionalDependencies>legion-application.lib;legion-audio.lib;legion-core.lib;legion-networking.lib;legion-physics.lib;legion-rendering.lib;legion-scripting.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;%(AdditionalDependencies);mono-2.0-sgen.lib;OptickCore.lib</AdditionalDependencies>
-->
Expand All @@ -101,7 +101,7 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)lib\;$(SolutionDir)deps\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>legion-core.lib;legion-application.lib;legion-rendering.lib;legion-audio.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;Voro++.lib;OptickCore.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>legion-core.lib;legion-application.lib;legion-rendering.lib;legion-audio.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;Voro++.lib;OptickCore.lib;yaml-cpp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile />
<!--
<AdditionalDependencies>legion-application.lib;legion-audio.lib;legion-core.lib;legion-networking.lib;legion-physics.lib;legion-rendering.lib;legion-scripting.lib;OpenCL.lib;OpenAL32.lib;glfw3.lib;%(AdditionalDependencies);mono-2.0-sgen.lib;OptickCore.lib</AdditionalDependencies>
Expand Down
Loading