One-button Flight (fair tap-to-flap)
/mechanic-one-button-flight
A GameSkill original: the rules of a one-button flight game that is never unfair. Flaps set speed instead of adding it, a fixed-step simulation plays the same at 30 and 144 fps, the hitbox forgives grazes, and a seeded gap generator stays inside the reachable band, checked by an autopilot.
- License
- MIT
- By
- By GameSkill
Tested by GameSkill
37/37 checks passed on Canvas 2D in Chrome 156 headless (2026-10-28): trigger, a runnable example, a screenshot and self-check, one job per skill, and English + Chinese docs. Trigger checks match prompts against skill descriptions; they are not a live agent run.
Test reportGameSkill's tested copy
Written and tested by GameSkill for gameskill.dev. The ZIP holds the whole skill: SKILL.md and its Chinese version, scripts, a runnable example, tests, the self-check list and our test report.
A GameSkill original, released under MIT. The ZIP keeps LICENSE and CREDITS.md, which lists the workflow inspiration, the CC0 test assets and the third-party libraries with their licenses.

Self-check
- 拍翅膀是设置垂直速度,不是叠加 / A flap sets vertical speed, it does not add to it
- 物理用固定步长,30 帧和 144 帧结果一致 / Physics run on a fixed step; 30 and 144 fps give the same result
- 一次拍翅膀的爬升加碰撞框直径小于最小间隙 / One flap's climb plus the hitbox diameter is smaller than the smallest gap
- 间隙生成只在可达范围的公平比例以内 / Gaps are generated inside a fair share of the reachable band
- 死亡后有短暂锁定再允许重开 / A short lockout after death before a tap restarts
- npm test 和 npm run test:browser 都通过 / npm test and npm run test:browser pass
Install
Tell your AI
Install the skill from https://gameskill.dev/skills/mechanic-one-button-flight/install.md
GameSkill's tested copy
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/mechanic-one-button-flight.zip -o /tmp/gameskill-mechanic-one-button-flight.zip
unzip -oq /tmp/gameskill-mechanic-one-button-flight.zip -d .claude/skills
rm /tmp/gameskill-mechanic-one-button-flight.zipWhat you get
- Lantern Moth: a playable Canvas 2D demo with tap, click and Space input
- src/logic.js: set-not-add flap, gravity with terminal speed, 1/120 s fixed step, forgiving hitbox, gap ramp
- A seeded gap generator limited to a fair share of the simulated reachable band
- A reference autopilot that proves 40 seeds x 100 gates are passable
- 13 Node tests and a 10-check headless Chrome test with touch input
Good fit
- Flappy-style, tap-to-fly and endless gap games
- Fixing floaty flaps, impossible gaps and frame-rate dependent difficulty
Not for
- Free flight with pitch and roll: that is a flight model, not a one-button game
- Game feel extras (shake, particles): pair with game-feel
Try this prompt
Make a one-tap flight game in the browser where the gaps are random but never impossible.About this skill
A GameSkill original, written and tested for gameskill.dev under MIT. The demo, Lantern Moth: one input keeps a moth flying through bamboo gates. All rules are in src/logic.js (no DOM), so they port to any engine.
Agent steps
- Set, don't add: a flap sets
vy = flapVelocity. Adding makes spam rocket the player. - Gravity with a terminal fall speed, advanced on a fixed 1/120 s step with
dtclamped to 50 ms. - Check one flap against the smallest gap:
flapVelocity² / (2·gravity)plus the hitbox must fit insidegapMin. - Reachable band: simulate how far the flyer can climb and drop across one spacing; each new gap centre stays within 55% of it.
- Forgiving hitbox (75% of the drawn radius) and a gap ramp controlled by one number.
- States: ready → flying → dead, with a short lockout before restart.
- Prove it: the reference autopilot must clear 100 gates on 40 seeds after any tuning change.
Common errors it fixes
- Impossible gaps from
random()over the whole screen height. - Harder play on 144 Hz screens because physics run per frame.
- Spam-tapping launching the player off screen.
Credits
Genre reference only: Mosswing by Ayi1337 (link only; that repository has no licence, so nothing was copied). Rules, code, art and text are ours.
Requirements
- Any engine: the rules are plain JavaScript and port line by line
- Node.js 20+ to run the tests; Chrome for the browser check
Topics
FAQ
Based on Mosswing (genre reference, link only) by Ayi1337 (no licence, nothing copied). Ideas only: GameSkill wrote the code and text; CREDITS.md in the ZIP lists every source.
Works well with
Skills the author points to as related or as the better fit for neighbouring tasks.
Game Feel & Juice
Add juice to actions: screen shake, hit-stop, eased motion, squash and stretch, knockback and layered audio-visual feedback.
Game Physics Tuning
Stable, good-feeling physics: fixed timestep with interpolation, mass and drag, CCD against tunneling, jitter fixes and collision layers.
Game Input Systems
Game input architecture: action mapping, rebinding with conflict checks, keyboard, gamepad and touch, deadzones, buffering and coyote time.
Similar skills
open-game-skills
An MIT pack of about 190 SKILL.md agent skills for game design: combat feel, camera, traversal, world, validation, 2D/Spine and art pipeline, with a dispatcher and adapters for Three.js, PixiJS, Phaser, Cocos, Godot, Unity and Unreal.
Kart Drift Boost (tiers, windows, ramps)
A GameSkill original: arcade kart drift-boost rules that reward skill. Drifts charge three tiers, release opens a 0.85 s window you must press in, counter-steer adds a CUT bonus, ramps give one air and one landing boost, boosts take the maximum instead of stacking, and walls cancel everything pending.
Procedural Low-Poly Buildings (kit, validator, views)
A GameSkill original: build stylised low-poly buildings in code from a small spec, then prove them: plot and height limits, a triangle budget per tier, closed outward meshes, supported parts, level roofs and side-only taper measured from silhouettes, plus front, side, top and 3/4 renders checked against the geometry.
Three.js FPS Weapon Feel (recoil, ADS, touch aim)
A GameSkill original: a learnable recoil pattern whose recovery never undoes the player's own compensation, aim-down-sights with matched sensitivity, spread you can draw as a crosshair, viewmodel bob, sway, kick and flash, and a phone chapter with a move stick, precision look zone and a fire button that aims.