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.
- 许可证
- MIT
- 出品
- GameSkill 出品
我们测过
在 Canvas 2D in Chrome 156 headless 上通过 37/37 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告GameSkill 测过的版本
GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。
GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

自检清单
- 拍翅膀是设置垂直速度,不是叠加 / 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
中文指南
这个 skill 做什么
GameSkill 原创(MIT)。单键飞行游戏的规则:点一下拍一下翅膀,穿过不断滚动过来的间隙。重点是“永远公平”:拍翅膀是设置速度而不是叠加,固定步长让 30 帧和 144 帧手感一样,碰撞框比画面小一点,间隙随机生成但始终在角色能飞到的范围内,并用自动驾驶在 40 个种子上各过 100 个门来证明。
什么时候用
- 想做 Flappy 类、点击飞行、无尽间隙的小游戏
- 觉得拍翅膀手感飘、连点会冲上天
- 遇到根本过不去的间隙,或者高刷新率屏幕上更难
怎么装
下载本页的 ZIP,把 mechanic-one-button-flight/ 文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。没有运行时依赖。
最小示例
示例叫《灯笼蛾》:点屏幕、点鼠标或按空格,让发光的蛾子穿过竹子门。node test/serve.mjs 后打开 http://localhost:8770/,加 ?autopilot 看自动驾驶。规则全部在 src/logic.js,换任何引擎都能逐行移植。
我们怎么测的
npm test 跑 13 个 Node 测试:开局悬停、拍翅膀不叠加、下落限速、30 帧和 144 帧结果一致、长帧截断、宽容碰撞框、难度收窄、2000 个生成间隙都在屏幕和公平范围内、同种子同关卡、自动驾驶在 40 个种子上各过 100 个门、计分和重开、一次拍翅膀小于最小间隙。npm run test:browser 在无头 Chrome 里做 10 项检查,包括触屏点击开局、空格拍翅膀、掉落结束、锁定后重开、没有控制台错误。
致谢
只参考了 Ayi1337 的 Mosswing 这一类型(仅链接;那个仓库没有开源协议,没有复制任何内容)。规则、代码、画面和文字都是我们写的。
搭配
game-feel:加震屏、停顿和粒子web-audio-sfx-synth:拍翅膀、得分、撞击的合成音效physics-tuning:更多固定步长和插值的细节
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/mechanic-one-button-flight/install.md
GameSkill 测过的版本
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.zip包含内容
- 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
适合
- Flappy-style, tap-to-fly and endless gap games
- Fixing floaty flaps, impossible gaps and frame-rate dependent difficulty
不适合
- 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
试试这条提示词
Make a one-tap flight game in the browser where the gaps are random but never impossible.关于这个 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.
环境要求
- Any engine: the rules are plain JavaScript and port line by line
- Node.js 20+ to run the tests; Chrome for the browser check
相关主题
常见问题
基于 Mosswing (genre reference, link only) (作者 Ayi1337,no licence, nothing copied)的思路。代码和文字由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
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.
相似 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.