Python/Pygame question

Rhodri James rhodri at wildebst.demon.co.uk
Wed Jul 1 18:08:33 EDT 2009


On Tue, 30 Jun 2009 19:15:24 +0100, Crip <cripplemeal at gmail.com> wrote:

> I have been experimenting with pygame. I would like to know how to go
> about placing an image of my creation as the background of the
> generated window. To where should I save the image, and what should it
> be saved as?

Wherever will be most useful to you (the same directory as where you
are developing your game is often good).  You can use most of the common
formats, so pick whatever's most appropriate for your image.

The documentation is at http://www.pygame.org/docs/ref/image.html
In particular, you use pygame.image.load() to load your file into a
surface, then blit it into your display.  Some resizing may be
necessary!


-- 
Rhodri James *-* Wildebeest Herder to the Masses



More information about the Python-list mailing list