Alternative to NSTimer
reklis Wrote:The Oolong skeleton project simply rotates a multicolored cube in space. This should give us a nice "Apples to Apples" comparison of different event pumping mechanisms with unchanging rendering and FPS calculation code.
The length of time taken to run through the render code is often a factor. I think rendering a simple cube (so, 12 triangles assuming you're not culling the back faces) is NOT a good enough representation of what your average game will be doing..
reklis Wrote:Switching from NSTimer to a mainGameLoop does not appear to improve anything, and may actually hinder performance.
I think you'll find if you're rendering a more complex scene, or have some physics simulations happening in your application, it might change things a bit. Especially with a low timer period (i.e. 1/60), where you'll start to notice beat frequencies when the timer misfires. Even though your average FPS might look ok, timer misfires cause stuttering or jerkiness in the animation. I've seen this on many applications on the app store.
Is your 'main loop' in a separate thread? (I think it would need to be). What priority did you set on the thread?
What are the times you are showing on your 'main thread' results (0.001, 0.002, etc.) Sleep time per cycle? They seem a bit arbitrary. I'm not sure what a random sleep period gains you. If you're trying to go as fast as possible, why sleep at all? The iPhone hardware refresh is 60Hz, so you *could* run a tight loop (no sleep) and allow the blocking in the OpenGL swap buffers calls to keep your drawing in check at 60fps.
| Messages In This Thread |
|
Alternative to NSTimer - demonpants - Mar 18, 2009, 02:51 PM
Alternative to NSTimer - longjumper - Mar 18, 2009, 04:15 PM
Alternative to NSTimer - demonpants - Mar 18, 2009, 11:48 PM
Alternative to NSTimer - Frank C. - Mar 19, 2009, 01:28 AM
Alternative to NSTimer - godexsoft - Mar 19, 2009, 02:15 AM
Alternative to NSTimer - riruilo - Mar 20, 2009, 02:56 AM
Alternative to NSTimer - demonpants - Mar 20, 2009, 11:29 AM
Alternative to NSTimer - JustinFic - Mar 20, 2009, 12:01 PM
Alternative to NSTimer - demonpants - Mar 20, 2009, 02:07 PM
Alternative to NSTimer - godexsoft - Mar 23, 2009, 09:04 AM
Alternative to NSTimer - godexsoft - Mar 23, 2009, 09:07 AM
Alternative to NSTimer - GregoryM - Mar 24, 2009, 01:15 AM
Alternative to NSTimer - demonpants - Mar 25, 2009, 05:07 PM
Alternative to NSTimer - godexsoft - Mar 26, 2009, 02:25 AM
Alternative to NSTimer - demonpants - Mar 26, 2009, 10:08 AM
Alternative to NSTimer - Ammonium - Apr 6, 2009, 12:44 PM
Alternative to NSTimer - demonpants - Apr 8, 2009, 02:43 PM
Alternative to NSTimer - mterlecki - May 12, 2009, 09:26 AM
Alternative to NSTimer - longjumper - May 12, 2009, 06:08 PM
Alternative to NSTimer - mister_t - May 13, 2009, 12:49 PM
Alternative to NSTimer - green_ghost - May 13, 2009, 11:12 PM
Alternative to NSTimer - bmantzey - May 15, 2009, 09:25 AM
Alternative to NSTimer - warmi - May 15, 2009, 10:49 AM
Alternative to NSTimer - warmi - May 15, 2009, 10:53 AM
Alternative to NSTimer - green_ghost - May 15, 2009, 07:45 PM
Alternative to NSTimer - ShiftZ - May 16, 2009, 02:24 AM
Alternative to NSTimer - mpatric - May 18, 2009, 09:49 AM
Alternative to NSTimer - ShiftZ - May 18, 2009, 11:55 AM
Alternative to NSTimer - warmi - May 18, 2009, 12:03 PM
Alternative to NSTimer - DoG - May 18, 2009, 02:56 PM
Alternative to NSTimer - warmi - May 18, 2009, 07:46 PM
Alternative to NSTimer - mpatric - May 19, 2009, 02:27 AM
Alternative to NSTimer - DoG - May 19, 2009, 04:07 PM
Alternative to NSTimer - warmi - May 19, 2009, 08:38 PM
Alternative to NSTimer - DoG - May 20, 2009, 02:08 AM
Alternative to NSTimer - ShiftZ - May 20, 2009, 04:48 AM
Alternative to NSTimer - iamflimflam1 - May 20, 2009, 07:33 AM
Alternative to NSTimer - DoG - May 20, 2009, 07:42 AM
Alternative to NSTimer - ShiftZ - May 20, 2009, 08:35 AM
Alternative to NSTimer - warmi - May 20, 2009, 09:08 AM
Alternative to NSTimer - mpatric - May 20, 2009, 11:23 AM
Alternative to NSTimer - mpatric - May 20, 2009, 11:26 AM
Alternative to NSTimer - mpatric - May 20, 2009, 11:31 AM
Alternative to NSTimer - ShiftZ - May 20, 2009, 12:12 PM
Alternative to NSTimer - DoG - May 20, 2009, 02:44 PM
Alternative to NSTimer - warmi - May 20, 2009, 08:17 PM
Alternative to NSTimer - arekkusu - May 20, 2009, 09:05 PM
Alternative to NSTimer - AnotherJake - May 20, 2009, 09:43 PM
Alternative to NSTimer - warmi - May 20, 2009, 10:27 PM
Alternative to NSTimer - maximile - May 21, 2009, 05:46 AM
Alternative to NSTimer - arekkusu - May 21, 2009, 05:47 AM
Alternative to NSTimer - warmi - May 21, 2009, 07:32 AM
Alternative to NSTimer - AnotherJake - May 21, 2009, 07:35 AM
Alternative to NSTimer - arekkusu - May 21, 2009, 09:24 AM
Alternative to NSTimer - warmi - May 21, 2009, 09:43 AM
Alternative to NSTimer - arekkusu - May 21, 2009, 09:58 AM
Alternative to NSTimer - warmi - May 21, 2009, 10:19 AM
Alternative to NSTimer - DoG - May 22, 2009, 01:39 AM
Alternative to NSTimer - warmi - May 22, 2009, 09:14 AM
Alternative to NSTimer - demonpants - Jun 8, 2009, 02:41 PM
Alternative to NSTimer - reklis - Jul 12, 2009, 01:36 PM
Alternative to NSTimer - maximile - Jul 13, 2009, 06:50 AM
Alternative to NSTimer - mpatric - Jul 13, 2009 07:10 AM
Alternative to NSTimer - Frank C. - Jul 13, 2009, 11:33 AM
Alternative to NSTimer - longjumper - Jul 13, 2009, 11:44 AM
Alternative to NSTimer - mpatric - Jul 13, 2009, 12:06 PM
Alternative to NSTimer - warmi - Jul 14, 2009, 12:18 AM
Alternative to NSTimer - DoG - Jul 14, 2009, 12:43 AM
Alternative to NSTimer - warmi - Jul 14, 2009, 08:12 AM
Alternative to NSTimer - mpatric - Jul 14, 2009, 08:12 AM
Alternative to NSTimer - AnotherJake - Jul 14, 2009, 08:35 AM
Alternative to NSTimer - warmi - Jul 14, 2009, 09:09 AM
Alternative to NSTimer - longjumper - Jul 14, 2009, 09:18 AM
Alternative to NSTimer - warmi - Jul 14, 2009, 09:38 AM
Alternative to NSTimer - AnotherJake - Jul 14, 2009, 09:45 AM
Alternative to NSTimer - AnotherJake - Jul 14, 2009, 09:47 AM
Alternative to NSTimer - DoG - Jul 14, 2009, 01:21 PM
Alternative to NSTimer - reklis - Jan 8, 2010, 08:34 PM
Alternative to NSTimer - riruilo - Jan 11, 2010, 01:52 PM
|
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| NSTimer fine, CADisplayLink having some issues | monteboyd | 5 | 7,479 |
Aug 31, 2010 07:05 PM Last Post: Skorche |
|
| NSTimer hiccups/choppy/jerky | jeonghyunhan | 2 | 2,404 |
Sep 24, 2009 07:35 PM Last Post: jeonghyunhan |
|
| Using an NSTimer to progressively draw a view | StevenD | 4 | 3,670 |
May 14, 2009 07:57 AM Last Post: StevenD |
|
| OpenGL render loop - NSTimer vs rendering thread | smallstepforman | 27 | 20,484 |
Feb 2, 2009 10:22 AM Last Post: ThemsAllTook |
|
| Alternative Input/Control Ideas | chrisco | 8 | 3,874 |
Aug 6, 2008 03:21 PM Last Post: bruss14 |
|

