"randomness" is how much the color value changes from pixel to pixel. "res" is how many pixels are on the screen, it is as if you are cropping the image, not as if you are decreasing the resolution while keeping the same image size. watch out with the res though
i decided to fix this perlin noise thing (and by that i mean completely remake it)