SHARE
TWEET

Untitled

a guest Aug 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pygame
  2. from pygame.locals import *
  3. from OpenGL.GL import *
  4. from OpenGL.GLU import *
  5. import random
  6. from random import *
  7.  
  8.  
  9. def init_game():
  10.     pygame.display.init()
  11.     pygame.display.set_mode((800, 600), DOUBLEBUF | OPENGL)
  12.  
  13.  
  14. def update():
  15.     pass
  16.  
  17.  
  18. def display():
  19.     pass
  20.  
  21.  
  22. def game_loop():
  23.     for event in pygame.event.get():
  24.         if event.type == pygame.QUIT:
  25.             pygame.quit()
  26.             quit()
  27.         elif event.type == pygame.KEYDOWN:
  28.             if event.key == K_ESCAPE:
  29.                 pygame.quit()
  30.                 quit()
  31.  
  32.     update()
  33.     display()
  34.  
  35.  
  36. if __name__ == "__main__":
  37.     init_game()
  38.     while True:
  39.         game_loop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top