iDevGames Forums
variable frame rate animation in Cocoa - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Game Programming Fundamentals (/forum-7.html)
+--- Thread: variable frame rate animation in Cocoa (/thread-6912.html)



variable frame rate animation in Cocoa - Damian - Jul 16, 2003 06:38 AM

In the past (in METAL) I have always measured elapsed time between loops, multiplying the velocities by elapsed time to move sprites.

I have switched to Cocoa, and done some animation with fixed frame rates using NSTimer and NSThread. How can I run the loop as fast as the machine can support it?


variable frame rate animation in Cocoa - Mark Levin - Jul 16, 2003 07:32 AM

Set the timer to a very, very small interval (like .001 - a thousand times a second).


variable frame rate animation in Cocoa - kelvin - Jul 16, 2003 04:46 PM

Quote:Originally posted by Mark Levin
Set the timer to a very, very small interval (like .001 - a thousand times a second).


set it to zero or negative Rasp
Zero or negative values get translated to the smallest available interval.


variable frame rate animation in Cocoa - macboy - Jul 16, 2003 06:00 PM

Quote:Originally posted by kelvin
set it to zero or negative Rasp
Zero or negative values get translated to the smallest available interval.
Really? Cool. Wow