import pygame from sys import exit #So "pygame.quit()" does not undo "pygame.init()" #initiates pygame pygame.init() #variable for window size (width,height) screen = pygame.display.set_mode((256,256)) #Name of game displayed on the window pygame.display.set_caption("bill's Super Shooty World") #Keep the code running forever instead of just for one frame, thus keeping the window open instead of it closing after one frame. while True: #allows us to actually quit the windows for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() exit() #So "pygame.quit()" does not undo "pygame.init()" # draw all our elements # update everything pygame.display.update()