|
Capycore Engine
0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
|
#include <engine/network/network_message.h>#include <engine/public/gameObject.h>#include <engine/public/scene.h>#include <cstdint>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | snapshot |
| Snapshot serialization/deserialization utilities for networked state synchronization. | |
Functions | |
| void | snapshot::write_string (std::vector< uint8_t > &out, const std::string &str) |
| Writes a length-prefixed string to a binary buffer. | |
| bool | snapshot::read_string (const std::vector< uint8_t > &data, size_t &offset, std::string &out) |
| Reads a length-prefixed string from a binary buffer. | |
| void | snapshot::write_bytes (std::vector< uint8_t > &out, const void *data, size_t size) |
| Writes raw bytes to a binary buffer. | |
| bool | snapshot::read_bytes (const std::vector< uint8_t > &data, size_t &offset, void *out, size_t size) |
| Reads raw bytes from a binary buffer. | |
| Message | snapshot::create_full_snapshot (const Scene &scene, DefaultMessageTypes messageType) |
| Builds a full snapshot message containing all networked GameObjects in a scene. | |
| Message | snapshot::create_delta_snapshot (const Scene &scene, DefaultMessageTypes messageType) |
| Builds a delta snapshot message containing only changed (dirty) networked objects. | |
| void | snapshot::apply_full_snapshot (Scene &scene, const Message &msg) |
| Applies a full snapshot to a scene, creating/updating GameObjects as needed. | |
| void | snapshot::apply_delta_snapshot (Scene &scene, const Message &msg) |
| Applies a delta snapshot to a scene, updating only the listed objects. | |