Guest User

Untitled

a guest
Jul 6th, 2018
5,836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.51 KB | None | 0 0
  1. # This code is released under GPLv3+ by DaFluffyPotato
  2.  
  3. import pygame, sys
  4.  
  5. clock = pygame.time.Clock()
  6.  
  7. from pygame.locals import *
  8. pygame.init() # initiates pygame
  9.  
  10. pygame.display.set_caption('My Pygame Window')
  11.  
  12. WINDOW_SIZE = (400,400)
  13.  
  14. screen = pygame.display.set_mode(WINDOW_SIZE,0,32) # initiate the window
  15.  
  16. while True: # game loop
  17.  
  18.     for event in pygame.event.get():
  19.         if event.type == QUIT:
  20.             pygame.quit()
  21.             sys.exit()
  22.  
  23.     pygame.display.update()
  24.     clock.tick(60)
Advertisement
Add Comment
Please, Sign In to add comment