Spaces:
Running

tiled-map-builder / CHANGELOG.md
4math's picture
Sync from GitHub 964d9e3
950662b verified
|
Raw History Blame Contribute Delete
10.6 kB
# Changelog
## 0.5.0
Everything is in English: theme keys, names and descriptions, sprite folders and example maps.
### Changed
- Ten theme keys were French and are now English: `GLACIAIRE` -> `GLACIER`, `INONDE` -> `FLOODED`,
`VOLCAN` -> `VOLCANO`, `FORET` -> `DARK_FOREST`, `HIVER` -> `WINTER`, `PRINTEMPS` -> `SPRING`,
`ETE` -> `SUMMER`, `AUTOMNE` -> `AUTUMN`, `FUTURISTE` -> `FUTURISTIC`, `ELECTRONIQUE` -> `ELECTRONIC`.
The MCP tools list only the English keys and answer an old key with its replacement
("Theme 'GLACIAIRE' was renamed 'GLACIER'"); `getTheme()` in the builder API and the web API
still accept the old keys.
- Every theme has an English display name and description (for example "Mournevald Crypt",
"Werewolf Den", "Frozen Tundra").
- Sprite folders, sprite ids and tileset names follow the new keys (`assets/glacier/`,
`assets/flooded/`, `assets/electronic/`, ...). A map saved before 0.5.0 with one of the renamed
themes points at the old folder: save it again, or rename the folder in its tileset paths.
- Example maps have English file names and contents: `water-cavern.tmj`, `ice-fortress.tmj`,
`hacker-lair.tmj` and `nemotron-crypt-example.tmj`.
### Added
- `npm test` runs every offline suite once; `npm run test:loop` runs them 5 times in a row.
- The smoke test loops over all 20 themes: English key, name and description, each layout preset
builds a map the player can walk with no warning, and a saved map finds its sprites.
## 0.4.1
Walking reachability: a map can load correctly and still not be explorable. Suggested in
feedback on the 0.4.0 announcement.
### Added
- `validate_map` and `validate_world` flood-fill the grid from the player spawn, following
transitions into linked maps, and warn about objects the player cannot reach on foot, floor
areas cut off from the rest, maps whose every way in is cut off, and arrival points walled in
with no way out. Walls, obstacle props, unpainted cells and buildings block; a transition must
be stepped on, other objects can be used from a side cell. See
[docs/map-format.md](docs/map-format.md#walking-reachability).
- `validate_map` warns about a spawn standing inside an obstacle prop.
- Smoke tests for a room cut in half by props, a fenced doorway whose links stay valid, and an
arrival point with no way out.
### Fixed
- `generate_castle_floor` (throne variant) and castle interiors put the castle lord on the throne
prop, where it could never move; it now stands in front of the throne.
- Example maps: the frozen fountains of `forteresse-glace-etage.tmj` blocked the only doorways of
its central hall, and overlapping walls sealed rooms of it and of `caverne-aquatique.tmj`. Both
scripts now build maps where every room can be walked to.
- The hosted-mode smoke test placed its house across a doorway, sealing a crypt chamber.
## 0.4.0
Large outdoor maps with buildings you can enter. Each building's interior is its own map,
linked both ways. See [docs/worlds-and-buildings.md](docs/worlds-and-buildings.md).
### Added
- `place_building`: puts a house, shop, tavern, temple, tower or castle on an outdoor map. It
creates the interior map, an `entrance` on the door, an `exit` inside, and an `arrival` spawn
on each side.
- `link_maps`: joins any two maps both ways with a door or stairs pair, for example castle floors.
- `validate_world`: checks that every link leads to a map of the session and to an arrival spawn
there, that every link has a way back, and that every map can be entered.
- `save_world`: writes every linked map into one folder under the file names its links use (one
`.zip` on the hosted server).
- `generate_building_sprite` (paid) and `scripts/gen-building-sprites.mjs`: FLUX building
sprites in `assets/buildings/`, fitted to their footprint.
- Transitions carry `targetMap`, a Tiled `file` property that opens the target map on
right-click, and `targetSpawn`. Spawns gain the `arrival` role.
- A Godot 4 loader for the transitions, in the new guide.
### Changed
- Maps go up to 256x256 cells (128x128 in hosted mode); `TILED_MAX_MAP_SIZE` changes the limit.
- Saved and exported maps write each tile layer's `data` on one line, so large maps stay small.
- The preview renderer draws large maps directly at reduced scale (a 256x256 map renders in about
a second) and draws building sprites, with placeholders when they are missing.
- `validate_map` accepts an arrival point instead of a player spawn, as on interiors.
- The castle preset is reusable: `generate_castle_floor` behaves as before.
- The web page's agent can place buildings: the preview shows the map the player starts on and
the `.zip` holds it with every linked interior. A **Village (enter buildings)** example shows it.
- Sample world `maps/crossroads-village/` (`scripts/create-village-world.mjs`, part of
`npm run examples`), with building sprites for all six types in `assets/buildings/`.
- The scripted sample maps are saved again in the compact format: same content, a quarter of the
size.
### Fixed
- Sprite generation failed with "We have not been able to find inference provider information"
because Replicate no longer serves FLUX.1-dev. By default the server now uses the first
provider Hugging Face lists as live for the model (fal-ai today) and sends the image size in
the form that provider reads. `TILED_HF_PROVIDER` still forces one, and a provider error now
names the providers that serve the model.
- Building sprites kept a translucent veil or grey specks when the provider did not paint a
clean magenta background. Generation now isolates the building from what remains around it
and refills enclosed see-through spots such as windows;
`node scripts/gen-building-sprites.mjs --clean` repairs existing sprites for free.
## 0.3.0
A hosted mode, published as a Hugging Face Space.
### Added
- Hosted mode (`npm run start:web`, `tiled-mcp/dist/http.js`), on one port:
- a web page where an open AI model on Hugging Face Inference Providers builds a map from a
description, with live progress, a PNG preview and a Tiled-ready `.zip`;
- every MCP tool over Streamable HTTP at `/mcp`, one isolated workspace per session;
- "Sign in with Hugging Face" when it runs on a Space.
Paid calls only ever use the caller's own token. See [docs/hugging-face.md](docs/hugging-face.md).
- `Dockerfile` and the `huggingface/` folder (Space card and publishing script).
- `npm run smoke:http`: offline end-to-end test of the hosted mode with a stand-in AI model.
- Map previews draw grey placeholder tiles where a theme has no sprite yet.
### Changed
- The preview renderer moved to `tiled-mcp/src/render.ts`, shared by `npm run preview` and the
web page. `npm run preview` now needs `npm run build` first.
- In hosted mode `save_to_disk` returns download links, and generated sprites stay in the
caller's session instead of the server's disk.
## 0.2.0
Usable by anyone from a fresh clone, with English documentation.
### Breaking
- **Object and spawn coordinates now follow Tiled's isometric convention**
(`x = col * tileheight`, `y = row * tileheight`). Objects are one-tile rectangles and spawns are
point objects at the tile centre, so everything opens on the right tiles in Tiled. The previous
encoding added a half-map origin offset that neither Tiled nor existing importers decoded
correctly. Importers that expect the older screen-space encoding can set
`TILED_OBJECT_COORDS=screen`. See [docs/map-format.md](docs/map-format.md#object-coordinates).
- Node.js 20.9 or newer is required (sharp 0.35).
- The server identifies itself as `tiled-map-builder`, and the package is `tiled-map-builder-mcp`.
- Layout presets enforce the sizes they need to avoid overlapping rooms: crypt 27x18, castle
27x20, werewolf den 22x16.
- Tool titles, descriptions and errors are in English.
- Three theme keys and their sprite folders were renamed to generic names: `CASTLE`
(`assets/castle`), `VILLAGE` (`assets/village`) and `HAUNTED_FOREST`
(`assets/haunted_forest`).
- The map properties holding the theme key and display name are now `theme` and `mapName`.
### Fixed
- The `map_builder` prompt loads `skills/map-builder/SKILL.md`, which is now in the repository.
- Sprite tools accept all 20 themes instead of 8.
- Default folders and the `.env` file are resolved inside the repository instead of the
author's machine.
- Example scripts import the server and write maps with repository-relative paths.
- `save_to_disk` writes sprite paths relative to the saved file, so maps open in Tiled with
their images; the sample maps were updated accordingly.
- The castle preset opens the wall under its locked main door.
- `paint_rect` and `paint_wall_border` reject rectangles outside the grid instead of painting
part of them.
- `generate_room` rejects an exit offset beyond the wall.
- Declared dependency ranges match the APIs used (MCP SDK 1.23+, zod 4, sharp 0.35); a fresh
install reports no known vulnerabilities.
### Added
- Placement checks: spawns, chests, traps, levers and zone stairs cannot go on a wall, outside
the ground, on an obstacle prop or on an occupied cell. `get_tile_info` reports occupants.
- `validate_map` warns about objects on walls or outside the ground and doors left inside a wall.
- `list_themes` reports which sprites are present.
- `generate_tile_sprite` no longer overwrites an existing sprite unless `force: true`.
- MCP tool annotations (read-only, destructive, idempotent, network).
- Configuration: `TILED_MAPS_DIR`, `TILED_OBJECT_COORDS`, `TILED_HF_PROVIDER`, automatic
`tiled-mcp/.env` loading.
- Scripts: `npm run smoke` (end-to-end checks), `npm run preview` (PNG renderer),
`npm run docs` (generated tool and theme references), `gen-theme-set.mjs` with
`--dry-run` and a required `--yes`.
- Documentation: client setup for seven clients and the MCP Inspector, tool reference, map format, themes,
configuration, sprite generation, Nemotron, troubleshooting, contributing. MIT `LICENSE` file.
- The map-builder skill rewritten in English for any user, keeping the original workflow and
design heuristics.
### Removed
- Superseded script drafts: the first aquatic script and glacier drafts 1 to 3 were removed, and
the versions that produced the sample maps (aquatic v2, glacier v4) became
`create-aquatic-map.mjs` and `create-glacier-map.mjs`.
- `gen-assets.mjs`, covered by `gen-theme-set.mjs`.
- The `upload_to_dungeon` tool and its environment variables. It only served one private web
app; save maps with `save_to_disk` instead.
## 0.1.0
Initial public version.