Walk: arrow keys or A / D Jump: SPACE, UP or W Change seed: N / M - replaces the world entirely Return to origin: R The HUD shows the seed, how far you have walked, crystals collected, and how many chunks the generator has built. Try this: walk east for a minute, press N then M to come back to the same seed. The world is bit-identical. Nothing about the landscape is stored anywhere.
An endless side-scrolling world from five octaves of value noise, generated in chunks on demand, with three parallax mountain layers. NOTHING IS STORED. The landscape is not saved and not precomputed - the height at any x is a pure function of x and the seed, so walking back east recomputes exactly the same ground you left. Chunks are built when you approach them and dropped behind you into a bounded 12-chunk ring, so memory stays flat no matter how far you walk. THE HASH IS THE INTERESTING BIT. The usual trick for noise is fract(sin(x) * 43758.5453). That is a bad idea in Scratch specifically: Scratch's sin() takes DEGREES, and once you walk a few thousand units from the origin the argument is large enough that the result degrades into visible repetition. So this uses two rounds of MINSTD (a classic Lehmer generator) on the integer lattice instead - integer arithmetic, no trigonometry, no drift however far you go. TUNED AGAINST REAL RENDERS, not guessed. The first parameter set was technically fractal and visually flat - correct noise, boring landscape. The octave wavelengths were retuned against actual rendered frames until the largest octave sat at about 320 world pixels, roughly two-thirds of a screen, which is what gives the horizon its shape. Skyline cap passes were added to kill scalloping artefacts from the coarse fill. The banner on this project is generated by the same noise function - it is a real frame of seed 1337, not an illustration. All original - code, art and sound. See Inside is open.