generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Random Number Generator

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Mar 2014 07:23 PM
Okay I experimented, and although I knew this, it proved it. math.random(1, 20) does NOT return a random number. I don't care what you say, but it doesn't. I have a standard Lua app on my iPod, Everytime I restart it, the "random" numbers, start over from the same number. How exactly could we MAKE a random number generator? No matter how many times you use math.random() it won't be random, so don't say this...


N = math.random(1, math.random(1, math.random(1, math.random(1, math.random(1, 9999)))))
Report Abuse
Discommodate is not online. Discommodate
Joined: 06 Mar 2011
Total Posts: 14052
22 Mar 2014 07:25 PM
don't you do randomseed or soemthing
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
22 Mar 2014 07:25 PM
math.randomseed(tick())

Yeah
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Mar 2014 07:26 PM
That still wouldn't be random...
Report Abuse
3rdblox is not online. 3rdblox
Joined: 09 Dec 2012
Total Posts: 4741
22 Mar 2014 08:05 PM
Computers cannot generate true random numbers. They have to use algorithms. The only "true" RNGs use dangerous chemicals.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Mar 2014 08:09 PM
So it really isn't possible?
Report Abuse
3rdblox is not online. 3rdblox
Joined: 09 Dec 2012
Total Posts: 4741
22 Mar 2014 08:23 PM
Well, you can get seemingly random things happening, but there is no way you could create a true random number generator with ROBLOX. Pseudo worked for every other developer, video game RNG abuse has only ever happened in Pokemon. Honestly, I wouldn't be so worried about players abusing the fact that you can't make a real RNG. Just put math.randomseed(tick()) at the start of every script that uses math.random() and you should be fine.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
22 Mar 2014 08:29 PM
I really wanna make one now though...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image