-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
66 lines (59 loc) · 1.1 KB
/
settings.py
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
59
60
61
62
63
64
65
66
"""
The settings of game
"""
FPS = 60
WIDTH = 800
HEIGHT = 600
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
# Ship
SHIP_LIVES = 3
SHIP_FRICTION = -0.80
ROT_FRICTION = -0.10
SHIP_MAX_VEL = 175.0
SHIP_ROT_VEL = 130.0
SHIELD_PERIOD = 2500
TIME_TO_NEXT_LVL = 1000
# Asteroids
ASTR_NUMBER = 2
BIG_ASTR_VEL = 70.0
MEDIUM_ASTR_VEL = 90.0
SMALL_ASTR_VEL = 140.0
ASTR_ROT_VEL = 120.0
TYPE_BIG = 1
TYPE_MEDIUM = 2
TYPE_SMALL = 3
# Bullet
BULLET_VEL = -400.0
BULLET_DURATION = 960
BULLET_SHOT_RATE = 250
# Particles
PARTICLE_MIN_SPEED = 50.0
PARTICLE_MAX_SPEED = 88.0
NB_PRTCL_SML = 25
NB_PRTCL_MED = 95
NB_PRTCL_BIG = 255
PARTICLE_LIFE_TIME = 1200.0
# CONST drawable: img[index]
BIGAS1_IMG = 0
BIGAS2_IMG = 1
BIGAS3_IMG = 2
MIDAS1_IMG = 3
MIDAS2_IMG = 4
MIDAS3_IMG = 5
SMLAS1_IMG = 6
SMLAS2_IMG = 7
SMLAS3_IMG = 8
SHIP_IMG = 9
BULLET_IMG = 10
THRUSTER_IMG = 11
# CONST drawable text: life, FPS, score..etc
LIFE_POS = 20
SCORE_POS = (10, 2)
LEVEL_POS = (380, 2)
FPS_POS = (737, 2)
# GAME FX : snd[index]
BULLET_FX = 0
THRUSTER_FX = 1
BOOM_FX = 2
TIME_FADE_OUT = 110