I would like to ask and pehaps start a discussion on creating a game loop for our MIDP games - in my game which i have beel lately devveloping i have got to delay some events like time beteen shots, sprate frmae changes and soo on. So far i am using System.currentTimeMilis to get curent time and then just in each loop i chceck if there is enaugh delay to place event in que.

it looks like this:

(curtime-lastFireTime>shipFireData[currentFire][4]){ //short[] -
type, posx, posy, frame short[] fireSprite = new short[8];
//and so on

what i am thinking of is declaring a long value which in each loop i will increse and
check the value of this varible in the conditions like this

while (gaemOver){
loopCounter++;....... if (loopcounter - storedMoment
> 200) { // do the event

what do you thin willl be the best and effective model for the game?? What are you using ?? From my tests in J2SE i know that checking the time is a little bit time consuming so the prefferable way should be the loopcounter but i am not sure.

regards mchmiel