Skip to content

Implement the RNG class, but properly this time #10

@fatcerberus

Description

@fatcerberus

As a cross-compatibility stopgap, RNG was hastily implemented by having it simply call Math.random() internally. Unfortunately, that also means it has to ignore any seed or state values supplied by the game, since JS doesn't provide any built-in mechanism to support them. The current behavior is therefore a bug and must be fixed.

Note that ideally, both neoSphere and Oozaru should produce the same random sequence when given the same seed or state values. That being the case, some research will need to be done on how to achieve that, since neoSphere presently uses xoroshiro128+ which (as far as I can tell) is non-trivial to implement in JS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions