Python/Pygame question

C

Crip

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?
 
R

Rhodri James

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,655
Latest member
eizareri

Latest Threads

Top