PocketMatrix forums

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

How to set framerate with C#?

I have been playing with GAPIDraw and have found that I can't figure out how to set the FrameRate.

What should I do (remember this is C#)?
If you are descending from GapiApplication, set TargetFrameRate to your desired value.

See WidgetApplication.cs line 28 (in the Widget Sample dir)
Mr. X,

You seriously rock! You have sure helped me. Can the individual frame rate of each image be set?
I am not sure what you mean by "each image". That sets the rate at which the screen is altered (ie the rate at which ProcessNextFrame is called.
If I want to animate a few differant surface images at differant rates, or make one move faster than the others. How do I do that?
You'll find several discussions in this forum covering methods of sprite animations. I've probably participated in most of them, so search on the ppcstudios posts and you'll find them.
can an image be put inside a rectangle and then have the rectangle move around?
Well, sort of... An image (sprite) is x by y pixels in size (a rectangle). It has a placement point on a surface. If you move that placement point around each time you draw the image, you effectively move the image.
Check out the MFC example. It animates and moves about 200 images