This PR focused on finally linking the random seed generated by the matchmaker (pushing it to client was implemented in previous PR) into the GgrsSessionRunner + SyncingInfo, and then using it to create and insert a RngGenerator resource automatically for the developer to use easily.
Additionally, I created reworked the previous flow, now having a new interface that both re-wraps all of the Turborand methods (a few functions were inconsistent naming-wise, and gives us more flexibility to change stuff in the future), and also implements a number of missing functionality that will be helpful to devs. This new RngGenerator struct now supports:
Basic Number Generation: Methods for integers, floats, and booleans.
Range-based Generation: Methods for numbers within specified ranges.
Character/String Generation: Methods for various character types and ASCII strings.
Collection Manipulation: Methods for shuffling and sampling from collections (Vec/SVec/Vecdeque)
Probability/Weighted Selection: Methods for chance-based and weighted random selection.
Vector Generation: Methods for random Vec2 and Vec3 values.
This PR focused on finally linking the random seed generated by the matchmaker (pushing it to client was implemented in previous PR) into the GgrsSessionRunner + SyncingInfo, and then using it to create and insert a
RngGenerator
resource automatically for the developer to use easily.Additionally, I created reworked the previous flow, now having a new interface that both re-wraps all of the Turborand methods (a few functions were inconsistent naming-wise, and gives us more flexibility to change stuff in the future), and also implements a number of missing functionality that will be helpful to devs. This new
RngGenerator
struct now supports: