Here is my current game loop:
final int ticksPerSecond = 60;
final int skipTicks = (1000 / ticksPerSecond);
float dt = 1f/ticksPerSecond;
while(System.currentTimeMillis() > nextGameTick && loops < maxFrameskip){
updateLogic();
nextGameTick+=skipTicks;
timeCorrection += (1000d/ticksPerSecond) % 1;
nextGameTick+=timeCorrection;
timeCorrection %=1;
loops++;
On most devices I've tested my game on (this is an Android game BTW) it runs quite nice.
As you can see, I'm using a fixed time-step (defined as my ticks per second).
If I reduce my Ticks Per Second to 30, everything runs at the same speed but is nowhere near as smooth. I keep hearing people say that 30fps should be OK for mobile games and everything should run great at 30 fps, but that's just not my experience.
Would be grateful if someone could give me some pointers on how to achieve this.