Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

responsive-input-timing

/responsive-input-timing

Pomaga w buforowaniu skoków, czasie coyote i odtwarzaniu wejścia w grach o stałym kroku czasu.

Licencja
MIT
Ostatnia zmiana repozytorium
30.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
15
Skrypty
3
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 30.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 3 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: examples/platformer-integration.mjs, src/timing.mjs, tests/timing.test.mjs

Co robi i kiedy

Pomaga w buforowaniu skoków, czasie coyote i odtwarzaniu wejścia w grach o stałym kroku czasu.

Oryginalny opis (EN)

Use for jump buffering, coyote time, subframe input edges and fixed-timestep input replay; not browser device bindings.

Jak działa

  1. Implementation procedure
  2. Semantics and edge cases
  3. Files
  4. Boundaries
Sekcje z nagłówków SKILL.md, w oryginale · 35 linii, 484 słów
Podgląd SKILL.md
---
name: responsive-input-timing
description: Use for jump buffering, coyote time, subframe input edges and fixed-timestep input replay; not browser device bindings.
---
# Responsive Input Timing (v1.0.0)

This skill owns **event timestamps, short buffering, coyote windows, consume-once edges and replay**. It NEVER changes velocity, gravity or character physics directly; expose a jump request to the existing controller and preserve its solver. It does not replace the `browser-input-action-system`, which captures physical input, nor `game-feel-event-orchestration`, which owns time-scale feedback.

## Implementation procedure

1. Identify one monotonic clock and simulation/update order. Convert timestamps at the system boundary rather than mixing `performance.now()`, seconds from physics simulation and wall clock milliseconds.
2. Have the action system capture each browser down/up as edge with a timestamp. **Do not require the button to still be held by the next fixed tick**. Forward to `FixedStepEdgeQueue` before simulation.
3. For platformer jump use `JumpAssist({bufferMs:120,coyoteMs:100})`; tune actual windows by playtest, not by frame count. `press(time,id)` stores unique input event ID; `tryConsume(time)` returns a single request if grounded or inside grace period; `setGrounded(time,bool)` updates the grounded state.
4. Call `tryConsume` once per simulated tick **after** processing buffered edges and grounded/landing state. Pass the returned request to the current movement controller (which owns velocity/impulse).
5. `release(time)` returns whether the jump was held, allowing the physics/controller to request upward velocity cut/modified gravity; this library does not select gravity values.
6. Cancel pending events on focus loss, pause, respawn, teleport or level transition as appropriate. The source queue's `cancel()` and `JumpAssist.cancel()` must both be invoked when dropping stale inputs.
7. Keep deterministic ordering: events in the same time domain, stable IDs, monotonic times. Use `InputTimeline` to capture and replay logical events, not browser event objects containing nonserializable properties.
8. Test `node --test tests/*.test.mjs` and `tsc --noEmit -p tsconfig.json`, then test against target physics with real platform collision timing.

## Semantics and edge cases

- Buffer window is inclusive at its boundary; an input expires strictly after `bufferMs`. Coyote window also includes its boundary. Both require nonnegative finite timestamps.
- Consume-once is enforced for a jump. An additional jump is gated until a **new ground contact**. Multiple different presses can replace pending jump; a configurable jump queue policy may be required by genre.
- A second jump in midair (double jump) is a **separate action/ability**; do not bypass the re-arming gate to simulate it.
- `FixedStepEdgeQueue.capture` validates monotonic arrival timestamps and `drainThrough(tickTime)` never repeats processed edges. Events arriving out of timestamp order must be normalized upstream or rejected.
- `InputTimeline` rejects duplicate event IDs and records events in order. `replay(handler)` is pure replay of event payloads; deterministic physics requires deterministic solver, random state and fixed timestep as well.
- Variable-height jump and apex assistance are recommendations for the **movement controller**, not new features in this module.

## Files

- `src/timing.mjs` / `src/timing.d.mts`
- `tests/timing.test.mjs` with 30/60/144 FPS and short-tap tests
- `examples/platformer-integration.mjs`
- `references/clock-and-physics.md`

## Boundaries

Integration requires test-scene timing and gameplay feel playtests. Pure test success is not proof of low-latency physical input on the display or of deterministic physics.
Pliki w paczce (15)
  • CHANGELOG.md 1 KB
  • LICENSE 1 KB
  • PROVENANCE.md 1 KB
  • SKILL.md 4 KB
  • TESTING.md 1 KB
  • VERSION 1 KB
  • tsconfig.json 1 KB
  • attribution/upstream/LICENSE 11 KB
  • attribution/upstream/NOTICE 1 KB
  • examples/platformer-integration.mjs 1 KB
  • references/clock-and-physics.md 2 KB
  • src/timing.d.mts 1 KB
  • src/timing.mjs 4 KB
  • tests/timing.test.mjs 4 KB
  • typecheck/example.mts 1 KB

Wersje

W bazie nie ma innych skilli o nazwie responsive-input-timing.

Migawka bazy z 13.11.2026 · wersja paczki c3296de0faee (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100input-systems
    Projektuje architekturę wejścia w grach: mapowanie akcji, zmianę przypisań z wykrywaniem konfliktów, wiele urządzeń, martwe strefy, bufor wejścia, coyote time i dostępność.
  • 100input-systems
    Projektuje wejście w grze: mapowanie akcji, zmianę przypisań z wykrywaniem konfliktów, obsługę pada i dotyku, martwe strefy i dostępność.
  • 100godot-characterbody-2d
    Dostarcza wzorce dla CharacterBody2D w Godot: ruch w platformówkach (coyote time, jump buffering), ruch z góry, kolizje, platformy jednokierunkowe i maszyny stanów.
  • 100input-patterns
    Podaje wzorce kodu wejścia w grach: akcje InputMap w Godot, skalowaną martwą strefę radialną, bufor skoku z coyote time, serializację przypisań, wirtualny joystick mobilny i wibracje gamepada.
  • 100platformer
    Buduje platformówkę 2D: skok z coyote time, buforowanie skoku, zmienną wysokość, zjazd po ścianie, odbicie od ściany i poziomy z pułapkami.
  • 100platformer
    Buduje platformówkę 2D: sterowanie biegiem i skokiem z coyote time, buforowaniem skoku i zmienną wysokością skoku, poziomy kafelkowe i przeszkody oraz strojenie odczucia skoku.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.