Image

Imagesciucaro wrote in Imagepython_dev

More Pygame questions...

I saw that there are two methods of working with graphics in Pygame.

One way is to make separate files for each sprite.

The other way is to have spritesheets, which each section of the picture file has one frame of any sprite used in the game.

And sometimes, the two are mixed for the sake of animating sprites, where instead of 4 different walk animation image files, it's all on one strip of image file.

Which would you consider the best way to work?

I think the best way is with all separate images, but I heard spritesheets and animation strips are useful, somehow.

I also decided to use FULLSCREEN because there is no way of centering the Pygame window. But there's a problem... The screen flickers.

How do you prevent the screen from flickering while the Pygame window is FULLSCREEN? Is it something in the main loop I gotta stop, or is it some hardware limitation I have? Because two games I downloaded from the site run on FULLSCREEN and they look flawless.


The screen flickers when I put pygame.display.flip() in the loop. When I leave it out, it stays nice and static.

What's the difference between pygame.display.update() and pygame.display.flip(), if all they do is simply reload the frame?