Skip to content

feat: add batching config and f16/bit-packed types - #13

Merged
protheeuz merged 1 commit into
mainfrom
feat/networking-optimizations
May 4, 2026
Merged

feat: add batching config and f16/bit-packed types#13
protheeuz merged 1 commit into
mainfrom
feat/networking-optimizations

Conversation

@suckserberg

Copy link
Copy Markdown
Collaborator

Summary

This PR introduces critical networking optimizations to the core library, specifically addressing bandwidth efficiency and frame-time stability. It implements a customizable batching configuration, bit-packed boolean arrays, and new half-precision floating-point types.

Technical Implementation

  • Core (Batcher): Implemented reliableThreshold for dynamic payload segmentation (Stability vs. Latency modes) and maxPacketsPerFrame to prevent engine-level CPU spikes during high-volume synchronization.
  • Serialization (Types):
    • Optimized array(bool) to use bit-packing, reducing bandwidth consumption for boolean arrays by 87.5% (from 1 byte per element to 1 bit per element).
    • Implemented f16 (Float16) and Vector3F16 types to provide a high-efficiency alternative for spatial data where full f32 precision is not required.
  • API (init): Updated Satset.start to accept and apply the new batching configurations.

Changelog Entry

  • [Batching]: Implementation of dynamic segmentation and rate-limiting. Enhances engine stability by preventing oversized network packets.
  • [Types]: Bit-packed boolean arrays and Float16 support. Reduces bandwidth for boolean synchronization by 8x.

Type of Change

  • Feature
  • Bug Fix
  • Performance Optimization
  • Documentation Update
  • Maintenance / Chore

Verification and Standards

  • I have adhered to the Development Patterns.
  • I have verified that all CI/CD linting and formatting checks pass (manual verification).
  • I have confirmed the changes within a Rojo-supported environment.
  • I have updated the technical documentation for any API or architectural changes.

@suckserberg
suckserberg requested a review from protheeuz as a code owner May 4, 2026 22:23
@github-actions github-actions Bot added the enhancement New feature or request label May 4, 2026

@protheeuz protheeuz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏻 I will added the docs and test after merge

@protheeuz
protheeuz merged commit ad0cc7d into main May 4, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants