forked from MykleR/Pygame-DoodleJump
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
45 lines (38 loc) · 972 Bytes
/
settings.py
File metadata and controls
45 lines (38 loc) · 972 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
from pygame import init
from pygame.font import SysFont
init()
# ==================================
# Window Settings
XWIN, YWIN = 600, 800 # Resolution
HALF_XWIN, HALF_YWIN = XWIN / 2, YWIN / 2 # Center
DISPLAY = (XWIN, YWIN)
FLAGS = 0 # Fullscreen, resizeable...
FPS = 60 # Render frame rate
# Colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GRAY = (100, 100, 100)
LIGHT_GREEN = (131, 252, 107)
ANDROID_GREEN = (164, 198, 57)
FOREST_GREEN = (87, 189, 68)
RED = (255, 0, 0)
# Player
PLAYER_SIZE = (25, 35)
PLAYER_COLOR = ANDROID_GREEN
PLAYER_MAX_SPEED = 20
PLAYER_JUMPFORCE = 20
PLAYER_BONUS_JUMPFORCE = 70
GRAVITY = .98
# Platforms
PLATFORM_COLOR = FOREST_GREEN
PLATFORM_COLOR_LIGHT = LIGHT_GREEN
PLATFORM_SIZE = (100, 10)
PLATFORM_DISTANCE_GAP = (50, 210)
MAX_PLATFORM_NUMBER = 10
BONUS_SPAWN_CHANCE = 10
BREAKABLE_PLATFORM_CHANCE = 12
# Fonts
LARGE_FONT = SysFont("", 128)
SMALL_FONT = SysFont("arial", 24)
# Configurable square speed
RED_SQUARE_SPEED = 5