Skip to content

feat(scene): SceneSnapshot struct + ISceneSerializer interface — foundation #713

Description

@JeanPhilippeKernel

Summary

Create the two foundation types for the new scene serialization system. Neither exists today.

SceneSnapshot

// ZEngine/ZEngine/ECS/SceneSnapshot.h
struct SceneSnapshot {
    uuids::uuid                         SceneUUID = {};
    Core::Containers::String            Name      = {};
    Core::Containers::Array<EntityID>   Entities  = {};
};

Lightweight snapshot that the serializer works with. Separate from ZEngine::ECS::Scene (the live runtime manager). The serializer snapshots Scene → SceneSnapshot on save and reconstructs Scene entities on load.

ISceneSerializer

// ZEngine/ZEngine/ECS/ISceneSerializer.h
class ISceneSerializer {
public:
    virtual Core::VFS::VFSResult<void> Serialize(
        Core::VFS::IVFSContext&, const Core::VFS::VFSPath&, const SceneSnapshot&) = 0;
    virtual Core::VFS::VFSResult<void> Deserialize(
        Core::VFS::IVFSContext&, const Core::VFS::VFSPath&, SceneSnapshot&) = 0;
};

References

scene-serialization.md §1 and §2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3Medium priority — plannedenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions