wobblyhead hg > minor_monsters
diff doc/architecture.md @ 11:a77857594150
adjusted tower building, added preview dragging
| author | ark |
|---|---|
| date | 2026-10-19 17:56 +0200 |
| parents | 22b604680c5a |
| children | 8df95050fc8b |
line wrap: on
line diff
--- a/doc/architecture.md Mon Oct 19 16:56:38 2026 +0200 +++ b/doc/architecture.md Mon Oct 19 17:56:56 2026 +0200 @@ -79,7 +79,7 @@ ff_screenshot -w 1024,768 -s 2 -S 3 -J 'document.getElementById("game") .dispatchEvent(new PointerEvent("pointerdown", - {clientX: 512, clientY: 444, bubbles: true}))' \ + {clientX: 497, clientY: 560, bubbles: true}))' \ file://$PWD/game/index.html temp/play.png `ff_screenshot -h` lists the other options. @@ -252,13 +252,16 @@ - nothing relies on hover; selection and confirmation are by tap. with a mouse, hover enlarges the screen buttons and shows the pointer cursor over any button +- buttons and tower selection act when the pointer goes down. placing + follows the pointer until it is let go, and building happens then - the page blocks browser zoom and scroll gestures on the canvas placement: - the build's placement grid marks every cell where a tower may stand -- on a tap, the game searches outward from the tap for the nearest legal cell - that keeps the minimum distance to other towers, within the snap radius +- while the pointer is down, the game searches outward from it for the + nearest legal cell that keeps the minimum distance to other towers, within + the snap radius. where there is none, the preview stays where it was - t0 checks once, at placement, which of its four sides face the path, and only draws spikes on those
