← Dev Log
BallOrcs Battle2 min read

BallOrcs Battle: touch controls and menus that fit a phone

The war game's touch layer gets a rebuilt HUD with unit icons, a layout editor, and menus sized in logical pixels so they work on real phones.

In plain words

Playing Battle on a phone was hard. The menus were laid out for a desktop window, so the Start button could sit below the bottom of the screen, and the buttons were too small to tap. This week the touch controls got a rebuild. The unit buttons are now icons you can tell apart at a glance, with the price shown when you hold your finger on one. Swipe left to buy one unit, or right to buy as many as your food covers. The top bar rotates through four sets of commands, and the pause menu has a Customize layout option where you can drag the buttons where your thumbs want them.

The menus were also reworked to fit a phone. The skirmish form scrolls with its Start button pinned at the bottom, and the pause menu is more compact.

Under the hood

  • Logical-pixel scaling (UiScale, UiScaleWatch): on touch-first devices a single factor is set on the root window before any other autoload runs. A "56 px" button is now a real 56 logical pixels. Desktop is untouched.
  • Touch HUD redesign: a four-face rotating top bar (Orders, Abilities, Select, Camera), with one icon per trainable unit on the bottom corners and a one-line hint.
  • Layout editor (#91): drag the top bar and HUD cards, with Snap to grid on by default. Positions save per unit type as 0..1 fractions of the safe area.
  • Phone menus: the skirmish card scrolls, and the loading, result and briefing panels no longer use fixed widths. ui_scale.gd MenuZoom keeps a menu button a fingertip in device pixels.
  • Match start: the Start button loads the match in place (MenuLoadProgress), with a new "Finishing the terrain" stage. A failed load restores the button.
  • Balance: gate 3's window is keyed by map profile. Standard is judged 10-25 min and Large 20-45 min, per docs/MATCH_DEPTH.md.
  • Testing: the long-match fuzz gained --fuzz-style=steady, which keeps gatherers home, musters and buys, so it reaches the late game. tools/playtest/long_fuzz.py runs maps, tribes and seeds in parallel. Several web-demo fixes were written before the headless suites ran, so they are still being checked.
  • Web demo: no Quit button on web, the Menu and Pause buttons are split, and a manual build:web:demo job ships with no crash reporting.

Nothing here changes the simulation's rules. These changes are presentation and input.

#rts#touch#ui#web#testing