adding new grass and squirrel objects add more grass squirrels if we don' have enough while len(grassobjsnumgrassgrassobjs append(makenewgrass(cameraxcameray)while len(squirrelobjsnumsquirrelssquirrelobjs append(makenewsquirrel(cameraxcameray)remember that the numgrass constant was set to and the numsquirrels constant was set to at the beginning of the programthese variables are set so that we can be sure there are always plenty of grass and squirrel objects in the active area at all times if the length of the grassobjs or squirrelobjs drops below numgrass or numsquirrels respectivelythen new grass and squirrel objects are created the makenewgrass(and makenewsquirrel(functions that create these objects are explained later in this camera slackand moving the camera view adjust camerax and cameray if beyond the "camera slackplayercenterx playerobj[' 'int(playerobj['size' playercentery playerobj[' 'int(playerobj['size' if (camerax half_winwidthplayercenterx cameraslackcamerax playercenterx cameraslack half_winwidth elif playercenterx (camerax half_winwidthcameraslackcamerax playercenterx cameraslack half_winwidth if (cameray half_winheightplayercentery cameraslackcameray playercentery cameraslack half_winheight elif playercentery (cameray half_winheightcameraslackcameray playercentery cameraslack half_winheight the camera' position (which is stored as integers in the camerax and cameray variablesneeds to be updated when the player moves over 've called the number of pixels the player can move before the camera gets updated the --camera slack|line set the cameraslack constant to which our program will take to mean that the player squirrel can move pixels from the center before the camera position gets updated to follow the squirrel in order to understand the equations used in the if statements on lines and you should note that (camerax half_winwidthand (cameray half_winheightare the xy game world coordinates currently at the center of the screen the playercenterx and playercentery is set to the middle of the player' squirrel' positionalso in game world coordinates for line if the center coordinate minus the player' center coordinate is greater than the cameraslack valuethat means the player is more pixels to the right of the center of the