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★ 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). SetframeMs: 8.3when 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: falseon terrain and ground. Every casting mesh draws again into each cascade, and ground still receives shadows. In a scene with cascades, validation warns withlarge_shadow_casteron 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. AmaxDistancefar 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
triangleMeshcollider, 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.getandworld.querywithnearandradius. Readinginput.worldserializes every active entity (1 MiB limit). - Send
setPropanduicommands 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.hudWidthis the render resolution. The exported player sizes the 3D canvas tohudWidthbyhudWidth / 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
thresholdhigh so only real highlights bloom, and leave vignette,fxaaandsmaaoff unless the look needs them. - Keep soft particles tight.
softnessmakes 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.
- 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub