# Generate2dmap

Plan and build 2D game maps and scenes - top-down and side-scrolling levels, tilemaps...

- Repository: https://github.com/0x0funky/agent-sprite-forge (4834 stars)
- Category: Design
- License: MIT
- Last updated: 2026-10-06
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -g -a claude-code -y`
Codex: `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -g -a codex -y`
Cursor: `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -g -a cursor -y`
Gemini CLI: `npx skills add 0x0funky/agent-sprite-forge --skill generate2dmap -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add 0x0funky/agent-sprite-forge`

## Description

Plan and build 2D game maps and scenes - top-down and side-scrolling levels, tilemaps, prop packs, parallax backgrounds and HD-2D battle or story plates - with collision, navigation and reachability checks, environment motion, a playable HTML preview and export to Tiled, Godot 4 or LDtk. Map art (terrain, tiles, props, plates, parallax layers) is image generation by default, through generate2dmedia route_media.py (the API when a key is configured, else the local Codex or Grok CLI); map data (layout, collision, exits, spawns) is written as data. Use for any map, level, room, scene, background, terrain or prop-kit request. Not for characters, creatures, items or FX (generate2dsprite), character animation (video2dsprite), code-drawn tiles or maps (codeart2d, only on request) or calling an image or video API by itself (generate2dmedia).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Generate 2D Map

Build the smallest scene bundle the request needs, in the game's art, camera, renderer and data conventions.
A background picture needs no game system; a playable map needs explicit geometry and data beyond a painting.

## Use when

- A playable map, level, room set, tilemap, terrain or prop kit, with collision and exits.
- A parallax background, a battle, title or story backdrop, or an HD-2D plate with lights and motion.
- Map data must be validated, previewed or exported to Tiled, Godot or LDtk.

## Do not use when

- Actors, items and attack FX: [generate2dsprite](../generate2dsprite/SKILL.md). Character motion from video: [video2dsprite](../video2dsprite/SKILL.md).
- Code-drawn tiles, layouts or parallax the user asked for: [codeart2d](../codeart2d/SKILL.md). Only an API or CLI call: [generate2dmedia](../generate2dmedia/SKILL.md).

## Capability check (once per session)

Run `python "<skill-dir>/../generate2dmedia/scripts/forge_doctor.py" --host-tools <tools> --save <output>/doctor.json`, where `<tools>` lists the media tools in your own tool list (`image_gen`, `image_edit`, `image_to_video`) or `none`. Its `ROUTES` block shows which API keys are configured (yes or no), the local readiness and the resolved order. If `encoding.stdout` fails, set `PYTHONUTF8=1`.

## Art source

Image generation is the default for map art: terrain and tile sheets, prop kits, HD-2D plates, painted backgrounds and parallax layers. Map data (layout, collision, exits, spawns) is data you write and validate, not art. Record each asset's `art_source` (`api`, `host_image`, `existing`, or `code` only on request) and name the route in your reply. A route the user names explicitly wins.

The rest: https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/skills/generate2dmap/SKILL.md
