I understand the math.noise
function is associated with the Perlin noise
algorithm, but I'm not exactly sure what it could be used for. According to the ROBLOX wiki, it will return a value between -0.5, and 0.5 with coordinates generally close to each other.
(Source: http://wiki.roblox.com/index.php?title=Function_dump/Mathematical_functions#math.noise)
Could this be used for random terrain generation? If so, would anyone mind giving a small explanation or example on how it could be done?
Thanks for reading, hope you can help!
math.noise
can be used to create a heightmap for terrain generation. The heightmap simply describes the height of a specific x/y location.
If you really want, it can also be used for loot tables, generation chance, and even as an alternative to math.random
in some applications.