-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.pyw
More file actions
58 lines (43 loc) · 937 Bytes
/
settings.pyw
File metadata and controls
58 lines (43 loc) · 937 Bytes
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
53
54
55
56
57
58
# importing modules
import pygame
import random
import sys
import time
# importing sub-modules
from random import randint
# initializing modules
pygame.init()
pygame.mixer.init()
pygame.font.init()
# game settings
# game constants
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "Duel"
FPS = 60
# rgb color tuples
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 162, 232)
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
YELLOW = (255, 255, 0)
PURPLE = (150, 0, 150)
ALPHA = GREEN
# game constants
PLAYER_SPEER = 8
BULLET_SPEED = 15
LINE_TICKNESS = 2
# game variables
# settings varaibles
__version__ = "v1.0"
running = True
p1_health = 50
p2_health = 50
p1_bullet_active = True
p2_bullet_active = True
image_show = True
# setting up screen
SCREEN = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
TITLE = pygame.display.set_caption(f"{SCREEN_TITLE} {__version__}")
MOUSE_VISIBILITY = pygame.mouse.set_visible(True)