Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

native-game-performance

БесплатноБез исполняемых скриптовНе проверен

Make a native NodeTool game run at the display rate: frame and tick targets, budgets per game type, the authoring rules that set engine cost, and the…

nodetool-aiот nodetool-ai★ 674 звезды на GitHub

Об этом скилле

Native game performance

A game is done when it holds its frame target on the slowest machine it ships to. Measure at every milestone. A number from a tool decides, not a look at the editor.

Targets

  • The simulation ticks at 60 Hz. Tick p95 stays at or under 4 ms (performance.budgets.tickMs, default 4). That leaves the rest of each 16.6 ms frame to rendering.
  • The player renders at the display rate. On the slowest target Mac, frame p95 stays within 16.6 ms for a 60 Hz display and within 8.3 ms for a 120 Hz display (performance.budgets.frameMs, default 16.6). Set frameMs: 8.3 when the game targets ProMotion displays.
  • Shader programs stay flat during play. Growth means a material switches its program variant every frame, which costs more than any draw.

Set the time budgets with the other budgets: edit_native_game {game_id, ops: [{op: "set_performance", performance: {budgets: {tickMs: 4, frameMs: 8.3, drawCalls: 400, triangles: 2000000}}}]}. set_performance replaces the whole performance object, so send cullLayers again when the game has them.

Budgets per game type

Starting budgets for the slowest target Mac. Draw calls and triangles count every pass: the scene, each shadow cascade and the soft-particle depth pass.

Budget Arena Platformer Open 3D world Flight or driving
Draw calls per frame 300 300 500 500
Triangles per frame 500k 500k 2M 3M
Shadow cascades none, one map with extent 2 3 3
Cascade maxDistance — 60 to 120 300 to 800 1000 to 2000
shadows.mapSize 1024 1024 2048 2048
Live particles 1000 1000 2000 4000
Soft emitters (softness > 0) 1 2 4 4
Collider triangles (all trimeshes) 5k 20k 50k 20k
Script behaviors 1 to 5 1 to 5 10 1 to 3
Active entities in a scripted scene 300 300 1000 300

RIDGELINE, the shipped flight showcase, measures 380 draw calls, 2.9M triangles, about 4000 particles, a 13.5k-triangle collider and 3 scripts.

Authoring rules

Each rule removes work the engine repeats every frame or every tick.

  • castShadow: false on terrain and ground. Every casting mesh draws again into each cascade, and ground still receives shadows. In a scene with cascades, validation warns with large_shadow_caster on a casting mesh 100 units or wider.
  • 2 or 3 cascades with a real maxDistance. Each cascade is another pass over every caster inside it. A maxDistance far beyond what the player sees spreads the map over kilometres and makes nearly everything a caster.
  • Merge repeated props. The engine does not instance: each model entity is its own draw calls and its own cloned materials. Bake trees, rocks and fence posts into a few merged models.
  • Split large meshes into chunks of a few hundred metres. The renderer culls whole meshes, so one huge terrain mesh always draws in full, in every pass.
  • Use a reduced collision mesh. The physics world is copied and restored every tick to keep replays exact, and that copy grows with collider triangles. Build a decimated triangleMesh collider, never the render mesh.
  • Use one controller script. Each script call pays realm setup and JSON transport. One script that drives many entities costs less than one script per entity. Read the world with world.get and world.query with near and radius. Reading input.world serializes every active entity (1 MiB limit).
  • Send setProp and ui commands only when the value changes. Props travel in the script input and the snapshot. A changed HUD value repaints the whole HUD canvas and uploads it as a texture. Round a speed or altitude readout so it changes a few times a second.
  • Keep the sun still under a procedural sky. The sky cube and its environment map rebuild whenever the sun direction changes. A day cycle that turns the sun every tick rebuilds them every tick.
  • presentation.hudWidth is the render resolution. The exported player sizes the 3D canvas to hudWidth by hudWidth / aspectRatio. Every full-screen pass scales with it. 1280 is enough for most games.
  • Bloom costs a mip chain. Bloom adds a bright pass and five blur levels at full resolution. Keep threshold high so only real highlights bloom, and leave vignette, fxaa and smaa off unless the look needs them.
  • Keep soft particles tight. softness makes the renderer draw scene depth once more for every geometry near any soft emitter. Set it only on emitters that touch geometry, and keep those emitters small.

The measure-fix loop

Run this loop at every milestone: after the blockout, after the art pass, after the effects pass, and before you report the game as done.

  1. Record a route. A route is a JSON array of input frames, one per tick: {"pressed": [], "justPressed": [], "axes": {"throttle": 1}, "look": {"x": 0, "y": 0}}. It must reach th
Полный SKILL.md на GitHub

Установить native-game-performance в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл native-game-performance?

Make a native NodeTool game run at the display rate: frame and tick targets, budgets per game type, the authoring rules that set engine cost, and the measure-fix loop with nodetool game bench, capture and perf. Load before building a 3D game, at every build milestone, and when a game stutters, drops frames or runs slowly.

Как установить скилл native-game-performance?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл native-game-performance запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить native-game-performance с