-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
87 lines (76 loc) · 1.49 KB
/
config.js
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
var config = {
HOST: '0.0.0.0',
PORT: 44444,
DELIMITER: ',',
VERSION: '1.0.0',
MAGIC_NUMBER: 'ZZZ',
INTERNET_ADDRESS: '127.0.0.1',
EVERY_GAME_TIME: 900, //in seconds
GAME_UPDATE_RATE: 60, // unit is Hz
NET_UPDATE_RATE: 30,
LEADERBOARD_UPDATE_RATE: 1,
MAP: {
width: 100,
height: 100
},
ERROR: {
VERSION_MISSMATCH: 1,
WRONG_PACKET: 2,
},
REQUEST: {
MATCH_REQUEST_NO: 0,
PLAYER_MOVE: 1,
PLAYER_FIRE: 2,
},
RESPONSE: {
MATCH_REQUEST_NO: 0,
},
PLAYER: {
RADIUS: 0.7,
W: 1,
H: 1,
JELLY: {
MAX_SPEED: 3,
DEFAULT_HP: 100,
DEFAULT_IMU_TIME: 5,
},
ZOMBIE: {
MAX_SPEED: 5,
DEFAULT_HP: 1000,
},
},
BULLET: {
NORMAL: {
MAX_SPEED: 10,
MAX_DISTANCE: 20,
W: 1,
H: 1
},
ZOMBIE_BULLET: {
MAX_SPEED: 10,
MAX_DISTANCE: 20,
W: 1,
H: 1
},
},
WEAPON: {
AK47: {
SHOOT_RATE: 6,
},
GUN: {
SHOOT_RATE: 3,
},
ZOMBIE_PAW: {
SHOOT_RATE: 3,
}
},
FOOD: {
RADIUS: 1,
},
GAMEROOM: {
MAX_PLAYER: 20
},
FOODS_CONST_NUMBER: 10,
ZOMBIE_JELLY: [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]
}
module.exports = config