[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Re: Fullscreen Performance



Gerrit Holl wrote:
Resolution      %graphics   fps (+/- 5)
320x200         44          30
640x480         59          20
800x600         63          10
1024x768        76          7 (+/- 2)
this seems a little slow to me. i'm used to seeing the numbers one notch up for fullscreen scrolling with software based SDL pygame displays. so 640x480 would be around 30, not 20.

going to a hardware display will help you out considerably. i believe the 'fenyas quest' game previously mentioned on the list is enabling directx hardware for its rendering.

there's a couple things to consider when switching to hardware displays. first, the mouse goes funky on most platforms, so you'll need to provide your own graphic cursor. the other thing you absolutely cannot do with hardware surfaces with alpha blended blitting. just don't try, it will be scary slow. both these things don't look like they will be a problem for you, so you may give it a try. the first big step is passing FULLSCREEN|DOUBLEBUF to the set_mode() function. also be sure to call convert() on all your loaded and font rendered images, since that moved them onto the video card too.

maybe a year ago we had quite a discussion on tweaking out the maximum speed from a fullscreen tile engine in pygame. i remember we made some pretty nice progress on that. i also recall that running psyco helped a bit too. you may just turn that on and see if you get its 'free' performance benefit.

i'm sure we could once again attack your rendering main loop. is this for the pybrian project? if so maybe i'll take a peek under the hood.