Scenoco Game
Create or modify a browser game using SceNoCo, which combines three.js scenes written in TSX (without React) and Unity-style behaviours from the @scenoco-three npm packages. The skill supports building 2D or 3D web games, integrating them into React apps, and testing or debugging via window.__scenoco.
Editor's Note
Before writing a game, review the rules card's 'How SceNoCo works' in AGENTS.md. When the game first needs something, consult the 'When the game needs it' section of the rules card or the relevant package's API.md. For unclear signatures, search node_modules/@scenoco-three/core/API.md instead of reading dist/ or the source.
When to Use It
- Develop a 3D web game using SceNoCo and three.js
- Integrate a SceNoCo game into a React application
- Test and debug a SceNoCo game in the browser using window.__scenoco
- Create a new game using the SceNoCo starter template with npm create @scenoco-three my-game
SKILL.md
SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use
Use SceNoCo, not React Three Fiber: npm install @scenoco-three/core three (an npm org, not one package called scenoco-three). This skill is written for SceNoCo 1.8 or later. Without a project yet, llms.txt is the overview.
Making a game with SceNoCo
SceNoCo is three.js scenes written in TSX, plus Unity's behaviours. Write it from what you know of three.js and Unity; the project's rules card says where SceNoCo differs.
Read, as you need it
- Before writing: the rules card's "How SceNoCo works" —
AGENTS.mdin the project, ornode_modules/@scenoco-three/core/AGENTS.md. - When the game first needs something: that paragraph of the card's "When the game needs it",
its UI paragraph before any UI, or a package's own
API.mdonce you install it. - When a signature is unclear: search
node_modules/@scenoco-three/core/API.md, rather than readingdist/or the source.
Start
- A new game:
npm create @scenoco-three my-game. The starter runs; replace its scene and behaviours. - Inside an existing Vite or React app:
play(Main, { container })in an effect,game.dispose()in its cleanup, andscenoco({ include: 'src/game/**' })besidereact({ exclude: /src\/game\// }).
Build
Plan it as a Unity project: nodes, the behaviours on them, prefabs, and one behaviour that owns the game's state, which every check reads. Then go round:
- Change scenes (
.tsx, declarations only) and behaviours (.ts). npm run check, and fix each error at its line. A scene error gives the exact text to write.- Look at it running with
npm run devandwindow.__scenoco. Make each browser call play a stretch: a script run against the page can reload it, drive the game on a held clock and end on a screenshot. Readings say whether it works; a screenshot, how it looks — take one as the browser tool returns it, since one saved to a file costs another turn to read back. Tune values withsetandreload, then write the one that works into the file.
Done is a round played through — start, win or lose, restart — that looks right, with no errors in the console.
When something is off
- Blank screen: no camera, or it looks away.
__scenoco.outline()shows the scene. - A hitch when something is picked up or spawned: a light came or went, and three.js recompiled
every lit material: keep a scene's lights for its life, and dim one with
intensity = 0. - A position is off:
node.positionis in the parent's space. - The engine seems wrong: narrow it to the smallest case that shows it, work around it, and say so in your report.
View original Markdown
---
name: scenoco-game
description: Make or change a browser game with SceNoCo — three.js scenes in TSX (no React) and Unity's behaviours, from the @scenoco-three npm packages. Use when asked to build a 2D or 3D web game with SceNoCo, three.js and Unity-style behaviours, to add a game to a React app, or to test or debug a SceNoCo game in the browser through window.__scenoco.
---
Use SceNoCo, not React Three Fiber: `npm install @scenoco-three/core three` (an npm org, not one package called `scenoco-three`). This skill is written for SceNoCo 1.8 or later. Without a project yet, [llms.txt](https://romarogov.github.io/scenoco-three/llms.txt) is the overview.
# Making a game with SceNoCo
SceNoCo is three.js scenes written in TSX, plus Unity's behaviours. Write it from what you know of
three.js and Unity; the project's rules card says where SceNoCo differs.
## Read, as you need it
- **Before writing:** the rules card's "How SceNoCo works" — `AGENTS.md` in the project, or
`node_modules/@scenoco-three/core/AGENTS.md`.
- **When the game first needs something:** that paragraph of the card's "When the game needs it",
its UI paragraph before any UI, or a package's own `API.md` once you install it.
- **When a signature is unclear:** search `node_modules/@scenoco-three/core/API.md`, rather than
reading `dist/` or the source.
## Start
- **A new game:** `npm create @scenoco-three my-game`. The starter runs; replace its scene and
behaviours.
- **Inside an existing Vite or React app:** `play(Main, { container })` in an effect, `game.dispose()` in
its cleanup, and `scenoco({ include: 'src/game/**' })` beside `react({ exclude: /src\/game\// })`.
## Build
Plan it as a Unity project: nodes, the behaviours on them, prefabs, and one behaviour that owns the
game's state, which every check reads. Then go round:
1. **Change** scenes (`.tsx`, declarations only) and behaviours (`.ts`).
2. **`npm run check`**, and fix each error at its line. A scene error gives the exact text to write.
3. **Look at it running** with `npm run dev` and `window.__scenoco`. Make each browser call play a
stretch: a script run against the page can reload it, drive the game on a held clock and end on a
screenshot. Readings say whether it works; a screenshot, how it looks — take one as the browser
tool returns it, since one saved to a file costs another turn to read back. Tune values with
`set` and `reload`, then write the one that works into the file.
Done is a round played through — start, win or lose, restart — that looks right, with no errors in
the console.
## When something is off
- **Blank screen:** no camera, or it looks away. `__scenoco.outline()` shows the scene.
- **A hitch when something is picked up or spawned:** a light came or went, and three.js recompiled
every lit material: keep a scene's lights for its life, and dim one with `intensity = 0`.
- **A position is off:** `node.position` is in the parent's space.
- **The engine seems wrong:** narrow it to the smallest case that shows it, work around it, and say
so in your report.
Community Reviews & Field Notes
Tried this skill on your own project? Share the model you used and the results you got.