I would like to know how to draw images using pygame. I know how to load them.
I have made a blank window.
When I use screen.blit(blank, (10,10))
, it does not draw the image and instead leaves the screen blank.
相关问题
- Views base64 encoded blob in HTML with PHP
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
After using
blit
or any other update on your drawing surface, you have to callpygame.display.flip()
to actually update what is displayed.This is a typical layout:
Loads the file
player.png
. Run this and it works perfectly. So hopefully you learn something.