displaysurf fill(bgcolor draw the title image to the window displaysurf blit(imagesdict['title']titlerect position and draw the text for in range(len(instructiontext)) instsurf basicfont render(instructiontext[ ] textcolor instrect instsurf get_rect( topcoord + pixels will go in between each line of text instrect top topcoord instrect centerx half_winwidth topcoord +instrect height adjust for the height of the line displaysurf blit(instsurfinstrect while truemain loop for the start screen for event in pygame event get() if event type =quit terminate( elif event type =keydown if event key =k_escape terminate( return user has pressed keyso return display the displaysurf contents to the actual screen pygame display update( fpsclock tick( def readlevelsfile(filename) assert os path exists(filename)'cannot find the level file% (filename mapfile open(filename' ' each level must end with blank line content mapfile readlines(['\ \ ' mapfile close( levels [will contain list of level objects levelnum maptextlines [contains the lines for single level' map mapobj [the map object made from the data in maptextlines for linenum in range(len(content)) process each line that was in the level file line content[linenumrstrip('\ \ ' if ';in lineemail questions to the authoral@inventwithpython com