Repository navigation
Controls: one input source from several devices; checked input capture - #60
Merged
Merged
Conversation
…k input capture
- Controls.actions([...]) declares the game's actions once; its merge(...)
builds one source from several devices (held/pressed/released as one
device with every binding), with lacking(device, [...]) naming exactly the
actions a device cannot report, available/devices/lastUsed in the
snapshot, rebind per device, idle(...) for the resource, and describe()
findings for every gap.
- Keyboard snapshots are { actions, used }; Touch renames buttons to actions
and touched to used; Gamepad adds used. Releases never count as use.
- Game.System.consumeService and the service-consumed-twice lint;
Debug.serviceLints lets a service report its own findings.
- InputCapture keeps its declared access: thisTick readers placed before it
no longer compile, and capturing one source twice is linted.
- Top-down reads one merged input resource.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Controls: merge devices into one input sourcelacking;lackinglist that names too much or too little (autocomplete offers exactly the missing actions);input.devices.touch.actions.pause).describe(): each one is reported as aservice-lint.One snapshot shape (breaking)
{ actions, used }.buttonsis renamed toactionsandtouchedtoused.used.used: a press or a hold, or a stick or swipe in use. Releases don't count, so a blur or a disconnect doesn't changelastUsed.Checked capture
Game.System.consumeService, plus aservice-consumed-twicelint that fires when one input is captured in two schedules and each capture sees only part of the presses.InputCapture.system: keeps its real spec. AthisTickreader placed before it is now a compile error that names both systems.Debug.serviceLints: a hook through which service values report their own lints.Top-down now reads one merged resource instead of two.
Verification
pnpm run checkpasses.pnpm pack:checkpasses.pnpm bench:checkflagsquery/iterate-write-10kat +26.5% against the committed baseline. Compared withorigin/mainon the same machine (--compare), there is no regression, and this PR touches no query code. Type-checker metrics are +2.6% against the baseline;mainis already at +2.5%.🤖 Generated with Claude Code