I've been experimenting with random generation, and seed-based stuff. I'm not really sure of the best way to do this, previously I just called love.math.setRandomSeed(seed) in love.load.
What I want to do is let the user input a string that can be used for a string. Currently, I have this function:
Code: Select all
function generateSeed(seed)
seedStringOfNumbers = ""
for i = 1, string.len(seed) do
seedStringOfNumbers = seedStringOfNumbers .. tostring(string.byte(string.sub(seed, i, i)))
end
print(seedStringOfNumbers)
return(seedStringOfNumbers)
--love.math.setRandomSeed(tonumber(seedStringOfNumbers))
end
I'm really not sure how to fix this, I'd be really grateful for any help.
Thanks in advance,
Noah