first pygame application start of our program we will therefore need to call pygame quit(at the end of the program to ensure everything is tidied up appropriately the output generated from sample run of this program is given belowpygame hello from the pygame community starting game initialising pygame initialising helloworldgame update display starting main game playing loop received quit eventgame over further concepts there are very many facilities in pygame that go beyond what we can cover in this bookhowever few of the more common are discussed below surfaces are hierarchy the top level display surface may contain other surfaces that may be used to draw images or text in turn containers such as panels may render surfaces to display images or text etc other types of surface the primary display surface is not the only surface in pygame for examplewhen an imagesuch as png or jpeg image is loaded into game then it is rendered onto surface this surface can then be displayed within another surface such as the display surface this means that anything you can do to the display surface you can do with any other surface such as draw on itput text on itcolour itadd another icon onto the surface etc fonts the pygame font font object is used to create font that can be used to render text onto surface the render method returns surface with the text rendered on it that can be displayed within another surface such as the display surface note that you cannot write text onto an existing surface you must always obtain new surface (using renderand then add that to an existing surface the text can only be displayed in single line and the surface holding the text will be of the dimensions required to render the text for exampletext_font pygame font font('freesansbold ttf' text_surface text_font render('hello world'antialias=truecolor=bluethis creates new font object using the specified font with the specified font size (in this case it will then render the string 'hello worldon to new surface using the specified font and font size in blue specifying that antialias is true indicates that we would like to smooth the edges of the text on the screen