TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 05:05 AM |
| The title is pretty much all I have to say |
|
|
| Report Abuse |
|
|
Aerideyn
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 1882 |
|
| |
|
| |
|
RaidenJPN
|
  |
| Joined: 22 May 2013 |
| Total Posts: 6920 |
|
|
| 03 Jun 2013 06:10 AM |
| Why in the world would we ever need something as preposterous as this? |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
| |
|
|
| 03 Jun 2013 06:56 AM |
local onFrame={on=false,connect=function(self,fun) self.on=true Spawn(function() while self.on do fun() end end) end, disconnect=function(self) self.on=false end}
onFrame:connect(function() print("GERMEHÖRD A FRAME") end) wait(10) onFrame:disconnect() |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 07:09 AM |
| Radio, wouldnt that freeze the game? |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 07:36 AM |
Like this if u cry every Tim. -- Signature |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 07:50 AM |
| throw in a wait() in the loop |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 07:55 AM |
| then it has a 0.03 second delay, not before every frame |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 08:11 AM |
| And by frame i mean, every time it draws a new frame on the screen. So with an event like that you can make stuff move before it gets rendered so there is no delays |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 08:13 AM |
| But the game works at 30 FPS, graphics framerate is completely separated from the game, it doesnt even exist from the games point of view. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 08:14 AM |
| If its for a gui you can use gui tweening though, it might be a render-side thing and be in sync with the graphics. |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 08:19 AM |
| The game is locked to 60 fps. Connecting currentcamera changes to a function that moves a brick will move it like it should if you are rotating your camera in first person, but that doesnt get fired when the camera moves (changes position) |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 08:34 AM |
Don't know if this is what you're searching for.. http://wiki.roblox.com/index.php/Stepped_(Event) |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 08:38 AM |
Raven that fires only every 1/30 of an second which is 0.0333 which is also wait().
Also an event that runs every time the camera changes (position too) would do pretty much the same trick that the pre-render event would but that would only work for things hooked to the camera. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 08:40 AM |
Everything is still synced with the physics, and the physics attempts to run at 30 FPS.
Roblox cannot really add something like that without either making it a really special case with tons of limitations (you cannot for example change any game objects mid-frame, as physics and all are running at that point i guess) which would make it useless, or by bumping the physics frame rate to 60 FPS (performance would take a hit even though it could be avoided to some degree) |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 08:49 AM |
| It would be nice if the camera.changed would fire on position changes too |
|
|
| Report Abuse |
|
|
noliCAIKS
|
  |
| Joined: 08 Mar 2010 |
| Total Posts: 917 |
|
|
| 03 Jun 2013 08:51 AM |
I believe RunService.Heartbeat fires before each frame and RunService.Stepped after each frame. If you're out of ideas, you can always use coroutine.yield() to get 100-10000 FPS. |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 09:12 AM |
| Heartbeat is also 0.03333 seconds. |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2013 09:13 AM |
| He wants it to be synced with graphics updates instead of physics updates, which is impossible. |
|
|
| Report Abuse |
|
|
TNOMCat
|
  |
| Joined: 02 Aug 2011 |
| Total Posts: 156 |
|
|
| 03 Jun 2013 09:24 AM |
and yield loop has also similiar speed compared to wait().
I shall stick with camera changed event and predicting the character movement to attach a thing to the camera. |
|
|
| Report Abuse |
|
|
| |
|
uyjulian
|
  |
| Joined: 29 Nov 2012 |
| Total Posts: 1214 |
|
| |
|
|
| 03 Jun 2013 02:35 PM |
gui = Instance.new("ScreenGui",game.StarterGui)
while wait() do Spawn(function() print("lol") end) Instance.new("Frame",gui) end
There it executes that before each frame |
|
|
| Report Abuse |
|
|