FlameYeti
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
|
| 23 Aug 2015 09:55 PM |
random = maps[math.random(1,#maps)]
where would i add the tick? |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 09:56 PM |
| on a different line about it |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
| |
|
FlameYeti
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
|
| 23 Aug 2015 10:09 PM |
| yes im stupid now help me plssssssss |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 10:09 PM |
They're meanies. Here: http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting |
|
|
| Report Abuse |
|
|
FlameYeti
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
|
| 23 Aug 2015 10:14 PM |
| thanks, but that didnt even mention math.randomseed |
|
|
| Report Abuse |
|
|
| |
|
|
| 23 Aug 2015 10:18 PM |
@iron lol you;re the bigger minnie Just put this at the top of your script and no where else math.randomseed(tick());
while true do the do |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 10:21 PM |
| @morashs How can I be mean? I'm an innocent scripter with only 100 posts! |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:00 PM |
"Just put this at the top of your script and no where else math.randomseed(tick());"
The only reason I came here to this thread was to tell the OP and majority of everyone who replies that THIS IS USELESS! This actually makes it LESS random! Roblox does a perfectly fine job of setting the seed on their own. And with this, you are almost 100% guaranteed huge streaks of first values. Exempli gratia: Join game, number picked is 7, second number picked is 2, leave game; Join game, number picked is 7, second number picked is 2, leave game; Join game, number picked is 7, second number picked is 9, leave game; Join game, number picked is 7, second number picked is 0, leave game; Join game, number picked is 7, second number picked is 0, leave game; Join game, number picked is 7, second number picked is 3, leave game; Join game, number picked is 7, second number picked is 3, leave game; Join game, number picked is 7, second number picked is 3, leave game; |
|
|
| Report Abuse |
|
|
FlameYeti
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
|
| 23 Aug 2015 11:06 PM |
jar
well right now it doesnt even pick a different map, so
any other ideas |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 23 Aug 2015 11:14 PM |
Roblox's prng has issues wherein if you seed it with tick() the most significant bits will still control the first few random numbers while successive numbers are influenced more by the least significant bits,
To remove the bias add this at the top of your code math.randomseed(tick()) for i = 1, math.random(50,100) do math.random() end --//bleeds off the first ~75 numbers to remove MSB biasing. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 11:16 PM |
Does Roblox use vanilla Lua's random function (which just calls the C function rand) or its own?
I don't think I ever had problems like this in vanilla Lua but I can't be too sure. |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 23 Aug 2015 11:19 PM |
@cnt Depends on how you bind it//what language you bind it with. I didn't notice anything with rbx.lua's math.random until this year, so it may have been messed up when they implemented math.noise (don't even get me started on everything wrong with math.noise). |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 11:21 PM |
Just regular 'ol Lua 5.1.5 (from the lua.org site). I wonder if LuaJIT has this problem
|
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 23 Aug 2015 11:25 PM |
| Haven't played much with lua standalone. Probably a non-issue. If you really wanted to make sure you could implement PCG as your prng and that'll pretty much eliminate any issues the standard LCG has. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:27 PM |
"prng" What flavor? I might like them. I do enjoy some prngles from time to time. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 11:27 PM |
| I rarely have a need for random numbers anyways, but that really does sound something that is too good to be true (pcg-random org) |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 23 Aug 2015 11:30 PM |
| @cnt It blows pretty much every non csprng out of the water, but the jury is still out on whether or not it is (or can be adapted to be) cryptographically secure. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:31 PM |
hi cnt :o
i'm studying z80 asm and 86-64 asm.
I started z80 because I found an old TI-85 and I heard that if you use this hack, it allows the user to code with memory-efficient z80 asm.
just wanted to put that out there
ʏᴏᴜ ᴛʜᴏᴜɢʜᴛ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴅʀᴀɢ ᴍᴇ ᴛᴏ ᴛʜᴇ ʙᴏᴛᴛᴏᴍ ᴏғ ᴛʜᴇ ʟᴀᴋᴇ sᴏ ʏᴏᴜ ᴄᴏᴜʟᴅ ᴇᴀᴛ ᴍᴇ ʟᴀᴛᴇʀ... ᴡᴇʟʟ ɢᴜᴇss ᴡʜᴀᴛ ᴘᴜɴᴋ... ɪᴍ ᴀ ғɪsʜ... ᴡɪᴛʜ ʟᴇɢs |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:32 PM |
Can't they just test it to see if it's cryptographically secure? What was the testing method... I think one of the steps was making sure that given a megabit, it must be impossible or very difficult to determine the next bit? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 11:35 PM |
Hi, also the TI-85 should have the Asm, AsmPrgm, and AsmComp functions built-in, so no need to hack it to run assembly.
Just create a program, go to Catalog -> AsmPrgm then after a new line, type the program. So something like (pseudo-code, this will most likely crash your calc.):
: AsmPrgm : 001F3C |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2015 11:35 PM |
| I had a TI-85 once. That was for a little while though. My Dad gave it to my when my TI-83's display broke. Then, after two or so years since the TI-85's display broke (Second display, second calculator), we finally found a TI-86. So far, the screen is fine. But they sure seem to have problems with these displays after a while. |
|
|
| Report Abuse |
|
|
FlameYeti
|
  |
| Joined: 14 Jan 2009 |
| Total Posts: 22158 |
|
|
| 23 Aug 2015 11:35 PM |
| my thread turned into nerd talk aaaaaaa help |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 23 Aug 2015 11:36 PM |
Oh wait, nvm I lied.
My TI-84 has it built-in and so does my cousin's TI-83, so I assumed the TI-85 would since it's a newer? brand. |
|
|
| Report Abuse |
|
|