Welcome! Log In Create A New Profile Wiibrew Wiki HackMii Blog

Advanced

How would I do a basic Timer for regulating frame rate?

Posted by DaveB1980 
How would I do a basic Timer for regulating frame rate?
December 22, 2014 09:46PM
Hey all, first time poster and Wii Homebrew newbie here. Hopefully my first question isn't too stupid...

Would anyone be able to provide some insight on how I could code a basic timer for regulating frame updates on the Wii? I've tinkered with other libraries in the past on other platforms that had built-in/pre-made Timers I could use to get the number of "ticks" since the last iteration of my game loop. Is there something similar in DevKitPro, LibOGC or any of the other OOTB libraries in the toolchain I could utilize?

Any help would be greatly appreciated!
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 02:02AM
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 03:13AM
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 03:23AM
Max 60 fps but if you do too much work it will slow down to zero, lol, so try no to take too long to draw.
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 08:26AM
You can also use gettick() instead of gettime() which gives the 4 less significant bytes of CPU clock instaed of 8 bytes but it is more quick to give the result.

In ogc/lwp_watchdog.h there are the descriptions of the time functions.

The screen framerate depends on the video mode:

480i: 29.97 FPS
480p: 59.94 FPS
576i: 25 FPS



Edited 1 time(s). Last edit at 12/24/2014 08:26AM by oibaf.
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 12:00PM
Load each texture before draw or use a big texture atlas. See which method gives best results.
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 01:03PM
Re: How would I do a basic Timer for regulating frame rate?
December 24, 2014 06:51PM
Re: How would I do a basic Timer for regulating frame rate?
December 25, 2014 02:39AM
I'm referring to the framerate that Wii games run on which is the most important to consider (60FPS in NTSC & MPAL, 50FPS in PAL whether it is progressive or interlaced)... Please don't make things too complicated as it might confuse beginners.
Sorry, only registered users may post in this forum.

Click here to login