aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorPercefia <[email protected]>2026-10-05 09:45:49 +0200
committerPercefia <[email protected]>2026-10-05 09:45:49 +0200
commit2e42a87358fd22faf9e18ae2b9e23e8402e59533 (patch)
tree4e520c02b33b8243edfb932a2eb069ac44030844 /main.py
parent67aee5a532fd6bc9d398470d94248ac0d15b4d65 (diff)
Pygame InitHEADmain
Diffstat (limited to 'main.py')
-rw-r--r--main.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..e06e835
--- /dev/null
+++ b/main.py
@@ -0,0 +1,26 @@
+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