wobblyhead hg > minor_monsters
annotate doc/balance.md @ 16:30bd10284fd8
added ./game to .hgignore
| author | ark |
|---|---|
| date | 2026-10-19 23:47 +0200 |
| parents | c1c7e4f54bf6 |
| children | ad1b478fc4dc |
| 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 | |
| 51 | monster | hp | coins | speed | source | | |
| 52 |---------|----|-------|-------|--------| | |
| 53 | m0 | 5 | 1 | 35 | hp, coins: notes; speed: guess | | |
| 54 | m1 | 10 | 2 | 40 | as above | | |
| 55 | m2 | 15 | 3 | 45 | as above | | |
| 56 | m3 | 20 | 4 | 40 | as above | | |
| 57 | m4 | 30 | 6 | 35 | as above | | |
| 58 | b0 | 30 | 30 | 25 | as above | | |
| 59 | b1 | 50 | 50 | 25 | as above | | |
| 60 | b2 | 70 | 70 | 25 | as above | | |
| 61 | b3 | 100 | 100 | 25 | as above | | |
| 62 | |
| 63 regular monsters drop 0.2 coins per hp; bosses drop 1 coin per hp (derived). | |
| 64 | |
| 65 time to walk the whole path at 35-45 speed (derived): map0 about 50 s, map3 | |
| 66 about 23 s. | |
| 67 | |
| 68 animation (all guesses): | |
| 69 | |
| 70 - one hop takes 0.35 s | |
| 71 - hop height 5 | |
| 72 - squash on landing 6 % (wider and flatter), stretch in the air 4 % | |
| 73 - idle bob 2 % | |
| 74 - each monster starts at a random point in its hop cycle, so a group does not | |
| 75 hop in step | |
|
8
2c4fed8baed9
art update, persistent sound setting, tower selling as double action
ark
parents:
6
diff
changeset
|
76 - the death puff shows for 0.4 s |
| 0 | 77 |
| 10 | 78 variation between monsters, so a group does not walk in single file (all |
| 79 guesses): | |
| 80 | |
| 81 - each monster's speed differs from its table speed by up to 5 % either way. | |
| 82 faster ones overtake slower ones | |
| 83 - a monster walks beside the centre line of the road, at most 0.45 of the | |
| 84 road half width away from it: 8.6, 7.7, 7.2 and 9.9 pixels by map | |
| 85 - half of that is a fixed lean to one side, chosen at spawn. the other half | |
| 86 wanders, with a new random value every 40 pixels along the route and a | |
| 87 smooth change between them | |
| 88 - the offset grows from 0 over the first 20 pixels of the route | |
| 89 - on the inside of tight bends the offset is reduced, so a monster never moves | |
| 90 backwards. monsters may bunch up there | |
| 91 | |
| 0 | 92 |
| 93 route preference | |
| 94 ---------------- | |
| 95 | |
| 96 on maps with several routes, a monster picks one at spawn. faster monsters | |
| 97 prefer longer or straighter routes, slower ones prefer shortcuts (decided). | |
| 98 | |
| 99 proposed rule (guess): | |
| 100 | |
| 101 - for each route the build calculates its length and how much it turns (sum of | |
| 102 direction changes along the route) | |
| 103 - each route gets a value between 0 and 1: the average of its length relative | |
| 104 to the longest route and its straightness relative to the straightest route | |
| 105 - each monster gets a speed factor: its speed minus the reference speed, | |
| 106 divided by the reference speed, limited to -1..1 | |
| 107 - route weight = 1 + bias * speed factor * (2 * route value - 1), at least 0.1 | |
| 108 - a monster at the reference speed sees all routes as equally likely | |
| 14 | 109 - a boss always takes the shortest route (decided). a route with a fixed |
| 110 weight of 0 is left out | |
| 0 | 111 |
| 112 | parameter | value | source | | |
| 113 |-----------------|-------|--------| | |
| 114 | reference speed | 40 | guess | | |
| 115 | bias | 3 | guess | | |
| 116 | |
| 117 with the speeds above, m2 is the only regular monster faster than the | |
| 118 reference, and the effect on it is small. the speeds may need to spread out | |
| 119 more for the preference to be visible. | |
| 120 | |
| 121 | |
| 122 towers | |
| 123 ------ | |
| 124 | |
| 15 | 125 towers have 5 levels (decided). the config sets damage, range, slow and cost |
| 126 for level 1 and level 5 only. the build fills in the levels between in equal | |
| 127 steps, rounded to whole numbers where both ends are whole. | |
| 128 | |
| 129 the drawing sheet gives five damage values for t0 and t1, and four for t2 and | |
| 130 t3. level 5 of t2 and t3 continues the trend (guess). the equal steps change | |
| 131 three values from the sheet: t1 level 2 from 7 to 8, t1 level 4 from 17 to 18, | |
| 132 and t3 level 2 from 5 to 4 (decided). | |
| 0 | 133 |
| 134 | tower | damage by level | cost | range by level | attack every | projectile speed | source | | |
| 135 |-------|------------------|------|---------------------|--------------|------------------|--------| | |
| 6 | 136 | 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 | 137 | 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 | |
| 138 | t2 | 1,3,5,7,9 | 20 | 90,94,98,102,106 | 1.2 s | 220 | damage level 1, cost: notes; rest: guess | | |
| 139 | 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 | | |
| 140 | |
| 141 the cost column is the build cost, level 1. | |
| 0 | 142 |
| 143 rules: | |
| 144 | |
| 145 - attack speed stays the same at every level (decided). t0 is slower than the | |
| 146 others (decided), t1 faster than t2, t2 faster than t3 (notes) | |
| 147 - range grows about 4 % per level (decided "slightly", amount guessed) | |
| 148 - t0 damages every monster in range at once, each attack | |
| 149 - t2 slow: hit monsters move at 0.60, 0.55, 0.50, 0.45, 0.40 of their speed | |
| 150 by level, for 2 s (guess). a new hit restarts the time. slows do not add up; | |
| 151 the strongest one applies | |
| 152 - p1, p2, p3 home in on their target. if the target dies first, the | |
| 153 projectile flies on to the last position and disappears (guess) | |
| 154 - towers aim at the monster furthest along its route (guess) | |
| 155 | |
| 15 | 156 costs: the price of building, or of the upgrade to a level. they started as |
| 157 level n costs base cost x n (decided); the config sets levels 1 and 5: | |
| 0 | 158 |
| 159 | tower | level 1 (build) | level 2 | level 3 | level 4 | level 5 | total | | |
| 160 |-------|-----------------|---------|---------|---------|---------|-------| | |
| 161 | t0 | 5 | 10 | 15 | 20 | 25 | 75 | | |
| 162 | t1 | 10 | 20 | 30 | 40 | 50 | 150 | | |
| 163 | t2 | 20 | 40 | 60 | 80 | 100 | 300 | | |
| 164 | t3 | 25 | 50 | 75 | 100 | 125 | 375 | | |
| 165 | |
| 6 | 166 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
|
167 rounded down (decided). a tower is sold whole. |
| 0 | 168 |
| 169 | tower | level 1 | level 2 | level 3 | level 4 | level 5 | | |
| 170 |-------|---------|---------|---------|---------|---------| | |
| 6 | 171 | t0 | 2 | 7 | 15 | 25 | 37 | |
| 172 | t1 | 5 | 15 | 30 | 50 | 75 | | |
| 173 | t2 | 10 | 30 | 60 | 100 | 150 | | |
| 174 | t3 | 12 | 37 | 75 | 125 | 187 | | |
| 0 | 175 |
| 176 damage per second against a single target, at the guessed attack times | |
| 177 (derived): | |
| 178 | |
| 179 | tower | level 1 | level 2 | level 3 | level 4 | level 5 | | |
| 180 |-------|---------|---------|---------|---------|---------| | |
| 181 | t0 | 3.3 | 6.7 | 10.0 | 13.3 | 16.7 | | |
| 15 | 182 | t1 | 4.3 | 11.4 | 18.6 | 25.7 | 32.9 | |
| 0 | 183 | t2 | 0.8 | 2.5 | 4.2 | 5.8 | 7.5 | |
| 15 | 184 | t3 | 0.8 | 3.1 | 5.4 | 7.7 | 10.0 | |
| 0 | 185 |
| 186 t3 is meant to be weaker than the other towers; its range lets it reach more | |
| 187 targets (decided). to keep the gap moderate, its cost went from 40 to 25 and | |
| 188 its attack time from 2.0 s to 1.3 s, just slower than t2 as the notes require | |
| 189 (decided, amount guessed). at level 1 it deals about a fifth of t1's damage per | |
| 190 second at two and a half times the cost. its range covers more path, roughly | |
| 191 three times as much on a winding map (estimate). | |
| 192 | |
| 193 | |
| 194 placement | |
| 195 --------- | |
| 196 | |
| 197 | parameter | value | source | | |
| 198 |--------------------------------------------|-------|--------| | |
| 199 | tower footprint radius | 16 | guess | | |
| 9 | 200 | road half width, centre line to road edge | per map: 19, 17, 16, 22 | measured from the earlier masks | |
| 201 | largest gap between footprint and road edge | 14 | guess | | |
| 202 | space between footprint and spawn point | per map: 50 | decided | | |
| 203 | space between footprint and exit point | per map: 40 | decided | | |
| 0 | 204 | smallest distance between tower centres | 32 | derived (two footprints) | |
| 205 | distance from the map edge | 16 | guess | | |
| 206 | snap radius, how far a tap may be from a legal position | 48 | guess | | |
| 207 | placement grid cell | 4 | guess | | |
| 208 | |
| 209 towers may not be placed on the entrance or exit areas. | |
| 210 | |
| 9 | 211 the spawn point is where the path leaves the blue entrance area. the space |
| 212 between it and a tower footprint is one to one and a half times the average | |
| 213 tower size (decided). level 1 towers average about 36 pixels across at sprite | |
| 214 scale 0.25, so the space is 36 to 53 pixels. | |
| 215 | |
| 216 the exit point is where the path enters the green exit area. towers keep a | |
| 217 somewhat smaller space from it (decided), so they do not cover the building | |
| 218 drawn at the exit. | |
| 219 | |
| 0 | 220 |
| 221 economy | |
| 222 ------- | |
| 223 | |
| 224 | map | starting coins | coins dropped in total | boss coins | regular monster coins | regular monster hp | | |
| 225 |------|----------------|------------------------|------------|-----------------------|--------------------| | |
| 226 | map0 | 10 | 100 | 30 | 70 | 350 | | |
| 227 | map1 | 20 | 200 | 50 | 150 | 750 | | |
| 228 | map2 | 40 | 400 | 70 | 330 | 1650 | | |
| 229 | map3 | 60 | 600 | 100 | 500 | 2500 | | |
| 230 | |
| 231 starting coins and the 10 x starting coins total are from the notes; the rest | |
| 232 is derived. early wave bonuses come on top of this total. | |
| 233 | |
| 234 the source sheet gives 50 starting coins for map3. the notes raise it to 60 to | |
| 235 make the step from map1 to map3 more even (10, 20, 40, 60 instead of 10, 20, | |
| 236 40, 50). likely to change after playtesting. | |
| 237 | |
| 238 share of the regular monster coins by monster level (guess). all monster | |
| 239 levels appear on all maps (decided): | |
| 240 | |
| 241 | map | m0 | m1 | m2 | m3 | m4 | | |
| 242 |------|------|------|------|------|------| | |
| 243 | map0 | 40 % | 25 % | 15 % | 10 % | 10 % | | |
| 244 | map1 | 30 % | 25 % | 20 % | 15 % | 10 % | | |
| 245 | map2 | 20 % | 20 % | 20 % | 20 % | 20 % | | |
| 246 | map3 | 15 % | 15 % | 20 % | 25 % | 25 % | | |
| 247 | |
| 248 resulting monster counts (derived, rounded): | |
| 249 | |
| 250 | map | m0 | m1 | m2 | m3 | m4 | monsters | coins | | |
| 251 |------|----|----|----|----|----|----------|-------| | |
| 252 | map0 | 28 | 9 | 4 | 2 | 1 | 44 | 72 | | |
| 253 | map1 | 45 | 19 | 10 | 6 | 2 | 82 | 149 | | |
| 254 | map2 | 66 | 33 | 22 | 16 | 11 | 148 | 328 | | |
| 255 | map3 | 75 | 38 | 33 | 31 | 21 | 198 | 500 | | |
| 256 | |
| 257 the build prints these totals from the actual wave lists and warns when a map | |
| 258 is more than 5 % off its coin total. | |
| 259 | |
| 260 | |
| 261 waves | |
| 262 ----- | |
| 263 | |
| 264 | parameter | value | source | | |
| 265 |------------------------------------|---------------------|--------| | |
| 266 | waves per map | 6, 8, 10, 12 | guess | | |
| 267 | break before the first wave | 40 s | guess | | |
| 268 | break between waves | 25 s | guess ("longer", decided) | | |
| 14 | 269 | time between spawns | 1.0, 1.0, 0.8, 0.7 s by map | guess | |
| 0 | 270 | early start bonus, coins per second left | 0.05, 0.1, 0.2, 0.3 by map | guess (starting coins / 200) | |
| 271 | |
| 272 the bonus is rounded down. if every break is skipped at once, the bonus adds | |
| 273 about 6, 17, 45 and 82 coins per map (derived). | |
| 274 | |
| 275 suggested shape of a map's waves (guess): the coin value of wave n grows in | |
| 14 | 276 proportion to n, so the last wave is the largest. the boss comes in the last |
| 277 wave and spawns first. later waves mix monster levels; early waves are mostly | |
| 278 m0 and m1. | |
| 0 | 279 |
| 280 | |
| 281 hearts | |
| 282 ------ | |
| 283 | |
| 284 | parameter | value | source | | |
| 285 |-------------------------|-------|--------| | |
| 286 | hearts per map | 10 | decided | | |
| 287 | heart cost of a monster | 1 | decided | | |
| 288 | heart cost of a boss | 5 | decided | | |
| 289 | |
| 290 | |
| 291 coins in flight | |
| 292 --------------- | |
| 293 | |
| 294 | parameter | value | source | | |
| 295 |----------------------------------|-------|--------| | |
| 296 | flight time to the counter | 0.7 s | guess | | |
| 297 | most coin sprites for one death | 8 | guess | | |
| 298 | |
| 299 coins are added to the counter at the moment the monster dies; the flying | |
| 300 coins only show it (guess). this keeps the counter correct for a player who | |
| 301 builds right after a kill. | |
| 302 | |
| 303 | |
| 304 controls | |
| 305 -------- | |
| 306 | |
| 307 | parameter | value | source | | |
| 308 |------------|--------|--------| | |
|
8
2c4fed8baed9
art update, persistent sound setting, tower selling as double action
ark
parents:
6
diff
changeset
|
309 | game speeds | 1x, 2x, 4x | decided | |
