Files
Commonwealth-Online-Public/protocol/README.md
T
andrew 99595ef87c Add host-authoritative world-state sync
Implement host-authoritative time/weather sync across server and clients. Adds a new worldState packet (and worldStateHost for host assignment) and server-side host tracking/reassignment to the lowest remaining playerId when the host disconnects. Plugin-side changes introduce F4T::WorldStateSync (new header + implementation), polling/apply hooks in the game-thread main loop, and Networking support to send/receive/parse worldState/worldStateHost packets. The server validates host-only sends, relays worldState to peers, broadcasts worldStateHost on host handoff, and augments logging/stats. Protocol and documentation files updated (protocol/world-state.md, docs/*) and server/fake_client.py extended to track/print host world-state snapshots.
2026-06-22 21:50:59 +12:00

35 lines
698 B
Markdown

# Protocol
This folder documents the planned network protocol for Commonwealth Online.
The first protocol should be simple and focused on player transform sync.
## First Packet Types
- Welcome packet
- Transform packet
- World state packet (host time and weather) — see [`world-state.md`](world-state.md)
- Disconnect packet
## Future Packet Types
- Animation state packet
- Fire weapon packet
- Health packet
- Chat packet
- Cell change packet
## Design Goals
The protocol should be:
- Simple
- Easy to debug
- Versioned
- Safe to extend
- Clear enough to test outside Fallout 4
## Early Testing
The protocol should be testable using fake clients before being connected to Fallout 4.