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 » Scripters
Home Search
 

Re: Would doing all RNG serverside be wasteful?

Previous Thread :: Next Thread 
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
05 Jul 2016 05:26 PM
I've been doing basically all random number generation serverside so people can't exploit the rng seed to predict the randomization, but then I remembered there's stuff that should be handled by the client with server authority. Would it be better to do rng serverside and then send it to the client, or should I do it clientside and risk the slight vulnerability to clear up network traffic?
Report Abuse
AxonMega is not online. AxonMega
Joined: 29 Aug 2014
Total Posts: 2403
05 Jul 2016 05:44 PM
Use a RNG to determine the answer to your request, and all will be well.
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
05 Jul 2016 06:28 PM
In most cases I would say clientside, but it depends on what you're doing. If you're even thinking of handling it serverside, you probably have a good reason for it.

What are you trying to do, exactly? If this is something sensitive it shouldn't be handled on the client in the first place; remember, the client should only serve as a way for you to gather input and provide feedback (e.g interfaces).
Report Abuse
SadisticNub is not online. SadisticNub
Joined: 05 Jan 2013
Total Posts: 4948
05 Jul 2016 06:29 PM
For example, if you're handling a daily login reward and want to pick a random award using a random number, you should be handling that entirely on the server and only notifying the client of the reward so that they can, for example, display the reward in an interface.
Report Abuse
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
05 Jul 2016 06:34 PM
math.randomseed(os.time()%16)


-Widths
Report Abuse
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
06 Jul 2016 12:29 AM
The issue, I mean, is that doing rng clientside allows the player to see the seed used. Many cheat programs for games are able to use the seed to accurately predict the random number.
Report Abuse
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
06 Jul 2016 12:29 AM
ok, then just use math.randomseed(os.time()%16)


-Widths
Report Abuse
pinballboy7 is not online. pinballboy7
Joined: 12 Mar 2009
Total Posts: 1485
06 Jul 2016 12:43 AM
That is not at all what I'm asking.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Jul 2016 12:47 AM
Get it on the server, then return it to the client. :p


Report Abuse
iJava is not online. iJava
Joined: 06 Mar 2011
Total Posts: 29914
06 Jul 2016 01:43 AM
if you use os.time() (serverside time) as the seed for math.random(), then they can't manipulate it on the client because it would no longer be based off of tick() (client time)


-Widths
Report Abuse
cntkillme1 is not online. cntkillme1
Joined: 16 Feb 2012
Total Posts: 592
06 Jul 2016 01:45 AM
LMAO no @ijava
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Jul 2016 01:45 AM
*edits computer time in settings*
Muahahah!!
I do this on my phone on games that want me to wait a day for a building to build and I just edit my settings. lololol

So no that won't work and is a bad idea. XD


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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