-
Notifications
You must be signed in to change notification settings - Fork 1
/
gameSettings.js
427 lines (333 loc) · 8.74 KB
/
gameSettings.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
const gameSettings = {
// GENERAL
/////////////////////////////////////////////////
//title of game
title: "Immunity",
//maximum length of player names
nameMax: 10,
//player name for testing (not case sensitive)
testName: "cheater",
//max players per room
roomCap: 6,
//number of game ticks per second
tickRate: 60,
//time between ping checks in MS
pingRate: 1000,
//size of game area
width: 3000,
height: 3000,
//starting lives for each room
livesStart: 2,
//time before next wave after current is complete
waveTime: 5000,
//Number of high scores to track
highScoreCount: 5,
//delay between high score updates on client side in MS
highScoreDelay: 10000,
//drag factor for physics objects, as fraction of acceleration
dragFactor: 0.1,
// PLAYERS
/////////////////////////////////////////////////
// time in MS to respawn players
respawnTime: 3000,
//info specific to each class
playerTypes: {
soldier: {
radius: 25,
maxHealth: 15,
acceleration: 1500,
maxVelocity: 500,
mass: 15,
colors: { //blue
light: '#29ADFF',
dark: '#1D2B53',
},
shots: {
count: 1,
velocity: 1500,
angle: 0,
range: 500,
cooldown: 100,
damage: 3,
mass: 1,
},
ability: "freeze",
},
engineer: {
radius: 25,
maxHealth: 15,
acceleration: 1500,
maxVelocity: 500,
mass: 20,
colors: { //yellow
light: '#FFEC27',
dark: '#AB5236',
},
shots: {
count: 3,
velocity: 1500,
angle:Math.PI/6,
range: 300,
cooldown: 200,
damage: 2,
mass: 1,
},
ability: "turret",
},
sniper: {
radius: 20,
maxHealth: 10,
acceleration: 2500,
maxVelocity: 700,
mass: 10,
colors: { //pink
light: '#FF77A8',
dark: '#7E2553',
},
shots: {
count: 1,
velocity: 2500,
angle: 0,
range: 1000,
cooldown: 500,
damage: 30,
mass: 20,
},
ability: "fullauto",
},
heavy: {
radius: 30,
maxHealth: 20,
acceleration: 800,
maxVelocity: 400,
mass: 20,
colors: { //green
light: '#00E436',
dark: '#008751',
},
shots: {
count: 5,
velocity: 1500,
angle:Math.PI/4,
range: 200,
cooldown: 250,
damage: 3,
mass: 5,
},
ability: "shield",
},
},
// ENEMIES
/////////////////////////////////////////////////
//number of enemies per player per wave at start
enemyCountStart: 5,
//how many additional enemies per player each wave
enemyCountScale: 1,
//chance of a mono-wave (wave with only 1 enemy type)
enemyMonoChance: 1/3,
//info specific to each enemy type
enemyTypes: {
normal: {
radius: 25,
spineCount: 8,
spineLength: 5,
maxHealth: 15,
acceleration: 1200,
maxVelocity: 400,
mass: 15,
attack: {
cooldown: 500,
// damage: 1,
},
colors: {
dark: "#000000",
light: "#29ADFF",
},
shots: {
count: 1,
velocity: 1000,
angle: 0,
range: 300,
damage: 1,
mass: 1,
},
},
heavy: {
radius: 40,
spineCount: 12,
spineLength: 5,
maxHealth: 25,
acceleration: 600,
maxVelocity: 300,
mass: 30,
attack: {
cooldown: 1000,
// damage: 3,
},
colors: {
dark: "#000000",
light: "#00E436",
},
shots: {
count: 3,
velocity: 1000,
angle:Math.PI/4,
range: 150,
damage: 1,
mass: 5,
},
},
boxer: {
radius: 30,
spineCount: 8,
spineLength: 5,
maxHealth: 20,
acceleration: 1800,
maxVelocity: 600,
mass: 20,
attack: {
cooldown: 500,
damage: 2,
},
colors: {
dark: "#000000",
light: "#FFEC27",
},
},
scout: {
radius: 20,
spineCount: 8,
spineLength: 5,
maxHealth: 5,
acceleration: 2400,
maxVelocity: 800,
mass: 1,
attack: {
cooldown: 750,
damage: 1,
},
colors: {
dark: "#000000",
light: "#FF77A8",
},
},
},
// BOSSES
/////////////////////////////////////////////////
//toggle for enabling boss waves
bossEnabled: true,
//frequency of boss waves (value of 5 would be every 5 waves)
bossFrequency: 5,
//info about bosses
boss: {
radius: 150,
spineCount: 30,
spineLength: 20,
maxHealth: 100,//multiplied by number of players
acceleration: 50,
maxVelocity: 200,
mass: 200,
focusTime: 10000,//time in ms that the boss will focus a given player
attack: {
cooldown: 60,
},
shots: {
count: 5,
velocity: 1000,
angle:Math.PI,
range: 1000,
damage: 1,
mass: 5,
},
colors: {
dark: "#000000",
light: "#FF004D",
},
},
// PICKUPS
/////////////////////////////////////////////////
//chance of enemy dropping a pickup (fraction of 1)
enemyDropChance: 0.05,
//chance of boss dropping a pickup (fraction of 1)
bossDropChance: 1,
//max pickups in the world at a time, per player
pickupMax: 3,
//radius of pickup objects
pickupRadius: 18,
//different types of pickups & relative drop chance
pickupTypes: {
health: {
chance: 95,
},
life: {
chance: 5,
},
},
//health pickup value
pickupHealthAmount: 5,
// ZONES
/////////////////////////////////////////////////
//number of zones per wave per person
zoneCount: 1,
//starting radius of zones
zoneRadiusStart: 500,
//how much zones grow each wave
zoneRadiusScale: 10,
//maximum radius of zones
zoneRadiusMax: 1000,
//rate of closing, per player in zone
zoneCloseRate: 1,
//rate of zone growing when no player in zone
zoneGrowRate: 0.25,
//cooldown on zones spawning enemies (ms)
zoneCooldown: 2500,
// ABILITIES
/////////////////////////////////////////////////
//kills needed to use ability
abilityCap: 10,
//ability types and relevant settings for each
abilityTypes: {
freeze: {
duration: 10000,
radius: 300,
},
fullauto: {
duration: 10000,
multiplier: 1.5,
},
shield: {
duration: 10000,
},
turret: {
duration: 10000,
attackCooldown: 200,
radius: 30, //purely for visuals
},
},
// OTHER
/////////////////////////////////////////////////
//color palette
colors: {
black:"#000000",
brown:"#AB5236",
red:"#FF004D",
blue:"#29ADFF",
darkblue:"#1D2B53",
darkgrey:"#5F574F",
mango:"#FFA300",
purple:"#83769C",
darkpink:"#7E2553",
grey:"#C2C3C7",
yellow:"#FFEC27",
pink:"#FF77A8",
darkgreen:"#008751",
white:"#FFF1E8",
green:"#00E436",
tan:"#FFCCAA",
}
}
// EXPORT only if node.js
///////////////////////////////////////////
if (typeof module != 'undefined') {
module.exports = gameSettings;
}