bob371
|
  |
| Joined: 15 Aug 2008 |
| Total Posts: 1834 |
|
|
| 10 Aug 2012 02:32 AM |
| Since when did the roblox timing sequence increase by tenfold? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:33 AM |
???
wait() always waits for one frame. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 02:35 AM |
@ArceusInator
Really? Try changing the DefaultWaitTime setting in the studio and tell me if it still waits for one frame. |
|
|
| Report Abuse |
|
|
bob371
|
  |
| Joined: 15 Aug 2008 |
| Total Posts: 1834 |
|
|
| 10 Aug 2012 02:47 AM |
| I just found out an hour ago while playing around at a script builder. Considering I do lot of animations, it was hard to miss and kind of ticked me off. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 03:29 AM |
ugm n00bs.
I thought you animators would be smarter than this.
Why would you ever, ever, evar, wait()? That's just not giving any arguments. That doesn't mean that it will always forever be a frame. If you want to wait by a frame, you should wait(1/framespersecond) or wait(0.03).
And you complain about your animations being broken T_T...
Well, I have nothing against you, it's just that you did something stupid.
So, to fix this, use cntrl+h to find and replace wait() or wait(0) with wait(1/FramesPerSecond) and have a variable called FramesPerSecond which you should use to make your animation work again.
kthx |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 03:30 AM |
wait but isn't it still one frame?
wait what?
.......
how did the animations get broken? |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:34 AM |
| wait() always pauses the thread for a frame. However, wait(1/30) will always wait a thirtieth of second unless the frame rate doesn't permit it. The max frame rate is 30, however, if it were higher, scripts using wait() would have faster animation. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:35 AM |
@Every single person who posted in this thread
Read this, please:
http://wiki.roblox.com/index.php/User:JulienDethurens/Essays/Wait_function |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 03:45 AM |
@awsum,
Yes, but Roblox can change it at any moment.
There should be a proper way to wait a frame...like,
wait(Roblox.Time.Frame)
wait no
Roblox doesn't do things like that.... (I was thinking of Love2d :P) |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:48 AM |
Okay, wait() with no arguments works by using a setting instead of a specified argument which is zero by default. Using zero as the argument makes it pause until the next frame. If the setting is changed, it changes the "default wait time", as specified with its name, and will wait the approximate specified time.
Neat. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:48 AM |
@SN0X
The proper way to wait a frame is this:
wait(0)
However, in most cases, ESPECIALLY WHEN MAKING ANIMATIONS, you shouldn't wait exactly a frame.
Seriously, most of the people who wait a frame just happen to wait a frame because it's a frame. They just arbitrarily choose that value because it's a frame.
Almost no scripter on ROBLOX actually understands how the wait function works... |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 03:53 AM |
@julien.
I read your article.
I need to change all my wait()s to wait(0)! Thanks.
And I dissagree- I think that while making animations you should move parts every frame. The human eye can detect movement at about 40 frames/second (some say 60, some say 30, but I think it's actually about 40). So, to make smooth animations, move by the frame. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:54 AM |
Doesn't roblox have a FPS cap at 30 FPS?
0.03 is the fastest you can go assuming you're on max FPS, why make it lower? |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 03:54 AM |
@jAlternate,
Off topic: why don't you use your main account? Banned? |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 10 Aug 2012 03:58 AM |
wait() waits one frame, no matter how long that frame is. wait(0.03) waits 0.03 seconds only if one frame is shorter. wait(1/30) waits 1/30 seconds if one frame is shorter. wait(0) waits one frame. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 03:58 AM |
Hold it, my DefaultWaitTime is 0.029999999999999999
I've never changed this setting. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:00 AM |
"wait() waits one frame, no matter how long that frame is."
Not if you change your default wait time... |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:01 AM |
"Not if you change your default wait time..."
*Not if you make your default wait time more than 0.03 |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:02 AM |
@ArceusInator
A frame isn't exactly 0.03 seconds. It can vary. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:03 AM |
| Yes, but the minimum length of a frame is 0.03 seconds because the maximum FPS is 30. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 04:06 AM |
| It's usually around 27-28 frames/second. |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 04:07 AM |
| Depends completely on your machine and what your trying to run. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 10 Aug 2012 04:15 AM |
I'm talking about on a server.
It always seems to be around 27-28 frames/sec as long as your server is not overloaded with 1000s of parts and 100s of crappy inefficient scripts.
Whether it's an empty baseplate, or a legitimate game, it's usually around 27-28 frames/sec. |
|
|
| Report Abuse |
|
|
Evess
|
  |
| Joined: 27 May 2012 |
| Total Posts: 25583 |
|
|
| 10 Aug 2012 05:02 AM |
always thought wait() were 0.03 by default o well
☼ Arcen Council. ☼ |
|
|
| Report Abuse |
|
|
|
| 10 Aug 2012 01:02 PM |
In my experience wait() with no arguments should only be used if your logic needs to yield to another thread. Examples can include loops that take a significant amount of time, by adding a wait you will let the program run smoothly rather than freeze it for the duration of the loop.
The Mac client seems to have a different default wait time, so any code that wants to do something at a specific rate should set a time delta in the wait call or be subject to system specific bugs. |
|
|
| Report Abuse |
|
|