Skip to content

Instantly share code, notes, and snippets.


JaredBGreat BlackJar72

View GitHub Profile
BlackJar72 / SpatialRandom-snippet.cpp
Created Feb 6, 2018
A simple, self-contained way to generate location-specific, on-demand pseudorandon number for procedural content generation by hash coordinates
View SpatialRandom-snippet.cpp
* A code snippet (not the whole thing) or a system for
* generating sequences of random number at points in
* space and "time" (sequence order) by hashing 4-dimensional
* coordinates. The purpose of this is for use in
* procedural content generation, as an alternative to
* complex systems of region / chunk / area seed calculations.
* This allows for any of the needed pseudorandom numbers
* to be generated on demand, in any order, as many times
* as required -- easily adapting to worlds generating in