Commit Graph

3 Commits

Author SHA1 Message Date
Vladyslav Doloman
5b7c302008 Plan: compact per-snake encoding + QUIC TLV + fragmentation-safe recovery
- Adopt 2-bit-per-section body with head (x,y) and len (u16)
- TLV framing with QUIC varints for body payloads; support RLE alternative
  and chunked variants for oversized snakes
- Periodic recovery and large updates partitioned to keep each compressed
  datagram <1280 bytes; pack whole snakes first, split only when a single
  snake exceeds the limit
- Canonical padding and strict validation rules (zero-pad last byte)

Rationale: minimize bandwidth and avoid IP fragmentation while keeping
decoding simple and robust.
2025-10-07 18:36:47 +03:00
Vladyslav Doloman
06083da592 Plan: input_broadcast + opponent prediction for late updates
- Server relays player inputs immediately as input_broadcast to others
- Clients mirror per-opponent buffers to predict movement when state
  updates are late or dropped; reconcile on next authoritative update
- Add ordering/dedup rules and reconciliation guidance
- Update testing and milestones to include prediction paths

Rationale: reduce perceived latency and jitter under packet loss.
2025-10-07 18:36:47 +03:00
Vladyslav Doloman
03969ebd99 Plan: initial multiplayer Snake design (server, client, protocol)
- Add PROJECT_PLAN.md outlining the core design:
  - Server: Python 3 asyncio, authoritative tick loop
  - Client: WebTransport (datagrams), canvas rendering, spectator overlay
  - Mechanics: blocked head + tail shrink, apples, colors, 60x40 field,
    continuous play, length as score, input buffer rules, 180° policy
  - Networking: datagrams, seq numbers + wraparound, delta/full updates,
    1280-byte budget, up to 32 players, names ≤16 bytes
  - Testing strategy and milestones

Rationale: establish a shared baseline for scope and interfaces.
2025-10-07 18:36:46 +03:00