Skip to content

v0.0.2

Choose a tag to compare

@mococa mococa released this 29 Dec 20:06
· 314 commits to main since this release

Release Notes for v0.0.2

🎮 New Features

Network Layer (Major Addition)

  • ServerNetwork & ClientNetwork: Complete transport-agnostic client/server abstractions for multiplayer games

    • Per-peer snapshot registries for fog of war and interest management
    • Built-in heartbeat mechanism for connection health monitoring
    • Automatic bandwidth optimization through delta detection
    • Transport-agnostic design (works with WebSocket, WebRTC, UDP, etc.)
  • Transport Adapters:

    • BunWebSocketServerTransport: Production-ready Bun WebSocket server adapter
    • BrowserWebSocketClientTransport: Browser WebSocket client adapter
    • Pluggable transport interface for custom implementations
  • Multiplayer Game Example: Complete working example demonstrating:

    • Client-side prediction with server reconciliation
    • Binary protocol with efficient encoding
    • Multiple concurrent players
    • Fixed tick rate simulation (20 TPS)

Protocol Enhancements

  • defineIntent Helper: Type-safe intent definition with automatic codec generation
  • Intent Change Detection: Automatic optimization to only send changed intents, reducing bandwidth
  • Client Tick Tracking: Server tracks client tick for accurate reconciliation
  • Global Intent Handlers: Server-side handlers for processing client intents

Codec Improvements

  • Array Support: PooledCodec.array() for efficient snapshot encoding of collections
  • Zero-Copy Operations: calculateSize() and encodeInto() methods for minimal allocations
  • Enhanced SnapshotRegistry: Zero-copy encoding and decoding support

📝 Documentation

📊 Statistics

  • 36 files changed: 6,585 additions, 252 deletions
  • 17 commits since 9081729

Breaking Changes

⚠️ Intent registration now uses defineIntent objects for better type safety. Old registration method still works but is deprecated.