Pygame ZeroToHero (1) – Make a window

A basic window made with Pygame

Where is the code?

# sprite

import pygame as pg
import sys
# pip install pygame==2.0.0.dev10
# py -m -3.8 pip install pygame==2.0.0.dev10

pg.init()
screen = pg.display.set_mode((500, 400))
clock = pg.time.Clock()

loop = 1
while loop:
    for event in pg.event.get():
        if event.type == pg.QUIT:
            loop = 0
    clock.tick(60)
    pg.display.update()



pg.quit()
sys.exit()

Some suggestions


Subscribe to the newsletter for updates
Tkinter templates
My youtube channel

Twitter: @pythonprogrammi - python_pygame

Videos

Speech recognition game

Pygame's Platform Game

Other Pygame's posts