• Home
  • About
    • 朱智博在Github上的Blog photo

      朱智博在Github上的Blog

      朱智博,朱智博的博客,zhuio,zhuio.github.io,

    • Learn More
    • Email
    • Github
    • Weibo
  • Posts
    • All Posts
    • All Tags
  • Projects

pygame0

16 Jan 2017

Reading time ~1 minute

pygame lts

pygame in youtube

pygame in py3

pygame init

import pygame

pygame.init()
display = pygame.display.set_mode((800,600))
pygame.display.set_caption('my video game')
clock = pygame.time.Clock()

crashed = False

while not crashed:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            crashed = True
        print(event)
    pygame.display.update()
    clock.tick(60)

pygame.quit()


pygame Share Tweet +1