- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/gamedev-skills/awesome-gamedev-agent-skills/tree/HEAD/skills/genres/platformer來自發布者
Owns how the jump feels and how levels are built around it. Numbers are engine-neutral, in
tiles and seconds, so they survive a change of tile size or engine. The engine's movement skill
supplies the body API (godot-2d-movement, unity-physics, phaser-arcade-physics).
When not to use: top-down movement without gravity (engine movement skill), 3D traversal
(fps-shooter or the engine 3D skill), grid or turn-based movement (roguelike, puzzle).
_physics_process (60 Hz default), Unity FixedUpdate (0.02 s = 50 Hz default), Phaser
Arcade (fixedStep on by default). Note the tile size, the y direction and the current
constants. Ask which game the feel should resemble if the user has not said; "Mario-like"
(momentum, heavy fall) and "Celeste-like" (instant, precise) need different targets.python3 scripts/jump_tuner.py --height 3.5 --apex-time 0.35 --tile 16 --tick 60 --run-speed 8. It prints rise and fall gravity and launch velocity, simulates the jump at
the project's tick, and warns about apex error from the integrator, grace windows that lose
a tick, tap-hop ratio and tunnelling. Add --json for machine-readable output.t,y for every physics tick of one jump
(start on the tick the jump fires) to a CSV, run the scene (headless where the engine
allows: godot --headless), then run python3 scripts/jump_tuner.py <same targets> --log jump.csv. Exit 1 means the measured apex height or time to apex is off by more than 5%.
Then script these edge cases as tests and report what each one did: press 1 tick before
landing, press N ticks after walking off a ledge (N = coyote ticks, then N + 1), tap versus
hold, and jump into a ceiling corner 2 px off the edge.Starting points. The Celeste column comes from its published Player.cs (8 px tiles, 60 Hz);
use it as a "precise and snappy" reference, not as the only right answer.
Floatiness usually comes from a long apex hang, a low terminal speed or a long time to apex, not only from symmetric gravity. Change one knob at a time and re-run the calculator.
Count grace windows in whole ticks at the fixed rate. A float countdown such as
timer -= dt; if timer > 0 silently loses a tick at some rates (0.1 s at 50 Hz gives 4 ticks,
not 5), so the same build feels different in Unity and Godot. Tick stamps avoid that and also
let Unity's Update record a press for FixedUpdate to consume.
# Pseudocode at the fixed tick. y points DOWN. Constants come from jump_tuner.py.
COYOTE_TICKS = round(COYOTE_TIME * TICK_RATE) # 0.1 s at 60 Hz -> 6
BUFFER_TICKS = round(JUMP_BUFFER * TICK_RATE) # 0.12 s at 60 Hz -> 7
NEVER = -10**9 # initial value of both stamps
tick += 1
if on_floor and velocity.y >= 0:
last_ground_tick = tick # refresh only while standing, not rising
if jump_pressed_this_tick:
last_press_tick = tick
if tick - last_press_tick <= BUFFER_TICKS and tick - last_ground_tick <= COYOTE_TICKS:
velocity.y = JUMP_VELOCITY # negative = up
last_press_tick = last_ground_tick = NEVER # consume both: no second jump from coyote
if not jump_held: # buffered press already released: short hop
velocity.y *= JUMP_CUT
if jump_released_this_tick and velocity.y < 0:
velocity.y *= JUMP_CUT # 0.4-0.6; only while rising
g = FALL_GRAVITY if velocity.y > 0 else RISE_GRAVITY
if jump_held and abs(velocity.y) < APEX_THRESHOLD:
g *= APEX_HANG # 0.5
velocity.y = min(velocity.y + g * dt, MAX_FALL_SPEED)
# then move and collide once; on a ceiling hit try corner correction (refs §4), else zero vy
Variable height has three common models. Use the release cut above by default: it is one line and gives a fixed minimum hop. For precision platformers use the Celeste model instead: hold the launch speed for up to ~0.2 s while the button is held, then let gravity act; release ends the hold. The third model raises gravity (2-3 x) while rising with the button up; it gives the smoothest arc but is the hardest to reason about. Pick one; mixing two doubles the effect.
_physics_process; Input.is_action_just_pressed()
reports presses per physics tick, so it is safe there. is_on_floor() is valid after
move_and_slide(). Body API, slopes and moving platforms: godot-2d-movement.Rigidbody2D.linearVelocity (velocity is obsolete). Record the press in
Update (set a flag or the tick number) and consume it in FixedUpdate; polling a "pressed
this frame" call inside FixedUpdate can miss or repeat presses. y points up, so flip the
signs above. One-way platforms: PlatformEffector2D.body.blocked.down or body.onFloor(), Phaser.Input.Keyboard.JustDown
in update; y points down. See phaser-arcade-physics.dt. The usual
"add gravity, then move" step peaks short by about v0 * dt / 2 (about 5% of a 3.5-tile jump
at 60 Hz, more at 30 Hz). Run on the fixed tick and design to the simulated apex, or use the
half-step update (refs §1, --integrator half).velocity.y >= 0.CharacterBody2D already adds it on leave (platform_on_leave); Unity's
CharacterController does not carry riders at all (refs §6).physics-tuning).FixedUpdate. Latch it in Update.references/feel-tuning.md: read when you need the jump math derivation and half-step
integrator, apex hang and fast-fall code, ceiling corner correction, one-way drop-through,
moving-platform behaviour per engine, or the full wall slide and wall jump resolver.scripts/jump_tuner.py --help: every option of the calculator and the log check.Related: level-design (teaching order, pacing), camera-systems (platformer camera
deadzone and look-ahead), game-feel (landing dust, squash, hit-stop), input-systems
(rebinding, gamepad, generic input buffers).
Last verified: 2026-11-11.
Source/Player/Player.cs in https://github.com/NoelFB/Celeste (MIT, file
released 2018): JumpGraceTime 0.1, JumpSpeed -105, VarJumpTime 0.2, Gravity 900,
HalfGravThreshold 40, MaxFall 160, FastMaxFall 240, MaxRun 90, RunAccel 1000,
AirMult 0.65, UpwardCornerCorrection 4, WallJumpForceTime 0.16,
CeilingVarJumpGrace 0.05. Height, apex time and tap hop were computed from these at 60 Hz.Input.is_action_just_pressed documents per-physics-tick behaviour
(doc/classes/Input.xml).Rigidbody2D.linearVelocity; default fixed timestep 0.02 s
(https://docs.unity.com/en-us/engine/6000.6/manual/physics-section/physics-overview/physics-optimization/cpu/frequency).fixedStep defaults to true; Keyboard.JustDown and body.onFloor()
exist in the shipped typings.>
---name: platformerdescription: >---# skills/genres/platformer/SKILL.md常見問題
從發布者下載 skills/genres/platformer/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/gamedev-skills/awesome-gamedev-agent-skills。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。