Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
"game loop" issues — Gideros Forum

"game loop" issues

incipientincipient Member
edited February 2014 in General questions
Hi All!

I am currently using Event.ENTER_FRAME for my "game loop" (moving objects, keeping track of time, etc) however this loop is not at a constant speed (runs faster on my phone than the emulator) and runs at the limit of the hardware so sometimes when moving an object it lags a bit when (i guess) something else is happening on the phone/computer.

I need a game loop that runs at a constant speed, and doesn't lag out at all. I was thinking of using a timer that calls itself (ie. infinite loop) and has a "break" ability built in when needed (end of level, character death, etc).

Is there a better way to do this? It seems very messy.

Thanks for the help!

edit: I have used the Event.ENTER_FRAME before as a game loop without any problems (on version 2013.09) so I am not sure if I am doing something wrong this time, or its implementation has changed?

more edit: This time I do have multiple Event.ENTER_FRAME events set to call DIFFERENT methods, I am not sure if this might cause problems for the runtime trying to sync up the different events?

Comments

Sign In or Register to comment.