What slows things down so much?

BlitzPlus Forums/BlitzPlus Programming/What slows things down so much?

Fry Crayola(Posted 2004) [#1]
I've been using 2D commands on Blitz 3D to build a GUI. On screen I have about 40 or 50 objects, built using DrawImage and Rect. For some reason this only runs at 60FPS whether I limit it or not, on a 2.2GHz machine.

Just to point out, I got that value by timing the game as it draws to the Backbuffer(), which has nothing to do with refresh rates and suchlike. Stripping away some drawing code can boost it to as much as 1000FPS. It is true that it only displays at about 60FPS thanks to Flip, but I'm more worried about the processing.

I've tried numerous things to increase this value, but it remains that the most affecting thing is the drawing commands. Why is this the case? I ran the code on a 700MHz machine and it struggled along, with a jerky mouse and only 15 FPS, sometimes as low as 10. Surely 50 objects (be they text, buttons, edit boxes and such that I've created myself) that are merely drawn to the screen shouldn't be slowing the thing down so much? The Text command, slows it a little but only by about 2 or 3 FPS. If I replaced it with bitmap fonts I'd not get much of an increase to notice. The action Listener code isn't involved in this FPS test, and it's running very responsively on the lower spec machine

Is there anything I can do to seriously increase the speed of the screen updating? Any tricks, or am I doing something stupid? Am I just drawing too much to the screen, and if so how come I see many other GUIs working perfectly well in 2D on low spec machines for all manner of games, Blitz or otherwise?

Thanks in advance for any help or advice.


Fry Crayola(Posted 2004) [#2]
Whoops, I meant to post this in the Misc folder... gonna stick it in over there. Close this one.