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

Re: [pygame] side scroller



Michal Wallace wrote:
> It sounds like it might help to actually set the screen mode
> to a full-screen mode with fewer colors than to just run it
> in a window with whatever bit depth the user is set to..
> Otherwise, even a plain black and white image would be slow
> right?

getting the absolute best graphics mode is a little tricky for cross 
platforms. you might be best off just picking a target (like windows) for 
now and later seeing if you can change things to also run quick on other 
platforms. for example. X11 displays cannot change the color depth, even in 
fullscreen mode (unless they also have permission to use DGA). on windows 
you can always change the color depth to anything you want in fullscreen. 
but you may also want to support a windowed mode?

if you really really want to test it out, make some calls to 
pygame.display.mode_ok, which will return the best bit depth for different 
display sizes and flags.


> What other options do I have besides "the way you are
> managing graphics now"?

tiles are definitely they way people do sidescroller games. your plan to do 
fullscreen pages might work ok, but i think you will end up with a big 
collection of them, and start to hit memory limits if the levels get large.


> I think this can be solved by making two invisible sprites,
> each one pixel tall and as wide as the hero.  One rides
> around on his head, the other on his feet.  What do you
> think?

well i'd write your own collision stuff instead of hijacking the pygame 
sprite collision stuff with invisible sprites. but yeah, it seems the way 
to do it is check edges of the sprites for collisions.


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