Skip to content

Conversation

@Xenius97
Copy link
Contributor

@Xenius97 Xenius97 commented Nov 16, 2025

Fixes #813 and #3985

Continues @TheNormalnij 's work, #4013
It requires a lot of testing and is very similar to the original code, as it was built on top of it.


New Advanced Functions

engineStreamingSetLimits(normalIn, normalOut, farIn, farOut) & engineStreamingResetLimits()
Updates the stream-in and stream-out limits used by the object streamer.
These values define how many elements may be streamed each frame.

Arguments

  • normalIn – number of elements allowed to stream in per frame under normal movement
  • normalOut – number of elements allowed to stream out per frame under normal movement
  • farIn – number of elements allowed to stream in when the player has moved a long distance in a single frame
  • farOut – number of elements allowed to stream out in the same “moved far” condition

normalIn, normalOut, farIn, farOut, maxSwaps, furthestInLimit = engineStreamingGetLimits()
Returns all active streamer limit settings.

Returned table fields

  • normalIn – current normal stream-in limit
  • normalOut – current normal stream-out limit
  • farIn – current “moved far” stream-in limit
  • farOut – current “moved far” stream-out limit
  • maxSwaps – maximum number of element swaps the streamer may perform per frame
  • furthestInLimit – maximum number of “furthest streamed-in” elements considered for swap operations

engineStreamingSetMaxSwaps(maxSwaps) & engineStreamingResetMaxSwaps()
Sets the maximum number of stream swaps that may occur per frame.

Arguments

  • maxSwaps – new swap limit (must be ≥ 5, which is half of the default 10)

engineStreamingSetFurthestInLimit(limit) & engineStreamingResetFurthestInLimit()
Sets how many of the furthest streamed-in elements are tracked for swap-out decisions.


engineSetMaxObjectStreamCount
Sets object streamer limit


engineResetMaxObjectStreamCount
Resets to default


engineGetMaxObjectStreamCount
Get current streamer limit

Important

New advanced functions will affect only object streamer.

@Dutchman101 Dutchman101 marked this pull request as ready for review November 17, 2025 04:35
@Xenius97 Xenius97 changed the title Fix streamer lagg spikes Streamer improvements & fixes Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple objects in other dimension cause game stuttering

1 participant