Home / Backend Stack & Server
Backend Stack & Server Implementation
4.1 Client ↔ gateway (game)
| Channel |
Phase 1 |
Phase 2+ |
Format |
| Session |
In-process / local |
QUIC (quinn) |
Versioned envelope |
| Tick stream |
Tokio channel |
QUIC unreliable stream |
postcard |
| Intent channel |
Tokio channel |
QUIC reliable sequenced |
postcard |
| Bulk snapshot |
On connect |
QUIC reliable |
postcard + zstd |
Codec decision (benchmarked): postcard v1 — smaller payloads than bincode for TickDelta, serde-native, fast enough for 100×15 entities @ 30 Hz. Revisit FlatBuffers if encode becomes hot.
5. Protocol types (v1)
Defined in protocol module:
| Type |
Direction |
Purpose |
Hello / Welcome |
C→S / S→C |
Session + snapshot |
Intent |
C→S |
Move, stop (sequenced) |
TickDelta |
S→C |
AOI-filtered entity states |
Snapshot |
S→C |
Region enter / reconnect |
Envelope<T> |
Both |
protocol_version wrapper |
6. Simulation parameters (locked for Phase 1)
| Parameter |
Value |
Ref |
| Tick rate |
30 Hz |
01 |
| Chunk size |
16 m |
01 |
| AOI core radius |
32 m |
06 |
| AOI horizon |
64 m (2× core) |
06 |
| Interaction radius |
1.5 m |
03 |
| Item instance IDs |
UUID v7 |
03, 18 |
| Seed segment |
64×64 m flat grass |
the content files |