Unity and Unreal Gameplay Systems and Optimization

Implement Unity and Unreal gameplay, physics, networking, and shaders with profiling plans tied to frame-time budgets.

Development / Engineeringunityunreal-engine
by AgentVoltv1.0.0
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

Prompt“Build a health bar UI system for a 2D platformer with damage feedback animations”
Beforegeneric AI agent
A health bar should work fine for a platformer. You could display it with a green bar that drains when the player takes damage, maybe with some red behind it showing the max health. You might want to animate it shrinking when damage happens. There are different ways to handle this depending on your engine and the look you're going for. Do you want it to show actual numbers or just a visual bar? And should it regenerate health automatically, or only through pickups? Let me know what engine you're using and I can give you more specific ideas.
Afterwith Unity and Unreal Gameplay Systems and Optimization
HEALTH BAR ARCHITECTURE (ECS pattern recommended)

COMPONENT HIERARCHY
• HealthDisplay (transform, world position relative to character)
  ├ BarBackground (red, full width 120px × 12px)
  ├ BarFill (green, width = health/maxHealth percentage)
  └ DamageFlash (white overlay, 0.3s duration on damage event)

STATE MACHINE
• Idle (bar opaque, stationary)
• TakingDamage (bar flashes white 4 frames, float upward 1sec)
• Regenerating (bar tints blue 0.5s, then fade)

PERFORMANCE OPTIMIZATION
• Pool damage floaters (UI text) in groups of 8; reuse instead of destroy
• Use screen space overlay (canvas) not world space (cheaper to render 1000+ UI elements)
• Cached shader for damage tint (avoid material duplication per bar)

PHYSICS INTEGRATION
• Health bar stays 1.5 units above character head (world space)
• Detect knockback force; tilt bar ±15 degrees to show impact direction
• Don't re-parent bar each frame (expensive); use OnPreRender callback

EDGE CASES
• Boss health (need 2x width bar, larger font for damage numbers)
• Poison damage over time (bar color shift green → purple over 8 seconds)
• One-hit KO (bar disappear if damage > health; show skull icon instead)

About this skill

“Enemies spawn and the frame rate tanks.” “The physics works at one frame rate and breaks at another.” This skill turns those symptoms into targeted Unity or Unreal implementations, with explicit ownership, simulation timing, and verification steps.

What it does

  • Builds gameplay systems using engine components, state machines, and ECS when the workload justifies it.
  • Fixes physics timing, collider configuration, fast-object tunneling, and pooled-object lifecycle errors.
  • Designs multiplayer authority, prediction, reconciliation, interpolation, and bounded lag compensation around the game's actual mechanics.
  • Separates CPU, GPU, allocation, and loading bottlenecks before selecting an optimization.
  • Reviews shaders for pipeline compatibility, transparency cost, material behavior, and target-platform constraints.
  • Converts frame-rate goals into measurable frame-time budgets and repeatable stress scenarios.

What you get

A focused implementation or diagnosis with code where appropriate, engine setup, lifecycle and ownership decisions, and concrete verification criteria. Performance recommendations distinguish supplied measurements from hypotheses and identify the next capture needed to resolve uncertainty.

Best for

Unity and Unreal developers implementing gameplay features, debugging physics or multiplayer behavior, or fixing performance problems on a defined target platform.

SKILL.md preview

SKILL.md
---
name: unity-and-unreal-gameplay-systems-and-optimization
description: Implement and debug Unity or Unreal gameplay systems, physics, multiplayer replication, and shaders using explicit simulation ownership and engine lifecycles. Diagnose performance through CPU/GPU frame-time captures and allocation evidence before selecting fixes. Use when the user says "build an enemy state machine", "my Unity game stutters when enemies spawn", "my Unreal character rubber-bands", "collisions keep missing fast projectiles", "should this system use ECS?", "optimize this shader", or "help me hit 60 FPS on mobile".
---

# Unity and Unreal Gameplay Systems and Optimization

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →