I actually missed the built-in noise function and instead used the same library you linked to. I tried switching to built-in C++ implementation just now and it was actually slower.
The Lua library for simplex does some FFI trickery and avoids crossing Lua/C++ barrier. Mike Pall is credited in comments, so I guess I'm not surprised it's faster.
As far as I know, Perlin noise has never been patented. According to Wikipedia, however (emphasis mine):
> in 2001 he was granted a patent for the use of 3D+ implementations of simplex noise for texture synthesis.
OpenSimplex is a variant of simplex noise developed specifically to work around that patent.
i think that minecraft stores the generated data along with modifications nowadays, instead of the neat little format you describe, because generating this frequently is usually very difficult for the computer. im not completely sure though.
Re:Understanding Perlin Noise (2014)
by PavlovsCat on Wednesday January 09, 2019 @09:56PM
(#18871142)
You're correct, Minecraft generates chunks around as players get near them, then they get stored on disk. To reset a chunk you can just delete it IIRC, it gets regenerated to the initial state as soon as a player comes near it.
There would be not much practical use for it I think, but in theory it should be possible to "compress" a Minecraft world by figuring out the delta between the original generated state and the current state, and then for each chunk either saving the delta or the the full chunk, whatever is smaller.
[1] https://gist.github.com/KdotJPG/b1270127455a94ac5d19
[2] http://staffwww.itn.liu.se/~stegu/simplexnoise/Noise.lua