Can someone help me identify where I went wrong? Thanks. I get: pygame.error: Couldn't open space.png
. My code is as follows:
import random, math, pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((800,600))
pygame.display.set_caption("orbit demo")
space = pygame.image.load("space.png").convert()
while True:
for event in pygame.event.get():
if event.type == QUIT:
sys.exit()
keys = pygame.key.get_pressed()
if keys[K_ESCAPE]:
sys.exit()
#draw backgroud
screen.blit(space, (0,0))
pygame.display.flip()