"Komag" wrote:
So far I've only had a chance to test my game on two Rokus, my own Roku 2 XS 3100X and my friend's old Roku XD 2050X. I'm using a lot of sprites and some alpha blending, so I'd be curious if that FOR loop test correlates closely with actual game performance across different Roku models. If so, it's a nice solution, thank you EnTerr.
Let me put it this way: assuming you are dividing players in discrete groups ("slow" vs "fast"), the last fn i proposed will do no worse than checking model# and/or fw# (but potentially better). There is a big B/S performance gap between 1st gen and the later ones, of at least 4x. And then Roku-3 is roughly 4x faster than that, per experiments here
viewtopic.php?f=34&t=66062&p=422729 .
The graphics engine is a whole another thing from the CPU, that's true - so timing empty loops won't give you exact idea on drawing speed - but as practical matter it is the same ballpark, magnitudinally/logarithmically there. Notice the fn has a wide safety margin of 2x, i placed the cut-off in the middle, so below #2050 and up to 2x faster will be "slow", where above #3100 and down to 2x slower will be "fast". It should give true result even if VM goes through evolutionary optimizations and pessimizations.
Now if you want to get a continuous-value measure of the drawing performance, presumably for the game to have more than 2 modes of drawing - the right way would be to do a mini-benchmark by drawing some sprites on screen and timing that. I don't think it is likely you'll need that, because of the way video hardware works - it outputs at 60Hz and because of VSYNC i believe we can only output with speed that is a
factor of 60 frames/sec. In other words in practice you'll only get 60fps, 30fps, 15fps, 7.5fps and so on. So you end up with only two or three discrete buckets of animation speed, the rest of performance is "wasted" in SwapBuffers() waiting for VSYNC. I experienced my "2048" game prototype geting
30fps on 1st gen platforms and 60fps on the rest. TheEndless can probably say a word on this from his experience.
PS. acting on a hunch, i just switched to using single-buffered roScreen and #3100 rate jumped to 143fps (with minimal blinking), where #2050 went to 62fps (with awful screen tearing) but only for an empty board, then quickly drops down to ~30fps. Which confirms the VSYNC-ronization of double-buffering causing the "bucketing" from above.