К основному содержанию
скилл Claude Code CX Codex Cursor GitHub Copilot

platformer — скилл для Claude Code: что делает и как установить

Помогает спроектировать механику 2D-платформера: настроить тайминги прыжка, буфер ввода, coyote time и поведение платформ.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a claude-code
Открыть на GitHub

Что делает platformer

Скилл собирает логику платформера из отдельных компонентов: контроллера движения движка, тайлмапов и геометрии уровней. Физика прыжка выводится не из случайных констант, а из целевой высоты в тайлах и времени достижения вершины. Формулы кинематики сразу задают гравитацию подъёма, скорость отталкивания и усиленную гравитацию падения, чтобы персонаж не казался невесомым.

Внутрь заложены паттерны отзывчивого управления: coyote time на 0.08–0.12 секунды после схода с края, буфер прыжка на 0.10–0.15 секунды до приземления, срез вертикальной скорости при раннем отпускании кнопки и сглаживание углов. Также описаны односторонние платформы и проваливание сквозь них по комбинации «вниз + прыжок».

Скилл не учит базовой физике движка и не подойдёт проектам с видом сверху или сеточным перемещением. Вся логика опирается на фиксированный шаг обновления: если запускать её на переменном рендерном тике без привязки к dt, высота прыжка начнёт плавать между экранами с разной частотой кадров.

Какие задачи решает

  • рассчитать гравитацию и силу прыжка по высоте в тайлах и времени взлёта
  • добавить coyote time и буферизацию нажатий перед приземлением
  • настроить срез высоты прыжка при коротком нажатии
  • сделать спрыгивание с односторонних платформ
  • предотвратить застревание коллайдера на стыках тайлов

Примеры запросов агенту

  • Рассчитай гравитацию и скорость прыжка для высоты в 3.5 тайла и времени до вершины 0.35 секунды.
  • Реализуй coyote time и буфер ввода прыжка для персонажа на Godot.

Как установить platformer

1Через Skills CLI (Vercel)

npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a claude-code

2Вручную: положить файлы

~/.claude/skills/platformer/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/platformer/

Из того же набора40

Весь набор →
game-feel gamedev-skills Скилл учит агента добавлять отклик к игровым действиям: тряску камеры, стоп-кадр, твины с easing, сквош и отброс. Для случаев, когда механика работает, но ощущается ватной. Claude Code CX Codex Cursor +1 9 400установок game-ui-ux gamedev-skills Архитектурный скилл для создания адаптивных игровых интерфейсов, стека экранов и навигации с геймпада без покадрового опроса состояния. Claude Code CX Codex Cursor +1 9 200установок level-design gamedev-skills Помогает спроектировать игровой уровень от блокута до плейтеста: маршруты, темп, препятствия и столкновения. Нужен при работе с whitebox, критическим путём и геймплейными комнатами. Claude Code CX Codex Cursor +1 7 500установок camera-systems gamedev-skills Рецепты для игровых камер в 2D и 3D: плавное следование, мёртвые зоны, опережение движения и обработка столкновений для Godot и Unity. Claude Code CX Codex Cursor +1 7 100установок audio-design gamedev-skills Скилл учит раскладывать игровой звук по шинам, глушить музыку под голос и собирать адаптивный саундтрек слоями. Примеры кода — на GDScript под Godot 4.7, с пометками для Unity. Claude Code CX Codex Cursor +1 7 100установок performance-optimization gamedev-skills Скилл учит искать узкое место в игре по профайлеру движка, а не по догадке, и даёт набор правок: пулы объектов, батчинг, отказ от лишних аллокаций. Claude Code CX Codex Cursor +1 7 100установок game-ai gamedev-skills Помогает проектировать логику врагов и NPC: конечные автоматы, деревья поведения, алгоритмы руления и поиск пути A*. Пригодится при сборке поведения ботов для любого движка. Claude Code CX Codex Cursor +1 7 100установок input-systems gamedev-skills Архитектура игровых управлений: отображение клавиш на действия, перекоординирование с проверкой конфликтов, поддержка клавиатуры, геймпада и сенсора, мёртвые зоны, буферизация и coyote time. Claude Code CX Codex Cursor +1 6 800установок

Похожие

showcase-video rehan-remade Записывает окно игры с её собственным звуком и собирает из нарезки короткий ролик о моде: титры, переходы, музыка, затемнение. Claude Code CX Codex Cursor +1 1 400установок fal-assets rehan-remade Генерирует спрайты, бесшовные текстуры, PBR-карты, 3D-модели и звуки через API fal. Пригодится разработчикам модов и инди-игр, когда в проекте не хватает арта или аудио. Claude Code CX Codex Cursor +1 1 400установок orbit-card heygen-com Скилл для встраивания готового 10-секундного 3D-блока HyperFrames: карточка фичи облетает сферу из точек по траектории камеры из Blender. Claude Code CX Codex Cursor +1 9 800установок sdf earthtojake Скилл создаёт и проверяет SDFormat-файлы для моделей и миров, а затем помогает подготовить их к передаче в симулятор. Claude Code CX Codex Cursor +1 10 500установок urdf earthtojake Скилл помогает создавать, проверять и отлаживать описания роботов в формате URDF. Пригодится для работы со звеньями, сочленениями и геометрией. Claude Code CX Codex Cursor +1 10 400установок hatch-pet официальный openai Создаёт и упаковывает анимированных питомцев и спрайт-листы для Codex. Пригодится, когда нужен персонаж по описанию, изображению или фирменным ориентирам. Claude Code CX Codex Cursor +1 3 300установок gcode earthtojake Нарезает модели STL, 3MF и OBJ в G-code через OrcaSlicer. Подходит, когда нужно подготовить файл для печати без подключения к принтеру. Claude Code CX Codex Cursor +1 9 500установок dxf earthtojake Скилл собирает и проверяет 2D DXF-чертежи из Python-скриптов на build123d: контуры, прокладки, панели, развёртки под лазер. Claude Code CX Codex Cursor +1 9 100установок

Вопросы о platformer

Как установить platformer в Claude Code?

Выполните команду npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill platformer -a claude-code.

Что делает скилл platformer?

Скилл предоставляет архитектуру и кинематические формулы для отзывчивого 2D-прыжка, связывая контроллер движения, буфер ввода, coyote time и односторонние платформы.

Почему расчёт прыжка нельзя привязывать к переменному dt рендера?

При переменном шаге кадров простая пошаговая интеграция недобирает нужную высоту на разную величину при разном FPS. Расчёт необходимо запускать в фиксированном физическом цикле движка, например _physics_process в Godot или FixedUpdate в Unity.

Исходный текст

SKILL.md · Apache-2.0
---
name: platformer
description: >
  Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump
  height, plus tiled levels and hazards. Use for a platformer or Mario/Celeste-like, or tuning jump feel.
---

# Platformer

A playbook for 2D platformers — the run/jump controller "feel", level structure, hazards,
and goals. This is a **compositional** skill: it wires an engine movement skill, a tilemap
skill, and design skills into a working game. It does **not** re-teach physics or tilemaps;
it tells you what to build and how to make jumping feel good.

## When to use

- Use when building a side-scrolling or single-screen platformer, a "Mario-like" /
  "Celeste-like", or any game whose core verb is **jump between surfaces**.
- Use when a jump feels floaty, unresponsive, or "unfair" and you need feel fixes
  (coyote time, jump buffering, variable height, corner correction).

**When *not* to use:** top-down movement with no gravity → use the engine movement skill
directly. 3D first-person traversal → `fps-shooter`. Grid/turn movement → `roguelike`.
For the raw kinematic body API, use `godot-2d-movement` (or your engine's controller skill).

## Core loop

**Observe a gap/hazard → commit to a jump or move → land safely (or die) → reach the next
checkpoint/goal.** A platformer lives or dies on the *moment-to-moment* feel of that single
jump, repeated thousands of times. Tighten the controller first; everything else is content.

## Must-have systems

1. **Run/jump controller** — horizontal accel/decel, gravity, jump, with the feel aids below.
2. **Solid + one-way collision** — ground, walls, and "jump-through" platforms.
3. **Level geometry** — a tilemap or hand-placed colliders; the playable space.
4. **Hazards + death/respawn** — spikes, pits, enemies; reset to the last checkpoint.
5. **Checkpoints / level goal** — progress markers and a win condition (flag, door, exit).
6. **Camera** — follows the player with a deadzone and look-ahead, clamped to level bounds.
7. **Juice** — landing dust, squash/stretch, hit-stop, sound. Cheap, huge feel payoff.

## Design knobs (make the jump feel right)

Tune these by **outcome** (height in tiles, time to apex in seconds), not by raw numbers.

| Knob | Effect | Sane starting point |
|------|--------|---------------------|
| Max jump height | reach | 3–4 tiles |
| Time to apex | "weight"/snappiness | 0.30–0.40 s |
| Fall gravity multiplier | snappy, non-floaty fall | 1.5–2.0× rise gravity |
| Coyote time | jump just after leaving a ledge | 0.08–0.12 s (~5–7 frames @60) |
| Jump buffer | press just before landing still jumps | 0.10–0.15 s |
| Variable jump cut | tap = short hop, hold = full | cut upward velocity ×0.4–0.5 on release |
| Apex hang | brief float at the top for air control | reduce gravity ×0.5 near `|vy|`<threshold |
| Ground accel / friction | responsiveness vs. ice | reach top speed in 0.05–0.1 s |
| Corner correction | nudge past a ledge clipped by 1–2 px | nudge up to ~4 px sideways |

Derive gravity and jump velocity from the *feel* values rather than guessing — see Pattern 1.

## Patterns

### 1. Solve jump physics from height + time (not magic numbers)

```python
# Pseudocode. Pick the FEEL you want, then derive the physics. y-axis points DOWN.
# From kinematics: h = (g * t^2) / 2  and  v0 = g * t.
JUMP_HEIGHT   = 3.5 * TILE      # how high, in world units
TIME_TO_APEX  = 0.35            # seconds to reach the top

gravity       = (2 * JUMP_HEIGHT) / (TIME_TO_APEX ** 2)   # rising gravity
jump_velocity = -(2 * JUMP_HEIGHT) / TIME_TO_APEX         # negative = upward
fall_gravity  = gravity * 1.8   # heavier on the way down → less floaty
```

### 2. Coyote time + jump buffer + variable height (the feel core)

```python
# Pseudocode in the per-frame update. dt = seconds since last frame.
# Timers count DOWN; refresh coyote while grounded, buffer on a fresh press.
if on_floor:
    coyote_timer = COYOTE_TIME           # 0.1
if jump_pressed_this_frame:
    buffer_timer = JUMP_BUFFER           # 0.12
coyote_timer -= dt
buffer_timer -= dt

# A jump is allowed if we pressed recently AND were grounded recently.
if buffer_timer > 0 and coyote_timer > 0:
    velocity.y   = jump_velocity
    buffer_timer = 0
    coyote_timer = 0                     # consume both so we can't double-jump

# Variable height: releasing jump early while still rising cuts the arc short.
if jump_released_this_frame and velocity.y < 0:
    velocity.y *= 0.45

# Asymmetric gravity: snappier fall than rise; clamp to a terminal speed.
g = fall_gravity if velocity.y > 0 else gravity
velocity.y = min(velocity.y + g * dt, MAX_FALL_SPEED)
```

### 3. One-way platforms

Solid from above, pass-through from below. Use the engine's flag rather than collision math:
Godot `CollisionShape2D.one_way_collision` (or the one-way option on a TileSet collision
polygon), Unity a `PlatformEffector2D` with **Use One Way** on a collider set to be used by the
effector, Phaser Arcade `platform.body.checkCollision.down = false` (plus `left`/`right` for thin
ledges). Let the player **drop through** by ignoring that platform for ~0.1–0.2 s when they hold
Down + Jump (refs §5).

## Pitfalls / failure modes

- **Per-frame movement not scaled by `dt`** → speed changes with frame rate. Every velocity
  integration and timer must use `dt`. (See `physics-tuning`.)
- **Jump height differs between machines** → the jump runs on a variable render `dt`. Simple
  per-step integration lands a few percent short of the designed height, by a different amount
  at each frame rate. Run the controller on the fixed physics tick (Godot `_physics_process`,
  Unity `FixedUpdate`) or use the half-step update in refs §1.
- **Player is flung off or doubles speed leaving a moving platform** → platform velocity added
  twice. Godot's `CharacterBody2D` already carries the body and adds the platform's velocity on
  leave (`platform_on_leave`); don't add it again in script (refs §6).
- **Floaty jumps** → symmetric gravity. Make fall gravity heavier than rise gravity.
- **"The jump didn't register"** → no input buffering. Buffer presses for ~0.1 s before landing.
- **"I fell off and couldn't jump"** → no coyote time. Allow a jump for ~0.1 s after leaving ground.
- **Sticking to walls / catching on tile seams** → use a single capsule/box collider, not
  per-tile colliders, and add corner correction.
- **Tunneling through floors at high speed** → enable continuous collision / smaller fixed
  timestep for fast bodies (see `physics-tuning`).
- **Camera snaps and induces nausea** → smooth/lerp the follow, add a deadzone, clamp to bounds.
- **Difficulty wall from bad teaching** → introduce one mechanic per area before combining them.

## Composition (build it from these skills)

- **Controller body:** `godot-2d-movement` (Godot `CharacterBody2D`); for other engines use
  the engine core + physics skill (`unity-physics`, `phaser-arcade-physics`, `pygame-core`).
- **Levels:** `godot-tilemap` / `unity-tilemap-2d` for geometry; `level-design` for layout,
  pacing, and teaching order.
- **Feel/physics:** `physics-tuning` for timestep, CCD, and stability.
- **Input:** `input-systems` for buffering, rebinding, and gamepad support.
- **Polish:** `audio-design` for SFX/music; the engine animation skill for squash/stretch.
- **Process:** `prototype-fast` to greybox the controller before building content.

## References

- For jump math derivation, a full feel-tuning table, corner correction, moving/one-way
  platforms, and camera follow, read `references/feel-tuning.md`.

© gamedev-skills · Apache-2.0 · gamedev-skills/awesome-gamedev-agent-skills

Смотрите также

Спонсоры проекта

Компании, которые помогают держать аналитику открытой