sashakoshka / m4kc

Minecraft 4k: decompiled, translated to C using SDL for graphics and input, and improved upon
78 stars 8 forks source link

Perlin noise function breaks in negatives #5

Closed sashakoshka closed 3 years ago

sashakoshka commented 3 years ago

Perlin noise function generates jittery and exaggerated terrain in negative coordinate chunks on the x and z axis.

Screenshot from 2021-05-13 14-23-18

sashakoshka commented 3 years ago

Fixed it by offsetting the perlin noise function a lot, and making it use doubles internally instead of floats. This will produce farlands at very far distances but farlands are cool and I wouldn't have it any other way.