view config/game.toml @ 34:83e8b0e0f010 0.10.1

homepage link on splash does not open a new tab anymore
author ark
date 2026-10-20 19:54 +0200
parents 85d23328a215
children a464bd43b76c
line wrap: on
line source

# game settings. tools/build.py checks this file and writes www/data/config.js.
#
# units: distances in map pixels (pixels of the map image as scanned), times
# in seconds, speeds in map pixels per second.
#
# source markers, as in doc/balance.md:
#   notes    from the original design notes or drawing sheet, decided
#   decided  decided after the notes were written
#   guess    a starting value for playtesting, expected to change
#   derived  calculated from other values
#   proto    chosen while building the prototype, not in the docs
#            (see "prototype notes" in doc/roadmap.md)


[scale]
map = 1.0           # notes
sprite = 0.25       # notes ("maps scaled approx 400%"), towers, monsters, projectiles
coin = 0.4          # guess, 0.25 makes them about 10 pixels
hp_bar = 0.25       # guess


# monsters. coins are set apart from hp (decided): regular monsters drop
# 0.10 to 0.20 coins per hp, bosses 0.2.
# hit_radius is a share of the scaled sprite's smaller side.

[monster.m0]
hp = 5
coins = 1
speed = 35

[monster.m1]
hp = 10
coins = 1
speed = 40

[monster.m2]
hp = 15
coins = 2
speed = 55

[monster.m3]
hp = 20
coins = 2
speed = 40

[monster.m4]
hp = 30
coins = 3
speed = 45

[monster.b0]
hp = 150
coins = 10
speed = 25
boss = true

[monster.b1]
hp = 300
coins = 20
speed = 20
boss = true

[monster.b2]
hp = 350
coins = 30
speed = 30
boss = true

[monster.b3]
hp = 500
coins = 40
speed = 25
boss = true


[animation]
hop_time = 0.35
hop_height = 5
squash = 0.06       # on landing, wider and flatter
stretch = 0.04      # in the air
idle_bob = 0.02
hit_radius = 0.4    # share of the monster sprite's smaller side
death_puff = 0.4    # seconds the death puff shows
freeze_splash = 0.4 # seconds the t2 freeze splash shows


# variation between monsters, so they do not walk in single file
[movement]
speed_variation = 0.05  # each monster's speed differs by up to this share either way
offset = 0.45           # largest sideways offset from the centre line, share of the road half width
lean = 0.5              # fixed part of a monster's offset, share of the largest offset
wander_step = 40        # distance along the route between the wandering part's values
fade_in = 20            # distance from the route start over which the offset grows from 0


[route_preference]
reference_speed = 40
bias = 3
min_weight = 0.1


# towers have 5 levels. damage, range, slow and cost give the values at
# level 1 and level 5; the build fills in the levels between in equal steps,
# rounded to whole numbers when both ends are whole. cost is the price of
# building (level 1) or of upgrading to that level. attack_time is the time
# between attacks, the same at every level (decided). projectile_speed 0
# means a melee tower: each attack damages every monster in range. damage
# may be left out for a tower that only slows.

# melee tower. low damage because it often hits multiple monsters.
[tower.t0]
damage = [2, 6]
cost = [5, 25]
range = [60, 70]
attack_time = 1.5
projectile = "p0"
projectile_speed = 0

# standard tower
[tower.t1]
damage = [3, 15]
cost = [10, 30]
range = [100, 116]
attack_time = 0.7
projectile = "p1"
projectile_speed = 300

# freeze tower, no damage. p2 bursts where it lands and slows every
# monster within splash_radius, about two monsters across.
[tower.t2]
cost = [20, 40]
range = [90, 106]
attack_time = 1.2
projectile = "p2"
projectile_speed = 220
slow = [0.60, 0.30]
slow_time = 2.0
splash_radius = 28

# sniper tower. slightly weaker, slower and more expensive than standard tower
# to balance much higher range
[tower.t3]
damage = [2, 13]
cost = [15, 35]
range = [220, 260]
attack_time = 0.9
projectile = "p3"
projectile_speed = 800

[tower_rules]
sell_refund = 0.5       # half of everything paid for the tower, rounded down


[placement]
footprint_radius = 16
max_gap = 14
min_tower_distance = 40
edge_distance = 16
snap_radius = 48
grid_cell = 4


[waves]
first_break = 40
break = 30
spawn_interval = 1.0


[hearts]
per_map = 10
monster = 1
boss = 10


[coins]
flight_time = 0.7
max_sprites = 8


[controls]
speeds = [1, 2, 4]


# sound events (doc/sound.md). the recordings come from art/sounds/, named
# after the event. per event: volume is a share of full volume. min_interval
# is the least time between two plays; plays in between are dropped. beep is
# the placeholder for an event without a recording, as notes of [frequency in
# Hz, seconds].
[sound]
enabled = true          # until the player switches sound on or off in the game
volume = 0.8            # base for all sounds
beep_wave = "square"
music_fade = 0.4        # seconds the splash screen music takes to fade out. proto

[sound.event]
t0_attack = { volume = 0.6 }
t1_shot = { volume = 0.4 }
t2_shot = { volume = 0.4 }
t3_shot = { volume = 0.5 }
monster_enter = { volume = 0.4 }
monster_exit = { volume = 0.8 }
monster_die = { volume = 0.5 }
monster_hit = { volume = 0.2, min_interval = 0.05, beep = [[1200, 0.03]] }
boss_enter = { volume = 1.0 }
boss_exit = { volume = 1.0 }
boss_die = { volume = 1.0 }
coins_arrive = { volume = 0.25, min_interval = 0.08, beep = [[1568, 0.04], [2093, 0.06]] }
wave_start = { volume = 0.4, beep = [[440, 0.1], [660, 0.15]] }
early_bonus = { volume = 0.4, beep = [[880, 0.06], [1175, 0.06], [1760, 0.1]] }
tower_built = { volume = 0.4, beep = [[330, 0.05], [494, 0.08]] }
tower_upgraded = { volume = 0.4, beep = [[392, 0.05], [587, 0.05], [784, 0.08]] }
tower_sold = { volume = 0.4, beep = [[494, 0.05], [330, 0.08]] }
placement_refused = { volume = 0.4, beep = [[220, 0.12], [165, 0.18]] }
button_tap = { volume = 0.3, beep = [[1000, 0.02]] }
map_won = { volume = 1.0 }
map_lost = { volume = 1.0 }
intro = { volume = 1.0 }   # splash screen music, looped. proto


# sprite drawing direction (art.md): angle the drawing points to as drawn,
# 0 right, -90 up. sprites not listed do not turn. set by hand, the towers
# checked in temp/preview/towers.png.
# adjusted by hand.
[art.angle]
t1 = -2
t1_2 = -3
t1_3 = -6
t1_4 = 0
t1_5 = 0
t2 = -95
t2_2 = -90
t2_3 = -89
t2_4 = -90
t2_5 = -95
t3 = -43
t3_2 = -48
t3_3 = -15
t3_4 = -15
t3_5 = -88
p0 = -90
p1 = 0
p3 = -45

# rotation point as a share of the trimmed image's width and height, for
# sprites that do not turn around their centre (art.md). proto, checked in
# temp/preview/towers.png. t1: the centre of the base square measured on
# source_sheet_2 cutouts. t2: the middle of the rows at least 60 % as wide as
# the widest row, which leaves out the barrel. t3: the centroid of the shape
# with parts narrower than 41 pixels removed.
# adjusted by hand.
[art.pivot]
t1 = [0.37, 0.5]
t1_2 = [0.30, 0.5]
t1_3 = [0.33, 0.48]
t1_4 = [0.35, 0.52]
t1_5 = [0.27, 0.5]
t2 = [0.49, 0.57]
t2_2 = [0.50, 0.61]
t2_3 = [0.50, 0.64]
t2_4 = [0.48, 0.71]
t2_5 = [0.50, 0.72]
t3 = [0.40, 0.62]
t3_2 = [0.41, 0.59]
t3_3 = [0.41, 0.43]
t3_4 = [0.45, 0.46]
t3_5 = [0.49, 0.54]

# where the button of each screen sits on the screen's drawing: the top left
# corner of the separate button image, in pixels of the trimmed drawing.
# proto, found by matching the button image against the drawing.
[art.screen]
splash = [479, 463]
map_won = [210, 225]
game_lost = [172, 230]
game_won = [373, 383]
# the logo and help buttons beside the play button on the splash screen:
# top left corner and height, in pixels of the trimmed splash drawing. proto
splash_logo = [119, 463, 164]
splash_help = [896, 463, 164]
# the email address on the help popup, a tap on it writes a mail: top left
# corner, width and height, in pixels of the drawing. measured, with a margin
help_email = [690, 1505, 665, 100]


# web page the logo on the splash screen opens in a new tab. empty: the
# logo does nothing. the address and subject of the mail written from the
# help popup. empty address: the email on the popup does nothing
[links]
logo_url = "https://www.wobblyhead.net/games/minor_monsters.html"
email = "info@wobblyhead.net"
email_subject = "Minor Monsters"


# debug switches, all off by default
[debug]
start_coins = -1        # coins at the start of a map, -1 uses the map's value
unlimited_coins = false
start_map = 0
start_wave = 1          # the first wave to play, from 1
no_heart_loss = false
show_routes = false
show_grid = false
show_ranges = false
show_hit_areas = false
show_stats = false      # frame time and entity counts
seed = 0                # random seed, 0 picks a new one each run


# maps. waves: number of each monster in the wave. the boss spawns first, the
# others follow one per spawn interval, in random order. the boss is in the
# last wave. monster_share, wave_size and first_wave are the numbers
# tools/balance.py --draft makes wave lists from; the game does not use them.

[map.0]
starting_coins = 10
early_bonus = 0.05
wave_count = 6
monster_share = [36, 25, 18, 12, 9]     # fitted in tools/simulate.js; % of regular monsters by count, m0-m4
wave_size = [4, 7]                      # fitted; regular monsters in the first and the last wave (draft, tools/balance.py)
first_wave = [1, 2, 2, 4, 5]            # fitted; wave in which each monster level first appears, m0-m4 (draft)
spawn_interval = 1.0                    # fitted; seconds between spawns
path_half_width = 19                    # measured from the earlier masks, centre line to road edge
spawn_distance = 50
exit_distance = 40

[map.1]
starting_coins = 20
early_bonus = 0.1
wave_count = 8
monster_share = [36, 25, 18, 12, 9]
wave_size = [6, 17]
first_wave = [1, 2, 3, 5, 6]
spawn_interval = 0.65
path_half_width = 17
spawn_distance = 50
exit_distance = 40

[map.2]
starting_coins = 30
early_bonus = 0.2
wave_count = 10
monster_share = [39, 26, 17, 11, 7]
wave_size = [10, 36]
first_wave = [1, 2, 4, 6, 8]
spawn_interval = 0.65
path_half_width = 16
spawn_distance = 50
exit_distance = 40

[map.3]
starting_coins = 40
early_bonus = 0.3
wave_count = 12
monster_share = [52, 26, 13, 6, 3]
wave_size = [5, 16]
first_wave = [1, 2, 4, 6, 9]
spawn_interval = 0.5
path_half_width = 22
spawn_distance = 50
exit_distance = 40

# map0: drafted by tools/balance.py --draft from wave_count 6, wave_size [4, 7],
# monster_share [36, 25, 18, 12, 9], first_wave [1, 2, 2, 4, 5]

[[map.0.wave]]   # wave 1, 4 monsters, 20 hp, 4 coins
monsters = { m0 = 4 }

[[map.0.wave]]   # wave 2, 5 monsters, 45 hp, 6 coins
monsters = { m0 = 2, m1 = 2, m2 = 1 }

[[map.0.wave]]   # wave 3, 5 monsters, 45 hp, 6 coins
monsters = { m0 = 2, m1 = 2, m2 = 1 }

[[map.0.wave]]   # wave 4, 6 monsters, 65 hp, 8 coins
monsters = { m0 = 2, m1 = 2, m2 = 1, m3 = 1 }

[[map.0.wave]]   # wave 5, 6 monsters, 90 hp, 10 coins
monsters = { m0 = 1, m1 = 2, m2 = 1, m3 = 1, m4 = 1 }

[[map.0.wave]]   # wave 6, 7 monsters, 130 hp, 14 coins + boss 30
monsters = { m0 = 1, m1 = 1, m2 = 1, m3 = 2, m4 = 2, b0 = 1 }

# map1: drafted by tools/balance.py --draft from wave_count 8, wave_size [6, 17],
# monster_share [36, 25, 18, 12, 9], first_wave [1, 2, 3, 5, 6]

[[map.1.wave]]   # wave 1, 6 monsters, 30 hp, 6 coins
monsters = { m0 = 6 }

[[map.1.wave]]   # wave 2, 8 monsters, 55 hp, 8 coins
monsters = { m0 = 5, m1 = 3 }

[[map.1.wave]]   # wave 3, 9 monsters, 80 hp, 11 coins
monsters = { m0 = 4, m1 = 3, m2 = 2 }

[[map.1.wave]]   # wave 4, 11 monsters, 105 hp, 14 coins
monsters = { m0 = 4, m1 = 4, m2 = 3 }

[[map.1.wave]]   # wave 5, 12 monsters, 135 hp, 17 coins
monsters = { m0 = 4, m1 = 3, m2 = 3, m3 = 2 }

[[map.1.wave]]   # wave 6, 14 monsters, 210 hp, 24 coins
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 2 }

[[map.1.wave]]   # wave 7, 15 monsters, 240 hp, 27 coins
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 3, m4 = 3 }

[[map.1.wave]]   # wave 8, 17 monsters, 290 hp, 32 coins + boss 50
monsters = { m0 = 3, m1 = 3, m2 = 3, m3 = 4, m4 = 4, b1 = 1 }

# map2: drafted by tools/balance.py --draft from wave_count 10, wave_size [10, 36],
# monster_share [39, 26, 17, 11, 7], first_wave [1, 2, 4, 6, 8]

[[map.2.wave]]   # wave 1, 10 monsters, 50 hp, 10 coins
monsters = { m0 = 10 }

[[map.2.wave]]   # wave 2, 13 monsters, 85 hp, 13 coins
monsters = { m0 = 9, m1 = 4 }

[[map.2.wave]]   # wave 3, 16 monsters, 110 hp, 16 coins
monsters = { m0 = 10, m1 = 6 }

[[map.2.wave]]   # wave 4, 19 monsters, 160 hp, 22 coins
monsters = { m0 = 9, m1 = 7, m2 = 3 }

[[map.2.wave]]   # wave 5, 22 monsters, 195 hp, 27 coins
monsters = { m0 = 10, m1 = 7, m2 = 5 }

[[map.2.wave]]   # wave 6, 24 monsters, 250 hp, 32 coins
monsters = { m0 = 9, m1 = 7, m2 = 5, m3 = 3 }

[[map.2.wave]]   # wave 7, 27 monsters, 305 hp, 38 coins
monsters = { m0 = 9, m1 = 7, m2 = 6, m3 = 5 }

[[map.2.wave]]   # wave 8, 30 monsters, 410 hp, 48 coins
monsters = { m0 = 8, m1 = 7, m2 = 6, m3 = 6, m4 = 3 }

[[map.2.wave]]   # wave 9, 33 monsters, 485 hp, 56 coins
monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 6, m4 = 5 }

[[map.2.wave]]   # wave 10, 36 monsters, 565 hp, 64 coins + boss 70
monsters = { m0 = 8, m1 = 7, m2 = 7, m3 = 7, m4 = 7, b2 = 1 }

# map3: drafted by tools/balance.py --draft from wave_count 12, wave_size [5, 16],
# monster_share [52, 26, 13, 6, 3], first_wave [1, 2, 4, 6, 9]

[[map.3.wave]]   # wave 1, 5 monsters, 25 hp, 5 coins
monsters = { m0 = 5 }

[[map.3.wave]]   # wave 2, 6 monsters, 35 hp, 6 coins
monsters = { m0 = 5, m1 = 1 }

[[map.3.wave]]   # wave 3, 7 monsters, 45 hp, 7 coins
monsters = { m0 = 5, m1 = 2 }

[[map.3.wave]]   # wave 4, 8 monsters, 60 hp, 9 coins
monsters = { m0 = 5, m1 = 2, m2 = 1 }

[[map.3.wave]]   # wave 5, 9 monsters, 70 hp, 10 coins
monsters = { m0 = 5, m1 = 3, m2 = 1 }

[[map.3.wave]]   # wave 6, 10 monsters, 85 hp, 12 coins
monsters = { m0 = 5, m1 = 3, m2 = 2 }

[[map.3.wave]]   # wave 7, 11 monsters, 105 hp, 14 coins
monsters = { m0 = 5, m1 = 3, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 8, 12 monsters, 110 hp, 15 coins
monsters = { m0 = 6, m1 = 3, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 9, 13 monsters, 120 hp, 16 coins
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1 }

[[map.3.wave]]   # wave 10, 14 monsters, 150 hp, 19 coins
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 1, m4 = 1 }

[[map.3.wave]]   # wave 11, 15 monsters, 170 hp, 21 coins
monsters = { m0 = 6, m1 = 4, m2 = 2, m3 = 2, m4 = 1 }

[[map.3.wave]]   # wave 12, 16 monsters, 185 hp, 23 coins + boss 100
monsters = { m0 = 6, m1 = 4, m2 = 3, m3 = 2, m4 = 1, b3 = 1 }