IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 01 Mar 2015 02:56 PM |
| Is it just a way to use while wait() do without lag? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 02:56 PM |
| It runs code just before each render done by the Roblox client. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 02:57 PM |
| No. wait() can run up to 30 FPS, which is the physics engine speed. RenderStepped goes at about 60 FPS, which is the rendering engine speed. Well, it goes every render frame, which can be upwards of 60 FPS. |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 01 Mar 2015 02:57 PM |
| Thanks, but does it also lag? |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 01 Mar 2015 02:58 PM |
| Alright so you basicly have like one big while true do loop where the wait() depends on your computer performance and it does lag the same like while wait() do? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 02:58 PM |
| Lag is a bad term. Asking if something lags could mean so many different things. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 02:59 PM |
| while wait() do should never lag. Doing something 30 times per second is NOTHING to a computer's processor. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 02:59 PM |
There should be a sticky post about this (not really)
Lag depends mostly on what you are DOING with it. If you are trying to recalculate a path with PathfindingService 60 times per second, it is going to lag. If you display a message to the output 60 times per second, it won't lag as much. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:00 PM |
Prehistoricman, I don't like you. :( Stop posting before I can. :(
Oh well, supposedly you disliked me in the first place, so whatever. |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 01 Mar 2015 03:02 PM |
| Alright so is it less or more lag then a while wait() do? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:06 PM |
Potentially more lag, but if there was more lag it would also lag less, since the lag slows down your rendering, and it only happens when you get a render.
Okay, I have a question. If my game renders at 120 FPS, that does nothing for me since my screen refreshes at 60 Hz, right? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:07 PM |
'Oh well, supposedly you disliked me in the first place, so whatever.'
What? |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:08 PM |
Idk, Vege said you got frustrated with me at a script builder (ages ago of course). Since my post was relevant to this, I decided to ask you about that, since I don't remember. :\ |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:09 PM |
| Nope, don't remember a thing. Last time I visited a script builder was loooong ago. |
|
|
| Report Abuse |
|
|
| |
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 01 Mar 2015 03:11 PM |
| How fast you see something and how fast the computer thinks about it are two different things. For example, your monitor would only refresh 60 times a second but animations in the game would have 120 iterations per second - making them much smoother than say 15 seconds. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Mar 2015 03:11 PM |
'No. wait() can run up to 30 FPS, which is the physics engine speed. RenderStepped goes at about 60 FPS, which is the rendering engine speed. Well, it goes every render frame, which can be upwards of 60 FPS.' No, the physics engine runs at 60 FPS since a long time ago (http://blog.roblox.com/2013/09/synchronizing-physics-and-rendering-at-a-smooth-60-fps/)
And wait itself is not limited by the physics or rendering speed. |
|
|
| Report Abuse |
|
|
|
| 01 Mar 2015 03:14 PM |
| Wait, really? Wow. I forgot that, and people have said it ran at 30, and of course, I never know anything unless I hear it on the forum. :P |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
LucasLua
|
  |
| Joined: 18 Jun 2008 |
| Total Posts: 7386 |
|
|
| 01 Mar 2015 03:19 PM |
| If you've ever done any multi-threading in software before you should understand parallelism. Each Lua script runs in its own thread, and can create new threads with events and coroutines. Like other languages and environments have thread.sleep, calling wait() will make the thread sleep for that amount of time. |
|
|
| Report Abuse |
|
|