TilemapLayer weightedRandomize does not use the default RNG #5911
StevenDepa
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Version
Description
The built-in weightedRandomize method of the TilemapLayer does not produce consistent layer distribution between refreshes.
This makes impossible to use this method and produce a consistent output from a given seed.
I've put the seed param in the game config and I've also inspected the phaser source code at https://github.com/photonstorm/phaser/blob/v3.50.1/src/tilemaps/components/WeightedRandomize.js and I've confirmed that the standard Math.random is used instead of the Phaser.Math.RNG functions. I'm not sure how to import it or I've had opened a pull request myself.
Example Test Code
Beta Was this translation helpful? Give feedback.
All reactions