Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- from pygame.locals import *
- from OpenGL.GL import *
- from OpenGL.GLU import *
- import random
- from random import *
- def init_game():
- pygame.display.init()
- pygame.display.set_mode((800, 600), DOUBLEBUF | OPENGL)
- def update():
- pass
- def display():
- pass
- def game_loop():
- for event in pygame.event.get():
- if event.type == pygame.QUIT:
- pygame.quit()
- quit()
- elif event.type == pygame.KEYDOWN:
- if event.key == K_ESCAPE:
- pygame.quit()
- quit()
- update()
- display()
- if __name__ == "__main__":
- init_game()
- while True:
- game_loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement