math.randomseed(os.time())
Should probably be included in the base code of the T-Engine every time it starts, otherwise you have to manually add it to each module so you don't get the same random numbers every start up.
math.randomseed()
Moderator: Moderator
Re: math.randomseed()
No, you do not want to use math.random at all.
Use the rng.* functions, they are correctly inited and use a mersene twister which makes much better random numbers than the default OS rand()
Use the rng.* functions, they are correctly inited and use a mersene twister which makes much better random numbers than the default OS rand()
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

Re: math.randomseed()
There are a few calls to math.random from the thirdparty modules, anything in there that is sensitive to non-randomness?
<DarkGod> lets say it's intended
Re: math.randomseed()
True .. I'll include the init just in case 
Still for your own code use rng.*

Still for your own code use rng.*
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning

-
- Reaper
- Posts: 1535
- Joined: Mon Jan 22, 2007 6:31 pm
- Location: East of the sun, west of the moon
Re: math.randomseed()
perhaps it would be better to say here is a list of rng.* functions you can use, rather than say use them... as some people may not know all of them... and it is easier to find the math.* stuff because it is written down online.
Oliphant am I, and I never lie.
Re: math.randomseed()
That reminds me, is there any way to include documentation of the C functions exposed to Lua with the LuaDoc generated documentation?
<DarkGod> lets say it's intended