Hsaka Posted October 8, 2013 Share Posted October 8, 2013 Phaser's repeatable random number generator doesn't seem to produce repeatable results given the same seed.var seed = 0;this.rng = new Phaser.RandomDataGenerator([(seed).toString()]);for (var i = 0; i < 5; i++) { console.log(this.rng.integer());}console.log('----------------------');this.rng.sow([(seed).toString()]);for (var i = 0; i < 5; i++) { console.log(this.rng.integer());}Produces:1031592550421546954312749997876555809963353747152------------10336454724215469543127499978739549714503353748151 Link to comment Share on other sites More sharing options...
rich Posted October 8, 2013 Share Posted October 8, 2013 Ouch, good catch! It was a stupid 1line mistake (aren't they always?) - the fix is now in the dev branch. Mike and Hsaka 2 Link to comment Share on other sites More sharing options...
Recommended Posts