game-ui-frontend

作者: openai

為瀏覽器遊戲設計UI介面。當使用者要求HUD、選單、疊層、響應式佈局或必須保護遊玩區域的視覺方向時使用。

npx skills add https://github.com/openai/plugins --skill game-ui-frontend

Game UI Frontend

Overview

Use this skill whenever the game needs a visible interface layer. The job is not to produce generic dashboard UI. The job is to produce a readable, thematic browser-game interface that supports the play experience.

Default assumption: build the game world in canvas or WebGL, and build text-heavy UI in DOM.

Frontend Standards

  1. Establish visual direction before coding.
    • Genre and fantasy
    • Material language
    • Typography
    • Palette
    • Motion tone
  2. Use CSS variables for the UI theme.
  3. Build clear hierarchy.
    • Critical combat or survival information first
    • Secondary tools second
    • Rarely used settings behind menus or drawers
  4. Protect the playfield first, especially in 3D.
    • The initial screen should feel playable within a few seconds.
    • Default to one primary persistent HUD cluster and at most one small secondary cluster.
    • Keep the center of the playfield clear during normal play.
    • Keep the lower-middle playfield mostly clear during normal play.
    • Put lore, field notes, quest details, and long control lists behind drawers, toggles, or pause surfaces.
    • Prefer contextual prompts and transient hints over permanent boxed panels.
  5. Keep overlays readable over motion.
    • Use backing panels, edge treatment, contrast, and restrained blur where needed.
  6. Design for both desktop and mobile from the start.
  7. Design 3D UI around camera and input control boundaries.
    • Pause or gate camera-control input when menus, dialogs, or pointer-driven UI are active.
    • Keep pointer-lock, drag-to-look, and menu interaction states explicit.

3D Starter Defaults

For exploration, traversal, or third-person starter scaffolds, prefer this UI budget:

  • one compact objective chip or status strip at the edge
  • one transient controls hint or interaction prompt
  • one optional collapsible secondary surface such as a journal, map, or quest log

Do not open every informational surface on first load. The scene should be readable before the user opens any deeper UI.

As a default implementation constraint for 3D browser games:

  • no always-on full-width header plus multi-card body plus full-width footer layout
  • no large center-screen or lower-middle overlays during normal movement
  • no more than roughly 20-25% of the viewport covered by persistent HUD on desktop unless the user explicitly requests a denser layout
  • on mobile, collapse to a narrow stack or contextual chips before covering the playfield with larger panels

Prompting Rules

When asking the model to design or implement game UI, include:

  • the game fantasy
  • the camera or viewpoint
  • the player verbs
  • the HUD layers
  • the camera or control mode when the game is 3D
  • the tone of motion
  • desktop and mobile expectations
  • playfield protection and disclosure strategy
  • explicit anti-patterns to avoid

Use ../../references/frontend-prompts.md for concrete prompt shapes.

Motion Rules

  • Prefer a few meaningful transitions over constant micro-animation.
  • Reserve strong motion for state change, reward, danger, and onboarding.
  • Respect reduced-motion settings for non-essential animation.
  • Keep 3D HUD motion from competing with camera motion.

What Good Looks Like

  • HUD elements are legible without flattening the scene.
  • Menus feel native to the game world, not like a SaaS admin panel.
  • Layout adapts cleanly across breakpoints.
  • Pointer, keyboard, and game-state feedback are obvious.
  • In 3D games, menu and HUD states do not fight camera control or pointer-lock.
  • In 3D games, the first playable view keeps most of the viewport available for movement, aiming, and spatial reading.
  • Persistent information density is low enough that screenshots still read as game scenes, not UI comps.

Anti-Patterns

  • Generic app dashboard layouts
  • Flat placeholder styling with no theme
  • Default font stacks without intent
  • Dense overlays that obscure the playfield
  • Large title cards or multi-paragraph notes sitting over a live playable scene
  • Equal-weight boxed panels distributed around every edge of the viewport
  • Controls, objectives, notes, and lore all expanded at once on first load
  • Full-width top-and-bottom chrome with large always-on center or body panels in 3D play
  • Excessive motion on every element
  • Canvas-only UI when DOM would be clearer and cheaper
  • Forcing HUD controls into the 3D scene when standard DOM would be clearer
  • Letting camera input remain active under modals or inventory panels

References

  • Shared architecture: ../web-game-foundations/SKILL.md
  • Prompt recipes: ../../references/frontend-prompts.md
  • Low-chrome 3D layout patterns: ../../references/three-hud-layout-patterns.md
  • React-hosted 3D UI context: ../react-three-fiber-game/SKILL.md
  • Playtest review: ../../references/playtest-checklist.md

來自 openai 的更多技能

user-context
openai
載入或管理資料分析插件的持久性來源路由偏好設定、入門邏輯、設定進度以及語義層註冊表。
official
notion-research-documentation
openai
研究Notion內容,並將其整合為結構化的簡報、報告或附有引用的比較分析。透過精準查詢搜尋並擷取Notion頁面,然後按主題組織發現,並附上內文來源引用及參考文獻章節。根據範圍與使用者目標,從四種輸出格式(快速簡報、研究摘要、比較分析、綜合報告)中選擇。使用內建範本建立與更新Notion頁面;直接連結來源,並在新資訊到來時追蹤變更。
official
rcsb-pdb-skill
openai
提交精簡的RCSB PDB請求以獲取核心元數據、Search API查詢及FASTA下載。當用戶需要簡潔的RCSB摘要時使用;保存原始JSON或…
official
pdf
openai
PDF 讀取、建立與驗證,支援視覺化渲染與程式化生成。使用 Poppler(pdftoppm)將 PDF 頁面渲染為 PNG,以便在交付前檢查版面、間距與排版。透過 reportlab 程式化生成 PDF,確保格式可靠;使用 pdfplumber 或 pypdf 提取文字與元資料。執行品質標準:無文字裁切、元素重疊、表格破損或渲染瑕疵;僅使用 ASCII 連字號,引用格式需具可讀性。使用...
official
test-coverage-improver
openai
Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose…
official
playwright
openai
終端驅動的瀏覽器自動化,具備元素快照與互動式UI工作流程。透過playwright-cli包裝腳本運作(需npx),支援無頭模式與有頭模式以進行視覺化除錯。核心流程:開啟頁面、擷取快照以取得穩定元素參照、使用參照進行互動、在導航或DOM變更後重新擷取快照。包含表單填寫、點擊、輸入、多分頁管理、螢幕截圖/PDF擷取,以及流程除錯的軌跡記錄。元素參照(例如e3、e15)...
official
ukb-topmed-phewas-skill
openai
接受rsID、GRCh37或GRCh38輸入,解析為所需的GRCh38查詢,以獲取單一變異的簡潔UKB-TOPMed PheWAS摘要。當需要…時使用。
official
code-review-context
openai
模型可見上下文
official