Skip to content

Instantly share code, notes, and snippets.

View BlackJar72's full-sized avatar
😫
Doomed

JaredBGreat BlackJar72

😫
Doomed
View GitHub Profile
@BlackJar72
BlackJar72 / SpatialRandom-snippet.cpp
Created February 6, 2018 21:30
A simple, self-contained way to generate location-specific, on-demand pseudorandon number for procedural content generation by hash coordinates
/*
* 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