A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
every week,
unless exhausted!
About Games Music Pixelart Poetry Home Patreon Scores JNKPlat Petit Switch
Blog
Randomisation, Kinda..
  20th July, 2019
I spent last night rewriting my Pseudo Random code so that it works nicely in Javascript, for both Browsercade and Shoebox.

-=-=-

The point of a Pseudo Random function is that you can easily reproduce the results on a set of "random" numbers.
I couldn't find a way to get Javascript to do it in a reproducible way, on all different browsers, so instead I opted to write my own. Or, rather, copy and paste my old version and tweak it to work, here!

The purpose for using "seedable" numbers is so that I can generate a set of numbers that are usually the same each time. This is useful for things like Level Generators. Give the generator the same seed, and you should end up with the same level.

In theory!
I've not stress tested the random function on all browsers, so will have to do that at some point, today. I'm expecting a couple of issues, given that it relies on a large text string, which appears to be getting mangled by Edge.. Hmmm.

Views 17, Upvotes 1
Daily Blog
Site credits : Jayenkai put all his heart and soul into everything you can see on this site.
(c) Jayenkai 2017 and onwards. RSS feed
Blog - Randomisation, Kinda.. - AGameAWeek