def main() global fpsclockdisplaysurfimagesdicttilemappingoutsidedecomappingbasicfontplayerimagescurrentimage pygame initialization and basic set up of the global variables pygame init( fpsclock pygame time clock( because the surface object stored in displaysurf was returned from the pygame display set_mode(functionthis is the surface object that is drawn to the actual computer screen when pygame display update(is called displaysurf pygame display set_mode((winwidthwinheight) pygame display set_caption('star pusher' basicfont pygame font font('freesansbold ttf' global dict value that will contain all the pygame surface objects returned by pygame image load( imagesdict {'uncovered goal'pygame image load('redselector png') 'covered goal'pygame image load('selector png') 'star'pygame image load('star png') 'corner'pygame image load('wall block tall png') 'wall'pygame image load('wood block tall png') 'inside floor'pygame image load('plain block png') 'outside floor'pygame image load('grass block png') 'title'pygame image load('star_title png') 'solved'pygame image load('star_solved png') 'princess'pygame image load('princess png') 'boy'pygame image load('boy png') 'catgirl'pygame image load('catgirl png') 'horngirl'pygame image load('horngirl png') 'pinkgirl'pygame image load('pinkgirl png') 'rock'pygame image load('rock png') 'short tree'pygame image load('tree_short png') 'tall tree'pygame image load('tree_tall png') 'ugly tree'pygame image load('tree_ugly png') these dict values are globaland map the character that appears in the level file to the surface object it represents tilemapping {' 'imagesdict['corner'] '#'imagesdict['wall'] ' 'imagesdict['inside floor'] 'imagesdict['outside floor']email questions to the authoral@inventwithpython com