# pygame template - LearnItWithMrC import pygame # accesses pygame files import sys # to communicate with windows # game setup ################ only runs once pygame.init() # starts the game engine clock = pygame.time.Clock() # creates clock to limit frames per second FPS = 60 # sets max speed of main loop SCREENWIDTH = 640 # sets the width of the screen/window SCREENHEIGHT = 480 # sets the height of the screen/window screen = pygame.display.set_mode((SCREENWIDTH ,SCREENHEIGHT)) # creates window and game screen with twin value # set variables for colors RGB (0-255) white = (255, 255, 255) black = (0, 0, 0) red = (255, 0, 0) yellow = (255, 255, 0) green = (0, 255, 0) ##### Your Variables go here ################# image_mario = pygame.image.load("mario.png") image_mario_sizeXY = [50, 60] image_mario = pygame.transform.scale(image_mario, image_mario_sizeXY) mario_position = [300, 210] ############################################## # game loop #################### runs 60 times a second! while True: # game loop - note: everything in the mainloop is indented one tab for event in pygame.event.get(): # get user interaction events if event.type == pygame.QUIT: # tests if window's X (close) has been clicked pygame.quit() # stops the game engine sys.exit() # close operating system window # your code starts here ############################## screen.fill(white) bird = screen.blit(image_mario, mario_position) # your code ends here ############################### pygame.display.flip() # updates the entire screen clock.tick(FPS) # limits game to frame per second, FPS value # out of game loop ###############