I was fiddling around with a title screen for Orb-Bits, and found it amazing just how much pure random fud could be pushed out to generate “static.” In its simplest implementation:
for i = 1, 1000 do
rect(math.random(WIDTH), math.random(HEIGHT), 1, 1)
end
I wouldn’t use it as background for anything more active than a title screen. I’m just amazed that it works even when nothing else is going on.
function setup()
end
function draw()
pr = image(WIDTH,1)
for x = 1, WIDTH do
dot = math.random(125)
pr:set(x,1,dot,dot,dot,255)
end
for y = 1, HEIGHT do
pps = math.random(WIDTH)
--sprite(pr,(WIDTH/2)-ps[y],y)
--sprite(pr,WIDTH+(WIDTH/2)-ps[y],y)
sprite(pr,(WIDTH/2)-pps,y)
sprite(pr,WIDTH+(WIDTH/2)-pps,y)
end
end