Uploaded January 2013 | Updated November 2026, 4 days ago
The next tutorial in my series of videos about Python and Pygame. In this video you will learn about how to create a window, where we will run our games in. If this helped you, please give it a like. Subscribe for more videos!
Download this code:
dropbox.com/s/9up1srgbqf54pro/pygamewindow.py
Code:
import pygame
pygame.init()
window = pygame.display.set_mode((800,600))
pygame.display.set_caption("Window")
black = (0,0,0)
gameLoop=True
while gameLoop:
for event in pygame.event.get():
if (event.type==pygame.QUIT):
gameLoop=False
window.fill(black)
pygame.display.flip()
pygame.quit()
The next tutorial in my series of videos about Python and Pygame. In this video you will learn about how to create a window, where we will run our games in. If this helped you, please give it a like. Subscribe for more videos!
Download this code:
dropbox.com/s/9up1srgbqf54pro/pygamewindow.py
Code:
import pygame
pygame.init()
window = pygame.display.set_mode((800,600))
pygame.display.set_caption("Window")
black = (0,0,0)
gameLoop=True
while gameLoop:
for event in pygame.event.get():
if (event.type==pygame.QUIT):
gameLoop=False
window.fill(black)
pygame.display.flip()
pygame.quit()



