I did some more testing and am now calculating mean delta times for
each second as well as the standard deviation of the delta times.
Here's what i get for the space racer above:

01-27 15:11:42.274: DEBUG/AFX(2504): fps: 56.82312, delta:
0.016143799, mean delta: 0.01756897, stddev. delta: 0.0026706476,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:43.274: DEBUG/AFX(2504): fps: 54.986576, delta:
0.016479492, mean delta: 0.018019613, stddev. delta: 0.0038374658,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:44.290: DEBUG/AFX(2504): fps: 50.92457, delta: 0.03729248,
mean delta: 0.019476827, stddev. delta: 0.0064565083, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:45.298: DEBUG/AFX(2504): fps: 53.9243, delta: 0.015136719,
mean delta: 0.019114176, stddev. delta: 0.00692833, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:46.306: DEBUG/AFX(2504): fps: 52.600296, delta:
0.012298585, mean delta: 0.018918864, stddev. delta: 0.0053105806,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:47.306: DEBUG/AFX(2504): fps: 52.914413, delta:
0.01171875, mean delta: 0.018682353, stddev. delta: 0.005447507,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:48.337: DEBUG/AFX(2504): fps: 51.17586, delta:
0.030395508, mean delta: 0.019417318, stddev. delta: 0.0067782626,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:49.337: DEBUG/AFX(2504): fps: 53.930874, delta:
0.031311035, mean delta: 0.019150289, stddev. delta: 0.0061283736,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:50.345: DEBUG/AFX(2504): fps: 54.986576, delta:
0.017272947, mean delta: 0.01829478, stddev. delta: 0.0044108317,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:51.360: DEBUG/AFX(2504): fps: 55.01943, delta:
0.026489256, mean delta: 0.018075053, stddev. delta: 0.0037128378,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:52.376: DEBUG/AFX(2504): fps: 55.93651, delta:
0.026336668, mean delta: 0.017899577, stddev. delta: 0.003501554,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:53.384: DEBUG/AFX(2504): fps: 56.657646, delta:
0.016845703, mean delta: 0.017754618, stddev. delta: 0.0029748674,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:54.384: DEBUG/AFX(2504): fps: 55.919792, delta:
0.016937256, mean delta: 0.017803447, stddev. delta: 0.002930975,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:55.391: DEBUG/AFX(2504): fps: 54.774338, delta:
0.016662598, mean delta: 0.018299866, stddev. delta: 0.0052955016,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:56.407: DEBUG/AFX(2504): fps: 51.882175, delta:
0.016479492, mean delta: 0.018996684, stddev. delta: 0.005628621,
#listeners: 1, #meshes: 35, #textures: 2
01-27 15:11:57.415: DEBUG/AFX(2504): fps: 55.93684, delta: 0.0223999,
mean delta: 0.018104045, stddev. delta: 0.0036228807, #listeners: 1,
#meshes: 35, #textures: 2
01-27 15:11:58.415: DEBUG/AFX(2504): fps: 51.946102, delta:
0.011444091, mean delta: 0.019133504, stddev. delta: 0.0067592976,
#listeners: 1, #meshes: 35, #textures: 2

The delta time varries between 3-6ms from frame to frame! That
explains the stuttering pretty well. Now i wonder why i get such
inconsistent delta times. I removed rendering the background tiles so
i only render the ship which is a lousy 50 triangles big, no textures
or lighting. Very strange indeed.

On 27 Jan., 14:23, Mario Zechner <[email protected]> wrote:
> @Ralf
> that is very strange behaviour i wouldn't expect from a Nexus One. I
> have to admit that i only own a Droid so i can't confirm it for the
> N1. Would you mind putting an apk with your test application up
> somewhere, for example athttp://www.file-pasta.com, and add log cat
> output so we can observe the behaviour of your app on our devices?
> Additionally, if it's not to much of a hazzle you could also share the
> source code so we can have a look at it.
>
> On 27 Jan., 12:42, Ralf Schneider <[email protected]> wrote:
>
> > I definitely have this problem on the Nexus One.
>
> > MyOpenGLperformance test (using JNI/NDK pumped by java GLSurfaceView) is
> > drawing 3 rotating Quads(8-8-8 texture) - all covering the whole screen -
> > with blending.
> > And I get very constant 60 FPS. As soon as I touch the screen: Frame rate
> > drops to 43 FPS until i release the finger, than it gets back to 60 FPS.
>
> > I think the garbage collection is the remaining reason for the slow down on
> > Android > 2.0.
>
> > The problem is less visible in a more complex scene where the initial frame
> > rate is around 35 FPS. Touching the screen in this case does not change the
> > frame rate significantly.
>
> > 2010/1/27 Robert Green <[email protected]>
>
> > > @MrChaz
> > > From my tests on 1.5 and 1.6, Thread.sleep() does not even come close
> > > to adequately fixing the problem.  I have tried ranges from 16-1000
> > > and touch'n'hold still causes my game to drop from 30FPS down to 15FPS
> > > or lower on the G1.  *The game suffers no such problems on the Droid
> > > and Nexus One*.  I've also taken out everything but the call to sleep

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to