diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000..14bdc968
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,55 @@
+# Generated from CLion C/C++ Code Style settings
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: false
+AlignOperands: false
+AlignTrailingComments: false
+AlwaysBreakTemplateDeclarations: Yes
+BraceWrapping:
+ AfterCaseLabel: true
+ AfterClass: true
+ AfterControlStatement: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterNamespace: true
+ AfterStruct: true
+ AfterUnion: true
+ AfterExternBlock: false
+ BeforeCatch: true
+ BeforeElse: true
+ BeforeLambdaBody: true
+ BeforeWhile: true
+ SplitEmptyFunction: true
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+BreakBeforeBraces: Custom
+BreakConstructorInitializers: AfterColon
+BreakConstructorInitializersBeforeComma: false
+ColumnLimit: 120
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ContinuationIndentWidth: 2
+IncludeCategories:
+ - Regex: '^<.*'
+ Priority: 1
+ - Regex: '^".*'
+ Priority: 2
+ - Regex: '.*'
+ Priority: 3
+IncludeIsMainRegex: '([-_](test|unittest))?$'
+IndentCaseBlocks: true
+IndentCaseLabels: true
+IndentWrappedFunctionNames: true
+InsertNewlineAtEOF: true
+MacroBlockBegin: ''
+MacroBlockEnd: ''
+MaxEmptyLinesToKeep: 2
+NamespaceIndentation: All
+SpaceInEmptyParentheses: false
+SpacesInAngles: false
+SpacesInConditionalStatement: false
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+TabWidth: 2
+...
diff --git a/.gdbinit b/.gdbinit
new file mode 100644
index 00000000..703993c7
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1 @@
+source ./experiment-ecs-printer.py
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 22680f28..7c9c19fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ cmake-build-debug-msvc/
cmake-build-debug-msvc-vs/
out/
.vs/
+.idea/
diff --git a/.gitmodules b/.gitmodules
index 3fc45167..96862037 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,15 +1,9 @@
-[submodule "projs/shadow/extern/spdlog"]
- path = projs/shadow/extern/spdlog
- url = https://github.com/gabime/spdlog.git
[submodule "projs/shadow/extern/imgui"]
path = projs/shadow/extern/imgui
url = https://github.com/ocornut/imgui
[submodule "projs/shadow/extern/dxmath"]
path = projs/shadow/extern/dxmath
url = https://github.com/microsoft/DirectXMath.git
-[submodule "projs/shadow/extern/catch2"]
- path = projs/shadow/extern/catch2
- url = https://github.com/catchorg/Catch2.git
[submodule "projs/shadow/extern/glm"]
path = projs/shadow/extern/glm
url = https://github.com/g-truc/glm.git
@@ -18,4 +12,13 @@
url = https://github.com/martin-olivier/dylib
[submodule "projs/shadow/extern/vulkan_memory_allocator"]
path = projs/shadow/extern/vulkan_memory_allocator
- url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
\ No newline at end of file
+ url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
+[submodule "extern/fmt"]
+ path = projs/extern/fmt
+ url = git@github.com:fmtlib/fmt.git
+[submodule "projs/extern/spdlog"]
+ path = projs/extern/spdlog
+ url = https://github.com/gabime/spdlog.git
+[submodule "projs/extern/catch2"]
+ path = projs/extern/catch2
+ url = https://github.com/catchorg/Catch2.git
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 1c2fda56..00000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/cmake.xml b/.idea/cmake.xml
deleted file mode 100644
index 89969254..00000000
--- a/.idea/cmake.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
deleted file mode 100644
index 4fe7f294..00000000
--- a/.idea/codeStyles/Project.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml
deleted file mode 100644
index 307554b7..00000000
--- a/.idea/codeStyles/codeStyleConfig.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/customTargets.xml b/.idea/customTargets.xml
deleted file mode 100644
index 93656d6a..00000000
--- a/.idea/customTargets.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 08cfc443..00000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/fileTemplates/Shadow Entitiy Header.h b/.idea/fileTemplates/Shadow Entitiy Header.h
deleted file mode 100644
index 3273bb65..00000000
--- a/.idea/fileTemplates/Shadow Entitiy Header.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-#include "Entity.h"
-#include "TransformEntity.h"
-
-class ${NAME} : public ShadowEngine::Entities::TransformEntity{
- SHObject_Base(${NAME});
-
- Entity_Base(${NAME}, TransformEntity);
-
-public:
- void Build() override;
-};
diff --git a/.idea/fileTemplates/Shadow Entitiy.cpp b/.idea/fileTemplates/Shadow Entitiy.cpp
deleted file mode 100644
index a927cdc6..00000000
--- a/.idea/fileTemplates/Shadow Entitiy.cpp
+++ /dev/null
@@ -1 +0,0 @@
-void ${NAME}::Build()
\ No newline at end of file
diff --git a/.idea/fileTemplates/internal/C++ Class Header.h b/.idea/fileTemplates/internal/C++ Class Header.h
deleted file mode 100644
index c84aecdc..00000000
--- a/.idea/fileTemplates/internal/C++ Class Header.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-${NAMESPACES_OPEN}
-
-class ${NAME} {
-
-};
-
-${NAMESPACES_CLOSE}
-
diff --git a/.idea/fileTemplates/internal/C++ Class.cc b/.idea/fileTemplates/internal/C++ Class.cc
deleted file mode 100644
index f40c5f55..00000000
--- a/.idea/fileTemplates/internal/C++ Class.cc
+++ /dev/null
@@ -1,4 +0,0 @@
-#[[#include]]# "${HEADER_FILENAME}"
-
-${NAMESPACES_OPEN_CPP}
-${NAMESPACES_CLOSE_CPP}
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index a98f236b..00000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index d965e880..00000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100644
index 7e527079..00000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/test_game.xml b/.idea/runConfigurations/test_game.xml
deleted file mode 100644
index 7c9a8be7..00000000
--- a/.idea/runConfigurations/test_game.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations/test_game_EDITOR.xml b/.idea/runConfigurations/test_game_EDITOR.xml
deleted file mode 100644
index a2a3fc81..00000000
--- a/.idea/runConfigurations/test_game_EDITOR.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/scopes/shadow.xml b/.idea/scopes/shadow.xml
deleted file mode 100644
index 8e551766..00000000
--- a/.idea/scopes/shadow.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/.idea/statistic.xml b/.idea/statistic.xml
deleted file mode 100644
index 06d20e2e..00000000
--- a/.idea/statistic.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/umbra.iml b/.idea/umbra.iml
deleted file mode 100644
index 6d70257c..00000000
--- a/.idea/umbra.iml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 6b0b8b1b..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8070d769..726452aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,10 @@ include(shadow-modules.cmake)
set(CMAKE_STATIC_LIBRARY_PREFIX "")
set(CMAKE_SHARED_LIBRARY_PREFIX "")
-add_subdirectory(projs/shadow)
+add_subdirectory(projs/extern)
-add_subdirectory(projs/test-game)
\ No newline at end of file
+#add_subdirectory(projs/shadow)
+
+#add_subdirectory(projs/test-game)
+
+add_subdirectory(projs/experiments/ecs)
\ No newline at end of file
diff --git a/deps.cmake b/deps.cmake
new file mode 100644
index 00000000..3d07a22a
--- /dev/null
+++ b/deps.cmake
@@ -0,0 +1,16 @@
+Include(FetchContent)
+include(ExternalProject)
+
+
+add_subdirectory(projs/extern/fmt)
+
+# ###############################################
+# Fetch Catch2 for the file format tests
+# ###############################################
+#FetchContent_Declare(
+# Catch2
+# GIT_REPOSITORY https://github.com/catchorg/Catch2.git
+# GIT_TAG v2.13.9 # or a later release
+#)
+#FetchContent_MakeAvailable(Catch2)
+#list(APPEND CMAKE_MODULE_PATH "${Catch2_SOURCE_DIR}/contrib")
diff --git a/experiment-ecs-printer.py b/experiment-ecs-printer.py
new file mode 100644
index 00000000..420d1e97
--- /dev/null
+++ b/experiment-ecs-printer.py
@@ -0,0 +1,32 @@
+import gdb.printing
+
+
+class idPrinter:
+ """Print a TypeId object."""
+
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ return ("ID: " + str(self.val["id"]) + " Flags: " + str(self.val["flags"]))
+
+class TypeIdPairPrinter:
+ def __init__(self, val):
+ self.val = val
+
+ def to_string(self):
+ id = idPrinter(self.val["first"])
+ return (id.to_string() + " Column: " + "asd")
+
+
+def build_pretty_printer():
+ pp = gdb.printing.RegexpCollectionPrettyPrinter("experiment-ecs")
+ pp.add_printer('id', '^TypeId$', idPrinter)
+ pp.add_printer('id_pair', '^TypeId, int$', TypeIdPairPrinter)
+
+ return pp
+
+
+gdb.printing.register_pretty_printer(
+ gdb.current_objfile(),
+ build_pretty_printer())
diff --git a/projs/experiments/ecs/CMakeLists.txt b/projs/experiments/ecs/CMakeLists.txt
new file mode 100644
index 00000000..29784173
--- /dev/null
+++ b/projs/experiments/ecs/CMakeLists.txt
@@ -0,0 +1,33 @@
+set(CMAKE_CXX_STANDARD 23)
+
+add_executable(experiment-ecs)
+add_executable(experiment::ecs ALIAS experiment-ecs)
+
+
+FILE(GLOB_RECURSE SOURCES
+ src/*.cpp
+)
+
+target_sources(experiment-ecs PUBLIC ${SOURCES})
+
+target_link_libraries(experiment-ecs
+ PRIVATE fmt::fmt-header-only
+)
+
+
+FILE(GLOB_RECURSE SOURCES_TESTS
+ src/id_system.cpp
+ src/span_dynamic.cpp
+ src/ecs.exp.cpp
+ tests/*.cpp
+)
+
+add_executable(experiment-ecs-tests)
+target_link_libraries(experiment-ecs-tests
+ Catch2::Catch2
+)
+target_compile_options(experiment-ecs-tests
+ PUBLIC -fconcepts-diagnostics-depth=4
+)
+target_sources(experiment-ecs-tests PUBLIC ${SOURCES_TESTS})
+target_include_directories(experiment-ecs-tests PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src)
\ No newline at end of file
diff --git a/projs/experiments/ecs/src/_old/old_ecs.exp.h b/projs/experiments/ecs/src/_old/old_ecs.exp.h
new file mode 100644
index 00000000..fea888a0
--- /dev/null
+++ b/projs/experiments/ecs/src/_old/old_ecs.exp.h
@@ -0,0 +1,632 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+//#include "../../shadow/shadow-engine/reflection/inc/shadow/SHObject.h"
+//#include "../../shadow/shadow-engine/core/inc/shadow/exports.h"
+
+
+namespace SH {
+
+ class span_dynamic {
+ std::byte *p_start;
+ std::byte *p_end;
+ size_t item_size;
+ public:
+ span_dynamic() = default;
+ span_dynamic(void *mem, size_t item_size, size_t count) :
+ p_start(static_cast(mem)),
+ p_end(p_start + (item_size * count)),
+ item_size(item_size) {
+ assert((p_end - p_start) / item_size == count);
+ }
+
+ public:
+ class iterator {
+ public:
+ using difference_type = std::ptrdiff_t;
+ using value_type = std::byte;
+ private:
+ std::byte *pos;
+ size_t size;
+
+ public:
+ iterator() : pos(nullptr), size(0) {};
+ iterator(std::byte *p, size_t item_size) : pos(p), size(item_size) {};
+
+ void Move(size_t n) {
+ pos += (n * size);
+ }
+
+ iterator &operator++() {
+ Move(1);
+ return *this;
+ }
+ iterator operator++(int) {
+ iterator tmp(*this);
+ operator++();
+ return tmp;
+ }
+
+ iterator &operator--() {
+ Move(-1);
+ return *this;
+ }
+ iterator operator--(int) {
+ iterator tmp(*this);
+ operator--();
+ return tmp;
+ }
+
+ iterator &operator+=(difference_type n) {
+ Move(n);
+ return *this;
+ }
+ iterator &operator-=(difference_type n) {
+ Move(-n);
+ return *this;
+ }
+
+ iterator operator+(const difference_type &n) const {
+ iterator tmp(*this);
+ tmp.Move(n);
+ return tmp;
+ }
+ iterator operator-(const difference_type &n) const {
+ iterator tmp(*this);
+ tmp.Move(-n);
+ return tmp;
+ }
+
+ std::byte &operator[](const difference_type &n) const {
+ iterator tmp(*this);
+ tmp.Move(n);
+ return *tmp;
+ }
+
+ difference_type operator-(const iterator &rhs) const { return pos - rhs.pos; }
+
+ bool operator==(const iterator &rhs) const { return pos == rhs.pos; }
+ bool operator!=(const iterator &rhs) const { return pos != rhs.pos; }
+
+ bool operator<(const iterator &rhs) const { return pos < rhs.pos; }
+ bool operator<=(const iterator &rhs) const { return pos <= rhs.pos; }
+ bool operator>(const iterator &rhs) const { return pos > rhs.pos; }
+ bool operator>=(const iterator &rhs) const { return pos >= rhs.pos; }
+
+ std::byte &operator*() const { return *pos; }
+
+ template
+ T &as() { return *(T *) pos; }
+ template
+ T *as_ptr() { return (T *) pos; }
+
+ [[nodiscard]] void *ptr() const { return pos; }
+ };
+
+ [[nodiscard]] iterator begin() const {
+ return {p_start, item_size};
+ }
+
+ iterator end() const {
+ return {p_end, item_size};
+ }
+
+ iterator last() const {
+ return end()--;
+ }
+ };
+
+ span_dynamic::iterator operator+(span_dynamic::iterator::difference_type n, span_dynamic::iterator i) {
+ span_dynamic::iterator tmp(i);
+ tmp.Move(n);
+ return tmp;
+ }
+ span_dynamic::iterator operator-(span_dynamic::iterator::difference_type n, span_dynamic::iterator i) {
+ span_dynamic::iterator tmp(i);
+ tmp.Move(-n);
+ return tmp;
+ }
+
+ bool operator<(const span_dynamic::iterator &lhr, const void *rhs) { return lhr.ptr() < rhs; }
+ bool operator<(const void *lhr, const span_dynamic::iterator &rhs) { return lhr < rhs.ptr(); }
+ bool operator<=(const span_dynamic::iterator &lhr, const void *rhs) { return lhr.ptr() <= rhs; }
+ bool operator>(const span_dynamic::iterator &lhr, const void *rhs) { return lhr.ptr() > rhs; }
+ bool operator>(const void *lhr, const span_dynamic::iterator &rhs) { return lhr > rhs.ptr(); }
+ bool operator>=(const span_dynamic::iterator &lhr, const void *rhs) { return lhr.ptr() >= rhs; }
+ bool operator>=(const void *lhr, const span_dynamic::iterator &rhs) { return lhr >= rhs.ptr(); }
+}
+
+static_assert(std::input_or_output_iterator);
+static_assert(std::random_access_iterator);
+
+static_assert(std::ranges::random_access_range);
+
+namespace SH {
+
+ class PoolAllocator {
+ public:
+
+ struct Item {
+ Item *next;
+ };
+
+ explicit PoolAllocator(size_t item_size) : item_size(std::max(item_size, sizeof(Item))) {
+ chunks.push_back(new Chunk(item_size));
+ }
+
+ class Chunk {
+ span_dynamic memory; //= span_dynamic(nullptr, 0, 0);
+ Item *next_free = nullptr;
+ public:
+ explicit Chunk(size_t item_size) {
+ void *m = malloc(item_size * 1024);
+ memory = span_dynamic(m, item_size, 1024);
+
+ next_free = memory.begin().as_ptr- ();
+ for (auto it = memory.begin(); it != memory.end(); it++) {
+ auto next = it + 1;
+ it.as_ptr
- ()->next = next.as_ptr
- ();
+ }
+ memory.last().as_ptr
- ()->next = nullptr;
+ }
+
+ bool HasSpace() { return next_free != nullptr; }
+
+ void *allocate() {
+ assert(next_free != nullptr);
+ auto ptr = next_free;
+ next_free = next_free->next;
+ return ptr;
+ }
+
+ void deallocate(void *p) {
+ assert(contains(p));
+ auto item = static_cast
- (p);
+ item->next = next_free;
+ next_free = item;
+ }
+
+ bool contains(void *p) {
+ return p >= memory.begin() && p < memory.end();
+ }
+ };
+
+ public:
+
+ virtual void *allocate() {
+ auto chunk_it = std::ranges::find_if(chunks, [](auto chunk) { return chunk->HasSpace(); });
+
+ // If no chunk has space, create a new one
+ if (chunk_it == chunks.end()) {
+ chunks.push_back(new Chunk(item_size));
+ chunk_it = std::prev(chunks.end());
+ }
+
+ return (*chunk_it)->allocate();
+ };
+
+ virtual void deallocate(void *p) {
+ auto chunk_it = std::ranges::find_if(chunks, [p](auto chunk) { return chunk->contains(p); });
+ if (chunk_it == chunks.end())
+ throw std::invalid_argument("WTF man common use pointer correctly");
+
+ (*chunk_it)->deallocate(p);
+ };
+ private:
+ std::vector chunks;
+ size_t item_size;
+ };
+
+}
+
+/*
+ * Archetype : (T1, T2, T3, T4)
+ * | self (T1) | comp 1 (T2) | comp 2 (T3) | comp 3 (T4) |
+ * | T1: 1 | T2: 1 | T3: 1 | T4: 1 |
+ * | T1: 2 | T2: 2 | T3: 2 | T4: 2 |
+ * | T1: 3 | T2: 3 | T3: 3 | T4: 3 |
+ *
+ * Archetype : (T1, T2, T3)
+ * | self (T1) | comp 1 (T2) | comp 2 (T3) |
+ * | T1: 4 | T2: 4 | T3: 4 |
+ * | T1: 5 | T2: 5 | T3: 5 |
+ *
+ *
+ */
+
+//####################################################
+//################## ID system #######################
+//####################################################
+#pragma region ID-System
+
+union Id {
+ std::byte bytes[sizeof(uint64_t)];
+ uint32_t half[2];
+ uint64_t id;
+
+ Id(uint64_t id) : id(id) {};
+ Id(uint32_t high, uint32_t low) : half{high, low} {};
+
+ Id Next() {
+ return Id(this->id++);
+ }
+};
+
+using TypeId = Id;
+
+template<>
+struct std::hash {
+ std::size_t operator()(const TypeId &s) const noexcept {
+ return std::hash{}(s.id);
+ };
+};
+
+bool operator==(const Id &lhs, const Id &rhs) { return lhs.id == rhs.id; }
+
+std::unordered_map typeMap;
+
+TypeId next_id(0);
+
+template
+TypeId GetTypeId() {
+ static TypeId id = next_id.id++;
+ static auto a = typeMap.insert({id, typeid(T).name()});
+ return id;
+}
+
+#pragma endregion ID-System
+
+//####################################################
+//################## Entity base classes #############
+//####################################################
+
+class Object {
+
+};
+
+class Component : public Object {
+public:
+ static constexpr bool isEntity = false;
+ Id UUID;
+
+ Component(Id UUID) : UUID(UUID) {};
+};
+template
+concept component = std::is_base_of_v;
+
+template
+concept component_only = component && T::isEntity == false;
+
+class Entity : public Component {
+public:
+ static constexpr bool isEntity = true;
+ Entity(Id UUID) : Component(UUID) {
+
+ }
+
+ template
+ T *AddInternalChild();
+
+};
+template
+concept entity = std::is_base_of_v && T::isEntity == true;
+
+//####################################################
+//############### Prefab stuff #######################
+//####################################################
+
+class Asset {
+
+};
+
+class Prefab : public Asset {
+
+};
+
+class PrefabEntity : public Entity {
+ Prefab p;
+public:
+ PrefabEntity(Id UUID, Prefab asset) : Entity(UUID), p(asset) {
+
+ }
+
+};
+
+//####################################################
+//################Built in entities ##################
+//####################################################
+
+class Scene : public Entity {
+ std::string name = "Test";
+public:
+ Scene(Id UUID) : Entity(UUID) {};
+};
+
+enum Relation {
+ PARENT = 1,
+};
+
+class Archetype {
+public:
+ using Id = uint32_t;
+ static Id next_id;
+
+ using Types = std::vector;
+
+ Types types;
+ Id id;
+
+ using Column = std::vector