|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 15 May 2016 09:14 AM |
renderstepped runs 1/60 of a second
It's simple physics |
|
|
| Report Abuse |
|
|
WoolHat
|
  |
| Joined: 19 May 2013 |
| Total Posts: 1873 |
|
|
| 15 May 2016 09:18 AM |
| Renderstepped is also not usable in server scripts |
|
|
| Report Abuse |
|
|
|
| 15 May 2016 09:25 AM |
crap didnt read...
It's simple physics |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 17 May 2016 06:15 PM |
Ok, thanks.
~~~Da siggy is OP~~~ |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 6338 |
|
|
| 19 May 2016 07:15 PM |
| coroutine.yield() is about 1/60th i believe |
|
|
| Report Abuse |
|
|
sparker22
|
  |
| Joined: 11 Mar 2010 |
| Total Posts: 846 |
|
|
| 19 May 2016 07:20 PM |
@AggressiveCatch
Heartbeat still works on the server. |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 03 Oct 2011 |
| Total Posts: 6405 |
|
|
| 19 May 2016 07:22 PM |
| I thought renderstepped was 1/30 a second.. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 2347 |
|
|
| 19 May 2016 07:27 PM |
| How can RenderStepped slow down by 2x? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 6338 |
|
|
| 19 May 2016 07:35 PM |
JUST USE COROUTINE.YIELD() IT'S 1/60TH |
|
|
| Report Abuse |
|
|
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 |
|
|