# Dark Sector: A Top-Down Shooter Lit Only by Your Lamp

> Fight through a facility with the power out, in one offline HTML file: you see only what light touches, from your lamp, your bolts, blasts and the power cells you wake. Wake every cell on a floor to call the lift; crawlers charge, gun drones hold range and fire back. Four seeded floors, health pips, score and a par-time bonus, with twin-stick touch on a phone. Every sprite and sound is drawn or synthesised in code.

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

## What you get

Bring the setting and the story text, and optionally the floors, the enemies, the light and the numbers. The Skill returns a downloadable Skill (the shooter project, a customize guide, headless verification) and one playable example run.

## Install

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

```text
/dark-sector make a top-down shooter set in <your dark place>, where the player has to <your objective>
```

## How it works

1. **Copy the Lights Out game** Dark Sector starts with node scripts/new-project.mjs --out my-sector and npm ci on Node 22.4 or newer. The simulation is plain JavaScript in src/sim.js and src/gen.js with no DOM, so Node can drive it in tests. Drawing and lighting live in src/draw.js, every number in src/cfg.js, sound in src/audio.js and the HUD in src/hud.js. Nothing calls a model.
2. **Edit floors, enemies and light** Your coding agent reads references/customize.md, which maps requests such as make it brighter, a third enemy, more floors or a new title to files and symbols. The boot card text is CARD.bootLines in src/cfg.js, and LIGHT.ambient sets how dark the map stays. Added images, sounds or fonts must be CC0 or your own and listed in assets/blackout/CREDITS.json.
3. **Build and pass every shoot step** npm run build:single writes dist-single/index.html, at most 8 MiB with no network, storage, workers or WebAssembly. npm run shoot needs local Chrome and drives the game through window.__scene.act: boot, moving, the darkness check, firing, a kill, waking a cell, a floor clear, death, retry and extraction, plus a phone run. Update verify.json when you change what it asserts.

## FAQ

### What is the goal in Dark Sector?

Dark Sector puts you in a powerless facility as a spare unit and asks you to wake every blue-flickering cell pedestal on a floor. When all cells glow teal, the lift beacon turns amber, and reaching it clears the floor. A run has four seeded floors, and dying costs the floor, not the run.

### What enemies are in Dark Sector?

Dark Sector has two enemy behaviours. Mites are small crawlers with glowing red eyes that charge when you get close. Wards are boxy gun drones that hold at range and fire back. You fire orange bolts that light the corridor they fly through.

### Can Dark Sector stay dimly visible instead of dark?

Yes. Dark Sector lets you raise LIGHT.ambient in src/cfg.js. The darkness verify step asserts the contrast between dark and lit areas, so adjust it together with the light level.

### Does Dark Sector keep high scores?

Only for the session. Dark Sector keeps the best score in src/runtime/store.js while the page is open, because the sandbox CSP forbids storage. A permanent leaderboard is not possible inside the sandbox.

### Does Dark Sector need a key or a GPU?

Dark Sector needs no key and calls no model or paid service, so playing it is free. It draws with 2D canvas only, so no WebGL is required. npm ci downloads pinned packages from the public npm registry.

### What are the limits of Dark Sector?

Dark Sector uses a 6 by 4 unit collision box against the tile grid, not sprite outlines. Lighting is a 16-light pool per frame, so more light sources need their own budget. There is no gamepad support, and floors are solvable by construction but not hand-designed set pieces.

## Examples

- Dark Sector top-down shooter (scene)
- Facility 7 (video)
