18-engine.md границы Tile2D, проекции 2D, формат проекта, второй проект 19-agent.md инструменты --tool, скиллы, терминал в редакторе 20-gdd.md акты, петли, рост отряда, закон масштаба, бюджет 200 часов 21-damage.md семь стихий, статусы, десять реакций, формулы, триггеры 22-loot.md редкости, аффиксы, артефакты, зачарования, материалы 23-endgame.md Бездна, мутации, лидерборды, 262 ачивки Плюс правки 01/02/07/15/16/17 под переехавшие пути и новые правила забега. Дизайнерская часть держится на одном законе: угроза растёт квадратично, сила отряда — линейно с затуханием, разрыв закрывается ЗНАНИЕМ, а не числами. Из него выведены и экономика опыта (41 млн против 44 млн дохода), и то, почему реакции считаются от глубины, а не от урона оружия, и почему в Бездне множитель HP разрешён, а во всём авторском контенте запрещён. .claude/commands: скиллы /tile2d, /room, /floor — правила этого движка, которые нельзя вывести из кода. Главное записано первым: не отчитываться об успехе без прохода --tool validate. Числа в этих документах — вход для инструментов, а не украшение. Расхождение между таблицей и выводом инструмента означает, что неправ документ. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
51 lines
2.7 KiB
Markdown
51 lines
2.7 KiB
Markdown
# Work on a Tile2D project
|
|
|
|
Request: `$ARGUMENTS`
|
|
|
|
Tile2D is the engine (`engine/`); a game is a project (`projects/<name>/`). The editor
|
|
(`tile2d_editor`) belongs to the engine and opens any project. Read `docs/18-engine.md`
|
|
before touching engine code, `docs/15-engine-and-editor.md` for the editor and room format.
|
|
|
|
## The loop
|
|
|
|
Content is plain text in git — rooms, entity catalog, project manifest. Edit the files
|
|
directly. What you cannot get from reading files is **consequences**: whether the room
|
|
assembles into a floor, whether a spawn point is reachable, whether the floor spends its
|
|
danger budget. That is what the tools are for.
|
|
|
|
```bash
|
|
tile2d_editor --tool help # every tool, with arguments
|
|
tile2d_editor --tool project # manifest, paths, difficulty curve
|
|
tile2d_editor --tool rooms # the set, with problems flagged
|
|
tile2d_editor --tool ascii <room> # room grid as text
|
|
tile2d_editor --tool floor <depth> [seed] # assemble a floor, report the numbers
|
|
tile2d_editor --tool map <depth> [seed] # that floor as an ASCII map
|
|
tile2d_editor --tool curve <from> <to> # what depth means, per floor
|
|
tile2d_editor --tool validate # whole set: exit code 1 means broken
|
|
```
|
|
|
|
Every tool takes `--project <name>`; inside the editor terminal `TILE2D_PROJECT` is already
|
|
set, so the bare command targets the open project.
|
|
|
|
## Rules that are easy to break here
|
|
|
|
1. **Never report success without `--tool validate` passing.** Exit code 1 means broken.
|
|
A room that looks right in a diff can still seal a pocket off from its own door.
|
|
2. **Verify through text, never by opening generated PNG/SFA** (see CLAUDE.md). Floor
|
|
layout is `--tool map`; a screenshot is `squad_proto --clean --shot`.
|
|
3. **Entity ids are the game's border, not the engine's.** The engine places any id from
|
|
the project catalog; `squad_proto` only turns into a creature the ids listed in
|
|
`src/sim/spawn_catalog.cpp`. A new id needs a row there too, or the floor spawns nothing.
|
|
4. **On-screen text is Latin.** raylib's built-in font has no Cyrillic and draws it as
|
|
question marks. Console output and comments stay Russian.
|
|
5. **Acceptance is measured in the sandbox.** `--accept` and `--headless` never load a
|
|
project. Do not wire content into them.
|
|
6. **The editor links only against the engine.** Anything in `editor/` reaching into
|
|
`sim/`, `ai/` or `ui/` is a build error, and that is deliberate.
|
|
|
|
## Report
|
|
|
|
State what you changed, paste the numbers that prove it (`validate`, `floor`, `curve`), and
|
|
name anything you left broken. If a check fails and you could not fix it, say so — do not
|
|
describe the intended state as if it were the measured one.
|