wobblyhead hg > minor_monsters
diff doc/roadmap.md @ 8:2c4fed8baed9
art update, persistent sound setting, tower selling as double action
| author | ark |
|---|---|
| date | 2026-10-19 13:37 +0200 |
| parents | 910b26feca76 |
| children | 53f015966118 |
line wrap: on
line diff
--- a/doc/roadmap.md Mon Oct 19 11:50:24 2026 +0200 +++ b/doc/roadmap.md Mon Oct 19 13:37:52 2026 +0200 @@ -63,12 +63,21 @@ - tower strips are split at columns without ink. ink is anything darker than luminance 225. outline gaps of up to about 4 pixels are closed before the fill. the white paper edge outside the outline fades to transparent -- tools/cut_sheet.py cuts the sprites out of source_sheet_2.jpg into art/. it +- tools/cut_sheet.py cuts the sprites out of art_sources/source_sheet_2.jpg + into art/. it is run by hand, not by the build. one hand-set box per drawing; in each box the largest connected outline is the drawing and other ink is dropped. outline ink is darker than luminance 150. sprites stay at the sheet's scale, which is the scale the first cutouts had, so [scale] is unchanged. coins and maps are not on the inked sheet and stay as they were +- game_won.png and game_won_button.png were cut once from + art_sources/game_won.jpg with the cut function of cut_sheet.py; the scan + has no boxes in the script +- tools/cut_digits.py takes every connected stroke on digits.png as one + character. ink is darker than luminance 150, strokes under 30 pixels are + specks. rows are told apart by the stroke centre, and the characters of + each row are listed in the script. the scaled height is 66.5 pixels, the + median of the drawings - the empty part of the hp bars is a darkened copy made by the build (hpm_empty, hpb_empty). the blue bars for slowed monsters have the hue of every pixel set to 220 degrees, which leaves the black outline as it is @@ -123,8 +132,8 @@ game: -- scripts share the namespace object MM. storage.js is not written until - there are settings to store (architecture.md, persistence) +- scripts share the namespace object MM. storage.js keeps the settings in + the localStorage entry minor_monsters, as version 1 - the simulation runs on wall clock time: at 60 frames per second, 2x gives two steps per frame. at most 4 steps per frame and speed step; a longer frame drops the rest @@ -133,10 +142,14 @@ debug.start_coins applies to every map. the splash screen pauses the first map without counting the pause for the sell refund, and only its play button responds. the next map starts with its break running, as - does the first map after a lost map. the screens use placeholders: a - pale veil with the title and byline in the system font, a play - triangle, one star for a won map and three for the game, a broken heart - for a lost map, an arrow for next and a circular arrow for restart + does the first map after a lost map. the splash screen has a pale veil + over the map, the other screens a dark one +- screens: the scale is the same for all four drawings, set so the widest + and the tallest fit 92 % of the window width and 90 % of its height, at + most 1. the separate button image is drawn over the button in the + drawing; [art.screen] in game.toml holds where, measured by matching the + images. its tap area is the button image. it pulses by 4 % over 1.2 s; + under the mouse it is 8 % larger with a shadow - a break starts when all monsters of the wave are gone, killed or escaped, not when the last one has spawned. during a break the wave counter shows the next wave @@ -160,11 +173,16 @@ placement cells give one side, most of the rest two, a few three - t2 slow: each running slow keeps its own time, and the strongest one applies. a slowed monster also hops slower, by the same factor -- tower menu: tapping a built tower shows an upgrade and a sell button above - it, or below it when there is no room above, kept inside the map. the - upgrade button shows the cost of the next level and is dimmed when it - cannot be afforded; at level 5 it is left out. the sell button shows the - refund. selling clears the selection; upgrading keeps it +- tower menu: tapping a built tower shows the tower_popup bubble, 168 css + pixels wide, above it, or below it when there is no room above, kept + inside the map. upgrade and sell sit in it side by side, each with its + price below, and each takes half of the bubble as tap area. the upgrade + price is the cost of the next level, dimmed when it cannot be afforded; at + level 5 upgrade is left out and sell takes the whole bubble. the sell + price is the refund. selling clears the selection; upgrading keeps it +- selling takes two taps. the first arms it: sell_button pulses by 15 % + every 0.5 s with a red glow. the second sells. a tap anywhere else, + another button or the map, cancels it; there is no timeout - the pause refund counts pauses: each purchase records the pause it was made in. a purchase made during the current pause is refunded in full - placement: a tap within the footprint radius or 28 css pixels of the @@ -174,17 +192,29 @@ the player cannot afford are dimmed and do nothing - flying coins: one sprite per coin, at most 8, started 0.05 s apart, flying in game time on an arc. they are dropped when the map ends -- placeholder icons: c0 for coins, m0 for waves, a drawn heart, one triangle - per game speed step (digits for debug speeds), a skip icon with countdown - and bonus for the early start. the top bar needs about 500 css pixels of - width; narrower screens are not handled +- top bar: coin_icon, heart and monster_icon with their counters. each + counter keeps the width of a usual largest value (3, 2 and 5 + characters), so the next one does not move. pause shows pause_button + while the game runs and play_button while it is paused. speed shows the + drawing of the current speed; debug speeds show their number. the early + start button shows the countdown on next_wave, without the bonus. the top + bar needs about 670 css pixels of width; narrower screens are not handled +- numbers: the digit variant of each place depends on the digit and its + place counted from the right, so the variants differ along a number but a + number keeps its look. top bar digits are 28 css pixels high, prices 18, + with coin_icon in front, as behind the amount it reads as an extra zero +- shop: items are 84 x 72 css pixels, drawn on shop_bubble. the chosen + item switches between shop_bubble_dark and shop_bubble_dark2 every 0.4 s +- death puffs: at the monster's centre, at sprite scale. they grow from 60 % + to full size over the first half of their time and fade out over the + second half. they are dropped when the map ends - debug switches: all from architecture.md. start_coins -1 means the map's own value, seed 0 a new seed per run - sound: the play button on the splash screen starts the sound; taps before it leave sound off. later pointer and touch events resume audio - if the browser has suspended it. sound is switched off only in the - config. beeps - use a square wave. variants are picked with Math.random, not the seeded + if the browser has suspended it. switching sound off mutes the output at + once and stops new sounds; the button tap is played after switching, so + it is heard when sound goes on. beeps use a square wave. variants are picked with Math.random, not the seeded generator, so sound does not change a repeated run. a sound that cannot be played at once (audio still locked) is dropped, not queued - towers at scale 0.25 are small: t1 level 1 is about 43 x 30 map pixels.
