game-ui-designer-developer
Master Enterprise & AAA Game UI/UX Design, Architecture, Performance, Shaders & Technical Art Suite - Complete framework covering Diegetic/Spatial UI, FSM Canvas Navigation, Spring Juice Buttons, Resp
SKILL.mdskills/game-development/game-ui-designer-developer/SKILL.md
GitHubGame UI/UX Designer & Developer - Master AAA Game Interface Suite
This skill provides a standardized, production-grade Game UI/UX architecture, shader suite, and technical art framework for AAA & Enterprise mobile/3D games. It encapsulates 8 deep-research master documents into modular sub-commands.
⚡ QUICK COMMAND REFERENCE
| Command | Focus Module | Primary Reference Document |
|---|---|---|
/game-ui-paradigm |
AAA UI Paradigms (Diegetic, Spatial), Color Theory & SDF Typography | game_ui_ux_paradigms_and_visual_hierarchy.md |
/game-ui-arch |
FSM Layered Canvas & Stack Modal Navigation & Focus Graph | game_ui_architecture_and_navigation_fsm.md |
/game-ui-button |
7-State Button Lifecycle, Spring Micro-Interactions, Haptics & Audio | button_systems_micro_interactions_and_juice.md |
/game-ui-responsive |
Device Safe Area Notch Inset, Aspect Ratio Adapters & Layout Math | responsive_layout_safearea_and_multi_device.md |
/game-ui-perf |
UGUI vs UI Toolkit, Canvas Splitting, SpriteAtlas & Zero-GC TMP | ugui_vs_ui_toolkit_and_performance_optimization.md |
/game-ui-hud |
Speedometer, World-Space Damage Pools, Off-screen Pins & DOTween | dynamic_gameplay_hud_and_worldspace_ui.md |
/game-ui-shader |
Glassmorphism Blur, Glowing Outline, Procedural Corners & Holograms | game_ui_shaders_and_technical_art.md |
/game-ui-a11y |
Unity Localization, CJK/RTL Layout, Colorblind Shaders & UI Auditors | localization_accessibility_and_ui_auditing.md |
🚀 CARDIV STANDARDIZED UI PRODUCTION SCRIPTS
Cardiv's production-ready, zero-bug UI architecture is implemented across the following C# scripts:
These scripts live in the game project (not in this skill repository) under Assets/Cardiv/Scripts/UI/:
- Layout & Safe Area Engine:
Layout/SafeAreaPanel.cs - Navigation Stack Router:
Navigation/UIManager.cs&Navigation/IUIScreen.cs - Design Tokens System:
Styling/UIThemeConfig.cs&Styling/UIStyleApplier.cs - Atomic Widgets:
Widgets/ScoreWidget.cs,Widgets/ComboWidget.cs,Widgets/PauseFABWidget.cs,Widgets/OilHazardWidget.cs
1. /game-ui-paradigm - AAA UI Paradigms, Color Theory & SDF Typography
Core Design Rules:
- 4 UI Paradigms:
- Diegetic: In-world UI integrated into geometry (e.g.
MaterialPropertyBlockmesh health bar). - Non-Diegetic: Screen-space HUD overlays decoupled from world physics.
- Spatial: 3D world-space markers projected to screen coordinates with frustum and depth check.
- Meta: Fourth-wall interfaces (in-game smartphone, glitching HUD, render texture monitors).
- Diegetic: In-world UI integrated into geometry (e.g.
- Color Theory & Accessibility:
- WCAG 2.1 AAA Contrast ratios ($CR \ge 7:1$ for normal text, $4.5:1$ for large headings).
- Dynamic adaptive text contrast using sRGB linear luminance: $$L = 0.2126R_{\text{lin}} + 0.7152G_{\text{lin}} + 0.0722B_{\text{lin}}$$
- LMS Cone Transformation matrices for Deuteranopia, Protanopia, Tritanopia support.
- SDF & MSDF Typography Engine:
- Use TextMeshPro SDF / Multi-channel SDF (MSDF) for crisp corners at extreme zoom levels.
- Fallback Font Chain: Primary Font $\rightarrow$ CJK Fallback $\rightarrow$ Arabic RTL BiDi shaping.
Reference Document: game_ui_ux_paradigms_and_visual_hierarchy.md
2. /game-ui-arch - Layered Canvas Architecture & FSM Navigation
Architecture Standards:
- 4-Layer Canvas Hierarchy:
- Layer 0 (BaseScreens): Full-screen screens (
MainMenuScreen,GameHUD). - Layer 1 (Modals): Window popups (
PausePopup,SettingsPopup,ShopWindow). - Layer 2 (Dimmer Overlay): Auto 50% black backdrop with Raycast Blocker.
- Layer 3 (Toasts): Notification toasts (
OilHazardWidget,FloatingText).
- Layer 0 (BaseScreens): Full-screen screens (
- Stack-Based Modal Navigation:
Stack<IUIScreen>managed viaUIManager.cs(PushScreen,PopScreen,ClearAll).- Unified Back-Button Handler: Android hardware back, iOS edge swipe, Esc key (
OnBackButtonPressed()).
- Gamepad & Focus Navigation:
- Automatic focus highlight traps for modal popups.
- Auto-scroll
ScrollRecttargeting focused UI element withMathf.SmoothDamp. - Minimum Touch Target: Apple 44x44pt / Google 48x48dp with invisible Raycast padding.
Reference Document: game_ui_architecture_and_navigation_fsm.md
3. /game-ui-button - 7-State Button Lifecycle, Spring Juice & Haptics
Button Engineering Rules:
- 7 Button States: Normal, Hover, Pressed, Selected, Disabled, Cooldown Overlay, Loading Spinner.
- Spring Physics Micro-Interactions:
- Damped harmonic oscillator scaling ($0.94\times$ on press, spring bounce on release): $$m\ddot{x} + c\dot{x} + kx = 0$$
- Y-translation offset (-4px) and dynamic shadow offset shift.
- Audio & Haptics:
- iOS
UIImpactFeedbackGenerator& AndroidVibrationEffectviaMobileHapticBridge.cs. - Audio pitch variation ($\pm 0.05$) to prevent ear fatigue.
- iOS
- Reusable UI Components:
- Modal Cards, Virtualized ScrollRect ($O(1)$ pool), Juicy Damage Ghost Progress Bars, Radial Selection Wheels.
Reference Document: button_systems_micro_interactions_and_juice.md
4. /game-ui-responsive - Safe Area, Aspect Ratio Adapters & Layout Math
Layout Standards:
- Multi-Aspect Ratio Support: 16:9, 19.5:9, 21:9, and 4:3 (iPad) dynamic anchor scaling.
- Hardware Notch / Safe Area:
- Normalize
Screen.safeAreapixels into $[0, 1]$ RectTransform anchor space and resetoffsetMin/MaxtoVector2.zero(SafeAreaPanel.cs).
- Normalize
- Single Source of Safe Area Truth & Double-Notch Shift Prevention Rule:
- Parent SafeArea Ancestor Check: Top header widgets (
TopBarWidget.cs) MUST check if any parent ancestor possesses aSafeAreaPanel.cs(GetComponentInParent<SafeAreaPanel>()) before applying custom notch pixel offsets (Screen.height - Screen.safeArea.yMax). - If a parent
SafeAreaPanel.csexists,anchoredPosition.yMUST remain0(or relative to parent's top edge) to prevent Double Notch Shifting ($2 \times \text{notch}$). - Unified Header-Card Parent Hierarchy: Place
TopBarbadges ($Y = -6\text{px}$) and upperCardsContainer($Y = -60\text{px}$) inside the SAME root header panel (TopBar) as parent-child siblings. This guarantees that no matter the device notch height or aspect ratio (Foldable 960x2658, Tablet 2048x2732), badges and cards shift in 100% synchronized harmony with zero vertical overlap or background clipping.
- Parent SafeArea Ancestor Check: Top header widgets (
- UGUI Layout Optimization:
- Avoid nested
ContentSizeFitter+Horizontal/VerticalLayoutGroup($O(N^2)$ Rebuild penalty). - Use zero-alloc
ManualLayoutGroup.csfor 35x faster CPU layout calculation.
- Avoid nested
- Zero-Overlap Typography & Bounding Box Math:
- Vertical Bounding Box Gap Formula: $$\text{Gap} = \left(Y_{\text{center, top}} - \frac{\text{Height}{\text{top}}}{2}\right) - \left(Y{\text{center, bottom}} + \frac{\text{Height}{\text{bottom}}}{2}\right) \ge \text{Margin}{\text{min}} , (4\text{--}8\text{px})$$
- Explicit Anchor Splitting & Zero Double-Offset Rule:
- Top Header Line:
anchorMin = (0, 0.5),anchorMax = (1, 1.0),pivot = (0.5, 0.5),anchoredPosition.y = -2px - Bottom Value Line:
anchorMin = (0, 0.0),anchorMax = (1, 0.5),pivot = (0.5, 0.5),anchoredPosition.y = +2px - Keeps texts perfectly centered in their respective anchor halves, eliminating clipping and double-offsetting outside container bounds.
- Top Header Line:
- Unity UI
bestFitPitfall Safeguard:- NEVER set
resizeTextForBestFit = trueon status titles or timers—it causes Unity UI to aggressively shrink text down to min font size (8--10pt). - ALWAYS set
resizeTextForBestFit = false,horizontalOverflow = Overflow,verticalOverflow = Overflow, and specify crisp font sizes (18pt--30pt Bold).
- NEVER set
- 100% Opaque & Dark Outline Rule for 3D Floating HUD:
- Floating 3D HUD badges (
OilStatusUI.cs) MUST use 100% opaque dark backgrounds (Color32(10, 12, 18, 255)) to prevent 3D road/coin bleed-through. - ALWAYS attach a dark
Outlinecomponent (Color32(0, 0, 0, 220),effectDistance = (1.5, -1.5)) to HUD texts for maximum edge contrast over dynamic game scenes.
- Floating 3D HUD badges (
Reference Document: responsive_layout_safearea_and_multi_device.md
5. /game-ui-perf - UGUI vs UI Toolkit & Zero-GC Optimization
Performance Rules:
- Canvas Splitting: Separate static background Canvas from high-frequency dynamic HUD Canvas to prevent global VBO re-batching.
- SpriteAtlas v2: Pack UI sprites with 8px bleed padding to prevent edge bleeding under bilinear filtering.
- Masking Performance: Prefer
RectMask2DoverStencil Mask(Stencil adds extra draw call passes). - Zero-GC Text Updates:
- Use
FastStringFormatorTMP_Text.SetText()numeric/StringBuilder overloads. Never concatenate strings (score.text = "Score: " + val) inUpdate().
- Use
Reference Document: ugui_vs_ui_toolkit_and_performance_optimization.md
6. /game-ui-hud - Dynamic Gameplay HUD & World-Space Damage Text
Gameplay HUD Standards:
- Radial Speedometer & Gauges: Non-linear angle mapping $\theta(v)$ with
Mathf.SmoothDampjitter reduction. - 3D World-Space Floating Damage Numbers:
- Bezier curve floating text pool (
DamageNumberPool.cs) with $Z \le 0$ camera rear frustum filtering.
- Bezier curve floating text pool (
- Off-Screen Objective Pins: Rectangle edge clamping ($\alpha_{\text{clamp}} = \min(\alpha_x, \alpha_y)$) with dynamic arrow rotation (
WorldToScreenTracker.cs). - Juice Animations: DOTween elastic punch scale and low-health vignette pulse.
- Capsule Badge & Status Indicator Placement:
- Ensure dynamic 3D World-Space floating badges (
OilStatusUI.cs) hover at an un-obstructed offset (worldOffset = Vector3(0, 2.6f, 0.2f)).
- Ensure dynamic 3D World-Space floating badges (
Reference Document: dynamic_gameplay_hud_and_worldspace_ui.md
7. /game-ui-shader - Glassmorphism, Neon Glow & Technical Art Shaders
UI Shader Engine:
- Glassmorphism Blur Shader: URP Downsampled Kawase Blur with Chromatic Aberration & Rim Lighting (
UI_Glassmorphism_URP.shader). - Glowing Outline Shader: 8-tap alpha dilate with sine pulsefalloff (
UI_GlowingOutline_URP.shader). - Procedural Rounded Corners: Independent 4-corner SDF radius calculation with antialiased stroke (
UI_ProceduralRoundedCorners_URP.shader). - Holographic Shimmer: Anisotropic specular sweep reflection for rare cards/badges.
Reference Document: game_ui_shaders_and_technical_art.md
8. /game-ui-a11y - Unity Localization, CJK/RTL & Automated UI Auditors
Accessibility & Audit Rules:
- Unity Localization: Key-based lookup, Smart Format pluralization,
StringBuilderPoolzero-alloc localizer. - Multilingual Alignment: RTL layout mirroring (
RTLRectTransformMirror.cs) and CJK Kinsoku Shori line-breaking rules. - Colorblind Filters: Real-time Deuteranopia, Protanopia, Tritanopia URP simulation shader filter (
UI/ColorblindFilter). - Automated UI Quality Auditors: Editor tools to inspect draw calls (
UIDrawCallAuditor.cs), unassigned TMP fonts (TMPFontAndOverflowAuditor.cs), multi-device aspect ratios (DeviceAspectRatioSimulator.cs), and RectTransform element overlaps (RectTransformOverlapAuditor.cs).
Reference Document: localization_accessibility_and_ui_auditing.md