# 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.

**Canonical URL:** https://skillshunter.net/skills/discovered-f174d003482b5cdddbbbaf011d34c2d93487a429ceaaa0b9

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-f174d003482b5cdddbbbaf011d34c2d93487a429ceaaa0b9

**Markdown URL:** https://skillshunter.net/skills/discovered-f174d003482b5cdddbbbaf011d34c2d93487a429ceaaa0b9.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-f174d003482b5cdddbbbaf011d34c2d93487a429ceaaa0b9/download

**Category:** Software & Development

**Source URL:** https://github.com/RomaRogov/scenoco-three/blob/660dca405f00ff718e0d9533e26646610d3f339e/skills/scenoco-game/SKILL.md

**Source commit:** 660dca405f00ff718e0d9533e26646610d3f339e

**Listing approved at:** 2026-11-30

**Created at:** 2026-11-29T10:51:26.000000Z

**Updated at:** 2026-11-30T06:51:23.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### 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 instructions

---
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.

