performance-optimization
Was er macht
Dieser Skill führt dich durch das Finden von Leistungsproblemen in einem Spiel mit einer messbasierten Methode. Er ist für Entwickler gedacht, deren Spiel Bilder verliert, stockt oder das Ziel-Tempo verfehlt.
Wann du ihn nutzt
- ✓Wenn die Bildrate deines Spiels während des Spielens fällt oder stockt.
- ✓Wenn du eine Ziel-Bildrate auf Desktop oder Mobilgeräten erreichen willst.
- ✓Wenn du vor Codeänderungen entscheiden musst, ob CPU oder GPU der Engpass ist.
Link zum Skill
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/performance-optimization/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Mein Spiel stockt auf dem Handy alle paar Sekunden. Kannst du mir helfen, herauszufinden, was langsam ist, und es zu beheben?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Dein Agent misst das Spiel zuerst, liest das Budget der Bildzeit und prüft, ob CPU oder GPU begrenzt. Dann wendet er eine gezielte Lösung an, etwa Objekt-Pooling, weniger Draw Calls, weniger Speicherzuweisungen oder Budgets für Assets, und misst erneut.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Performance optimization
Performance work is a measurement discipline, not a bag of tricks. The method is always the
same: profile → find the one bottleneck → fix that → measure again. This skill teaches that
loop and the highest-leverage fixes (pooling, batching, allocation control, asset budgets), and
points you at each engine's profiler. It pairs with physics-tuning for simulation cost.
When to use
- Use when the frame rate is low or uneven, the game stutters/hitches, or it must hit a target (60 FPS desktop, 30/60 mobile) and currently doesn't.
- Use to decide what to optimize: profile, read the frame budget, and identify whether the CPU or GPU is the bottleneck before changing any code.
- Use to apply specific fixes: object pooling, draw-call/batch reduction, removing per-frame allocations and GC spikes, and setting asset budgets.
When not to use: for physics jitter/tunneling/timestep specifically, use physics-tuning.
For the engine's concrete profiler UI and rendering settings, use that
engine skill (godot-export covers some build settings; engine cores cover the rest). This skill
is the cross-engine method and the shared fixes.
The golden rule: measure first, never guess
Most performance "fixes" applied without profiling target the wrong thing and add complexity for no gain. Do not optimize code you have not measured. Open the profiler, find the single biggest cost in a representative scene on representative hardware, and fix that. Re-measure to confirm the fix helped before moving on. Profile a release/optimized build where it matters — editor and debug builds lie (editor overhead, no compiler optimization).
Core workflow
- Define the target and reproduce. State the goal (e.g. 60 FPS = 16.67 ms/frame) and find a repeatable worst-case scene. "Sometimes slow" is unfixable; a reproducible spike is fixable.
- Profile before touching code. Run the engine profiler and read the frame: total frame time, and the split between CPU (game logic, physics, scripts) and GPU (rendering).
- Find the bottleneck — CPU or GPU. If GPU time ≫ CPU, attack draw calls/overdraw/shaders/ resolution. If CPU time dominates, attack scripts/physics/allocations. Fixing the wrong side does nothing.
- Fix the single biggest cost. Prefer an algorithmic win (do less work, cache, spatial partition, run less often) over micro-optimizing a hot line. Apply the matching shared fix (pooling, batching, allocation removal).
- Re-measure on the same scene/hardware. Confirm the number moved. Keep or revert based on data, not intuition.
- Set budgets so it stays fixed. Per-frame ms budgets per subsystem, plus asset budgets (texture sizes, triangle counts, draw-call ceilings); add a perf check to verification.
- Report measured numbers. State before/after frame time, the bottleneck found, and the fix — never "should be faster". If you could only measure in-editor, say so.
Patterns
1. Frame budget math (turn "feels slow" into a number)
target FPS → frame budget: 60 FPS = 16.67 ms | 30 FPS = 33.3 ms | 120 FPS = 8.33 ms
The WHOLE frame (CPU sim + render submit + GPU) must fit the budget; the GPU runs in parallel,
so the slower of CPU-frame and GPU-frame sets your FPS. Allocate sub-budgets, e.g. @60 FPS:
gameplay/scripts ~5 ms · physics ~3 ms · rendering(CPU submit) ~4 ms · UI/other ~2 ms · slack.
If one subsystem blows its slice, that's your target — not whatever you assumed.
2. Measure with the engine profiler (do this before any fix)
Godot 4.7 : Debugger ▸ Profiler (script/physics time), Visual Profiler (CPU vs GPU render time
per pass) and Monitors tab (FPS, draw calls, memory).
In code: Performance.get_monitor(Performance.TIME_PROCESS) returns SECONDS
(× 1000 for ms); Performance.RENDER_TOTAL_DRAW_CALLS_IN_FRAME for draw calls.
Unity 6.3 LTS : Profiler window (CPU/GPU/Memory/Rendering modules) + Frame Debugger for draw calls.
In code: ProfilerRecorder on "CPU Main Thread Frame Time" / "GPU Frame Time"
(release players need Frame Timing Stats enabled in Player Settings).
Unreal 5.8 : `stat unit` (Frame / Game / Draw / RHIT / GPU ms), `stat fps`,
`stat scenerendering` (draw calls); Unreal Insights for deep traces.
# Read the split: Game = gameplay thread, Draw = render thread (both CPU), GPU = t
Häufige Fragen
Sollte ich Code optimieren, den ich nicht gemessen habe?
Nein. Der Skill sagt, dass die meisten geratenen Lösungen das falsche Problem treffen und Komplexität ohne Gewinn hinzufügen.
Deckt er Physikprobleme ab?
Physik-Ruckeln und Durchtunneln behandelt der Skill für die Physikabstimmung.
Welcher Profiler wird genutzt?
Der Skill empfiehlt den in deine Engine eingebauten Profiler.
Details
Originalbeschreibung des Autors
Find and fix game performance problems methodically — measure with the engine profiler first, reason about the frame-time budget, locate the CPU-vs-GPU bottleneck, then apply the right fix: object pooling, draw-call batching, fewer allocations/GC spikes, and asset budgets. Engine- neutral method that pairs with each engine's profiler. Use when the user mentions performance, optimize, low/dropping FPS, frame drops, stutter, lag, profiler, frame budget, draw calls, batching, garbage collection/GC spikes, object pooling, or "the game runs slow".
Beliebtheit
- GitHub-Sterne
- 6.6k
- Platz im Ranking
- #13801
- Lizenz
- Apache-2.0
- Aktualisiert
- 28.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
router
6.6kHilft deinem Agenten, für eine Anfrage den passenden Spiele-Entwicklungs-Skill zu finden, indem er deine Engine und die Art der Aufgabe erkennt.
ai-behavior-trees-utility-ai
6.6kHilft deinem Agenten, einen Behavior Tree und eine Utility-KI für Gegner und Figuren zu bauen, die Aktionen nach Priorität und Punktwert wählen.
audio-design
6.6kBringt deinem Agenten das Mischen von Spiel-Audio bei: Busse, Lautstärke in Dezibel, Absenkung unter Dialogen, adaptive Musik und Variationen von Soundeffekten.
camera-systems
6.6kHilft deinem Agenten, Spielkameras zu bauen, die sanft folgen, innerhalb des Levels bleiben und sich in 3D um die Figur drehen oder umschauen lassen.
Ähnliche Skills
test-driven-development
311kBringt deinem Agenten bei, vor jedem Feature oder Fix zuerst einen fehlschlagenden Test zu schreiben, ihn fehlschlagen zu sehen und dann den kleinsten passenden Code zu schreiben.
verification-before-completion
311kBringt deinem Agenten bei, echte Prüfungen auszuführen und ihre Ausgabe zu lesen, bevor er behauptet, eine Aufgabe, ein Fix oder ein Build sei fertig oder bestehe.
migrate-to-shoehorn
310kErsetzt riskante Typumwandlungen in deinen Testdateien durch die Bibliothek shoehorn, damit Tests mit unvollständigen Daten arbeiten und trotzdem die Typprüfung bestehen.