annotate doc/game_design.md @ 31:d1ae50439686

Added tag 0.9.2 for changeset a51e44094df2
author ark
date 2026-10-20 17:58 +0200
parents 3f2811aebb3d
children 85d23328a215
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
1 tower defense game design notes
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
2 -------------------------------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
3
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
4 numbers marked as guesses, and all speeds, ranges and timings, are collected in
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
5 balance.md. technical details are in architecture.md.
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
6
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
7 - working title "minor monsters"
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
8 - runs as a plain html/javascript page, on desktop (mouse) and on tablets
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
9 (touch)
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
10 - the player only manages towers: build, upgrade, sell. everything else, such
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
11 as collecting coins, happens on its own
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
12 - no text in the game where an icon will do. icons, ui elements and any
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
13 remaining text are supplied as scribbles; see art.md for the list
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
14
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
15 maps
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
16 ----
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
17
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
18 - map levels 0-3: home, mine entrance, mine, lava depths
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
19 *mask images define play areas
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
20 monster enter from blue entrance, walk to green exit on red path
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
21 towers are placed along path
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
22 - maps are played in order. after a won map the only way on is the next map.
910b26feca76 full game flow
ark
parents: 4
diff changeset
23 a lost map sends the player back to the first map. there is no map
910b26feca76 full game flow
ark
parents: 4
diff changeset
24 selection. to be reviewed after playtesting
910b26feca76 full game flow
ark
parents: 4
diff changeset
25 - the first map is map0, or the map set by the debug start switch
910b26feca76 full game flow
ark
parents: 4
diff changeset
26 (architecture.md)
910b26feca76 full game flow
ark
parents: 4
diff changeset
27 - nothing is stored in the browser for now. a reload starts again at the
910b26feca76 full game flow
ark
parents: 4
diff changeset
28 splash screen with a fresh game
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
29 - coins do not carry over between maps; each map starts with its own starting
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
30 coins
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
31 - map1 and map2 have branching paths, map2 has two entrances. a monster picks
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
32 its route when it spawns:
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
33 - faster monsters prefer longer or straighter routes
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
34 - slower monsters prefer shortcuts
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
35 - otherwise all routes are equally likely
14
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
36 - bosses take the shortest route
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
37 - later maps have shorter paths and many more monsters
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
38
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
39 towers
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
40 ------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
41
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
42 - towers:
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
43 - t0 is close range and projects spikes (p0) from all four sides
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
44 damage per tower level: 5,10,15,20
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
45 cost 5
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
46 melee tower: each attack damages every monster in range at once
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
47 slower attack than the other towers
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
48 spikes are only drawn on the sides that face the path
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
49 - t1 is the default generic towers, turns, shoots projectile p1
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
50 damage: 3,7,13,17
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
51 cost 10
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
52 - t2 shoots projectile p2, turns, slows down monsters
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
53 slower than t1
24
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
54 no damage (decided; the sheet gave 1,3,5,7). p2 bursts where it
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
55 lands into a freeze splash (freeze.png) about two monsters across,
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
56 and slows every monster in it
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
57 a slowed monster's hp bar turns blue
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
58 cost 20
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
59 - t3 is long range sniper tower, turns, shoots p3
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
60 slower than t2
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
61 damage 1,5,7,10
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
62 cost 25 (first planned as 40, lowered for balance)
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
63 - art assets for tower levels still need to be processed, contain upgrades 1-4
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
64 for each tower
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
65 - towers have 5 levels: t0-t3 are level 1 (the base), the four drawings in
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
66 each t*p strip are levels 2-5
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
67 the original drawing sheet gives five damage values for t0 (5,10,15,20,25)
24
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
68 and t1 (3,7,13,17,23), and four for t2 and t3, as above. level 5 of t3
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
69 is guessed in balance.md. the game fills in the levels between
15
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
70 level 1 and level 5 in equal steps, so some values differ from the sheet
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
71 - t3 is meant to be weaker than the other towers; its range lets it reach
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
72 more targets
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
73 - towers are placed next to the path, never on it. a tap or click snaps to the
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
74 nearest legal position, so the player does not have to hit an exact spot
11
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
75 - placing: pick a tower in the shop, press on the map and drag. a preview
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
76 with its range follows, snapped to the nearest legal position, and stays
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
77 where the pointer is let go. tapping the preview builds the tower.
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
78 dragging the preview, or pressing elsewhere and dragging, moves it again.
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
79 changed after user testing, where players wanted to drag the preview
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
80 - the preview pulses in time with the chosen shop item. some testers took
a77857594150 adjusted tower building, added preview dragging
ark
parents: 10
diff changeset
81 the preview for a built tower
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
82 - tapping a built tower shows its range and the upgrade and sell buttons
15
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
83 - each level has its own cost: building is level 1, an upgrade costs the
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
84 price of the new level. the costs started as tower base cost * tower
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
85 level, so the first upgrade (to level 2) cost twice the base cost.
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
86 balance.md has the current values
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
87 - upgrades mainly raise damage. range grows slightly, and so does the slowing
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
88 of t2. attack speed stays the same at all levels
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
89 - selling a tower refunds half of everything paid for it: the build and all
910b26feca76 full game flow
ark
parents: 4
diff changeset
90 its upgrades. a tower is always sold whole; upgrades cannot be sold one by
910b26feca76 full game flow
ark
parents: 4
diff changeset
91 one
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
92
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
93 monsters
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
94 --------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
95
23
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
96 - monsters m0-m4 are monster levels, drop 1/1/2/2/3 coins on death
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
97 hp 5/10/15/20/30, the same on every map
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
98 (the notes had 1/2/3/4/6 coins; balance.md, monsters)
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
99 - all monster levels appear on all maps, in different amounts and proportions.
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
100 low levels stay in the mix on later maps to balance the larger numbers
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
101 - monsters emulate animation with slight bobbing, squish/stretch on x and y by a
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
102 few percent; walking animation is by small hops; hops and animation may
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
103 overlap out of red path
10
22b604680c5a adjusted monster movement to be less uniform
ark
parents: 8
diff changeset
104 - monsters do not walk in single file: each walks a little to the side of the
22b604680c5a adjusted monster movement to be less uniform
ark
parents: 8
diff changeset
105 path, drifting from side to side, and at a slightly different speed
22
ad1b478fc4dc balancing work, docs and scripts
ark
parents: 15
diff changeset
106 - bosses are map-specific, b0 belongs to map0 etc; boss coin drop
ad1b478fc4dc balancing work, docs and scripts
ark
parents: 15
diff changeset
107 30/50/70/100, boss hp 5 times that (balance.md)
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
108 - hp bars are always shown above every monster. the boss uses its own bar, also
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
109 above the boss. the bar turns blue while t2 slows the monster
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
110 - dropped coins fly to the coin counter on their own. each coin uses a random
23
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
111 one of c0-c3. the coins of an early start bonus fly the same way, from the
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
112 level exit
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
113
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
114 economy and waves
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
115 -----------------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
116
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
117 - starting coins per map level: 10, 20, 40, 60
22
ad1b478fc4dc balancing work, docs and scripts
ark
parents: 15
diff changeset
118 - balance of monster speed vs tower fire frequency tbd, see balance.md,
ad1b478fc4dc balancing work, docs and scripts
ark
parents: 15
diff changeset
119 balancing
23
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
120 - several monster waves per map with breaks between them, last wave
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
121 includes boss. the notes set the coins per map to 10 times the starting
2f555a54c332 layout fixes and balancing
ark
parents: 22
diff changeset
122 coins; this is no longer a target (balance.md, economy)
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
123 - the break between waves counts down, and the next wave starts on its own
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
124 when it runs out. a button starts the next wave early and pays a coin bonus
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
125 based on the seconds left. this is how most tower defense games handle it
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
126 - the breaks are longer than first planned, to give time to build
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
127
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
128 hearts
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
129 ------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
130
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
131 - each map starts with a number of hearts
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
132 - a monster that reaches the exit costs one heart, a boss costs more
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
133 - at zero hearts the map is lost, and play starts again at the first map
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
134 - the map is won when the last wave, including the boss, is cleared
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
135
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
136 screens
910b26feca76 full game flow
ark
parents: 4
diff changeset
137 -------
910b26feca76 full game flow
ark
parents: 4
diff changeset
138
910b26feca76 full game flow
ark
parents: 4
diff changeset
139 - splash: title "minor monsters", byline "By M.A. and J.A. Juszczyk" and a
910b26feca76 full game flow
ark
parents: 4
diff changeset
140 play button, drawn over the first map with the game paused. the play button
24
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
141 also starts the sound. left of the play button a logo opens a web page in a
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
142 new tab, right of it a question mark opens the help popup
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
143 - map won, on maps before the last: one button, next, which starts the next
910b26feca76 full game flow
ark
parents: 4
diff changeset
144 map
910b26feca76 full game flow
ark
parents: 4
diff changeset
145 - game won, after the last map: one button, restart, which goes back to the
910b26feca76 full game flow
ark
parents: 4
diff changeset
146 splash screen
910b26feca76 full game flow
ark
parents: 4
diff changeset
147 - map lost: one button, which starts the first map
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
148 - all screens are drawn at one scale, so the splash and game won screens,
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
149 which are drawn larger, stay larger than map won and map lost
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
150 - the screen buttons pulse slowly as a cue to tap. with a mouse they grow
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
151 under the pointer
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
152
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
153 controls
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
154 --------
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
155
13
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
156 - pause. towers cannot be built, upgraded or sold while paused. building
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
157 during a pause was allowed at first, but it clashed with starting waves
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
158 early
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
159 - game speed 1x, 2x and 4x (decided)
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
160 - sound on and off, kept in the browser
24
3f2811aebb3d splash screen buttons, help button, info screen
ark
parents: 23
diff changeset
161 - help, which opens the help popup
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
162 - input via pointer events, so mouse and touch work the same. no part of the
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
163 game depends on mouse hover
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
164
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
165 sound
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
166 -----
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
167
4
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
168 - voice recordings for most events, placeholder beeps generated in the
2d46729a022e sound processing and in-game sounds
ark
parents: 0
diff changeset
169 browser for the rest; see sound.md