Files
gig-line/Docs/controls.md
zwitschi 4d27109668 refactor(tools): group the sixty scripts by what they talk to
One directory with sixty scripts stopped being navigable, and the grouping is also the sandbox boundary:

  Tools/unreal/    commandlets and the two map builders, with ue_common.py and ue_placement.py as the
                   shared imports (they need the engine)
  Tools/blender/   builders, exporters, the FBX preset, the MPFB character pipeline, blender_screenshots
                   (they need the Blender Flatpak)
  Tools/review/    the visual loop: render_screenshots.sh, judge_screenshot.py, hero_compare.py,
                   build_comparison_md.py, e2e_asset_check.py, hero_iterate.sh, visual_loop.py,
                   visual_targets.json
  Tools/gen/       image and texture generation: the ComfyUI driver, deterministic texture writers,
                   reference fetching
  Tools/input/     OS-level input injection
  root             _common.py, check-lfs.sh, addon_compat_probe.py, sibling_asset_audit.py, tests/

Every moved script now resolves the repository root as ../.. and puts the tools root plus its siblings on
sys.path, so 'import ue_common' still works from unreal/. The test suite bootstrap does the same for the five
folders. render_screenshots.sh takes the folder as a third argument to run_cmdlet, and the e2e driver,
hero_iterate.sh and the comparison generator were repointed.

51 README rows now link to their new location, the README gains a Layout section naming each folder's
sandbox, and the architecture notes and Blender README follow the moves.

Verified: 108 tests pass, prettier is clean, judge_screenshot.py and hero_compare.py run from their new
homes, and the e2e run was aborted mid-way (it had been rebuilding an empty DemoMap for 15 minutes) and is
being rerun against the new layout.
2026-11-10 12:40:30 +01:00

3.8 KiB

Controls

Keyboard and mouse. The same list is shown in-game, bottom-right of the frame (AGigLineHUD), and the packaged Linux build ships with these bindings.

Action Key Notes
Move forward W 4 m/s walk
Move back S
Strafe right D
Strafe left A
Look Mouse Captured on launch; Escape releases it
Jump Space
Reset to start R Returns to the grounded spawn point
Pause / release mouse Escape Second press resumes and recaptures the mouse
Swap first / third person V First person is the default; the body is hidden in that view
Show / hide debug overlay F3 FPS, frame time, worst frame, view mode, speed and player position

Notes

  • Movement is relative to where you are looking (controller yaw), so the capsule stays upright on the sloped street.
  • The mouse is captured on launch, so looking works without clicking first. Escape toggles the capture as part of pause.
  • Bindings are Enhanced Input actions in /Game/Input built by Tools/unreal/ue_create_input_assets.py; the mapping context is IMC_Default.

Changes since 0.1.0

  • V swaps first and third person (0.2.0, IA_ToggleCamera). The shipped default view is still first person, as the owner decided for 0.1.0; third person adds a collision-tested spring-arm camera and a visible, animated body. Escape still pauses and releases the mouse in either view.

Debug overlay

F3 toggles a top-left readout: smoothed FPS and frame time, the worst frame in a rolling two-second window, the active view (first or third person), player speed, a frame counter, and the player's position in metres from the project origin. The first two seconds of a session are a warm-up window and are excluded from the worst-frame figure, because shader and streaming hitches there made a healthy run read as a 400 ms stall.

It is off in the built demo — a player should not see an FPS counter over Hollywood Boulevard — and on automatically when the process is started with -perf or -qaselftest, so a performance capture never depends on someone pressing a key first. In a running build it can also be forced with the console variable gigline.Debug 1.

Cost: about 5 % of frame time at 1440p in the demo (2.64 → 2.77 ms average), measured in the same self-test route. The performance release check is recorded without the overlay for that reason; the overlay run is kept beside it as Docs/perf/0.2.0-walk-frametimes-overlay.csv.

Review and harness switches

These are command-line switches for the screenshot pipeline and QA runs, not player controls. They exist so a capture is reproducible rather than dependent on a human pressing keys at the right moment.

Switch Effect
-thirdperson Starts the pawn in the third-person rig, so a capture shows the body without anyone pressing V
-walk Holds forward input from the first frame — what makes the stride shot possible
-qaselftest Runs the scripted walk / reset / pause / transect checks and quits; also enables the debug overlay
-perf Enables the debug overlay for a manual frame-time check

The walking shot is driven per shot rather than by the switch: the shot actor enables the walk only while a tracking (ShotFollow) camera is being captured, and returns the pawn to spawn afterwards, so the fixed-camera shots still find it in place.

Testing input without a physical keyboard

Tools/input/input_test.py injects OS-level keyboard/mouse events through a virtual /dev/uinput device (see Tools/input/input_emulation.py), e.g.:

python3 Tools/input/input_test.py --sequence move:2,look:3

It drives the focused game window exactly like real hardware, which is how the controls were regression-tested on the packaged build.