import pygame, sys # Setup pygame.init() clock = pygame.time.Clock() # Variables WIDTH = 800 HEIGHT = 800 WHITE = (255, 255, 255) BLUE = (0, 0, 255) # Display screen = pygame.display.set_mode((WIDTH, HEIGHT)) second_surface = pygame.Surface([100, 200]) second_surface.fill((BLUE)) image = pygame.image.load("image.png") image_rect = image.get_rect(topleft = [100, 200]) # print(image_rect.center) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() screen.fill((WHITE)) screen.blit(second_surface, (0, 50)) screen.blit(image, image_rect) image_rect.right += 2 pygame.display.flip() clock.tick(144)