commit a927fa8b904bec07e6a1328defea87fe8a857bd9 Author: tillbecks <44341541+tillbecks@users.noreply.github.com> Date: Sun Feb 23 15:26:53 2025 +0100 init pygame diff --git a/init.py b/init.py new file mode 100644 index 0000000..ed372a1 --- /dev/null +++ b/init.py @@ -0,0 +1,27 @@ +# Example file showing a basic pygame "game loop" +import pygame + +# pygame setup +pygame.init() +screen = pygame.display.set_mode((1280, 720)) +clock = pygame.time.Clock() +running = True + +while running: + # poll for events + # pygame.QUIT event means the user clicked X to close your window + for event in pygame.event.get(): + if event.type == pygame.QUIT: + running = False + + # fill the screen with a color to wipe away anything from last frame + screen.fill("purple") + + # RENDER YOUR GAME HERE + + # flip() the display to put your work on screen + pygame.display.flip() + + clock.tick(60) # limits FPS to 60 + +pygame.quit() \ No newline at end of file