wobblyhead hg > minor_monsters
annotate doc/balance.md @ 33:767970d80214
Added tag 0.10.0 for changeset 85d23328a215
| author | ark |
|---|---|
| date | 2026-10-20 18:39 +0200 |
| parents | 3f2811aebb3d |
| children |
| rev | line source |
|---|---|
| 0 | 1 balance |
| 2 ------- | |
| 3 | |
| 4 all game numbers in one place. the values used by the game are in the config | |
| 5 file (see architecture.md); this document explains them and records where each | |
| 6 one comes from. | |
| 7 | |
| 8 source markers: | |
| 9 | |
| 10 - notes: from the original design notes or the original drawing sheet, | |
| 11 decided | |
| 12 - decided: decided after the notes were written | |
| 13 - guess: a starting value for playtesting, expected to change | |
| 14 - derived: calculated from other values | |
| 15 | |
| 15 | 16 notes and decided values are not fixed either. they come from the original |
| 17 drawing sheet and the first design rounds, made without experience in game | |
| 18 design, and are all open to change in balancing. | |
| 19 | |
| 0 | 20 units: distances are in map pixels, that is pixels of the map image as |
| 21 scanned. times are in seconds, speeds in map pixels per second. | |
| 22 | |
| 23 | |
| 24 scale | |
| 25 ----- | |
| 26 | |
| 27 | item | value | source | | |
| 28 |------------------------------|-------|--------| | |
| 29 | map images | 1.0 | notes | | |
| 30 | towers, monsters, projectiles | 0.25 | notes ("maps scaled approx 400%") | | |
| 31 | coins | 0.4 | guess, 0.25 makes them about 10 pixels | | |
| 32 | hp bars | 0.25 | guess | | |
| 33 | |
| 9 | 34 measured from the earlier masks, which covered the whole road (approximate, |
| 35 from red area divided by path width): | |
| 0 | 36 |
| 37 | map | size | path width | path length, all branches | | |
| 38 |------|---------|------------|---------------------------| | |
| 39 | map0 | 705x697 | 56 | 1930 | | |
| 40 | map1 | 663x590 | 48 | 1350 | | |
| 41 | map2 | 618x537 | 42 | 2075 | | |
| 42 | map3 | 642x459 | 52 | 905 | | |
| 43 | |
| 44 a single route on map1 or map2 is shorter than the total. exact route lengths | |
| 45 come from the build (see architecture.md). | |
| 46 | |
| 47 | |
| 48 monsters | |
| 49 -------- | |
| 50 | |
| 23 | 51 | monster | hp | coins | coins per hp | speed | source | |
| 52 |---------|----|-------|--------------|-------|--------| | |
| 53 | m0 | 5 | 1 | 0.20 | 35 | hp, coins: notes; speed: guess | | |
| 54 | m1 | 10 | 1 | 0.10 | 40 | hp: notes; coins: decided (was 2); speed: guess | | |
| 55 | m2 | 15 | 2 | 0.13 | 45 | hp: notes; coins: decided (was 3); speed: guess | | |
| 56 | m3 | 20 | 2 | 0.10 | 40 | hp: notes; coins: decided (was 4); speed: guess | | |
| 57 | m4 | 30 | 3 | 0.10 | 35 | hp: notes; coins: decided (was 6); speed: guess | | |
| 58 | b0 | 150 | 30 | 0.20 | 25 | hp: decided, 5 x the notes; coins: notes; speed: guess | | |
| 59 | b1 | 250 | 50 | 0.20 | 25 | as above | | |
| 60 | b2 | 350 | 70 | 0.20 | 25 | as above | | |
| 61 | b3 | 500 | 100 | 0.20 | 25 | as above | | |
| 0 | 62 |
| 23 | 63 monster hp is the same on every map (decided). a monster that took two hits |
| 64 on one map must not take four on a later one. a map gets harder through the | |
| 65 size of its waves and the mix of monsters. | |
| 66 | |
| 67 the notes had every monster drop 0.2 coins per hp. regular monster coins are | |
| 68 now set apart from hp (decided): m0 keeps 0.2, the others drop 0.10 to 0.13. | |
| 69 the mix of monsters then sets the coins per hp of a map. the notes gave | |
| 70 bosses hp equal to their coins; balancing raised it to 5 times that | |
| 71 (decided). | |
| 0 | 72 |
| 73 time to walk the whole path at 35-45 speed (derived): map0 about 50 s, map3 | |
| 74 about 23 s. | |
| 75 | |
| 76 animation (all guesses): | |
| 77 | |
| 78 - one hop takes 0.35 s | |
| 79 - hop height 5 | |
| 80 - squash on landing 6 % (wider and flatter), stretch in the air 4 % | |
| 81 - idle bob 2 % | |
| 82 - each monster starts at a random point in its hop cycle, so a group does not | |
| 83 hop in step | |
|
8
2c4fed8baed9
art update, persistent sound setting, tower selling as double action
ark
parents:
6
diff
changeset
|
84 - the death puff shows for 0.4 s |
| 0 | 85 |
| 10 | 86 variation between monsters, so a group does not walk in single file (all |
| 87 guesses): | |
| 88 | |
| 89 - each monster's speed differs from its table speed by up to 5 % either way. | |
| 90 faster ones overtake slower ones | |
| 91 - a monster walks beside the centre line of the road, at most 0.45 of the | |
| 92 road half width away from it: 8.6, 7.7, 7.2 and 9.9 pixels by map | |
| 93 - half of that is a fixed lean to one side, chosen at spawn. the other half | |
| 94 wanders, with a new random value every 40 pixels along the route and a | |
| 95 smooth change between them | |
| 96 - the offset grows from 0 over the first 20 pixels of the route | |
| 97 - on the inside of tight bends the offset is reduced, so a monster never moves | |
| 98 backwards. monsters may bunch up there | |
| 99 | |
| 0 | 100 |
| 101 route preference | |
| 102 ---------------- | |
| 103 | |
| 104 on maps with several routes, a monster picks one at spawn. faster monsters | |
| 105 prefer longer or straighter routes, slower ones prefer shortcuts (decided). | |
| 106 | |
| 107 proposed rule (guess): | |
| 108 | |
| 109 - for each route the build calculates its length and how much it turns (sum of | |
| 110 direction changes along the route) | |
| 111 - each route gets a value between 0 and 1: the average of its length relative | |
| 112 to the longest route and its straightness relative to the straightest route | |
| 113 - each monster gets a speed factor: its speed minus the reference speed, | |
| 114 divided by the reference speed, limited to -1..1 | |
| 115 - route weight = 1 + bias * speed factor * (2 * route value - 1), at least 0.1 | |
| 116 - a monster at the reference speed sees all routes as equally likely | |
| 23 | 117 - a boss always takes the shortest route (decided) |
| 0 | 118 |
| 119 | parameter | value | source | | |
| 120 |-----------------|-------|--------| | |
| 121 | reference speed | 40 | guess | | |
| 122 | bias | 3 | guess | | |
| 123 | |
| 124 with the speeds above, m2 is the only regular monster faster than the | |
| 125 reference, and the effect on it is small. the speeds may need to spread out | |
| 126 more for the preference to be visible. | |
| 127 | |
| 128 | |
| 129 towers | |
| 130 ------ | |
| 131 | |
| 15 | 132 towers have 5 levels (decided). the config sets damage, range, slow and cost |
| 133 for level 1 and level 5 only. the build fills in the levels between in equal | |
| 134 steps, rounded to whole numbers where both ends are whole. | |
| 135 | |
| 136 the drawing sheet gives five damage values for t0 and t1, and four for t2 and | |
| 24 | 137 t3. level 5 of t3 continues the trend (guess). t2 does no damage (decided); |
| 138 it only slows. the equal steps change | |
| 15 | 139 three values from the sheet: t1 level 2 from 7 to 8, t1 level 4 from 17 to 18, |
| 140 and t3 level 2 from 5 to 4 (decided). | |
| 0 | 141 |
| 142 | tower | damage by level | cost | range by level | attack every | projectile speed | source | | |
| 143 |-------|------------------|------|---------------------|--------------|------------------|--------| | |
| 6 | 144 | t0 | 5,10,15,20,25 | 5 | 60,63,66,69,72 | 1.5 s | none (melee) | damage, cost: notes; range level 1: decided (was 45); rest: guess | |
| 15 | 145 | t1 | 3,8,13,18,23 | 10 | 100,104,108,112,116 | 0.7 s | 300 | damage levels 1 and 5, cost: notes; range: guess | |
| 24 | 146 | t2 | none | 20 | 90,94,98,102,106 | 1.2 s | 220 | damage: decided; cost: notes; rest: guess | |
| 15 | 147 | t3 | 1,4,7,10,13 | 25 | 220,230,240,250,260 | 1.3 s | 800 | damage level 1: notes; cost: decided (was 40), may go lower; rest: guess | |
| 148 | |
| 149 the cost column is the build cost, level 1. | |
| 0 | 150 |
| 151 rules: | |
| 152 | |
| 153 - attack speed stays the same at every level (decided). t0 is slower than the | |
| 154 others (decided), t1 faster than t2, t2 faster than t3 (notes) | |
| 155 - range grows about 4 % per level (decided "slightly", amount guessed) | |
| 156 - t0 damages every monster in range at once, each attack | |
| 24 | 157 - t2 slow: p2 bursts where it lands into a freeze splash of radius 28, |
| 158 about two monsters across (decided, radius guessed). every monster the | |
| 159 splash touches moves at 0.60, 0.55, 0.50, 0.45, 0.40 of its speed by | |
| 160 level, for 2 s (guess). a new hit restarts the time. slows do not add up; | |
| 0 | 161 the strongest one applies |
| 162 - p1, p2, p3 home in on their target. if the target dies first, the | |
| 163 projectile flies on to the last position and disappears (guess) | |
| 164 - towers aim at the monster furthest along its route (guess) | |
| 165 | |
| 15 | 166 costs: the price of building, or of the upgrade to a level. they started as |
| 167 level n costs base cost x n (decided); the config sets levels 1 and 5: | |
| 0 | 168 |
| 169 | tower | level 1 (build) | level 2 | level 3 | level 4 | level 5 | total | | |
| 170 |-------|-----------------|---------|---------|---------|---------|-------| | |
| 171 | t0 | 5 | 10 | 15 | 20 | 25 | 75 | | |
| 172 | t1 | 10 | 20 | 30 | 40 | 50 | 150 | | |
| 173 | t2 | 20 | 40 | 60 | 80 | 100 | 300 | | |
| 174 | t3 | 25 | 50 | 75 | 100 | 125 | 375 | | |
| 175 | |
| 6 | 176 selling refunds half of everything paid for the tower, build and upgrades, |
|
13
8df95050fc8b
no more build during pause; tower popup closes on any click outside it
ark
parents:
10
diff
changeset
|
177 rounded down (decided). a tower is sold whole. |
| 0 | 178 |
| 179 | tower | level 1 | level 2 | level 3 | level 4 | level 5 | | |
| 180 |-------|---------|---------|---------|---------|---------| | |
| 6 | 181 | t0 | 2 | 7 | 15 | 25 | 37 | |
| 182 | t1 | 5 | 15 | 30 | 50 | 75 | | |
| 183 | t2 | 10 | 30 | 60 | 100 | 150 | | |
| 184 | t3 | 12 | 37 | 75 | 125 | 187 | | |
| 0 | 185 |
| 186 damage per second against a single target, at the guessed attack times | |
| 187 (derived): | |
| 188 | |
| 189 | tower | level 1 | level 2 | level 3 | level 4 | level 5 | | |
| 190 |-------|---------|---------|---------|---------|---------| | |
| 191 | t0 | 3.3 | 6.7 | 10.0 | 13.3 | 16.7 | | |
| 15 | 192 | t1 | 4.3 | 11.4 | 18.6 | 25.7 | 32.9 | |
| 193 | t3 | 0.8 | 3.1 | 5.4 | 7.7 | 10.0 | | |
| 0 | 194 |
| 195 t3 is meant to be weaker than the other towers; its range lets it reach more | |
| 196 targets (decided). to keep the gap moderate, its cost went from 40 to 25 and | |
| 197 its attack time from 2.0 s to 1.3 s, just slower than t2 as the notes require | |
| 198 (decided, amount guessed). at level 1 it deals about a fifth of t1's damage per | |
| 199 second at two and a half times the cost. its range covers more path, roughly | |
| 200 three times as much on a winding map (estimate). | |
| 201 | |
| 202 | |
| 203 placement | |
| 204 --------- | |
| 205 | |
| 206 | parameter | value | source | | |
| 207 |--------------------------------------------|-------|--------| | |
| 208 | tower footprint radius | 16 | guess | | |
| 9 | 209 | road half width, centre line to road edge | per map: 19, 17, 16, 22 | measured from the earlier masks | |
| 210 | largest gap between footprint and road edge | 14 | guess | | |
| 211 | space between footprint and spawn point | per map: 50 | decided | | |
| 212 | space between footprint and exit point | per map: 40 | decided | | |
| 22 | 213 | smallest distance between tower centres | 40 | decided (was 32, two footprints; towers stood too close together) | |
| 0 | 214 | distance from the map edge | 16 | guess | |
| 215 | snap radius, how far a tap may be from a legal position | 48 | guess | | |
| 216 | placement grid cell | 4 | guess | | |
| 217 | |
| 218 towers may not be placed on the entrance or exit areas. | |
| 219 | |
| 9 | 220 the spawn point is where the path leaves the blue entrance area. the space |
| 221 between it and a tower footprint is one to one and a half times the average | |
| 222 tower size (decided). level 1 towers average about 36 pixels across at sprite | |
| 223 scale 0.25, so the space is 36 to 53 pixels. | |
| 224 | |
| 225 the exit point is where the path enters the green exit area. towers keep a | |
| 226 somewhat smaller space from it (decided), so they do not cover the building | |
| 227 drawn at the exit. | |
| 228 | |
| 0 | 229 |
| 230 economy | |
| 231 ------- | |
| 232 | |
| 23 | 233 | map | starting coins | |
| 234 |------|----------------| | |
| 235 | map0 | 10 | | |
| 236 | map1 | 20 | | |
| 237 | map2 | 40 | | |
| 238 | map3 | 60 | | |
| 0 | 239 |
| 23 | 240 starting coins are from the notes. the source sheet gives 50 for map3. the |
| 241 notes raise it to 60 to make the step from map1 to map3 more even (10, 20, | |
| 242 40, 60 instead of 10, 20, 40, 50). likely to change after playtesting. | |
| 0 | 243 |
| 23 | 244 the notes set the coins dropped per map to 10 times the starting coins. this |
| 245 is no longer a target (decided): the coins a map pays follow from its waves. | |
| 246 the build prints, per map, the coins dropped by regular monsters and the | |
| 247 boss, the total with the starting coins, and the coins per hp of the regular | |
| 248 monsters. | |
| 0 | 249 |
| 23 | 250 coins per map from the current wave lists (derived): |
| 0 | 251 |
| 23 | 252 | map | regular monsters | boss | dropped in all | with starting coins | regular hp | coins per hp | |
| 253 |------|------------------|------|----------------|---------------------|------------|--------------| | |
| 254 | map0 | 48 | 30 | 78 | 88 | 395 | 0.12 | | |
| 255 | map1 | 139 | 50 | 189 | 209 | 1145 | 0.12 | | |
| 256 | map2 | 326 | 70 | 396 | 436 | 2615 | 0.12 | | |
| 257 | map3 | 157 | 100 | 257 | 317 | 1160 | 0.14 | | |
| 0 | 258 |
| 23 | 259 early start bonuses come on top. |
| 260 | |
| 261 all monster levels appear on all maps (decided). | |
| 0 | 262 |
| 263 | |
| 264 waves | |
| 265 ----- | |
| 266 | |
| 267 | parameter | value | source | | |
| 268 |------------------------------------|---------------------|--------| | |
| 269 | waves per map | 6, 8, 10, 12 | guess | | |
| 270 | break before the first wave | 40 s | guess | | |
| 23 | 271 | break between waves, from the last spawn of a wave | 25 s | guess ("longer", decided) | |
| 272 | time between spawns | 1.0, 0.65, 0.65, 0.5 s by map | guess, fitted in the simulation | | |
| 0 | 273 | early start bonus, coins per second left | 0.05, 0.1, 0.2, 0.3 by map | guess (starting coins / 200) | |
| 274 | |
| 275 the bonus is rounded down. if every break is skipped at once, the bonus adds | |
| 276 about 6, 17, 45 and 82 coins per map (derived). | |
| 277 | |
| 23 | 278 shape of a map's waves (decided): each wave is at least as hard as the one |
| 279 before, and the last wave is the largest. the boss comes in the last wave and | |
| 280 spawns first. early waves are mostly m0 and m1; later waves mix monster | |
| 281 levels. | |
| 282 | |
| 283 the wave lists in the config are drafted by tools/balance.py | |
| 284 (architecture.md) from a few numbers per map, and may be edited by hand | |
| 285 afterwards: | |
| 286 | |
| 287 - the number of waves | |
| 288 - the number of regular monsters in the first and in the last wave. the waves | |
| 289 between grow in equal steps | |
| 290 - the share of each monster level in the map's regular monsters, by count | |
| 291 - the wave in which each monster level first appears | |
| 292 | |
| 293 each monster level gets a weight per wave that grows by one per wave from its | |
| 294 first wave. the weights are scaled until the wave sizes and the shares are | |
| 295 met, then rounded to whole monsters per wave. later waves therefore hold more | |
| 296 of the levels that came in late. every level keeps at least one monster. | |
| 297 | |
| 298 the draft numbers are kept in the map's section of the config, next to the | |
| 299 other map settings. the game does not read them. | |
| 300 | |
| 301 draft numbers, fitted in the simulation to the targets in balancing | |
| 302 (guess): | |
| 303 | |
| 304 | map | waves | regular monsters, first and last wave | share by count, m0-m4 | first wave of m0-m4 | | |
| 305 |------|-------|-----------------|---------------------|---------------| | |
| 306 | map0 | 6 | 4, 7 | 36, 25, 18, 12, 9 % | 1, 2, 2, 4, 5 | | |
| 307 | map1 | 8 | 6, 17 | 36, 25, 18, 12, 9 % | 1, 2, 3, 5, 6 | | |
| 308 | map2 | 10 | 10, 36 | 39, 26, 17, 11, 7 % | 1, 2, 4, 6, 8 | | |
| 309 | map3 | 12 | 5, 16 | 52, 26, 13, 6, 3 % | 1, 2, 4, 6, 9 | | |
| 310 | |
| 311 resulting monster counts (derived): | |
| 312 | |
| 313 | map | m0 | m1 | m2 | m3 | m4 | regular monsters | | |
| 314 |------|----|----|----|----|----|------------------| | |
| 315 | map0 | 12 | 9 | 5 | 4 | 3 | 33 | | |
| 316 | map1 | 32 | 22 | 17 | 12 | 9 | 92 | | |
| 317 | map2 | 90 | 59 | 39 | 27 | 15 | 230 | | |
| 318 | map3 | 65 | 33 | 17 | 8 | 3 | 126 | | |
| 319 | |
| 320 map3 has fewer and weaker monsters than map2. its 60 starting coins already | |
| 321 pay for much of what the naive player needs against b3, so the waves before | |
| 322 may pay only about 130 coins (see balancing). | |
| 0 | 323 |
| 324 | |
| 325 hearts | |
| 326 ------ | |
| 327 | |
| 328 | parameter | value | source | | |
| 329 |-------------------------|-------|--------| | |
| 330 | hearts per map | 10 | decided | | |
| 331 | heart cost of a monster | 1 | decided | | |
| 332 | heart cost of a boss | 5 | decided | | |
| 333 | |
| 334 | |
| 335 coins in flight | |
| 336 --------------- | |
| 337 | |
| 338 | parameter | value | source | | |
| 339 |----------------------------------|-------|--------| | |
| 340 | flight time to the counter | 0.7 s | guess | | |
| 341 | most coin sprites for one death | 8 | guess | | |
| 342 | |
| 343 coins are added to the counter at the moment the monster dies; the flying | |
| 23 | 344 coins only show it (guess). the same holds for an early start bonus, whose |
| 345 coins fly from the exits. this keeps the counter correct for a player who | |
| 0 | 346 builds right after a kill. |
| 347 | |
| 348 | |
| 349 controls | |
| 350 -------- | |
| 351 | |
| 352 | parameter | value | source | | |
| 353 |------------|--------|--------| | |
|
8
2c4fed8baed9
art update, persistent sound setting, tower selling as double action
ark
parents:
6
diff
changeset
|
354 | game speeds | 1x, 2x, 4x | decided | |
| 22 | 355 |
| 356 | |
| 357 balancing | |
| 358 --------- | |
| 359 | |
| 23 | 360 the first values were set without a way to estimate their effect, and the |
| 361 game was far too easy. two t1 towers won every map, t2 was never needed, and | |
| 362 many coins were left over when a map was won. the aim is a game where the | |
| 22 | 363 player has to think about where to place towers and which ones to build. a |
| 364 player who only buys plain firepower should need nearly every coin a map | |
| 365 pays in order to win it. coins left over then come from better choices. | |
| 366 | |
| 367 two scripted players mark the range (decided): | |
| 368 | |
| 369 - naive: builds t1 only, on placement cells of median coverage, whenever it | |
| 370 can afford one. it should win with about 5 of its 10 hearts left and with | |
| 371 next to no coins at the start of the last wave | |
| 372 - greedy: builds on the best cells, and upgrades when no good cell is left. | |
| 373 it should win with coins to spare | |
| 374 | |
| 375 rules for changing values: | |
| 376 | |
| 377 - shop prices and starting coins stay multiples of 5. round upgrade prices | |
| 378 are preferred | |
| 379 - values the player does not see are free: hp, damage, coin drops, speeds, | |
| 380 attack times | |
| 381 - shop prices are set first. hp, damage and the wave mix are then fitted to | |
| 382 them | |
| 23 | 383 - the main control is coins per hp, set by the mix of monsters. m0 drops |
| 384 0.2 coins per hp, the other regular monsters 0.10 to 0.13. a mix with | |
| 385 fewer m0 pays less for the same hp | |
| 386 - monster hp stays the same on every map. wave size and the mix make a map | |
| 387 harder | |
| 22 | 388 |
| 389 the coins of the last wave, the boss's included, arrive when the map is as | |
| 390 good as won. leftover coins are therefore measured at the start of the last | |
| 391 wave. the last wave's coins are left out of the calculation. the boss keeps | |
| 392 its drop as a visible reward (decided). | |
| 393 | |
| 394 the calculation goes wave by wave, not per map. at the start of each wave | |
| 395 the player has the starting coins, the coins dropped in earlier waves and | |
| 396 any early start bonus. these coins buy a certain amount of firepower. the | |
| 397 wave sets two demands on it: | |
| 398 | |
| 399 - throughput: the towers' damage per second has to keep up with the hp | |
| 400 arriving per second. the time a monster spends in range gives some buffer | |
| 401 - single target: the toughest monster of the wave, m4 or the boss, has to | |
| 402 die within its time in range | |
| 403 | |
| 404 damage is counted in whole shots. t1 at level 1 needs 2 shots for the 5 hp | |
| 405 of an m0, not five thirds of one. | |
| 406 | |
| 407 simplifications in tools/balance.py: | |
| 408 | |
| 409 - a tower attacks from the first monster of a wave reaching it until the | |
| 410 last has passed. it is idle when no monster is in range. with route | |
| 411 length c in range and spacing s between monsters, the share of time with | |
| 412 a monster in range is taken as 1 - e^(-c/s) | |
| 413 - for the single target demand the monster gets every tower's full | |
| 414 attention while in range. in the game, faster monsters overtake the | |
| 415 boss and draw fire away from it | |
| 416 - the naive player builds at the start of a wave with the coins on hand | |
| 417 and never starts a wave early. the greedy player always starts early and | |
| 418 takes the bonus. coins dropped during a wave count from the next wave | |
| 419 - monsters that leak cost one heart each and drop no coins, so a leaky | |
| 420 wave leaves less for the next one | |
| 421 - routes are equally likely; the route preference is left out. the boss | |
| 422 takes the shortest route | |
| 423 - towers keep their level 1 range when upgraded | |
| 424 | |
| 425 the time a monster spends in range comes from coverage: the length of route | |
| 426 within a tower's range, measured for every legal placement cell from the | |
| 427 build's route and placement data. the median cell stands for the naive | |
| 428 player and the best cells for the greedy one. for more than one tower, | |
| 429 cells are picked one after the other, each counting only route that no | |
| 430 earlier tower covers. maps with several routes are measured per route. | |
| 431 | |
| 432 t1 coverage at range 100 and footprint radius 16, in map pixels of route | |
| 433 within range, the mean over routes on maps with several. top 10 % is the | |
| 434 coverage the best tenth of the cells reach: | |
| 435 | |
| 436 | map | routes | legal cells | best | top 10 % | median | | |
| 437 |------|--------|-------------|------|----------|--------| | |
| 438 | map0 | 1 | 2893 | 415 | 360 | 228 | | |
| 439 | map1 | 3 | 2132 | 325 | 232 | 129 | | |
| 440 | map2 | 6 | 1857 | 276 | 195 | 111 | | |
| 441 | map3 | 1 | 1369 | 422 | 311 | 174 | | |
| 442 | |
| 443 route lengths: map0 2068, map1 737 to 1048, map2 722 to 1363, map3 1035. | |
| 444 | |
| 445 value per coin is damage per second divided by all coins paid for the | |
| 446 tower. for t1 it falls with level: 0.43, 0.38, 0.31, 0.26 and 0.22. this | |
| 447 is the intended trade between upgrading and building another tower. t0 at | |
| 448 level 1 reaches 0.67 against a single target, kills an m0 in one hit and | |
| 449 damages every monster in range. it may be the better buy for a naive | |
| 450 player than t1, so the calculation lists value per coin for every tower and | |
| 23 | 451 level, area damage included. the simulation measures 1.2 to 1.7 monsters |
| 452 hit per t0 attack over whole runs, on median cells as on the best ones. | |
| 453 at that rate t0 at level 1 gives 0.8 to 1.1 against m0, two to three times | |
| 454 t1. | |
| 22 | 455 |
| 456 t2 works as a time multiplier. a slow to 0.6 of the speed gives 1.67 times | |
| 457 the time in range for every tower covering the same stretch. this only | |
| 458 helps against the single target demand, so t2 needs faster monsters or | |
| 459 tough monsters spaced apart to pay off. it is tuned after the t1 baseline. | |
| 460 | |
| 23 | 461 tools/simulate.js (architecture.md) plays the same two players in the game |
| 462 code. with the fitted waves, the two tools agree on the coins on hand at | |
| 463 each wave. they differ in the coins a wave needs: | |
| 464 | |
| 465 - the boss needs 5 to 20 % more in the simulation: 49, 143, 338 and 206 | |
| 466 coins for the naive player against 40, 130, 320 and 170 in the | |
| 467 calculation. faster monsters overtake the boss and draw fire away from it | |
| 468 - regular waves on map2 need up to 1.5 times as much. towers on median | |
| 469 cells cover the six routes unevenly, and monsters on a route with little | |
| 470 cover get through. the mean over routes hides this | |
| 471 - about a tenth of the shots are lost because the target died before the | |
| 472 projectile arrived | |
| 473 - route preference changes nothing: with bias 0 the results are the same, | |
| 474 since the speeds lie close to the reference speed | |
| 475 - the players in the simulation also build during a wave, with coins from | |
| 476 the monsters killed in it | |
| 477 | |
| 478 tools/balance.py was left as it is. the waves were fitted with the | |
| 479 simulation. | |
| 480 | |
| 481 with the fitted waves the naive player loses hearts to regular monsters | |
| 482 only in the first two or three waves. towers stay and add up. what a wave | |
| 483 demands, hp arriving per second, follows from the mix and the spawn | |
| 484 interval; wave size sets how long the wave lasts and what it pays. the boss | |
| 485 is the one demand that grows faster than the coins. the naive player loses | |
| 486 its hearts there, 5 at once, in most runs. the target of about 5 hearts | |
| 487 left is met on average over the seeds: the boss gets through in most runs | |
| 488 and dies in a few. | |
| 489 | |
| 22 | 490 order of work (decided): |
| 491 | |
| 492 1. the calculation, tools/balance.py (architecture.md): value per coin for | |
| 493 every tower, the wave demands against t1 only | |
| 494 2. shop prices fixed, then hp, damage and waves fitted to them | |
| 495 3. t2 after the t1 baseline | |
| 496 4. a headless simulation of the real game code with the two scripted | |
| 497 players confirms the result |
