def METHOD_NAME(self, delta_time):
    """ Movement and game logic """
    # Calculate speed based on the keys pressed
    self.player.change_x = 0
    self.player.change_y = 0
    if self.up_pressed and not self.down_pressed:
        self.player.change_y = MOVEMENT_SPEED
    elif self.down_pressed and not self.up_pressed:
        self.player.change_y = -MOVEMENT_SPEED
    if self.left_pressed and not self.right_pressed:
        self.player.change_x = -MOVEMENT_SPEED
    elif self.right_pressed and not self.left_pressed:
        self.player.change_x = MOVEMENT_SPEED
    self.physics_engine.update()
    # --- Manage Scrolling ---
    # Keep track of if we changed the boundary. We don't want to call the
    # set_viewport command if we didn't change the view port.
    changed = False
    # Scroll left
    left_boundary = self.view_left + VIEWPORT_MARGIN
    if self.player.left < left_boundary:
        self.view_left -= left_boundary - self.player.left
        changed = True
    # Scroll right
    right_boundary = self.view_left + SCREEN_WIDTH - VIEWPORT_MARGIN
    if self.player.right > right_boundary:
        self.view_left += self.player.right - right_boundary
        changed = True
    # Scroll up
    top_boundary = self.view_bottom + SCREEN_HEIGHT - VIEWPORT_MARGIN
    if self.player.top > top_boundary:
        self.view_bottom += self.player.top - top_boundary
        changed = True
    # Scroll down
    bottom_boundary = self.view_bottom + VIEWPORT_MARGIN
    if self.player.bottom < bottom_boundary:
        self.view_bottom -= bottom_boundary - self.player.bottom
        changed = True
    # Make sure our boundaries are integer values. While the view port does
    # support floating point numbers, for this application we want every pixel
    # in the view port to map directly onto a pixel on the screen. We don't want
    # any rounding errors.
    self.view_left = int(self.view_left)
    self.view_bottom = int(self.view_bottom)
    # If we changed the boundary values, update the view port to match
    if changed:
        arcade.set_viewport(self.view_left,
                            SCREEN_WIDTH + self.view_left,
                            self.view_bottom,
                            SCREEN_HEIGHT + self.view_bottom)