Well basically my question is right in the title: why does my game use 100% cpu and the LunarLander example does not?
My game is currently almost identical to the LunarLander example in function, with a separate thread for the game loop, updating physics/events in a while() loop and drawing to the screen continuously.
However when I run LunarLander and enable the debug tools, it shows about 50% cpu usage (the emulator uses about 25% on my dual-core PC). My own game uses 100% of the cpu (and the emulator 50% on my pc).
I don't necessarily want or need to reduce the cpu load and increase the performance of my game (although it runs a bit sluggish on the emulator and on a slower phone), but I just really don't understand why the LunarLander example doesn't use 100%? It basically has a while(true) loop in which it updates the physics and draws to the screen constantly. Why does that not reach 100%?
Also my game is quite similar: I update my game state in a method and then draw everything to the screen. First a background image, then a few other images on it (the LunarLander example uses Drawables while I use Bitmap, because I don't have to transform them and they're supposed to be faster). When I don't interact with the game, nothing even really happens, and interaction is done through events, not even in the main loop.
Any ideas? :-)