36void write_string(std::vector<uint8_t>& out,
const std::string& str);
49bool read_string(
const std::vector<uint8_t>& data,
size_t& offset,
62void write_bytes(std::vector<uint8_t>& out,
const void* data,
size_t size);
76bool read_bytes(
const std::vector<uint8_t>& data,
size_t& offset,
void* out,
Represents a scene within the engine. A scene contains multiple GameObjects and manages their lifecyc...
Definition scene.h:19
Snapshot serialization/deserialization utilities for networked state synchronization.
bool read_string(const std::vector< uint8_t > &data, size_t &offset, std::string &out)
Reads a length-prefixed string from a binary buffer.
void write_bytes(std::vector< uint8_t > &out, const void *data, size_t size)
Writes raw bytes to a binary buffer.
void write_string(std::vector< uint8_t > &out, const std::string &str)
Writes a length-prefixed string to a binary buffer.
void apply_full_snapshot(Scene &scene, const Message &msg)
Applies a full snapshot to a scene, creating/updating GameObjects as needed.
Message create_delta_snapshot(const Scene &scene, DefaultMessageTypes messageType)
Builds a delta snapshot message containing only changed (dirty) networked objects.
void apply_delta_snapshot(Scene &scene, const Message &msg)
Applies a delta snapshot to a scene, updating only the listed objects.
bool read_bytes(const std::vector< uint8_t > &data, size_t &offset, void *out, size_t size)
Reads raw bytes from a binary buffer.
Message create_full_snapshot(const Scene &scene, DefaultMessageTypes messageType)
Builds a full snapshot message containing all networked GameObjects in a scene.
DefaultMessageTypes
Built-in protocol message types used for core connection events.
Definition network_message.h:14
Represents a complete network message including type and payload.
Definition network_message.h:105