aboutsummaryrefslogtreecommitdiff
path: root/docs/balance.md
blob: 5db5300f2fcc2394aa63d347ad5263cf6f0bc564 (plain)
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
# balance

### turret effectiveness
How strong is a turret compared to another? Are there trivial winning strategies? Are some turrets unuseful? 

Turret types:
- apply damage
- make the path longer
- resource production

I can compare how effective a turret is w.r.t. the others in its type.

1. damage turret
Effectiveness: damage per second

2. path turret
Effectiveness: elongation constant (adimensional)

3. resource turret
Effectiveness: return on investment (adimensional)

### random wave generation:
A wave is generated based on a lives budget, which is a function of the wave number. Tuning that function changes the difficulty of the game.

The current function is `hp_budget = pow((x + 10), 2.7) * 1.8 - 850`

### total damage output (D)
I need an estimate of how much damage a turret configuration is capable of dealing against enemies in a path of lenght L to derive the function of the wave number.

```
D = sum{d:damage turrets}( dps of d ) / enemy_speed 
	* (1 + sum{p:path turrets}( 
			elongation constant of p * (p.range*2 / L) ) 
		* path_constant)

enemy_speed = 1
```

The `path_constant` is how valuable it is to elongate the path in damage per meter.