ascii-city-engine
Build portable, first-person colored ASCII city engines and small GIS-derived city packs. Use when designing terrain-following walking, raycast character rendering, city-provider schemas, or reproducible public-GIS ingestion. Do not use for conventional 3D/WebGL games, multi-leve
Install
npx skills add https://github.com/magnus919/agent-skills/tree/main/ascii-city-engine
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install magnus919-agent-skills@llmmart
git clone https://github.com/magnus919/agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole magnus919/agent-skills collection as a plugin from our marketplace. Git is the plain clone.
README
ASCII City Engine
Why Install This Skill
Turn public elevation, building, and street data into a portable, first-person colored-ASCII city without re-deriving coordinate, collision, and provenance rules. The skill keeps the renderer city-neutral and city packs interchangeable.
What You Get
- A heightfield and solid-footprint engine architecture.
- JSON Schemas for manifests and world tiles.
- A deterministic offline city-pack validator.
- A pure browser, single-file Canvas 2D reference engine.
- A small redistributable downtown Raleigh sample with real public footprints.
- Reproducible GIS ingestion and Raleigh walkthrough references.
Quick Start
python3 scripts/validate-city-pack.py assets/raleigh-downtown-sample
python3 -m http.server 8000
Then open http://localhost:8000/assets/ascii-city-engine.html. The scaffold reads assets/raleigh-downtown-sample/manifest.json for the spawn point and first world tile; use W/S or arrow keys to move and A/D or left/right arrows to turn. The sample is dense: named-street signs, traffic signals, crosswalks, trees, and transit stops all render from real recorded data, and the HUD names the street you are standing on and the building you are facing.
Triggers
Load this skill for requests to build a colored ASCII city renderer, create a terrain-following first-person walker, define a pluggable city pack, ingest public GIS into the provided contract, or reproduce the Raleigh proof of concept.
Do not load it for ordinary GIS analysis, WebGL/3D engines, multi-level interiors or tunnels, gameplay systems, or requests to commit full-resolution GIS archives.
Requirements
- Python 3 standard library for validation and conversion examples.
- A current desktop browser with Canvas 2D and
fetchsupport. - Network access only while acquiring full-resolution public GIS data; validation and the committed sample run offline.
- Source licenses that permit redistribution, with attribution and retrieval metadata.
Skill manifest
ASCII City Engine
Build a portable city experience in three layers: an engine, a city-provider contract, and a city pack. Keep city-specific facts out of engine code.
Workflow
- Define the pack boundary and local meter-based CRS.
- Acquire elevation, building, and road/path data from public sources.
- Verify downloads, licenses, units, and provenance before conversion.
- Reproject all geometry to local meters and emit the manifest plus world tiles.
- Validate the pack offline:
python3 scripts/validate-city-pack.py path/to/city-pack - Load the pack's first tile in
assets/ascii-city-engine.htmland test movement, grade following, and solid footprints. - Record data limitations and human acceptance evidence.
Required invariants
- Compute
feet_zfrom terrain andeye_zfrom feet plus eye height. - Reject null terrain, over-steep steps, and movement touching a solid footprint.
- Use deterministic building colors and clear missed rays every frame.
- Treat v1 as one ground height per
(x, y)column; reserve, but do not implement, a surface graph. - Keep the engine independent of any city, vendor, agent harness, or private infrastructure.
- Do not commit large or full-resolution source data. Commit only a small redistributable sample; document acquisition for the rest.
Reference routing
- Read references/engine-architecture.md for world math, rendering, collisions, and the scaffold contract.
- Read references/city-provider-contract.md when creating or validating a provider.
- Read references/gis-ingestion.md before downloading or converting GIS sources.
- Read references/raleigh-poc.md for the reproducible Raleigh proof of concept.
- Use templates/city-pack-manifest.schema.json and templates/world.schema.json as authoritative data contracts.
Available Scripts
This skill bundles one script; there are no others to discover.
| Script | Purpose | Invocation |
|---|---|---|
scripts/validate-city-pack.py |
Offline validator for a city pack: checks the manifest against the schema contract and verifies world tiles. Run it at workflow step 5, after emitting the manifest and tiles and before loading anything in the engine — do not proceed to in-engine testing until it passes. | python3 scripts/validate-city-pack.py path/to/city-pack |
Prerequisites
- Python 3 with standard library only; the validator requires no third-party packages.
- A city pack produced through the ingestion workflow: manifest plus world tiles reprojected to local meters (see references/gis-ingestion.md).
- The engine itself is a standalone HTML file (
assets/ascii-city-engine.html) that runs in any modern browser; no build step or server is required.
Limitations
- v1 supports one ground height per
(x, y)column: no interiors, bridges with traversable space below, tunnels, or multi-level geometry (a surface graph is reserved but not implemented). - The engine is software-rendered CPU canvas — no WebGL/GPU rendering or mobile controls.
- The skill does not include full-resolution GIS archives; packs are built reproducibly from public sources, committing only small redistributable samples.
- The validator is offline and structural: passing it does not substitute for human movement testing in the engine (workflow step 6).
Boundaries
Use a different skill or implementation approach for WebGL/GPU rendering, mobile controls, combat, interiors, bridges with traversable space below, tunnels, or general-purpose geospatial analysis. If asked to specialize this skill for one agent runtime, preserve the portable core and put runtime integration outside this skill. If asked to commit large GIS binaries, refuse and provide reproducible download/conversion commands instead.
Files (agent-skills)
-
assets
-
deliberately-broken-pack
-
manifest.json 280 B
Loading… -
README.md 325 B
Loading…
-
-
raleigh-downtown-sample
-
world
-
tile-0.json 497.3 KB
Loading…
-
-
manifest.json 1.8 KB
Loading…
-
-
ascii-city-engine.html 15.7 KB · in bundle
-
-
evals
-
evals.json 8.1 KB
Loading…
-
-
references
-
city-provider-contract.md 3.4 KB
Loading… -
engine-architecture.md 6.3 KB
Loading… -
gis-ingestion.md 5.6 KB
Loading… -
raleigh-poc.md 8.6 KB
Loading…
-
-
scripts
-
validate-city-pack.py 15.3 KB
Loading…
-
-
templates
-
city-pack-manifest.schema.json 1.7 KB
Loading… -
world.schema.json 3.4 KB
Loading…
-
-
README.md 2 KB
# ASCII City Engine ## Why Install This Skill Turn public elevation, building, and street data into a portable, first-person colored-ASCII city without re-deriving coordinate, collision, and provenance rules. The skill keeps the renderer city-neutral and city packs interchangeable. ## What You Get - A heightfield and solid-footprint engine architecture. - JSON Schemas for manifests and world tiles. - A deterministic offline city-pack validator. - A pure browser, single-file Canvas 2D reference engine. - A small redistributable downtown Raleigh sample with real public footprints. - Reproducible GIS ingestion and Raleigh walkthrough references. ## Quick Start ```sh python3 scripts/validate-city-pack.py assets/raleigh-downtown-sample python3 -m http.server 8000 ``` Then open `http://localhost:8000/assets/ascii-city-engine.html`. The scaffold reads `assets/raleigh-downtown-sample/manifest.json` for the spawn point and first world tile; use W/S or arrow keys to move and A/D or left/right arrows to turn. The sample is dense: named-street signs, traffic signals, crosswalks, trees, and transit stops all render from real recorded data, and the HUD names the street you are standing on and the building you are facing. ## Triggers Load this skill for requests to build a colored ASCII city renderer, create a terrain-following first-person walker, define a pluggable city pack, ingest public GIS into the provided contract, or reproduce the Raleigh proof of concept. Do not load it for ordinary GIS analysis, WebGL/3D engines, multi-level interiors or tunnels, gameplay systems, or requests to commit full-resolution GIS archives. ## Requirements - Python 3 standard library for validation and conversion examples. - A current desktop browser with Canvas 2D and `fetch` support. - Network access only while acquiring full-resolution public GIS data; validation and the committed sample run offline. - Source licenses that permit redistribution, with attribution and retrieval metadata. -
SKILL.md 4.3 KB
--- name: ascii-city-engine description: Build portable, first-person colored ASCII city engines and small GIS-derived city packs. Use when designing terrain-following walking, raycast character rendering, city-provider schemas, or reproducible public-GIS ingestion. Do not use for conventional 3D/WebGL games, multi-level interiors, general GIS analysis, or committing full-resolution GIS archives. --- # ASCII City Engine Build a portable city experience in three layers: an engine, a city-provider contract, and a city pack. Keep city-specific facts out of engine code. ## Workflow 1. Define the pack boundary and local meter-based CRS. 2. Acquire elevation, building, and road/path data from public sources. 3. Verify downloads, licenses, units, and provenance before conversion. 4. Reproject all geometry to local meters and emit the manifest plus world tiles. 5. Validate the pack offline: ```sh python3 scripts/validate-city-pack.py path/to/city-pack ``` 6. Load the pack's first tile in `assets/ascii-city-engine.html` and test movement, grade following, and solid footprints. 7. Record data limitations and human acceptance evidence. ## Required invariants - Compute `feet_z` from terrain and `eye_z` from feet plus eye height. - Reject null terrain, over-steep steps, and movement touching a solid footprint. - Use deterministic building colors and clear missed rays every frame. - Treat v1 as one ground height per `(x, y)` column; reserve, but do not implement, a surface graph. - Keep the engine independent of any city, vendor, agent harness, or private infrastructure. - Do not commit large or full-resolution source data. Commit only a small redistributable sample; document acquisition for the rest. ## Reference routing - Read [references/engine-architecture.md](references/engine-architecture.md) for world math, rendering, collisions, and the scaffold contract. - Read [references/city-provider-contract.md](references/city-provider-contract.md) when creating or validating a provider. - Read [references/gis-ingestion.md](references/gis-ingestion.md) before downloading or converting GIS sources. - Read [references/raleigh-poc.md](references/raleigh-poc.md) for the reproducible Raleigh proof of concept. - Use [templates/city-pack-manifest.schema.json](templates/city-pack-manifest.schema.json) and [templates/world.schema.json](templates/world.schema.json) as authoritative data contracts. ## Available Scripts This skill bundles one script; there are no others to discover. | Script | Purpose | Invocation | |---|---|---| | `scripts/validate-city-pack.py` | Offline validator for a city pack: checks the manifest against the schema contract and verifies world tiles. Run it at workflow step 5, after emitting the manifest and tiles and before loading anything in the engine — do not proceed to in-engine testing until it passes. | `python3 scripts/validate-city-pack.py path/to/city-pack` | ## Prerequisites - Python 3 with standard library only; the validator requires no third-party packages. - A city pack produced through the ingestion workflow: manifest plus world tiles reprojected to local meters (see [references/gis-ingestion.md](references/gis-ingestion.md)). - The engine itself is a standalone HTML file (`assets/ascii-city-engine.html`) that runs in any modern browser; no build step or server is required. ## Limitations - v1 supports one ground height per `(x, y)` column: no interiors, bridges with traversable space below, tunnels, or multi-level geometry (a surface graph is reserved but not implemented). - The engine is software-rendered CPU canvas — no WebGL/GPU rendering or mobile controls. - The skill does not include full-resolution GIS archives; packs are built reproducibly from public sources, committing only small redistributable samples. - The validator is offline and structural: passing it does not substitute for human movement testing in the engine (workflow step 6). ## Boundaries Use a different skill or implementation approach for WebGL/GPU rendering, mobile controls, combat, interiors, bridges with traversable space below, tunnels, or general-purpose geospatial analysis. If asked to specialize this skill for one agent runtime, preserve the portable core and put runtime integration outside this skill. If asked to commit large GIS binaries, refuse and provide reproducible download/conversion commands instead.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.