Python / Pygame Tutorial 3 - Creating a Window @123Animations
Python / Pygame Tutorial 3 - Creating a Window  @123Animations
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()
Python / Pygame Tutorial 3 - Creating a WindowScratch - Mario Tutorial Part 5Scratch - Mario Tutorial Part 7Scratch - Stopping sprites from moving when they hit a wallScratch - How to make your sprite move over hills
123Animations |

Python / Pygame Tutorial 3 - Creating a Window

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER