Advertisement
MCreeper12731

Lesson 1 - Base

Apr 14th, 2025 (edited)
557
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. import pygame
  2. pygame.init()
  3. pygame.font.init()
  4.  
  5. width = 1200
  6. height = 600
  7. window = pygame.display.set_mode((width, height))
  8. pygame.display.set_caption("Game Title")
  9.  
  10. # Class definitions and variables
  11.  
  12.  
  13. # Main game loop
  14. clock = pygame.time.Clock()
  15. running = True
  16. while running:
  17.     for event in pygame.event.get():
  18.         if event.type == pygame.QUIT:
  19.             running = False
  20.  
  21.     window.fill((255, 255, 255))
  22.  
  23.     # Moving and drawing
  24.    
  25.     pygame.display.update()
  26.     clock.tick(60)
  27.  
  28. pygame.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement