- New server/quic_transport.py using aioquic to accept QUIC connections and datagrams
- run.py: QUIC mode when QUIC_CERT/QUIC_KEY provided; else in-memory
- requirements.txt: aioquic + cryptography
- Clarify TLV selection between 2-bit and RLE per snake
- Define PART inner_type for STATE_FULL/STATE_DELTA and merging by update_id
- Apples included only in the first part (full and delta)
- Recommend ~1200-byte post-compression budget (<=1280 hard cap)
- Protocol: RLE packing, TLV chooser, body_2bit_chunk helper, state_full_body builder
- Server: on join, build snapshot body and partition across PART packets if over MTU; include apples only in first part; chunk single oversized snake with 2-bit chunking
- Protocol: SnakeDelta structure; build_state_delta(_body); build_part
- Server: compute per-snake changes (move/grow/blocked-shrink), apples diffs
- Partition large deltas by snake changes with apples in first part; use update_id
- Send STATE_DELTA when under MTU; else PART packets referencing STATE_DELTA
- Input buffer rules: enqueue+consume with 180° guard (len>1)
- Movement: wrap per config; allow moving into own tail when it vacates
- Blocking: head holds, tail shrinks to min 1
- Apples: eat= grow; ensure target apples after tick
- Broadcast: send current snakes/apples as delta (placeholder for real deltas)
- 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.
- 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.