News for hackers. Stuff that matters.
Re:Understanding Perlin Noise (2014) by sephoric on Wednesday January 09, 2019 @08:18PM (#18870699)
When I first learned about noise (many years later than I should have), I remember finding out that Perlin noise was patented, so I looked into OpenSimplex[1] instead which is Java but has been ported to other languages. It turns out Love2d has love.math.noise built in which does the same thing. Would be great if PICO-8 had it too, although I think this one[2] is free too. But one of the coolest things was realizing that Minecraft landscapes are mostly just multiple applications of noise functions on top of each other, which means it only needs to store changes to the environment, and that it can completely regenerate the same environment using noise functions. Sometimes I envy game developers, until I remember how their working conditions are usually very horrible.

[1] https://gist.github.com/KdotJPG/b1270127455a94ac5d19

[2] http://staffwww.itn.liu.se/~stegu/simplexnoise/Noise.lua

Re:Understanding Perlin Noise (2014) by veli_joza on Thursday January 10, 2019 @02:23AM (#18872143)
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.

Re:Understanding Perlin Noise (2014) by Sharlin on Thursday January 10, 2019 @11:21AM (#18874966)
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.

Re:Understanding Perlin Noise (2014) by bepvte on Wednesday January 09, 2019 @09:42PM (#18871089)
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.

Re:Understanding Perlin Noise (2014) by the_gipsy on Thursday January 10, 2019 @03:32AM (#18872387)
It is still practical in some cases, like moving the world border at will.