variable frame rate animation in Cocoa
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?
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?
Visit http://www.theDailyGrind.net for your recommended daily intake of embittered satire.
Set the timer to a very, very small interval (like .001 - a thousand times a second).
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

Zero or negative values get translated to the smallest available interval.
---Kelvin--
15.4" MacBook Pro revA
1.83GHz/2GB/250GB
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Use an integer value as part of a variable name | PHANTOMIAS | 5 | 3,352 |
Dec 8, 2009 09:24 AM Last Post: PHANTOMIAS |
|
| Separating update rate from render rate | Jar445 | 5 | 3,731 |
Jan 17, 2009 01:43 PM Last Post: AnotherJake |
|
| Anybody have an idea what this variable is used for? | WhatMeWorry | 8 | 3,890 |
Mar 1, 2007 10:31 AM Last Post: unknown |
|
| Frame Based Animation | Nick | 6 | 3,509 |
Jan 27, 2007 06:25 AM Last Post: 007gamer |
|
| Previous frame inner to this frame (corrupt stack?) | wyrmmage | 9 | 6,441 |
Nov 29, 2006 05:14 PM Last Post: wyrmmage |
|

