screen = pygame.display.set_mode((screen_width, screen_height), SCALED, vsync=True) Subtracting opposite movement states can give three values - 0 - neither keys are pressed, or both keys are pressed ...