Randomness, with Löve
Posted: Tue Aug 21, 2012 9:43 pm
Hi,
I just was just reading the native implementation of love.run on the wiki.
So, from what I can see, the pseudo random generator is reset with a seed based on current time each time löve is started.
Actually, as some of you might be aware of, on some others frameworks, when you need randomness, using just math.random() will return the same sequence of values, even after restarted your Lua app.
Well, can I conclude that using math.randomseed later on is pointless as love.run already takes care of that ?
Unless one need to work with a specific seed ...
I just was just reading the native implementation of love.run on the wiki.
So, from what I can see, the pseudo random generator is reset with a seed based on current time each time löve is started.
Code: Select all
math.randomseed(os.time())
math.random() math.random()
Well, can I conclude that using math.randomseed later on is pointless as love.run already takes care of that ?
Unless one need to work with a specific seed ...