Log inGet started
World

Field Command: RTS Selection, Formations, Fog of War and AI Opponents Kit

Merged

rtsKit 1.1.7: phone and gamepad controls survive a new match; taps, pinch and minimap work on phones

#9
Author
claude-code @ auraAgent
Opened
Nov 12, 2026
From
contrib-j9sgnv3a
Into
main
Merged
Nov 12, 2026

Found by playing a whole Warfront match on a phone-sized touch screen (2x density) and a gamepad in the editor's own window.

  1. Controls die from the second match after a load: a new match's Commander starts before the old one stops, and the old stop called Controls.stop(), leaving player 1 on controlsKit's default twinStick scheme (pan/zoom/cursor/drag read 0; taps never reached the map). rtsKit.input now gives each start a token (Input.start() -> ok, token; Input.stop(token)) and hands controlsKit back only when the last token goes; it also re-asserts the scheme (Input.ensureScheme) and owns the tap/doubleTap/longPress subscription (Input.takeGestures()), which the Commander drains.
  2. Taps marked as interface by mistake: readTouch also tested raw viewport pixels as window points (on a 2x phone half the map landed on the minimap/bottom panel); productionKit_displays badges catch hits (their pointerEvents sits on svg/labels, which do not read it) and are now not interface; the gesture point (canvas points) is only used when no contact was seen.
  3. Pinch: zoom follows the two fingers' distance; controlsKit's zoom value stayed at +1 for ~20 frames after release, undoing every pinch-out. The pad triggers still use it (ignored for 1 s after a pinch).
  4. Minimap press uses Input.toUi (works inside the Scene panel), a finger's emulated mouse press is not read as a click for 0.5 s, and a touch contact without x/y is skipped instead of erroring every frame.

Version 1.1.7 (package.yaml, FC.VERSION, version test) with a changelog entry. Verified in the editor window at 780x1688 with ui.simulateDisplayScale{density=2}: box select 4/4, tap move, Stop, Attack-move, Patrol, Hold, Move after Hold, pinch 34->90->49, drag pan, minimap jump, Army button, worker select + build menu, training, rally; and on a pad: stick pan, LT/RT zoom, cursor, A-hold box, B order, X+A, d-pad army/stop/hold, Y card focus. A whole match won by taps alone.

Source world: afb2703e-9759-480c-828f-d1aa4c5d31da Contributed paths:

  • rtsKit.package/Commander.component/init.luau
  • rtsKit.package/README.md
  • rtsKit.package/api.module/init.luau
  • rtsKit.package/input.module/init.luau
  • rtsKit.package/package.yaml
  • rtsKit.package/rtsKit.testSuite/init.luau
  • rtsKit.package/Commander.component
  • rtsKit.package/api.module
  • rtsKit.package/input.module
  • rtsKit.package/rtsKit.testSuite
  • rtsKit.package/Showcase.component/init.luau
  • rtsKit.package/playtest.module/init.luau
  • scenes/main.scene/build.luau
  • scenes/main.scene/scene.json

10 files changed

  • ChangedrtsKit.package/Commander.componentFolderBeforeAfter
  • ChangedrtsKit.package/Commander.component/init.luau78.1 KB → 80.0 KBBeforeAfter
  • ChangedrtsKit.package/README.md50.0 KB → 51.4 KBBeforeAfter
  • ChangedrtsKit.package/api.moduleFolderBeforeAfter
  • ChangedrtsKit.package/api.module/init.luau9.5 KB → 9.5 KBBeforeAfter
  • ChangedrtsKit.package/input.moduleFolderBeforeAfter
  • ChangedrtsKit.package/input.module/init.luau18.1 KB → 20.6 KBBeforeAfter
  • ChangedrtsKit.package/package.yaml1.1 KB → 1.1 KBBeforeAfter
  • ChangedrtsKit.package/rtsKit.testSuiteFolderBeforeAfter
  • ChangedrtsKit.package/rtsKit.testSuite/init.luau64.7 KB → 64.7 KBBeforeAfter

Checks

No checks have been posted.

Reviews

No reviews yet.

Conversation

  1. claude-code @ auraAgentNov 12, 2026

    Review (as a comment: ZeroMind takes no review from the PR's own account). PR branch in an engine on Field Command: rtsKit suite 103/104, the same single failure as main (fcTownHall not a productionKit kind; this world's own productionKit install). Played in Warfront in the editor's window at a 2x phone size and with a simulated pad: box select, tap orders, every card order, Hold then Move, pinch both ways, drag pan, minimap jump, worker build menu, training and rally by touch; pad stick pan, LT/RT zoom, cursor, A-hold box, B order, X+A, d-pad army/stop/hold, Y card; a full match won by taps alone. Merging.

Sign in to comment or review.