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: Stat Game most efficient scripting?

Previous Thread :: Next Thread 
Beartikal is online. Beartikal
Joined: 16 Jan 2012
Total Posts: 275
27 Jul 2017 11:11 AM
When making a Stat-based game, what would be the most efficient way to call functions from local to server. For instance, if I make it to where you punch for Experience, wouldn't I have to fire to the server each time the person punches in order to up their exp? (assuming the Stat folders are in serverstorage and can only be accessed by the server)


Report Abuse
KapKing47 is not online. KapKing47
Joined: 09 Sep 2012
Total Posts: 5522
27 Jul 2017 11:14 AM
As soon as u punch u should call the server in general if u want it to hurt someone, so asking about xp makes no sense since both damage and xp handling can be done in 1 trip from client to the server.


Report Abuse
Beartikal is online. Beartikal
Joined: 16 Jan 2012
Total Posts: 275
27 Jul 2017 11:20 AM
I made damage and exp all in the same one, but is there any more efficient way?


Report Abuse
KapKing47 is not online. KapKing47
Joined: 09 Sep 2012
Total Posts: 5522
27 Jul 2017 11:25 AM
Not really. Unless there was some sort of "automatic punch system" where it would keep punching when u click and stop when u lift ur finger of the mouse. That way the server can do everything as soon as u click and then just wait for the client to say "stop", so there is a LOT less client-server communication. But don't be afraid of client-server communication, like... from all I know, FPS games do the projectile calculations on the client and send the data to the server PER BULLET SHOT to see if it hit a person... and that could go upwards of 20 communications per second or more.


Report Abuse
Proxinable is not online. Proxinable
Joined: 12 Sep 2011
Total Posts: 395
27 Jul 2017 11:43 AM
You should also consider security, if you're going to let the client fire a function to award something the client can very easily spam that request to exploit your game.
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