harvest/game/scripts
Forrest aee60b0ba2 #35: interface scale, safe area, and the mobile test kit
MobilePort: ui_scale() (clampf(4.3 / the screen's shorter side in inches, 1, 1.8) times the
Interface size; 1 on desktop), a size-class fallback (below 500 pt = phone, 1.6) when the
density is 0 or implausible, safe_rect(ci) (the display's safe area mapped into ci's canvas
through the final transform), minimum_target() (44 pt in canvas pixels), and the `forced`
override for tests. The desktop preview (-- --mobile) plays the phone in the window:
--safe-area=l,t,r,b insets it, --dpi=N sets its density, and without --dpi a 16:9-or-wider
window is a 2.7 in phone (about 1.6x) and a squarer one a 6 in iPad (1x).

GameSettings: interface_size (0.8-1.3, saved under [touch]) and apply_scale(), which sets the
window's content_scale_factor (always 1 on desktop). PerfTest shows the screen, density, safe
area, and resulting scale, to check the density on a device.

Test kit: test_mobile (last in SUITES) runs game/tests/mobile/*_test.gd in name order and puts
the root window back between files; mobile/touch.gd sends touches through
Input.parse_input_event; scale_test covers phones, iPads, desktop, the safe rect, and the target;
sticks_test is the 8c81d81 driver's 24 checks. game/tools/capture_mobile.gd takes the phone
screenshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 14:40:06 -04:00
..
action_edges.gd updates 2026-10-04 12:07:36 -04:00
action_edges.gd.uid updates 2026-10-04 12:07:36 -04:00
alert_manager.gd Task #12 follow-up: theft alert for a claimed loose animal 2026-10-05 15:20:58 -04:00
alert_manager.gd.uid updates 2026-10-04 12:07:36 -04:00
alien_beam.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
alien_beam.gd.uid Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
animal_system.gd Task #21: animals roam the whole farm, never lost on their own 2026-10-06 13:07:13 -04:00
animal_system.gd.uid updates 2026-10-04 12:07:36 -04:00
assessment.gd Task #15: UFO enemy, a fast flying fighter 2026-10-05 14:43:46 -04:00
assessment.gd.uid updates 2026-10-04 12:07:36 -04:00
avatar.gd updates 2026-10-04 12:07:36 -04:00
avatar.gd.uid updates 2026-10-04 12:07:36 -04:00
build_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
build_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
build_mode.gd Task #23: remove the zone banner and the message feed 2026-10-06 16:02:37 -04:00
build_mode.gd.uid updates 2026-10-04 12:07:36 -04:00
campaign_controller.gd Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
campaign_controller.gd.uid init 2026-10-03 12:14:28 -04:00
campaign_debug.gd iOS test port: phone build switches, PerfTest overlay, Codemagic workflow 2026-10-14 12:59:25 -04:00
campaign_debug.gd.uid init 2026-10-03 12:14:28 -04:00
confirm_box.gd UI and other changes 2026-10-07 13:41:38 -04:00
confirm_box.gd.uid updates 2026-10-04 12:07:36 -04:00
conversation.gd Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
conversation.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
coop_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
coop_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_link.gd Co-op voice/session work, config retune, net budget tool, overhaul plan 2026-10-05 13:35:53 -04:00
coop_link.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_lobby.gd updates 2026-10-04 17:30:48 -04:00
coop_lobby.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_menu.gd updates 2026-10-04 12:07:36 -04:00
coop_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_session.gd Merge task #26: upgrade tiers and timed shed stock 2026-10-06 16:20:52 -04:00
coop_session.gd.uid updates 2026-10-04 12:07:36 -04:00
coop_voice.gd Co-op voice/session work, config retune, net budget tool, overhaul plan 2026-10-05 13:35:53 -04:00
coop_voice.gd.uid updates 2026-10-04 12:07:36 -04:00
crop_unit.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
crop_unit.gd.uid init 2026-10-03 12:14:28 -04:00
cutscene_kit.gd #29: cutscene kit and roof luggage 2026-10-07 21:58:50 -04:00
cutscene_kit.gd.uid #29: cutscene kit and roof luggage 2026-10-07 21:58:50 -04:00
day_night.gd #30: forced lighting, intro sounds, scarecrow chest glow 2026-10-07 21:51:14 -04:00
day_night.gd.uid updates 2026-10-04 12:07:36 -04:00
dialogue_box.gd Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
dialogue_box.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
dialogue_director.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
dialogue_director.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
dialogue_line.gd Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
dialogue_line.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
dialogue_speaker.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
dialogue_speaker.gd.uid Talking-head dialogue: DialogueDirector, DialogueBox, conversations and speakers 2026-10-07 21:33:54 -04:00
end_panel.gd Upgrade counts are in levels; day-1 text no longer promises pumpkin bombs 2026-10-06 16:24:30 -04:00
end_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
enemy_characters.gd Pooled enemy characters stop animating while hidden 2026-10-06 17:59:44 -04:00
enemy_characters.gd.uid updates 2026-10-04 12:07:36 -04:00
enemy_system.gd Task #25: arrivals wait for a free character 2026-10-06 16:17:31 -04:00
enemy_system.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_audio.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
farm_audio.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_marker.gd updates 2026-10-04 12:07:36 -04:00
farm_marker.gd.uid init 2026-10-03 12:14:28 -04:00
farm_navigation.gd Task #9 follow-up: make the Workbench genuinely targetable (Decision 3) 2026-10-05 16:46:04 -04:00
farm_navigation.gd.uid init 2026-10-03 12:14:28 -04:00
farm_projectiles.gd tasks: check off #18; drop stale Alien Ray projectile comments 2026-10-06 13:42:09 -04:00
farm_projectiles.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_sim.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
farm_sim.gd.uid updates 2026-10-04 12:07:36 -04:00
farm_state.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
farm_state.gd.uid init 2026-10-03 12:14:28 -04:00
farm_zone.gd updates 2026-10-04 12:07:36 -04:00
farm_zone.gd.uid init 2026-10-03 12:14:28 -04:00
farm_zones.gd Task #20: lettuce and corn fields on the south soil, map grows to 60 x 80 2026-10-06 13:10:08 -04:00
farm_zones.gd.uid init 2026-10-03 12:14:28 -04:00
farmers_return.gd Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
farmers_return.gd.uid updates 2026-10-04 12:07:36 -04:00
follow_camera.gd init 2026-10-03 12:14:28 -04:00
follow_camera.gd.uid init 2026-10-03 12:14:28 -04:00
game_config.gd Room for 40 robots; fewer robots and more UFOs in the late nights 2026-10-06 18:06:28 -04:00
game_config.gd.uid init 2026-10-03 12:14:28 -04:00
game_settings.gd #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
game_settings.gd.uid updates 2026-10-04 12:07:36 -04:00
gather_node.gd Task #4: Alien Goop resource and drop-on-kill from Aliens 2026-10-05 14:23:22 -04:00
gather_node.gd.uid updates 2026-10-04 12:07:36 -04:00
gdsync_link.gd updates 2026-10-04 12:07:36 -04:00
gdsync_link.gd.uid updates 2026-10-04 12:07:36 -04:00
interactions.gd Task #23: remove the zone banner and the message feed 2026-10-06 16:02:37 -04:00
interactions.gd.uid updates 2026-10-04 12:07:36 -04:00
loading_screen.gd #32: animated loading screen 2026-10-07 21:46:27 -04:00
loading_screen.gd.uid #32: animated loading screen 2026-10-07 21:46:27 -04:00
loot_system.gd Task #23: remove the zone banner and the message feed 2026-10-06 16:02:37 -04:00
loot_system.gd.uid updates 2026-10-04 12:07:36 -04:00
main.gd Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
main.gd.uid updates 2026-10-04 12:07:36 -04:00
main_menu.gd iOS test port: phone build switches, PerfTest overlay, Codemagic workflow 2026-10-14 12:59:25 -04:00
main_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
mobile_port.gd #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
mobile_port.gd.uid iOS test port: phone build switches, PerfTest overlay, Codemagic workflow 2026-10-14 12:59:25 -04:00
night_plan.gd Task #24: nights by count, per-night enemy speed and HP 2026-10-06 16:05:12 -04:00
night_plan.gd.uid updates 2026-10-04 12:07:36 -04:00
opening_intro.gd Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
opening_intro.gd.uid #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
pause_menu.gd UI and other changes 2026-10-07 13:41:38 -04:00
pause_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
perf_test.gd #35: interface scale, safe area, and the mobile test kit 2026-10-14 14:40:06 -04:00
perf_test.gd.uid iOS test port: phone build switches, PerfTest overlay, Codemagic workflow 2026-10-14 12:59:25 -04:00
phase_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
phase_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
player_character.gd #30: forced lighting, intro sounds, scarecrow chest glow 2026-10-07 21:51:14 -04:00
player_character.gd.uid init 2026-10-03 12:14:28 -04:00
pumpkin_bombs.gd updates 2026-10-04 12:07:36 -04:00
pumpkin_bombs.gd.uid updates 2026-10-04 12:07:36 -04:00
radar_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
radar_hud.gd.uid Task #8: Radar item, a Supply Shed minimap reveal 2026-10-05 16:08:54 -04:00
remote_controls.gd Task #22: the joining player can open the store 2026-10-06 13:47:52 -04:00
remote_controls.gd.uid updates 2026-10-04 12:07:36 -04:00
resource_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
resource_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
resource_store.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
resource_store.gd.uid updates 2026-10-04 12:07:36 -04:00
review_panel.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
review_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
save_game.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
save_game.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
scarecrow.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow_combat.gd Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
scarecrow_combat.gd.uid updates 2026-10-04 12:07:36 -04:00
scarecrow_hud.gd UI and other changes 2026-10-07 13:41:38 -04:00
scarecrow_hud.gd.uid updates 2026-10-04 12:07:36 -04:00
screen_labels.gd UI and other changes 2026-10-07 13:41:38 -04:00
screen_labels.gd.uid UI and other changes 2026-10-07 13:41:38 -04:00
settings_menu.gd iOS test port: phone build switches, PerfTest overlay, Codemagic workflow 2026-10-14 12:59:25 -04:00
settings_menu.gd.uid updates 2026-10-04 12:07:36 -04:00
shed_counter.gd Task #6: Supply Shed as its own weapon shop, separate from the Workbench 2026-10-05 15:13:48 -04:00
shed_counter.gd.uid Task #6: Supply Shed as its own weapon shop, separate from the Workbench 2026-10-05 15:13:48 -04:00
shed_stock.gd UI and other changes 2026-10-07 13:41:38 -04:00
shed_stock.gd.uid updates 2026-10-04 12:07:36 -04:00
sketch.gd #31: intro speakers and conversations 2026-10-07 21:48:31 -04:00
sketch.gd.uid UI and other changes 2026-10-07 13:41:38 -04:00
sketch_box.gd UI and other changes 2026-10-07 13:41:38 -04:00
sketch_box.gd.uid UI and other changes 2026-10-07 13:41:38 -04:00
structure_system.gd Task #16: per-player pouch in co-op 2026-10-06 13:06:25 -04:00
structure_system.gd.uid updates 2026-10-04 12:07:36 -04:00
thief_behavior.gd Thieves go straight for loose loot in clear view, however far 2026-10-06 13:22:21 -04:00
thief_behavior.gd.uid updates 2026-10-04 12:07:36 -04:00
toon_look.gd UI and other changes 2026-10-07 13:41:38 -04:00
toon_look.gd.uid UI and other changes 2026-10-07 13:41:38 -04:00
torch_flame.gd Task #17: Propane Torch sprays a band of fire 2026-10-06 13:04:54 -04:00
torch_flame.gd.uid Task #17: Propane Torch sprays a band of fire 2026-10-06 13:04:54 -04:00
touch_sticks.gd Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
touch_sticks.gd.uid Phones: dual floating thumbsticks (move right, attack left) 2026-10-14 13:48:59 -04:00
tutorial.gd #33: opening intro cutscene 2026-10-07 22:54:24 -04:00
tutorial.gd.uid updates 2026-10-04 12:07:36 -04:00
ui_theme.gd UI and other changes 2026-10-07 13:41:38 -04:00
ui_theme.gd.uid updates 2026-10-04 12:07:36 -04:00
upgrade_panel.gd UI and other changes 2026-10-07 13:41:38 -04:00
upgrade_panel.gd.uid updates 2026-10-04 12:07:36 -04:00
upgrades.gd UI and other changes 2026-10-07 13:41:38 -04:00
upgrades.gd.uid updates 2026-10-04 12:07:36 -04:00
wave_director.gd Task #25: arrivals wait for a free character 2026-10-06 16:17:31 -04:00
wave_director.gd.uid updates 2026-10-04 12:07:36 -04:00
weapon_models.gd Task #18: Alien Ray fires a beam 2026-10-06 13:39:00 -04:00
weapon_models.gd.uid updates 2026-10-04 12:07:36 -04:00
workbench.gd Upgrade counts are in levels; day-1 text no longer promises pumpkin bombs 2026-10-06 16:24:30 -04:00
workbench.gd.uid updates 2026-10-04 12:07:36 -04:00