-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvampirepizza_chapter1.py
More file actions
52 lines (35 loc) · 1.1 KB
/
vampirepizza_chapter1.py
File metadata and controls
52 lines (35 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#Set-up Game
#import libraries
import pygame
from pygame import *
#initialize pygame
pygame.init()
#-----------------------------
#Define constant variables
#Define the parameters of the game window
WINDOW_WIDTH = 900
WINDOW_HEIGHT = 400
WINDOW_RES = (WINDOW_WIDTH, WINDOW_HEIGHT)
#--------------------------------------------------------------
#Load Assets
#create window
GAME_WINDOW = display.set_mode(WINDOW_RES)
display.set_caption('Attack of the Vampire Pizzas!')
#--------------------------------------------------------------------------------------------------------------------------------------
#Start Main Game Loop
#Game Loop
running = True
while running:
#------------------------------------------
#Check for events
#checking for and handling events
for event in pygame.event.get():
#exit loop on quit
if event.type == QUIT:
running = False
display.update()
#Close Main Game Loop
#------------------------------------------------------------------------------------------------------------------------
#End of game loop
#Clean-up Game
pygame.quit()