annotate doc/roadmap.md @ 20:4348b83d3e6b

more art adjustment
author ark
date 2026-10-20 00:41 +0200
parents fe680946164b
children fa04481563b7
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 roadmap
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 steps in order. each ends with something that runs and can be looked at.
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
5
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
6 1. build basics
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
7 - directory layout, config/game.toml with the values from balance.md
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
8 - build script: sprites, tower level split and fill, map copies,
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
9 config.js
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
10 - check: the processed tower levels look right
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
11 2. maps and routes
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
12 - mask classification, placement grid, route extraction, routes.toml
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
13 corrections
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
14 - previews in temp/preview/
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
15 - check: routes on all four maps follow the paths, placement grid looks
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
16 sensible
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
17 3. map and walking monsters
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
18 - index.html, main loop, scaling to the window, map drawing
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
19 - monsters walk their routes with hop animation and route preference
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
20 - check: hop and squash feel; speeds against path lengths
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
21 4. waves and hearts
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
22 - wave timing, countdown, early start and bonus, hearts, win and loss
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
23 5. towers
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
24 - shop, placement with snapping and preview, targeting, projectiles,
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
25 damage, hp bars, coin drops and flying coins
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
26 - first playable version of map0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
27 6. tower details
13
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
28 - upgrades, selling the whole tower, t0 melee
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
29 and spike sides, t2 slow with the blue hp bar, boss with its bar
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
30 7. game flow
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
31 - splash screen with title, byline and play button over the paused first
910b26feca76 full game flow
ark
parents: 4
diff changeset
32 map; the play button starts the sound
910b26feca76 full game flow
ark
parents: 4
diff changeset
33 - map won with next, game won after the last map with restart to the
910b26feca76 full game flow
ark
parents: 4
diff changeset
34 splash screen, map lost back to the first map
910b26feca76 full game flow
ark
parents: 4
diff changeset
35 - no map selection, unlocking or localStorage
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
36 8. tuning on all maps
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
37 - wave lists for maps 1-3, playtesting, balance changes in config only
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
38 9. supplied art and sound
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
39 - icons, screens and digits as the drawings arrive (art.md)
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
40 - voice recordings as they arrive (sound.md)
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
41 10. publishing
17
fe680946164b reorganised repo
ark
parents: 15
diff changeset
42 - publish script, dist/ zip of www/, hosting for tablet play
15
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
43 11. help page
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
44 - a hint page made from game graphics, no text where a picture will do
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
45 - the tower ranges side by side
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
46 - placing a tower: one tap puts the preview down, a second tap on it
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
47 builds
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
48 - t0 hitting several monsters with one attack
c1c7e4f54bf6 balance work prep
ark
parents: 14
diff changeset
49 - t2 slowing a monster, with the blue hp bar
0
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
50
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
51 debug switches (architecture.md) are added as each step needs them, starting
7af9dd4e2595 initial art and design/planning docs
ark
parents:
diff changeset
52 with step 3.
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
53
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
54
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
55 prototype notes
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
56 ---------------
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
57
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
58 decisions taken while building steps 1-7 that the other documents do not
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
59 cover. values marked proto in config/game.toml refer to this list.
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
60
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
61 build:
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
62
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
63 - runs on python 3.11 or later with pillow; numpy is not used. a full build
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
64 takes about 5 s, most of it in the mask step
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
65 - a step is skipped when its outputs are newer than its inputs and the build
9
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
66 scripts. the mask step also reruns when the placement settings or the
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
67 per map road and spawn settings in game.toml change; it keeps its result in temp/build/maps.json for the
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
68 checks and previews
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
69 - map images are written as jpeg, quality 88. the maps have no transparency
2
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
70 - tower strips are split at columns without ink. ink is anything darker
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
71 than luminance 225. outline gaps of up to about 4 pixels are closed before
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
72 the fill. the white paper edge outside the outline fades to transparent
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
73 - tools/cut_sheet.py cuts the sprites out of art_sources/source_sheet_2.jpg
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
74 into art/. it
2
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
75 is run by hand, not by the build. one hand-set box per drawing; in each box
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
76 the largest connected outline is the drawing and other ink is dropped.
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
77 outline ink is darker than luminance 150. sprites stay at the sheet's
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
78 scale, which is the scale the first cutouts had, so [scale] is unchanged.
3dd5b745fa08 updated art with inked drawings
ark
parents: 1
diff changeset
79 coins and maps are not on the inked sheet and stay as they were
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
80 - game_won.png and game_won_button.png were cut once from
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
81 art_sources/game_won.jpg with the cut function of cut_sheet.py; the scan
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
82 has no boxes in the script
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
83 - tools/cut_digits.py takes every connected stroke on digits.png as one
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
84 character. ink is darker than luminance 150, strokes under 30 pixels are
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
85 specks. rows are told apart by the stroke centre, and the characters of
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
86 each row are listed in the script. the scaled height is 66.5 pixels, the
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
87 median of the drawings
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
88 - the empty part of the hp bars is a darkened copy made by the build
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
89 (hpm_empty, hpb_empty). the blue bars for slowed monsters have the hue of
910b26feca76 full game flow
ark
parents: 4
diff changeset
90 every pixel set to 220 degrees, which leaves the black outline as it is
910b26feca76 full game flow
ark
parents: 4
diff changeset
91 (hpm_slow, hpb_slow, each with its _empty copy)
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
92 - sprite sizes go into config.js, so the game knows them before the images
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
93 load
9
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
94 - mask pixels are classified by exact colour. any pixel that is not fully
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
95 transparent and not one of the three colours stops the build
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
96 - the placement test draws discs instead of keeping a distance for every
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
97 pixel. the result is the same. the road is a disc of footprint radius plus
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
98 road half width around each centre line pixel; centre line pixels inside
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
99 the entrance and exit areas do not count. each spawn point gets a disc of
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
100 footprint radius plus spawn_distance, each exit point one of footprint
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
101 radius plus exit_distance. edge_distance applies to the tower centre
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
102 - the spawn point is the first centre line pixel outside the entrance area,
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
103 walking from the route start. the exit point is found the same way from
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
104 the route end
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
105 - the centre line runs through the entrance and exit areas, so routes start
9
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
106 and end inside them. dead ends shorter than 0.8 line widths are dropped.
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
107 junctions closer together than 0.75 line widths count as one. the line
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
108 width is the red area divided by the centre line length, about 11 pixels
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
109 - map2 has three loops (the round one at the top left, two squares at the
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
110 bottom). each leaves the path at a junction and comes back to the same
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
111 junction, so the rule "no junction twice" would never walk them. a route
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
112 may walk such a loop once. of its two directions, the one that turns less
9
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
113 is kept. map2 gives 6 routes, all kept; map1 gives 3
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
114 - route smoothing: moving average over 17 points, applied twice, then
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
115 simplified to 0.8 pixel tolerance
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
116 - straightness for the route value is the least turning of the map's routes
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
117 divided by the route's turning. turning is the total, not per length
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
118 - routes.toml names routes by their number in the build output. the numbers
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
119 change when a mask changes
9
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
120 - the road half widths are the median distance from the centre line to the
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
121 edge of the earlier masks, which covered the whole road. map0's route is
53f015966118 map, path, tower placement adjustments
ark
parents: 8
diff changeset
122 2068 long
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
123 - the coin check compares all coins dropped, boss included, with 10 x
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
124 starting coins
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
125 - the build prints the early start bonus for skipping every break, including
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
126 the one before the first wave: 8, 21, 53, 94. balance.md gives 6, 17, 45,
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
127 82, which leaves that break out. the game pays the bonus before the first
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
128 wave too. to decide
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
129
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
130 config:
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
131
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
132 - per map: [map.N] holds starting_coins, early_bonus, wave_count and
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
133 monster_share, followed by the [[map.N.wave]] lists
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
134 - added: hit_radius in [animation] (0.4 of the monster sprite's smaller
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
135 side), min_weight in [route_preference] (the "at least 0.1" of the rule),
14
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
136 [art.angle] and [art.pivot]. the turning towers turn around the middle of
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
137 their body, not the middle of the image. t1: the centre of the box
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
138 measured on the cutouts. t2: the middle of the round body, found as the
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
139 rows at least 60 % as wide as the widest row. t3: an estimate, the
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
140 centroid of the shape once the barrel and star tips are removed, to adjust
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
141 by hand. temp/preview/towers.png marks them
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
142 - draft waves: monster counts per level from the coin shares. each level is
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
143 spread over the waves by the coin budget still open, with wave n worth n
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
144 shares. higher levels start later: m1 after 15 % of the waves, m2 35 %, m3
14
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
145 50 %, m4 65 %. spawn interval 1.0 s on maps 0 and 1, 0.8 s on map2, 0.7 s
7fda634d15ad adjustments to wave logic, tower pivot points
ark
parents: 13
diff changeset
146 on map3. totals: 102, 199, 398, 600 coins
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
147
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
148 game:
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
149
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
150 - scripts share the namespace object MM. storage.js keeps the settings in
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
151 the localStorage entry minor_monsters, as version 1
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
152 - the simulation runs on wall clock time: at 60 frames per second, 2x gives
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
153 two steps per frame. at most 4 steps per frame and speed step; a longer
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
154 frame drops the rest
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
155 - game flow: the first map is debug.start_map, and only the first map
910b26feca76 full game flow
ark
parents: 4
diff changeset
156 starts at debug.start_wave; the next maps start at wave 1.
910b26feca76 full game flow
ark
parents: 4
diff changeset
157 debug.start_coins applies to every map. the splash screen pauses the
13
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
158 first map, and only its play button responds. the next map starts with its break running, as
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
159 does the first map after a lost map. the splash screen has a pale veil
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
160 over the map, the other screens a dark one
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
161 - screens: the scale is the same for all four drawings, set so the widest
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
162 and the tallest fit 92 % of the window width and 90 % of its height, at
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
163 most 1. the separate button image is drawn over the button in the
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
164 drawing; [art.screen] in game.toml holds where, measured by matching the
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
165 images. its tap area is the button image. it pulses by 4 % over 1.2 s;
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
166 under the mouse it is 8 % larger with a shadow
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
167 - a break starts when all monsters of the wave are gone, killed or escaped,
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
168 not when the last one has spawned. during a break the wave counter shows
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
169 the next wave
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
170 - monsters move at constant speed; the hop is drawn only. a hop spends 80 %
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
171 of its time in the air and 20 % landing. the idle bob is a slow breathing
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
172 (1.3 s) on top of the hops, as monsters never stand still
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
173 - route choice weighs all routes of the map. on map2 this also picks the
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
174 entrance
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
175 - "furthest along" means the least distance left to the exit. a monster is in
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
176 range when its centre is. projectiles hit on reaching the target's hit
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
177 radius. a new tower attacks at once
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
178 - turning towers face their target at once and keep the last direction when
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
179 idle
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
180 - t0's attack stretches each spike from under the tower until its tip
910b26feca76 full game flow
ark
parents: 4
diff changeset
181 reaches the range, and back, over 0.3 s
910b26feca76 full game flow
ark
parents: 4
diff changeset
182 - t0 spike sides: each side covers a quarter of the directions around the
910b26feca76 full game flow
ark
parents: 4
diff changeset
183 tower. the route centre lines are sampled every 4 pixels; a side gets a
910b26feca76 full game flow
ark
parents: 4
diff changeset
184 spike when it holds at least 20 % of the samples within t0's level 5
910b26feca76 full game flow
ark
parents: 4
diff changeset
185 range. with no sample in that range, only the side towards the nearest
910b26feca76 full game flow
ark
parents: 4
diff changeset
186 one gets a spike. the preview shows the same sides. on map0 about half the
910b26feca76 full game flow
ark
parents: 4
diff changeset
187 placement cells give one side, most of the rest two, a few three
910b26feca76 full game flow
ark
parents: 4
diff changeset
188 - t2 slow: each running slow keeps its own time, and the strongest one
910b26feca76 full game flow
ark
parents: 4
diff changeset
189 applies. a slowed monster also hops slower, by the same factor
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
190 - tower menu: tapping a built tower shows the tower_popup bubble, 168 css
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
191 pixels wide, above it, or below it when there is no room above, kept
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
192 inside the map. upgrade and sell sit in it side by side, each with its
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
193 price below, and each takes half of the bubble as tap area. the upgrade
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
194 price is the cost of the next level, dimmed when it cannot be afforded; at
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
195 level 5 upgrade is left out and sell takes the whole bubble. the sell
13
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
196 price is the refund. selling clears the selection; upgrading keeps it.
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
197 a tap anywhere outside the bubble closes it
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
198 - selling takes two taps. the first arms it: sell_button pulses by 15 %
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
199 every 0.5 s with a red glow. the second sells. a tap anywhere else,
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
200 another button or the map, cancels it; there is no timeout
13
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
201 - pausing clears the shop choice, the preview and the tower selection.
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
202 while paused, presses on the map do nothing and the shop is dimmed. the
8df95050fc8b no more build during pause; tower popup closes on any click outside it
ark
parents: 11
diff changeset
203 top bar buttons, early start included, still work
11
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
204 - placement: a press on the map puts the preview at the nearest legal
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
205 position, and the preview follows the pointer until it is let go. only
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
206 the first pointer is followed. a press within the footprint radius or 28
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
207 css pixels of the preview grabs it: let go after moving at most 10 css
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
208 pixels, it builds; a longer move drags it, keeping its offset to the
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
209 pointer. the shop choice is cleared after building, and a second tap on
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
210 the chosen shop button cancels it. a tap on a built tower selects it and
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
211 shows its range. a press that finds no legal position shows a red cross
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
212 for 0.5 s where the pointer is let go. shop buttons the player cannot
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
213 afford are dimmed and do nothing
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
214 - the preview is drawn at 45 % to 80 % opacity and 100 % to 108 % size. it
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
215 grows while the chosen shop item shows shop_bubble_dark and shrinks while
a77857594150 adjusted tower building, added preview dragging
ark
parents: 9
diff changeset
216 it shows shop_bubble_dark2. the range circle does not pulse
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
217 - flying coins: one sprite per coin, at most 8, started 0.05 s apart, flying
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
218 in game time on an arc. they are dropped when the map ends
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
219 - top bar: coin_icon, heart and monster_icon with their counters. each
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
220 counter keeps the width of a usual largest value (3, 2 and 5
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
221 characters), so the next one does not move. pause shows pause_button
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
222 while the game runs and play_button while it is paused. speed shows the
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
223 drawing of the current speed; debug speeds show their number. the early
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
224 start button shows the countdown on next_wave, without the bonus. the top
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
225 bar needs about 670 css pixels of width; narrower screens are not handled
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
226 - numbers: the digit variant of each place depends on the digit and its
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
227 place counted from the right, so the variants differ along a number but a
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
228 number keeps its look. top bar digits are 28 css pixels high, prices 18,
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
229 with coin_icon in front, as behind the amount it reads as an extra zero
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
230 - shop: items are 84 x 72 css pixels, drawn on shop_bubble. the chosen
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
231 item switches between shop_bubble_dark and shop_bubble_dark2 every 0.4 s
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
232 - death puffs: at the monster's centre, at sprite scale. they grow from 60 %
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
233 to full size over the first half of their time and fade out over the
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
234 second half. they are dropped when the map ends
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
235 - debug switches: all from architecture.md. start_coins -1 means the map's own value, seed 0 a new seed per
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
236 run
6
910b26feca76 full game flow
ark
parents: 4
diff changeset
237 - sound: the play button on the splash screen starts the sound; taps
910b26feca76 full game flow
ark
parents: 4
diff changeset
238 before it leave sound off. later pointer and touch events resume audio
8
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
239 if the browser has suspended it. switching sound off mutes the output at
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
240 once and stops new sounds; the button tap is played after switching, so
2c4fed8baed9 art update, persistent sound setting, tower selling as double action
ark
parents: 6
diff changeset
241 it is heard when sound goes on. beeps use a square wave. variants are picked with Math.random, not the seeded
4
2d46729a022e sound processing and in-game sounds
ark
parents: 2
diff changeset
242 generator, so sound does not change a repeated run. a sound that cannot be
2d46729a022e sound processing and in-game sounds
ark
parents: 2
diff changeset
243 played at once (audio still locked) is dropped, not queued
1
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
244 - towers at scale 0.25 are small: t1 level 1 is about 43 x 30 map pixels.
5492efd60e2c first prototype + updated art sheet
ark
parents: 0
diff changeset
245 worth a look with the hop and squash check of step 3