represents the area of the camera (using cameraxcameraywinwidthand winheight constantsnextwe randomly generate numbers for the xy coordinates that would be within the active area the active area' left and top edge are winwidth and winheight pixels to the left and up of camerax and cameray so the active area' left and top edge are at camerax winwidth and cameray winheight the active area' width and height are also three times the size of the winwidth and winheightas you can see in this image (where winwidth is set to pixels and winheight set to pixels)this means the right and bottom edges will be at camerax ( winwidthand cameray ( winheightline will check if the random xy coordinates would collide with the camera view' rect object if notthen those coordinates are returned if sothen the while loop on line will keep generating new coordinates until it finds acceptable ones creating enemy squirrel data structures def makenewsquirrel(cameraxcameray) sq { generalsize random randint( multiplier random randint( sq['width'(generalsize random randint( )multiplier sq['height'(generalsize random randint( )multiplier sq[' ']sq[' 'getrandomoffcamerapos(cameraxcameraysq['width']sq['height'] sq['movex'getrandomvelocity( sq['movey'getrandomvelocity(creating enemy squirrel game objects is similar to making the grass game objects the data for each enemy squirrel is also stored in dictionary the width and height are set to random sizes on line and the generalsize variable is used so that the width and height of each email questions to the authoral@inventwithpython com