К основному содержанию
скилл CX Codex

iphone-duo-games — скилл для Claude Code: адаптация игр под iPhone Duo

Помогает агенту адаптировать игру под складной iPhone Duo: заполнение экрана в любой позе, блокировка ориентации, соотношение сторон вместо чёрных полос.

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

Что делает iphone-duo-games

Скилл объясняет агенту, как ведёт себя игра на iPhone Duo. Игры не получают исключения из правил адаптивного интерфейса только в одном месте — изменение размера. Экран меняет форму каждый раз, когда устройство открывают, закрывают, складывают или поворачивают, и игра с фиксированным вьюпортом либо растянется, либо потеряет элементы управления за краем.

Блокировать ориентацию можно, но это не повод считать размер постоянным: у устройства два дисплея с разными размерами, а внутренний экран не соблюдает поддерживаемые ориентации интерфейса. Скилл советует менять соотношение сторон и показывать больше мира, а если дизайн этого не выдерживает — заполнять полосы фоном и артворком. HUD и тач-цели лучше держать в отдельном слое и в постоянном физическом размере, иначе при открытии устройства на большем дисплее текст и кнопки станут мельче.

Отдельная проблема — сгиб. Внутренний дисплей изгибается посередине, и виртуальный джойстик или кнопка в этой зоне становятся ненадёжными. Интерактивные элементы стоит прижимать к внешним краям и держать вне области сгиба, учитывая ещё и зоны перекрытия камерами. Резервированные регионы и угол сгиба — это API iOS 27.1 без аналога в движках, поэтому понадобится нативный плагин. Скилл даёт заметки по Unity, Unreal, Godot, SpriteKit и Metal: вьюпорт нужно обрабатывать как живое событие, а не читать один раз при запуске.

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

  • настроить заполнение экрана в каждой позе устройства
  • выбрать между сменой соотношения сторон и полосами
  • удержать HUD и тач-цели одного размера при ресайзе
  • вынести джойстик и кнопки из зоны сгиба
  • проверить рендер игры в Split View

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

  • Проверь мою игру на Unity: обрабатывается ли ресайз вьюпорта в рантайме, а не только в Start()?
  • Вынеси виртуальный джойстик из division region и прижми его к внешнему краю экрана.
  • Игра ломается в Split View на iPhone Duo — посмотри, что падает и теряет ли она элементы управления.

Как установить iphone-duo-games

1Через Skills CLI (Vercel)

npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-games -a claude-code

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

~/.claude/skills/iphone-duo-games/SKILL.md

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

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

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

iphone-duo-readiness Скилл для аудита и адаптации iOS-приложений под складной iPhone Duo. Помогает найти жёстко заданные размеры экрана, устаревшие вызовы UIScreen и ошибки вёрстки при переходе на iOS 27.1 SDK. CX Codex +1 630установок iphone-duo-design-review Скилл проверяет интерфейсы для складного iPhone Duo во всех позах: закрытой, открытой, книжной, настольной и палатке. Помогает оценить макеты экранов до написания кода. CX Codex +1 584установок iphone-duo-vertical-bars Скилл подсказывает агенту, как перенести тулбары, навбары и таббары на боковую ось iPhone Duo и что для этого нужно в коде. CX Codex +1 596установок iphone-duo-camera Скилл для работы с двумя фронтальными камерами iPhone Duo: виртуальная камера, внутренняя под экраном и внешняя ultra-wide. CX Codex +1 500установок iphone-duo-react-native Скилл помогает адаптировать приложения на React Native и Expo под складной iPhone Duo: от асимметричных отступов до нативного модуля под iOS 27.1. CX Codex +1 432установок iphone-duo-flutter Помогает адаптировать приложение на Flutter под складной iPhone Duo. Учит обходить ограничения MediaQuery и пробрасывать нативные API через платформенные каналы. CX Codex +1 402установок

Похожие

level-design gamedev-skills Помогает спроектировать игровой уровень от блокута до плейтеста: маршруты, темп, препятствия и столкновения. Нужен при работе с whitebox, критическим путём и геймплейными комнатами. CX Codex +1 7 800установок performance-optimization gamedev-skills Скилл учит искать узкое место в игре по профайлеру движка, а не по догадке, и даёт набор правок: пулы объектов, батчинг, отказ от лишних аллокаций. CX Codex +1 7 400установок reverse-document Donchitos Разбирает уже написанный код или прототип и собирает по нему дизайн-док или ADR. Пригодится, когда фича есть, а описания к ней нет. CX Codex +1 461установок game-development miles990 Скилл с паттернами для игр: игровой цикл, ECS, коллизии, поведение врагов. Пригодится, когда агент пишет логику на Unity, Godot или Flutter. CX Codex +1 410установок test-flakiness Donchitos Скилл находит нестабильные тесты в логах CI игровых движков, считает долю сбоев и отправляет проблемные проверки на карантин. CX Codex +1 408установок mashup-mods rehan-remade Скилл для создания кросс-игровых модов: от Minecraft внутри Skyrim до скейтбординга в MW2. Охватывает passthrough-моды, портирование контента и встраивание одной игры в другую. CX Codex +1 1 500установок

Рядом в теме «Геймдев и 3D: Unity, Unreal, Godot, Blender»

Всё по теме «Геймдев и 3D: Unity, Unreal, Godot, Blender» →

Вопросы о iphone-duo-games

Как установить iphone-duo-games в Claude?

Выполните npx skills add mirzaaghazadeh/iphone-duo-skills --skill iphone-duo-games -a claude-code. Скилл появится в ~/.claude/skills/iphone-duo-games/SKILL.md.

Что делает iphone-duo-games?

Описывает агенту, как адаптировать игру под складной iPhone Duo: заполнение экрана в любой позе, соотношение сторон вместо чёрных полос, постоянный размер текста и тач-целей, вынос элементов управления из зоны сгиба.

С какими движками работает скилл?

В нём есть заметки по Unity, Unreal, Godot, SpriteKit и Metal. Резервированные регионы и угол сгиба — это API iOS 27.1 без аналога в движках, для них нужен нативный плагин.

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

SKILL.md · MIT
---
name: iphone-duo-games
description: Adapt a game to iPhone Duo — filling the screen across every device pose, orientation locking, aspect ratio versus letterboxing, keeping touch controls out of the fold, and consistent text and control sizing while resizing. Use when the project is a game or uses a game engine such as Unity, Unreal, Godot, SpriteKit or Metal.
---

# Games on iPhone Duo

Games get a carve-out from most of this device's UI guidance — no toolbars to
send vertical, no split views to adapt. What they don't get a carve-out from is
**resizing**. The screen changes size and shape underneath a running game every
time someone opens, closes, folds or rotates the device, and a game that assumed
a fixed viewport will letterbox, stretch, or drop controls off the edge.

## You may lock orientation. You may not stop filling the screen.

Locking to portrait or landscape is fine and supported. What is not fine is
treating that lock as permission to assume a fixed size.

Two reasons it doesn't hold here:

1. The device has **two displays with different dimensions**, and your game moves
   between them mid-session.
2. **The inner display doesn't honor supported interface orientations.** An
   orientation lock that has held on every previous iPhone stops holding on the
   inner display.

`UIRequiresFullScreen` behaves the same way — still honored, but your game still
resizes when the device opens and closes. Plan for the resize regardless.

So: pick your orientation, then make sure the game **fills the screen in every
pose**. That is the actual requirement.

## Aspect ratio beats letterboxing

When the viewport shape changes, you have three options, in order of preference:

**1. Change the aspect ratio.** Show more or less of the world. This is the
preferred answer: extend the camera frustum, widen the visible field, let the
scene breathe into the space it has been given. The game stays full-bleed and
feels native to whatever pose it's in.

**2. Letterbox or pillarbox with artwork.** If the design genuinely can't take a
variable aspect ratio — a fixed puzzle grid, a precisely tuned platformer
camera — then bars are acceptable, but fill them. Extend the background,
continue the scene's artwork, or run themed framing into the padding. The goal is
that it reads as a deliberate frame rather than a game that failed to fit.

**3. Bare black bars.** Avoid. This is what "didn't adapt" looks like.

## Keep text and controls the same size

When the viewport resizes, resist the urge to scale the whole scene uniformly.
Uniform scaling shrinks your HUD text and touch targets along with the world —
so opening the device to the *larger* display can make text harder to read and
buttons harder to hit, which is exactly backwards.

Scale the world; keep UI in its own layer sized in points. Text and controls
should stay as close to a constant physical size as you can manage across every
pose. On-screen touch controls in particular must not shrink below a comfortable
target just because the aspect ratio changed.

## The fold is a real problem for touch controls

This is the iPhone Duo-specific issue most likely to hurt a game.

When the device is partially folded, the inner display curves through the middle,
and that region is genuinely harder to see and to tap. A virtual joystick, a fire
button, or a drag target that lands in the curve becomes unreliable — not
invisible, just worse, which is harder to diagnose from a bug report.

Games rarely use the system components that get fold avoidance for free, so this
one is on you:

- Query reserved regions and keep interactive controls out of the **division
  region** (the fold). See `../iphone-duo-adaptive-layout/SKILL.md` for the API
  and the displacement patterns.
- Anchor touch controls to the **outer edges** rather than centering them. Edge
  anchoring is more robust across every pose and costs nothing when flat.
- Watch the **occlusion regions** too: the outer front camera is always present,
  and the inner camera appears whenever it activates.

Purely visual, non-interactive content can cross the fold. It's touch targets and
critical readouts that need to move.

## Poses worth designing for

You don't need a bespoke layout per pose, but two are worth a thought:

**Tabletop / laptop.** The device stands on a surface, half the display facing up
and half facing the player. This is a genuinely new play position — the lower
region is a stable touch surface and the upper region is a viewing surface. A
game with a board-and-controls split maps onto it naturally.

**Tent.** Standing on its edges, hands-free. Good for idle, spectator, ambient or
turn-based games.

Treat both as bonuses. Don't tie any functionality to a pose someone might never
use.

## Split View

Games participate in Split View multitasking like everything else — your game can
end up in half the inner display. It will be smaller and a different shape than
anything you designed for. Make sure it still renders correctly and doesn't drop
controls off the edge; you are not obliged to make it a great *play* experience
at that size, but it must not break.

## The hinge as an input

The hinge angle is available as a live, continuous value — coarse status plus an
angle — via `onHingeChange` in SwiftUI or `UIHingeInteraction` in UIKit. For a
game engine, bridge it the way you'd bridge any other native sensor.

It is a genuine novelty input, and worth considering for effects, camera
parallax, or a mechanic. Two cautions: guard for a `nil` hinge, since the same
binary runs on every non-folding iPhone, and never make it the *only* way to
perform an action. Details in `../iphone-duo-hinge-and-scenes/SKILL.md`.

## Engine notes

Most engines expose the viewport as a resize event and a safe-area inset query.
Wire both, and treat resize as a first-class event rather than a startup value:

- **Unity** — `Screen.safeArea`, and handle resolution changes at runtime rather
  than reading once in `Start()`.
- **Unreal** — safe zone / title safe values, and re-evaluate on viewport resize.
- **Godot** — the safe area API plus a stretch mode that tolerates changing
  aspect ratios.
- **SpriteKit / Metal** — you already get the resize through the view; the work
  is making the scene respond rather than assuming the initial drawable size.

Reserved regions and the hinge angle are iOS 27.1 APIs with no engine-level
equivalent, so those need a native plugin. The bridging pattern is the same one
described in `../iphone-duo-flutter/SKILL.md` and
`../iphone-duo-react-native/SKILL.md`.

## Checklist

1. Handle viewport resize as a live event — not a value read at launch.
2. Fill the screen in every pose, whatever your orientation lock.
3. Prefer changing aspect ratio; if you letterbox, fill the bars with artwork.
4. Keep HUD text and touch targets at a consistent physical size across poses.
5. Anchor interactive controls to edges, and keep them out of the fold.
6. Verify the game still renders correctly in Split View.
7. Test every pose in the iPhone Duo simulator in Device Hub — open, closed,
   folded, rotated.

© mirzaaghazadeh · MIT · mirzaaghazadeh/iphone-duo-skills

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

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

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