wobblyhead hg > minor_monsters
diff doc/roadmap.md @ 6:910b26feca76
full game flow
| author | ark |
|---|---|
| date | 2026-10-19 01:05 +0200 |
| parents | 2d46729a022e |
| children | 2c4fed8baed9 |
line wrap: on
line diff
--- a/doc/roadmap.md Sun Oct 18 22:50:24 2026 +0200 +++ b/doc/roadmap.md Mon Oct 19 01:05:29 2026 +0200 @@ -25,10 +25,14 @@ damage, hp bars, coin drops and flying coins - first playable version of map0 6. tower details - - upgrades, selling with the pause refund rule, t0 melee and spike sides, - t2 slow, boss with its bar + - upgrades, selling the whole tower with the pause refund rule, t0 melee + and spike sides, t2 slow with the blue hp bar, boss with its bar 7. game flow - - title and map selection, unlocking, localStorage, restart + - splash screen with title, byline and play button over the paused first + map; the play button starts the sound + - map won with next, game won after the last map with restart to the + splash screen, map lost back to the first map + - no map selection, unlocking or localStorage 8. tuning on all maps - wave lists for maps 1-3, playtesting, balance changes in config only 9. supplied art and sound @@ -44,7 +48,7 @@ prototype notes --------------- -decisions taken while building steps 1-5 that the other documents do not +decisions taken while building steps 1-7 that the other documents do not cover. values marked proto in config/game.toml refer to this list. build: @@ -66,7 +70,9 @@ 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 - the empty part of the hp bars is a darkened copy made by the build - (hpm_empty, hpb_empty) + (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 + (hpm_slow, hpb_slow, each with its _empty copy) - sprite sizes go into config.js, so the game knows them before the images load - mask pixels count when at least half opaque, and take the class of their @@ -117,12 +123,20 @@ game: -- scripts share the namespace object MM. storage.js is not written yet +- scripts share the namespace object MM. storage.js is not written until + there are settings to store (architecture.md, persistence) - 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 -- there is no title or map selection yet. the game starts on - debug.start_map. the won and lost screens offer a restart only +- game flow: the first map is debug.start_map, and only the first map + starts at debug.start_wave; the next maps start at wave 1. + 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 - 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 @@ -136,10 +150,23 @@ radius. a new tower attacks at once - turning towers face their target at once and keep the last direction when idle -- t0's melee attack is in place, since without it t0 does nothing. it draws - spikes on all four sides and pushes them out for 0.3 s. spike sides, t2 - slow, upgrades, selling and the boss bar are left for step 6; the boss uses - hpm for now +- t0's attack stretches each spike from under the tower until its tip + reaches the range, and back, over 0.3 s +- t0 spike sides: each side covers a quarter of the directions around the + tower. the route centre lines are sampled every 4 pixels; a side gets a + spike when it holds at least 20 % of the samples within t0's level 5 + range. with no sample in that range, only the side towards the nearest + one gets a spike. the preview shows the same sides. on map0 about half the + 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 +- 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 preview builds. the shop choice is cleared after building, and a second tap on the chosen shop button cancels it. a tap on a built tower selects it and @@ -151,11 +178,12 @@ 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 -- debug switches: all from architecture.md except unlocking maps, which waits - for step 7. start_coins -1 means the map's own value, seed 0 a new seed per +- debug switches: all from architecture.md. start_coins -1 means the map's own value, seed 0 a new seed per run -- sound: the first pointer or touch event anywhere unlocks audio, as there - is no title screen yet. sound is switched off only in the config. beeps +- 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 generator, so sound does not change a repeated run. a sound that cannot be played at once (audio still locked) is dropped, not queued
