Skip to content

v0.0.5

Choose a tag to compare

@mococa mococa released this 14 Jan 04:36
· 582 commits to main since this release

Release Notes - v0.0.5

Overview

This release introduces significant improvements to networking, navmesh pathfinding with Web Workers support, ECS performance optimizations, and enhanced client-side prediction and interpolation.

Features

Navmesh & Pathfinding

  • Web Workers Support: Implemented NavMeshWorkerPool for parallel pathfinding operations
    • Added worker pool management for multi-threaded pathfinding
    • Comprehensive test suite with 356 test cases
    • Added documentation for Web Workers integration
    • Fixed worker pool initialization with proper type casting

Networking

  • RPC Enhancements:

    • Standardized RPC method naming convention (sendRPC and onRPC)
    • Renamed defineRpc to defineRPC for consistency
    • Implemented player spawn RPC handling and response
  • Lag Simulation: Added lag simulation configuration for testing network conditions

    • Available on both ClientNetwork and ServerNetwork
  • Transport Layer: Added optional onOpen handler to TransportAdapter for connection lifecycle management

Client-Side Improvements

  • Interpolation & Smoothing:

    • Enhanced player position interpolation with error smoothing
    • Updated lerp function to use simulation ticker alpha for smoother movement
    • Adjusted error smoothing factor for refined reconciliation logic
  • Fixed Ticker Enhancements:

    • Added alpha property for smooth rendering interpolation
    • Changed intervalMs to public for easier access

ECS Performance

  • Query Optimization:

    • Implemented query cache invalidation system
    • Optimized buffer management in World
  • Component Store:

    • Replaced Map with Record for field index mapping (performance improvement)
  • Benchmark Suite:

    • Added comprehensive stress tests for 25 components
    • Enhanced performance benchmarks with detailed metrics

Server Improvements

  • Optimized game loop timing
  • Removed redundant logging for cleaner output

Configuration Changes

  • TICK_RATE: Reduced from 24 to 12 for improved game performance

Fixes

  • Fixed navmesh worker pool initialization with proper type casting
  • Adjusted client error smoothing factor for better reconciliation
  • Updated lerp function for smoother client-side movement
  • Made intervalMs public in FixedTicker for external access

Testing

  • Added safety validation for PooledCodec DataView optimization
  • Comprehensive test suite covering:
    • Nested schema with same ArrayField instance
    • Async/await and Promise.all scenarios
    • Microtask queue interleaving
    • Buffer pool behavior with varying array sizes
    • 10k iteration stress test

Documentation

  • Updated ECS documentation for clarity and performance metrics
  • Added Web Workers documentation for navmesh pathfinding
  • Updated networking and protocol documentation

Example Updates

  • Enhanced multiplayer game example with improved networking and input handling
  • Streamlined player movement handling and input processing

Refactoring

  • Standardized RPC naming throughout codebase
  • Improved code consistency across networking modules
  • Optimized component store implementation

Total Changes: 29 files changed, 2,519 insertions(+), 517 deletions(-)