So I created Signal Lite (http://www.byond.com/developer/Koil/SignalLite). Signal Lite provides you with functions to generate 2D and 3D simplex noise (Perlin noise) and fractal brownian motion (also known as plasma fractals). The library also provides a .DLL for speeding up computation.
Simplex noise
Fractal brownian motion
There is documentation in the library to explain how to generate noise.
The above pictures were drawn using my Canvas library (http://www.byond.com/developer/Koil/Canvas).
The following code was used to generate them:
world
maxx = 8
maxy = 8
view = "8x8"
var
obj/anchor = new(locate(1, 1, 1))
Canvas/canvas = new(anchor, 256, 256)
Noise/noise = new
mob
verb
noise_test()
var
width = 256
height = 256
x_scale = 128
y_scale = 128
value
for(var/px = 1, px <= width, px ++)
for(var/py = 1, py <= height, py ++)
value = noise.noise2(px / x_scale, py / y_scale)
value = noise.scale(value, 0, 255)
canvas.drawPixel(px, py, rgb(value, value, value))
canvas.update()
fbm_test()
var
width = 256
height = 256
x_scale = 128
y_scale = 128
value
for(var/px = 1, px <= width, px ++)
for(var/py = 1, py <= height, py ++)
value = noise.fbm2(px / x_scale, py / y_scale)
value = noise.scale(value, 0, 255)
canvas.drawPixel(px, py, rgb(value, value, value))
canvas.update()
Noise can be used for many different things. It is most commonly used to generate terrain.
Example terrain generated using Signal Lite:
http://files.byondhome.com/Koil/Island.zip is the program I made to generate islands like the above picture. You essentially take the noise you get from my library and treat it as "elevation." For example, you could treat all values less than 0 (the noise functions return values in the range -1 to 1) as water, and all values above 0 as land.
I am terrible at explaining things, but hopefully you can tell by my examples how it all works.
For more information, view:
http://breinygames.blogspot.com/2012/06/ generating-terrain-using-perlin-noise.html
http://en.wikipedia.org/wiki/Simplex_noise
http://en.wikipedia.org/wiki/Perlin_noise
http://en.wikipedia.org/wiki/Fractional_Brownian_motion
http://pcg.wikidot.com/pcg-algorithm:perlin-noise
Do you guys have any other ideas on what noise could be used for?
However you could do something with the ocean. It looks like just random noise.
#many sand #much shore #wow