game-ui-ux
БесплатноБез исполняемых скриптовНе проверенEngine-neutral design rules for game HUDs and menus: anchors and containers, scaling, safe areas, gamepad focus, HUDs driven by events instead of polling, and…
от gamedev-skills★ 12 656 звёзд на GitHubОб этом скилле
Game UI/UX
Make every HUD and menu work on a phone, an ultrawide monitor and a TV, with a mouse or only a gamepad. This skill decides layout, scaling, focus, screen flow and how UI listens to game state; the engine UI skill supplies nodes, components and styling.
When to use
- Building a HUD, a menu, an inventory or shop screen, or any overlay.
- Fixing UI that breaks at other resolutions, ignores safe areas, strands a gamepad user, or polls game state every frame.
- Structuring screen flow (title, game, pause, settings, confirm) as a stack.
Not this skill: widget APIs and themes (godot-ui-control, roblox-ui, Unity UGUI or UI
Toolkit through the Unity skills), visual juice (game-feel), conversation flow and choice
logic (dialogue-systems), rebinding screens' input logic (input-systems), UI art and icons
(create-game-assets).
Workflow
- Inspect the project's UI first: stretch or CanvasScaler settings, existing theme, fonts, the screen-switching code, and which input devices the game targets.
- Lay out with anchors and containers. Anchor to edges, corners or centre; let rows,
columns and grids place children. A hard-coded
(x, y)is correct at one resolution only. - Set one scaling policy for the whole UI: a reference resolution (usually 1920x1080) that
scales to fit, plus an aspect rule:
expandand anchor HUD corners outward (default), or letterbox when the design truly needs a fixed frame. - Inset critical UI to the safe area (health, timers, prompts); decorative art may bleed. Reapply on resize and orientation change.
- Make every screen gamepad-navigable: one control focused on open, neighbours fixed where the engine guesses wrong, a focus style distinct from hover, focus trapped inside modals.
- Model screens as a stack. Push for overlays, pop for back; only the top screen takes input, and the screen below gets its focus back.
- Drive the HUD from events. Subscribe to
health_changed,score_changed; set the initial value once on connect, because signals do not replay. - Verify with a runnable check, then on screens.
- Headless focus check: a script that opens each screen in turn and fails if
get_viewport().gui_get_focus_owner()(Godot) orEventSystem.current.currentSelectedGameObject(Unity) is null. - Size sweep: launch at 1280x720, 2560x1080 and 1080x2340 (Godot:
--resolution WxH; needs a display orxvfb-run, because the headless renderer draws nothing) and save a viewport screenshot at each. Inspect them for clipped or overlapping elements. - Ask the user to unplug the mouse, play through every menu with a gamepad and report any screen where nothing is selected or focus escapes.
- Headless focus check: a script that opens each screen in turn and fails if
Patterns
1. Anchors and containers
# Godot 4.7. Anchor the score to a corner; an HBoxContainer spaces the hearts.
func _ready() -> void:
$Score.set_anchors_preset(Control.PRESET_TOP_LEFT)
for i in lives:
$Hearts.add_child(make_heart())
Unity UGUI: anchor the RectTransform to the corner and use a HorizontalLayoutGroup; set the
pivot to the same corner, or the element grows in every direction when its size changes.
2. Scaling settings
Godot 4.7 project.godot [display]:
window/stretch/mode="canvas_items" window/stretch/aspect="expand"
window/size/viewport_width=1920 window/size/viewport_height=1080
Unity 6.3 CanvasScaler: Scale With Screen Size, Reference Resolution 1920x1080,
Match Width Or Height = 0.5 (1.0 if the layout must never clip vertically)
Unity 6.3 UI Toolkit: the same three settings live on the PanelSettings asset
3. Safe-area inset
# Godot 4.7. Only Android and iOS report a real safe area; elsewhere the call returns the usable
# screen rect (taskbar, menu bar or dock excluded), which would inset a fullscreen HUD.
func _apply_safe_area() -> void:
if not OS.has_feature("mobile"):
return
var safe := Rect2(DisplayServer.get_display_safe_area()) # screen pixels
var win := Rect2(Rect2i(DisplayServer.window_get_position(), DisplayServer.window_get_size()))
var inner := safe.intersection(win)
var to_ui := get_viewport_rect().size / win.size # window pixels -> UI units under stretch
$Margin.add_theme_constant_override("margin_left", int((inner.position.x - win.position.x) * to_ui.x))
$Margin.add_theme_constant_override("margin_top", int((inner.position.y - win.position.y) * to_ui.y))
$Margin.add_theme_constant_override("margin_right", int((win.end.x - inner.end.x) * to_ui.x))
$Margin.add_theme_constant_override("margin_bottom", int((win.end.y - inner.end.y) * to_ui.y))
Unity: read Screen.safeArea and set a panel's anchorMin/anchorMax to its corners divided
by Screen.width/Screen.height; recompute when the rect changes, not every frame.
4. Focus on open
# Godot 4.7. Focus something on open; fix neig
Установить game-ui-ux в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл game-ui-ux?
Engine-neutral design rules for game HUDs and menus: anchors and containers, scaling, safe areas, gamepad focus, HUDs driven by events instead of polling, and accessibility minimums. Use for menus, health bars or inventory screens that break on ultrawide or phones. Pair with `godot-ui-control` or `roblox-ui`. Not for button juice (`game-feel`) or rebinding (`input-systems`).
Как установить скилл game-ui-ux?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл game-ui-ux запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic