[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] PyRockets update



Leonardo Santagada wrote:
> 	I found that taking the bitdepth from pygame.display.set_mode() got a
> lot more frames here(linux non hardware accel 16bit desktop bitdepth)
> and the game look the same. This quick hack has doubled the fps for me.
> Also I don't know how I didn't get accel. I use the nvidia drivers and
> I tougth they would work with hw accel in SDL. Maybe Pete knows why.

great new version of rockets!
doing 16bit blits will regularly be twice as fast as 32bit blits (in 
software) obviously the blitting is very "memory copy" intensive, so with 
less memory there is less to do.

although the big key is using whatever display depth the screen is using. 
usually you can't run a different windowed bit depth than what the desktop 
currently is. if you don't pick what's on the desktop, you get even slower 
performance, since the blit has to convert each pixel as it goes.

the best way to do this is not passing a bit depth to display.set_mode(), 
then you will naturally get the best mode. you can also test with 
display.mode_ok() to see ahead of time what will work best.

whatever you do, try to avoid the 24bit modes. all software work on 24bit 
surfaces is about 1/3 the speed of anything else. this is because there is 
no natural 24-bit sized integer on cpus, so all pixel access must be broken 
into 3 steps.


as far as getting acceleration on SDL and X11, you'll need to use the DGA 
modes. usually this involves read/write access to /dev/mem (or /dev/fb if 
you use special SDL binaries), after that do SDL_VIDEODRIVER=dga

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org