A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
every week,
unless exhausted!
About Games Tools 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 20, Upvotes 2
Daily Blog
Site credits : PHP script, Site design, Blog posts, Games, Music, Pixelart, Poems and More : Jayenkai
(c) Jayenkai 2017 and onwards. RSS feed
Blog - Randomisation, Kinda.. - AGameAWeek