Fixes the papercut: the generated frame loop called rt_poll() (feeding only Input.key) but never input_poll(), so Input.active/key_down/mouse/pad read empty unless the game called Input.poll() by hand. The loop now calls input_poll() when the game uses any Input runtime method — committing the held-key/mouse/gamepad state, and record/replay — and stores its return as the frame key so Input.key still works. A game using no Input runtime keeps the plain rt_poll path, byte-identical. Adds the Input-Manager API: Input.action(name,key) ships a default binding (kept if already bound, so a rebind/loaded map isn't clobbered), Input.bind_pad(name,button) makes an action device-agnostic (keyboard OR pad), and Input.active/just_pressed/just_released read the multi-key device layer with clean on-press/on-release edges (deterministic, dispatch-free — a handler polls the edge; a replay fires identically). Examples input_manager + input_auto, 5 docs pages. Full suite 107/0, goldens byte-identical, fixpoint holds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.3 KiB
bump: minor
type: feat
Input Manager + automatic device-layer drive (#83). The generated frame loop now commits the input device layer itself — when a game uses any Input action-map / device method it calls input_poll each frame (reading the live key, recording/replaying, and rebuilding the held-key/mouse/gamepad state), so Input.active / Input.key_down / the mouse and pads read live without the game calling Input.poll by hand (previously the loop fed only Input.key, and the device layer read empty unless the game polled at the top of its Input phase). A game that uses no Input runtime keeps the plain rt_poll path, byte-identical. Adds the Input-Manager API on top: Input.action(name, key) ships a default binding (kept if already bound, so a player's Input.rebind or a loaded key-map is not clobbered); Input.bind_pad(name, button) makes an action device-agnostic (fires from keyboard or gamepad); and Input.active / Input.just_pressed / Input.just_released read the whole multi-key device layer with clean on-press / on-release edges (the deterministic, dispatch-free equivalent of event handlers — a handler polls the edge and reacts, so a replay fires identically). Examples: examples/library/input_manager.ludic, examples/library/input_auto.ludic.