3 Commits

Author SHA1 Message Date
SoftwareApp 254e0d2675 gameplay: dosable power and a playable landscape layout
Two findings from actually playing:

1. Shot power was hard to set and impossible to read. It was derived from the
   absolute distance to the tank (250 world px = 100 %) and only shown through
   the size of the aim dots, so direction and power changed together.
   Aiming is now a slingshot: the drag length sets the power (260 px = 100 %),
   the drag direction sets the shot direction, with a 6 px dead zone. Feedback:
   a dashed rubber band to the finger, a charge bar under the active tank with
   quarter marks, and a HUD row with angle plus a power bar and percentage.

2. Landscape was unplayable. The camera used zoom = max(fitHeight, fitWidth),
   so a wide view zoomed in and cropped the world top and bottom - and the
   camera never panned vertically, which put both tanks off-screen. The camera
   now always fits the world height, centres the world when the view is wider,
   and the background continues into the letterbox (ridges tiled, ground edge
   extended, vignette follows the visible range). Controls and paddings are
   compact in landscape.

- new golden test landscape.png (840x420) shows both tanks and guards the bug;
  18 tests green.
- verified on the device in both orientations: shots fire, measured power 47 %
  and 54 % mid-gesture, no RenderFlex overflow in logcat, perf.sh still
  60.0 fps / 0.0 % jank (p90 16.9 ms).
- store screenshots re-captured with the new HUD and re-framed to 16:9;
  play-console.md release notes and "how to play" updated for 0.9.1.
- release 0.9.1 (14).
2026-10-25 15:14:02 +01:00
SoftwareApp fb85915418 art: new ingame renderer (sky, parallax, terrain, tanks, effects)
- lib/src/game/art.dart draws the scene with canvas primitives: dusk sky with a
camera-relative sun, three parallax ridges (far = lighter), soil with rim
light and irregular rocks, tanks with hull/turret/barrel/tracks and a
health bar in team colour, comet trail, impact with fireball/ring/sparks and
a dotted aim hint.
- Flutter tokens come from the generated palette, so app UI and artwork match.
- performance was part of the job: the first version ran at 31-40 % jank. An
A/B against the old renderer (0-6.5 %) proved it was the new scene, then the
causes were removed one by one: full-screen radial vignette (now edge bands),
per-ridge gradient shaders and per-frame paints (flat fills, cached paints),
two clipped gradient rects under the surface, terrain redrawn every frame (now
a ui.Picture per terrain version) and mask-filter blurs.
- result on the Redmi Note 10: 60.0 fps, 0.0-0.8 % jank.
- goldens regenerated and reviewed; store screenshots re-captured and renamed
to match their content (01 gameplay, 02 projectile, 03 crater, 04 settings).
- docs/art-direction.md: phase 2 section with the performance table.
2026-10-25 02:59:20 +01:00
SoftwareApp e8908ef4bb test(m3b): headless golden tests via m3b match source abstraction 2026-10-24 23:02:13 +02:00