# Nightgrid: Build a Relay Outpost by Day, Hold It Through the Night

> Wire relay-outpost services into pipelines and keep reputation up through the nightly traffic surge, in one offline HTML file. Place sentries, balancers, handlers and stores on a dark board, link them back to the Uplink and route each kind of request to the right store. Every 60 seconds of daylight turns into a 30-second night that dims the board and raises the request rate; at dawn a card reports what held. Upkeep drains the budget, failures cost reputation, and losing all of it ends the run.

- Type: Lab Skill (downloadable Agent Skill)
- Category: [Game creation](https://www.sandbase.ai/skills/games)
- Version: 0.1.2
- Runs online: yes
- Page: https://www.sandbase.ai/skills/games/nightgrid

## What you get

Bring the theme, the service names and the look, and optionally the day/night timing, the survival numbers, the HUD layout and the UI text. The Skill returns a downloadable Skill (the survival-game project, a customize guide, headless verification) and one playable example run.

## Install

Download the Skill package from https://www.sandbase.ai/skills/games/nightgrid (sign-in required), unzip it into your agent's skills folder, then ask your agent to use it:

```text
/nightgrid make a survival game where <your player> builds <your network> by day and holds it against <your nightly threat>
```

## How it works

1. **Theme the outpost** Nightgrid starts from a prompt such as 'Use nightgrid to make a survival game where a lighthouse keeper builds a signal network by day and holds it against a nightly storm.' node <skill>/scripts/new-project.mjs --out my-outpost copies the game. npm ci downloads pinned Vite, three.js and playwright-core from the public npm registry; no keys are needed.
2. **Wire services through the night** Players place a Sentry, Balancer, Handler and Vault or Depot chain, link it back to the Uplink and press play. Each 60 seconds of day gives way to 30 seconds of night, when the board dims and spawn rate swells, and a dawn card reports held and lost requests. references/customize.md covers palette, service ids, survival numbers, the cycle, HUD and audio.
3. **Build and deliver one file** npm run build:single writes dist-single/index.html, about 1.0 MiB with everything inlined, and it opens with a double-click. npm run shoot needs local Chrome and writes shots/*.jpg and shots/report.json. Release 0.1.2 passed eight checks: menu, start, a placed and linked pipeline, the invented names, nightfall, the surge and dawn, in English and Chinese.

## FAQ

### What kind of game is Nightgrid?

Nightgrid is a network-topology survival game in WebGL. You out-build a rising request rate by placing relay services and linking them from the Uplink, then hold reputation through each night surge. Budget drains on upkeep, failures cost reputation and a SYSTEM FAILURE card ends the run.

### Does the Nightgrid night change gameplay?

Yes. Nightgrid raises the spawn rate through the night with nightSpawnMultiplier() and dims the board with nightDarkness(). Both read the same nightPhase(), so the look and the rules can never disagree. The cycle only runs in survival mode.

### Is Nightgrid a real network simulator?

No. Nightgrid simulates a bounded request queue graph of services, links, queues and breakers, not packets. There is no TCP, DNS or bandwidth realism beyond capacity numbers, and a request no service can take counts as a failure.

### Does Nightgrid need an API key or paid calls?

No. Nightgrid runs entirely in the built HTML file with a WebAudio synth that starts on the first gesture, and it makes no network or model call, so playing it bills nothing. SwiftShader can run it without a GPU, only slower.

### Where are the Nightgrid licences?

Nightgrid includes MIT-licensed code. Its licences are embedded as an HTML comment at the top of the built file, and that comment must never be stripped. The full licence and copyright notices also ship in assets/nightgrid/LICENSE.

### Does Nightgrid support Chinese?

Yes. Nightgrid switches the whole UI to Simplified Chinese with ?lang=zh-CN, and the system font stack covers both languages without bundling a font. English and Chinese are the only shipped locales.

## Examples

- Nightgrid survival game (scene)
- First Watch (video)
