Hello everybody (excuse-me for my english), trying to render my independent J2me game from the speed of the processor of the cellular one I have met one strange problem.
I calculate the position of the personage in this way:
float xf,x0,t;
short V;
t=(System.currentTimeMillis()-time_frame_prev_mill)0.001f
xf=x0+ Vt; // t time in second, between two frame.
Hour if the personage moves to Sx all OK…
While if one moves to Dx the personage moves slowly.
Here a simplified table of the times finds to you:
Right t
0.0
0.016
0.0
0.031
0.0
// As it can be observed often going to Dx the time passed between 2 frame is 0 here (the personage slows down).
Left
0.0
0.031
0.016
0.015
0.031
The problems to perhaps use the method System.currentTimeMillis() or mistake something?
Thanks!!!