Using the fixed floating point math
Its either fixed point
, or floating point
, "fixed floating point" is a contradiction.
Basing your animation loop on time deltas has a number of problems.
1) Many phones (in particular all Samsung phones) do not handle call interupts correctly.
Consequently, there is often no way for an app. to know a call interupt has occured.
If the game relies on time deltas, a huge time delta (the length of the phone call) can accumulate between concurrent frames.
There are hacky work-arounds (check for time deltas in excess of some constant value), however they often have unwanted side effects.
2) The precision of System.currentTimeMillis() is not specified in cldc - therefor you cannot rely on its accuracy being 1ms.
It so happens that nearly all phones I have come across *do* report timings to 1ms accuracy, however im quite sure there will be exceptions. (im still waiting to find a phone with a win98 accuracy of 50~60ms
3) time based animation is NOT suitable for 2D animation.
Due to the way the human brain percieves motion, time based animation loops are best suited to 3D animation.
In this situation the brain interpolates discrete positions to give a smoother perception of motion.
In 2D the brain does not do this, so sustained, fixed rate, smooth animation is preferable.