Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: BlakPilar on February 12, 2012, 02:23:34 pm

Title: Calculate FPS?
Post by: BlakPilar on February 12, 2012, 02:23:34 pm
I was just wondering how, if at all, one could calculate the frames per second of an Axe program. I have an engine I'm writing in my spare time and I thought it'd be useful to see how many FPS it gets to compare my attempts at optimization as I work on it.
Title: Re: Calculate FPS?
Post by: Runer112 on February 12, 2012, 02:28:47 pm
The easiest solution is to test your program in Wabbitemu without the skin enabled. You should then see Wabbitemu's built-in FPS feature on the bottom of the window, which should be accurate for any Axe program. (It may not be accurate for assembly programs with custom screen updating methods, but you don't need to worry about that)

However, if you need an actual FPS counter built into your program, I would suggest using interrupts in your program and using them to keep track of and display an approximate FPS.
Title: Re: Calculate FPS?
Post by: BlakPilar on February 12, 2012, 02:34:22 pm
The easiest solution is to test your program in Wabbitemu without the skin enabled.

Ahh, thank you! I don't know anything about interrupts, though, so I'll just be content with Wabbit's lol.
Title: Re: Calculate FPS?
Post by: Eiyeron on February 12, 2012, 03:24:34 pm
Or within the main loop, lake a counter.
If you know how to access the rtc, you can how how many frames are drawn between two clock ticks, and show it.
Title: Re: Calculate FPS?
Post by: BlakPilar on February 12, 2012, 03:26:27 pm
Yeah, see, I don't even know what RTC stands for lol.
Title: Re: Calculate FPS?
Post by: Eiyeron on February 12, 2012, 03:55:49 pm
Real time clock, what calculates the crystal ticks into time.