I'm making a game with pygame, and it's my first time. I am having trouble with how to 'blit' images, and when I try nothing appears on the window.
I've already caught a few problems, and made sure that I update the display and 'blitted' the image with coodrinates.
import pygame
pygame.init()
# py-game variables
(width, height) = (1000, 600)
window = pygame.display.set_mode((width, height))
window_title = pygame.display.set_caption('the CATANALYSER')
does_quit = False
# py-game images
hexagon_image = pygame.image.load('hexagon image.png')
# py-game window loop
while not does_quit:
for event in pygame.event.get():
if event.type == pygame.QUIT:
does_quit = True
window.blit(hexagon_image, (0, 0))
pygame.display.update()
pygame.quit()
the expected result is a screen with the image hexagon_image in the uppermost left hand corner.
No error messages show up with this code.