Frames per second with graphics demo.
sccoupe
Posts: 118
I am playing with the graphics demo and stripping it down for my own needs. I have basically remove everything but the large number that counts in the upper left corner of the screen. I then moved that to the right side of the screen, made the number much larger in size and thickness and added the number "14" in front of it. So basically I have 14X on the screen with the X counting up. A screenshot is attached. My·problem is that·I only get about 3 frames per second. I have it set to count and repaint the screen as fast as it can just as the graphics demo does, but the demo seems to have a much better framerate with much more happening on the screen. Any ideas as to the cause?
Thanks
Thanks
Comments
I think it works with a BYTEMOVE, from offscreen to onscreen, which is FAST but
you only need to do it once per each count number not once per each digit.
If that's not the problem, look to see if the code in Graphics.spin that draws numbers or text or char is in PASM or SPIN.
If it's in SPIN, it will be a slow process to plot all the pixels for the THREE LARGE DIGITS compared to all the smaller
things in the demo. It might speed up if you make the digits just a little bit thinner and smaller.
Also, if you are counting and reusing the code that draws the digits, there might be a faster way
to count and break the number into digits than you are using. Is each digit counting separately
or are you counting to 999 and breaking the number into digits with / and // ?
It might be faster also if you can put the number in a string and display it as a string.
(Try to think of simplest fastest counting and displaying method.)
I recently modified the demo to work on TV and VGA screens at the same time, and everything didn't fit,
so I took out some stuff and added another digit, and it did slow down a little tiny bit I think.
Post Edited (VIRAND) : 2/2/2010 12:03:56 AM GMT
Based on 4 colors/tile, you could split the tiles to get a higher resolution.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jim Fouch
FOUCH SOFTWARE