group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
RegistrySerialization.hpp File Reference

Serialize and deserialize the entt ECS registry for network replication. More...

#include "ecs/components/InputSnapshot.hpp"
#include "entt/entity/fwd.hpp"
#include <entt/entt.hpp>
#include <optional>
#include <vector>
Include dependency graph for RegistrySerialization.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  registry_serialization::RemoteInputRecord
 A paired entity ID and input snapshot received from a remote client. More...
class  registry_serialization::Loader
 Deserializes registry snapshots received from the server and applies them locally. More...

Namespaces

namespace  registry_serialization
 Utilities for serializing and deserializing the ECS registry over the network.

Functions

std::vector< uint8_t > registry_serialization::serialize (const entt::registry &registry)
 Serialize the full registry state into a byte buffer for transmission.
std::vector< uint8_t > registry_serialization::encodeDelta (const std::vector< uint8_t > &baseline, const std::vector< uint8_t > &current)
 Compute an RLE byte-diff patch from baseline to current.
std::vector< uint8_t > registry_serialization::applyDelta (const std::vector< uint8_t > &baseline, const uint8_t *patch, std::size_t patchSize, std::size_t outputSize)
 Reconstruct current from baseline + patch.

Detailed Description

Serialize and deserialize the entt ECS registry for network replication.