for i=1, 10, do
value = love.math.noise(i)
print(value)
end
I'm trying to create a Perlin noise function. From what I gathered this is a build in function in lua that given an x value it returns a value between 0 and 1, but when I run the loop above I get the same value of .5 for every i variable input into the function. Am I wrong to think that this can be substituted instead of the random number generator? and why I cant get different values when inputting i into love.math.noise(i)?
thanks for the help, ironed out a few things with that, but i'm running into the issue that when I close the program and reopen it I get the same values. How can I have a random set of numbers each time?
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
noise is supposed to give the same output given the same input. You could add an offset to the arguments which is randomized at startup. Something like this: