Files
Cielonos/.claude/rules/network-code.md
SoulliesOfficial 39b43680a9 爆更
2026-07-18 03:16:20 -04:00

678 B

paths
paths
src/networking/**

Network Code Rules

  • Server is AUTHORITATIVE for all gameplay-critical state — never trust the client
  • All network messages must be versioned for forward/backward compatibility
  • Client predicts locally, reconciles with server — implement rollback for mispredictions
  • Handle disconnection, reconnection, and host migration gracefully
  • Rate-limit all network logging to prevent log flooding
  • All networked values must specify replication strategy: reliable/unreliable, frequency, interpolation
  • Bandwidth budget: define and track per-message-type bandwidth usage
  • Security: validate all incoming packet sizes and field ranges