native-game-reference
БесплатноБез исполняемых скриптовНе проверенField reference for native game documents: scripts, lifecycle hooks, events, tags and props, 2D visuals, particles, lighting, effects, 3D rendering, physics…
от nodetool-ai★ 674 звезды на GitHubОб этом скилле
Native game field reference
The fields and runtime rules behind native-game. Load native-game first for
the build, playtest and asset loop. The edit_native_game op description also
lists the op shapes for prefabs, the mixer, script params, input bindings, the
HUD tree, animation graphs, performance, spatial audio and collision layers.
Sections here say what the fields do and how they interact.
Schema versions
New 2D games start at schemaVersion: 4 with engineVersion: "3". Older 2D
documents use schema 1 or 2 with engine "1". Fonts, prepared assets, scene
music, lighting, backgrounds, gravity, visualAnimation and a render effect
chain need schema 2 or later. Tags, props and script params need schema 4.
Validation rejects these fields on an earlier schema. 2D schemaVersion: 5 with
engineVersion: "4" is reserved for Rapier 2D physics, which this runtime does
not provide: validation and sessions refuse it with engine_unavailable. Do not
author schema 5. A schema must use its own engine version. 3D games use
schemaVersion: 3 with engineVersion: "2".
Entity tags and properties
Both dimensions support optional tags and props on an entity. Use
update_entity with set: {tags: ["hero"], props: {health: 10}}. Each field
replaces its complete value. A top-level null removes the stored field.
Nested null is JSON data. Tags are unique, with at most 64 strings of
1–128 characters. Properties hold finite JSON, with at most 64 top-level keys,
16 levels of nesting and 64 KiB of UTF-8 JSON. Keys contain 1–128 characters.
__proto__, constructor and prototype are rejected at every nesting level.
Scripts read entity.tags, entity.props, entity.active and
entity.rotation, and the same fields on existing world entries and
world.get(id) results. world.query({tag}) returns the ids carrying a tag.
Rotation is radians in 2D and the committed world quaternion [x, y, z, w] in 3D.
Use setProp {key, value} and removeProp {key} to change the caller's
runtime properties. Setting null keeps that key. Removal deletes it. The
runtime checks every property command in a tick before it changes any state,
and an error names the entity and tick. The props of each entity that runs a
script count once toward the 64 KiB script input limit. Other entities' props
travel with the world only when a script reads input.world. Runtime properties survive snapshot restore and
remain independent of the authored document and other prefab instances.
Mutating an input object does not change runtime state.
2D scripts
A script behavior is a function expression, or an object of lifecycle hooks
(see Lifecycle hooks and timers). A function receives {tick, pressed, justPressed, events, entity, world, state, random} and returns {state, commands}. events are the previous tick's events. world lists every active
entity with a collider or camera as {id, source, x, y}. entity holds the
caller's id, source, position, velocity, and touching {down, up, left, right}, which names the sides of its collider that rest against a solid at the
start of the tick. A spawned instance has the id <prefab>#<n>, its source
is the prefab id, and it runs the prefab's script with its own state.
Functions, lifecycle hooks, and timer methods must be synchronous. Async functions and generators fail preparation. Returning a promise, thenable, or iterator fails the call. Use tick timers for delayed work.
Store persistent values in returned state. Nothing else carries over between
calls. A plain function expression such as (input) => { … } runs in strict
mode in a reused sandbox whose built-ins and global object are frozen, which
makes each call several times cheaper. Assigning to a global or a built-in
there throws, and the engine then repeats the call in a fresh context and keeps
that source in fresh contexts. Other sources, such as a function returned by an
initializer call, evaluate in a fresh context each call. Prefer plain function
expressions and keep helpers and temporary values in local variables.
Source initialization uses the seeded random generator. maxTickMs limits each
call, subject to the total script budget for the tick. Source and input/output
limits count UTF-8 bytes.
During a function call, global world.get(id) returns an entity or undefined,
and world.query({source?, tag?, near?, radius?, limit?}) returns matching IDs
in runtime entity order. Both read the same immutable tick-start snapshot,
before movement behaviors or script commands run. Returned values are private
copies. Queries cover every active entity. Legacy input.world keeps its
existing shape and population, including only collider or camera entities in 2D.
The engine serializes input.world only when a script reads it, with a 1 MiB
limit, so prefer world.get and world.query with near and radius.
The 2D query record is {id, source, x, y, velocityX, velocityY, grounded}.
The 3D record is `{
Установить native-game-reference в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл native-game-reference?
Field reference for native game documents: scripts, lifecycle hooks, events, tags and props, 2D visuals, particles, lighting, effects, 3D rendering, physics layers, audio mix, animation graphs, input bindings, HUD widgets, performance and editor panels. Load after native-game when an edit needs one of these fields.
Как установить скилл native-game-reference?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл native-game-reference запускает скрипты?
Нет, скилл состоит только из инструкций (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