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: Every 1/60th a second on a server script

Previous Thread :: Next Thread 
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
15 May 2016 07:52 AM
Is it impossible to run a block of code 60 times a second on the server?


~~~Da siggy is OP~~~
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
15 May 2016 08:21 AM
The closest you can get (that I know of) is run service's heartbeat (~40/second)
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
15 May 2016 08:33 AM
^ although Heartbeat can vary and go about 60 times a second

Formerly ToxicDominator - add 17,509 posts
Report Abuse
Lord_Oscar is not online. Lord_Oscar
Joined: 15 Nov 2009
Total Posts: 17662
15 May 2016 09:14 AM
renderstepped runs 1/60 of a second


It's simple physics
Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
15 May 2016 09:18 AM
Renderstepped is also not usable in server scripts
Report Abuse
Lord_Oscar is not online. Lord_Oscar
Joined: 15 Nov 2009
Total Posts: 17662
15 May 2016 09:25 AM
crap didnt read...


It's simple physics
Report Abuse
sparker22 is not online. sparker22
Joined: 11 Mar 2010
Total Posts: 846
15 May 2016 09:34 AM
Heartbeat is the way to go. It's tied to fps.





Also, if you use renderstepped, you probably shouldn't.


'Since the only high-frequency signal in ROBLOX at this time is RenderStepped, some developers of games and scripts are using it as a signal to run the game logic, custom animations, custom replication etc. at. Due to the way ROBLOX frame is scheduled, this limits the performance of games in certain cases. In the worst case, running code in RenderStepped as opposed to Heartbeat can slow down the game by ~2x.' ~Zeuxcg
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
17 May 2016 06:15 PM
Ok, thanks.


~~~Da siggy is OP~~~
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:02 PM
just be aware that Heartbeat varies depending on the client's FPS

Formerly ToxicDominator - add 17,509 posts
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
19 May 2016 07:10 PM
"just be aware that Heartbeat varies depending on the client's FPS"

some people must click on threads without even reading the title, man
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:12 PM
what are you talking about

Formerly ToxicDominator - add 17,509 posts
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
19 May 2016 07:15 PM
coroutine.yield() is about 1/60th i believe
Report Abuse
sparker22 is not online. sparker22
Joined: 11 Mar 2010
Total Posts: 846
19 May 2016 07:20 PM
@AggressiveCatch


Heartbeat still works on the server.
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
19 May 2016 07:22 PM
How can renderstepped slow down a game by 2x?

I use this all the time in my local scripts. Should I replace it with heartbeat?
Report Abuse
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
19 May 2016 07:22 PM
I thought renderstepped was 1/30 a second..
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
19 May 2016 07:23 PM
wait() is 1/30 of a second

renderstepped is 1/60 of a second

@above
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:23 PM
^ for the most part it is

Formerly ToxicDominator - add 17,509 posts
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:24 PM
I meant to reference the post above you but it's actually 1/60 not 1/30
stupid me

Formerly ToxicDominator - add 17,509 posts
Report Abuse
C_Sharper is not online. C_Sharper
Joined: 03 Oct 2011
Total Posts: 6405
19 May 2016 07:25 PM
I swear some one said RS was 1/30 a second

oh well
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:26 PM
RunService.Stepped ~ wait()
RunService.RenderStepped ~ (1/60)/second

Formerly ToxicDominator - add 17,509 posts
Report Abuse
cgjnm is not online. cgjnm
Joined: 22 Dec 2011
Total Posts: 2347
19 May 2016 07:27 PM
How can RenderStepped slow down by 2x?
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:28 PM
RenderStepped fires per render frame while Heartbeat fires per frame

Formerly ToxicDominator - add 17,509 posts
Report Abuse
sparker22 is not online. sparker22
Joined: 11 Mar 2010
Total Posts: 846
19 May 2016 07:29 PM
Renderstepped can only be run on the client.
It runs at the rate of your FPS. 45 FPS = 1/45 60fps = 1/60

Heartbeat 'at most' can cause a 2x slowdown. I have no answer as to why. Zeuxcg, a ROBLOX staff member said that. You should most definitely use Heartbeat instead.
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
19 May 2016 07:35 PM
JUST USE COROUTINE.YIELD()
IT'S 1/60TH
Report Abuse
Skellobit is not online. Skellobit
Joined: 13 Apr 2016
Total Posts: 12758
19 May 2016 07:36 PM
coroutine.yield() is not what he's looking for...

Formerly ToxicDominator - add 17,509 posts
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