Skip to main content
WEB
SkillFreeBy GameSkillGameSkill original

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
Download ZIP

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 report

GameSkill'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.

Download tested ZIP (601 KB)Roadmap: Gameplay mechanics

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.

One-button Flight (fair tap-to-flap)

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

Tested copy into .claude/skills/
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

What 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

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

  1. Set, don't add: a flap sets vy = flapVelocity. Adding makes spam rocket the player.
  2. Gravity with a terminal fall speed, advanced on a fixed 1/120 s step with dt clamped to 50 ms.
  3. Check one flap against the smallest gap: flapVelocity² / (2·gravity) plus the hitbox must fit inside gapMin.
  4. Reachable band: simulate how far the flyer can climb and drop across one spacing; each new gap centre stays within 55% of it.
  5. Forgiving hitbox (75% of the drawn radius) and a gap ramp controlled by one number.
  6. States: ready → flying → dead, with a short lockout before restart.
  7. 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.

Similar skills

open-game-skills
GDT
Starter kit
6

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.

Engine-agnosticGodotUnityClaude Code · Codex +1
Kart Drift Boost
WEB
Skill
By GameSkill

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.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Procedural Low-Poly Buildings
WEB
Skill
By GameSkill

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.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2
Three.js FPS Weapon Feel
WEB
Skill
By GameSkill

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.

Web (Phaser / Three.js)Engine-agnosticClaude Code · Codex +2