This commit is contained in:
Liam Waldron 2022-07-07 19:02:29 -04:00
parent 48f8a66fd2
commit 51a0949467
3 changed files with 32 additions and 0 deletions

View File

@ -24,6 +24,14 @@ import os
Variables Variables
''' '''
# variables go here # variables go here
worldx = 960
worldy = 720
fps = 40
ani = 4
BLUE = (25, 25, 200)
BLACK = (23, 23, 23)
WHITE = (254, 254, 254)
main = True
# ----------------- # -----------------
''' '''
Objects Objects
@ -34,10 +42,34 @@ Objects
Setup Setup
''' '''
# run-once code goes here # run-once code goes here
clock = pygame.time.Clock()
pygame.init()
world = pygame.display.set_mode([worldx,worldy])
backdrop = pygame.image.load(os.path.join('stages','Untitled.png'))
backdropbox = world.get_rect()
# ----------------------- # -----------------------
''' '''
Main Loop Main Loop
''' '''
# main game loop goes here # main game loop goes here
while main:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
try:
sys.exit()
finally:
main = False
if event.type == pygame.KEYDOWN:
if event.key == ord('q'):
pygame.quit()
try:
sys.exit()
finally:
main = False
world.blit(backdrop, backdropbox)
pygame.display.flip()
clock.tick(fps)
# ------------------- # -------------------

BIN
src/stages/Untitled.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

BIN
src/stages/Untitled.xcf Normal file

Binary file not shown.