Game Performance Optimization
/performance-optimization
Fix performance methodically: profile first, set a frame budget, find the CPU or GPU bottleneck, then pool, batch and cut allocations.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 上通过 22/22 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
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 …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 184b72be0288,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 先用分析器测量,再动手优化 / Measure with the profiler before changing anything
- 在发布版、目标硬件上测,不在编辑器里测 / Profile a release build on target hardware, not the editor
- 先分清是 CPU 还是 GPU 瓶颈 / Find out whether the CPU or the GPU is the bottleneck first
- 子弹、粒子等高频对象用对象池 / Bullets, particles and other hot objects are pooled
- 共享贴图和材质、用 MultiMesh,减少 draw call / Shared textures and materials and MultiMesh keep draw calls down
中文指南
这个 skill 做什么
游戏性能优化方法:把“卡”换算成帧预算(毫秒)、先用分析器测量、分清 CPU 还是 GPU 瓶颈、用对象池避免频繁创建销毁、减少 draw call、消除每帧的内存分配。覆盖 Godot 4.7、Unity 6.3 和 Unreal 5.8 的工具。
什么时候用
- 游戏掉帧、卡顿或周期性顿一下
- 不知道该从哪里开始优化
- 上线前定性能预算
怎么装
下载本页的 ZIP,把 performance-optimization/ 整个文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。
最小示例
gameskill/examples/ 是一个 Godot 4.7 工程:budget.gd 是帧预算计算,pool.gd 是 skill 的对象池,busy.gd 用来校验分析器读数,测试里对比了共享贴图、独立材质和 MultiMesh 的 draw call。
我们怎么测的
在 Godot 4.7.2(xvfb + OpenGL 3)下跑 10 项检查:60/30/120 FPS 的预算是 16.67/33.3/8.33 毫秒,超预算的子系统能被标出;Performance.get_monitor(TIME_PROCESS) 的单位确实是秒(监视器约每秒刷新一次,读数要等一会儿);对象池 5000 次取用没有新建任何节点,比每次实例化再释放快约 6 倍;200 个共享贴图的精灵只要 1 次 draw call,每个用独立贴图和材质时变成 200 次;1000 个 MultiMesh 实例 1 次 draw call。结果在 gameskill/test-report.json。
搭配
godot-export:用发布版测性能ccgs-launch-checklist:上线前的性能检查godot-shaders:着色器的开销
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/performance-optimization/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/performance-optimization.zip -o /tmp/gameskill-performance-optimization.zip
unzip -oq /tmp/gameskill-performance-optimization.zip -d .claude/skills
rm /tmp/gameskill-performance-optimization.zip包含内容
- Worked steps: Frame budget math; Measure with the engine profiler; Object pooling; Cut draw calls
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
适合
- Requests about performance, optimize, low/dropping FPS, frame drops or stutter
试试这条提示词
My game drops to 40 FPS in big fights. Profile it and fix the bottleneck.关于这个 Skill
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".
From the performance-optimization SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- The golden rule: measure first, never guess
- Frame budget math (turn "feels slow" into a number)
- Measure with the engine profiler (do this before any fix)
- Object pooling (stop allocating/freeing in hot loops)
- Cut draw calls (the most common GPU-side win)
- Kill per-frame allocations (GC spikes = stutter)
常见问题
游戏打磨流程 Game Polish Workflow
让 AI 把游戏真正改好的可复用流程:10 步打磨循环、中英双语提示词、AI 做游戏常见问题排障清单,以及试玩和发布检查表。
- 10 步打磨循环,每步有完成标准
- 14 条中文 + 14 条英文提示词
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Game Physics Tuning
Stable, good-feeling physics: fixed timestep with interpolation, mass and drag, CCD against tunneling, jitter fixes and collision layers.
Godot Export
Export Godot 4.7 games for desktop, web and mobile: export presets, headless CLI builds for CI, web COOP/COEP and server builds.
Procedural Generation
Procedural content with seeded RNG: Perlin and Simplex noise terrain, rooms-and-corridors dungeons and weighted loot tables.
Game AI: FSM, Behavior Trees & Pathfinding
NPC and enemy decision-making with state machines, behavior trees, steering and A* pathfinding, paired with your engine's navigation API.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 42 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Card Game
Build a card game: card data, deck/hand/discard zones, draw/shuffle/reshuffle, a turn structure, costs, and effect resolution.
相似 skills
Playtest Report (Claude Code Game Studios)
Structured playtest report template, or turn existing playtest notes into structured feedback.
Universal Modder
Skills, tools and a fal MCP that let Claude Code mod PC games you own: recon, reverse engineering, generated assets, in-game testing.
earshot: ears for coding agents (judge, find, time-align and make game sound on CPU)
Let an agent hear: rank sound-effect candidates against a description, find the clean trim in a long recording, tell real recordings from code-synthesised sound, check that every hit lands on its picture cut, and render effects from a bank of 252 code-made sounds. Runs locally on CPU with two open audio models (~1.1 GB, downloaded once); no API key needed.
Co-op Anything
Point your coding agent at a single-player game and make it co-op: an MCP server, 13 agent skills and a playbook to research, reverse engineer, build, bot-test and ship co-op mods with Steam relay networking.