Advertisement
drakon-firestone

Untitled

Mar 11th, 2025 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import pygame
  2.  
  3. pygame.init() # inicjalizacja pygame
  4.  
  5. SCREEN_WIDTH = 800
  6. SCREEN_HEIGHT = 600
  7.  
  8. # tworzenie okna o podanych wymiarach
  9. screen_surface = pygame.display.set_mode( (SCREEN_WIDTH, SCREEN_HEIGHT) )
  10.  
  11. pygame.display.set_caption('Pierwsza gra w pygame') # tytuł okienka
  12.  
  13. clock = pygame.time.Clock()
  14.  
  15. game_status = True
  16. while game_status:
  17. events = pygame.event.get()
  18. for event in events:
  19. if event.type == pygame.QUIT:
  20. game_status = False
  21.  
  22. pygame.display.update()
  23. clock.tick(60)
  24.  
  25.  
  26. pygame.quit()
  27. quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement