PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Animation Timing in Pocket Frog

How do you control animation timing in Pocket Frog. Normally, I would just create several timers and use the WM_TIMER event to call my update routine to blit the offscreen window. Since pocket frog has its own GameLoop, what controls the frequency that this loop function is called?

What if I have multiple objects on the screen that each need to move at different speeds? How does Pocket Frog handle this? Should I have multiple game loops; each with a different timing?

Thanks...
:D
I have several Timer objects based on PocketPC::GetTickCount() with their callback functions.

The best approach I'm going to is to get single Timer object and define callback functions for each time range you need ever.

Unfortunately, I can't reach the code to explain more detailed.

P.S. When you are using Game->Suspend() and Game->Resume() function you must call such functions for your timers too.
Hmmm...well, there has to be something in PocketFrog that governs the speed of screen updates. When I compile and run the sample programs included with PF, the animation isn't too fast and it's not too slow. Yet, the sample programs are pretty simple...just a GameLoop.

Are you saying that (in the sample programs) the GameLoop is running as fast as possible without any control on its execution? If so, how does a PF application run at the same speed on a slow Pocket PC and on a fast Pocket PC?
Calculate a value that is the ratio of the speed you designed to vs. the speed it is running at...

See this thread:
http://www.pocketmatrix.com/forums/view ... highlight=
ah-ha! That's exactly what I needed...thanks!! :D
There is a rather old thread in this group regarding limiting frame rate with PF. There are a number of approahes, plus and minuses to each. I suggest a quick search to find it, it might be helpful to you.
Oh, and don“t talk about fixed framerate
people will crucify you!
:wink:
Yeah, well, that's certainly a much larger debate, and it wouldn't be the first time it's come up here :)