0

I have written a SurfaceView-based rendering system (basically identical to that shown in the LunarLander example) that has some frame rate issues. Rendering is very fast, but in different conditions, the frame rate exhibits serious spikes. The game is noticeably jumpy on my Droid 1, and has some intermittent jumpiness on an LG G2. The most interesting behavior, though, shows up on a Droid Razr M. On that phone, turning on the "Show CPU Usage" developer option, or plugging the phone into the computer for debugging, causes the frame rate to stabilize at a fairly high frame rate, and gameplay is very smooth. I tried plugging into just power, and observed no effect.

This seems like something that somebody with experience would have seen before... any ideas?

Additional information: This jitter goes away when a computer USB (not power) connection is made, even if USB debugging is turned off, or if the connected computer is logged out and is not running ADB or phone drivers.

hunt
  • 372
  • 1
  • 10

1 Answers1

0

I've developed a very simple game using Android's SurfaceView and I've been getting some weird results as well concerning the LG G2.

I've been testing the game with LG G2, Galaxy S2, HTC Desire and ZTE Blade. All the other devices run smoothly except LG G2 (tested with two different devices) which obviously has the best hardware. Even the ZTE Blade which is one of the low-end Android phones out there runs the game very well.

I haven't noticed any lag on some of the most demanding games on the market but somehow I think the SurfaceView is giving the LG G2 a hard time.

Also I haven't noticed any difference if the USB debug is connected or not.

p.s. This would've been better as a comment since it didn't answer the question and concerned only about the LG G2 part but since it's my first post I couldn't comment, sry.

mangotus
  • 1
  • 1
  • You're right that this would be best as a comment; however, I can provide a potential explanation. The LG G2 has a large display, 1920x1080 pixels. Addressing this display is more processor intensive than addressing the smaller displays (such as the 800x480 display on the S2). Even the improved processor on the G2 has to work extra hard to achieve a good, quality render on that screen. Of course, other factors can affect rendering as well. Limiting the frame rate of the application can seriously improve the "butteryness", as it prevents sudden spikes. – hunt Jan 13 '14 at 16:12
  • Ah yes, that might be the case. I've tried limiting FPS to the point where the game is barely playable but I can still see the lagginess on the G2. Maybe I still need some optimizing. Thanks for the answer, I hope you'll get your's! – mangotus Jan 13 '14 at 20:27