drawing images with pygame image load(and blit(the drawing functions are fine if you want to draw simple shapes on the screenbut many games have images (also called spritespygame is able to load images onto surface objects from pngjpggifand bmp image files the differences between these image file formats is described at the image of the cat was stored in file named cat png to load this file' imagethe string 'cat pngis passed to the pygame image load(function the pygame image load(function call will return surface object that has the image drawn on it this surface object will be separate surface object from the display surface objectso we must blit (that iscopythe image' surface object to the display surface object blitting is drawing the contents of one surface onto another it is done with the blit(surface object method if you get an error message like --pygame errorcouldn' open cat png|when calling pygame image load()then make sure the cat png file is in the same folder as the catanimation py file before you run the program displaysurf blit(catimg(catxcaty)line of the animation program uses the blit(method to copy catimg to displaysurf there are two parameters for blit(the first is the source surface objectwhich is what will be copied onto the displaysurf surface object the second parameter is two-integer tuple for the and values of the topleft corner where the image should be blitted to if catx and caty were set to and and the width of catimg was and the height was this blit(call would copy this image onto displaysurf so that the top left corner of the catimg was at the xy coordinate ( and the bottom right corner' xy coordinate was at ( note that you cannot blit to surface that is currently --locked|(such as when pixelarray object has been made from it and not yet been deleted the rest of the game loop is just changing the catxcatyand direction variables so that the cat moves around the window there is also call to pygame event get(to handle the quit event fonts if you want to draw text to the screenyou could write several calls to pygame draw line(to draw out the lines of each letter this would be headache to type out all those email questions to the authoral@inventwithpython com