More Game Stuttering

Problems with Canvas, OpenGL, etc...

More Game Stuttering

Postby tttcowan » Tue Jan 18, 2011 3:29 pm

I'm pulling my hair out on this one... I've got a very simple Opengl game which just moves a sprite across the screen at the moment. The problem is it's stuttering even though I consistantly get 55 Frames/s. A typical frame looks like the below timming wise,

01-18 14:10:42.065: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.085: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.105: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.115: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.135: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.155: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.018
01-18 14:10:42.165: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.015
01-18 14:10:42.195: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.023
01-18 14:10:42.205: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.012
01-18 14:10:42.215: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.014
01-18 14:10:42.235: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.255: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.265: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.285: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.018
01-18 14:10:42.305: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.315: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.355: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.032
01-18 14:10:42.365: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.385: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.395: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.415: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.435: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.445: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.465: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.02
01-18 14:10:42.495: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.03
01-18 14:10:42.535: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.032
01-18 14:10:42.545: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.565: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.585: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.595: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.615: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.625: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.645: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.665: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.675: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.695: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.715: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.725: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.745: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.765: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.019
01-18 14:10:42.785: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.795: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.018
01-18 14:10:42.815: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.018
01-18 14:10:42.845: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.026
01-18 14:10:42.865: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.875: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.895: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.905: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.016
01-18 14:10:42.925: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.945: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.019
01-18 14:10:42.965: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.017
01-18 14:10:42.975: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.015
01-18 14:10:42.995: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.019

As you can see for the most part it flies through without any problems but there are stutters in there eg,
01-18 14:10:42.845: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.026
01-18 14:10:42.495: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.03
01-18 14:10:42.535: DEBUG/PlayerGameObject -(25444) : Time to render frame : 0.032

There's no GC going on, I've tried to make the code as efficient as possible and I'm really struggling to work out what this is... I need the game to be Iphone smooth and the framework doesn't seem to be doing me any favours. If you look at the trace view nothing seems different. Just ALL methods take a bit longer to process with no other work being done on any other threads... It's like the phone throttles down or something??? I'm using a desire by the way running android 2.2 and compiling code for android 1.6.

Any help or ideas where to look would be great. Thanks.
tttcowan
Developer
Developer
 
Posts: 46
Joined: Mon Jul 19, 2010 11:08 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 1 guest