generate2dmap

Generate layered 2D game maps with props, collision metadata, and parallax stages.

Updated Sep 17, 2026
One-click install
npx skills add https://github.com/scomofo/midi-stage2 --skill generate2dmap-scomofo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: generate2dmap
Source: https://github.com/scomofo/midi-stage2/tree/main/.grok/skills/generate2dmap
Command: npx skills add https://github.com/scomofo/midi-stage2 --skill generate2dmap-scomofo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve? Building playable 2D game maps requires more than a single generated image: runtime objects, collision zones, spawn markers, and parallax layers must stay separate and editable. This Skill turns image generation into a structured map-production pipeline so browser games get real map art plus the metadata engines need. ## Core Features & Use Cases - Six map pipelines: tile maps, base-plus-props scenes, side-scroller parallax stages, rule-heavy grids, modular room chunks, and flat baked backgrounds, each with defined deliverables. - Prop production workflow: generate foundation-only base art, plan placement with an in-world reference mockup, then extract transparent props from magenta-backed sheets with extract_prop_pack.py. - Collision and scene metadata: emit placement JSON, blockers, walk bounds, zones, scene hooks, and camera bounds, then compose QA previews with compose_layered_preview.py. - Use Case: Ask for a Mega Man-style side-scroller stage and receive scenery-only parallax layers, separate platform and hazard sprites, collision data, spawn markers, and a composed stage preview ready for a canvas or Phaser runtime. ## Quick Start Generate a playable top-down RPG town map with separate props, collision zones, and a layered preview for my browser game.

Frequently Asked Questions about generate2dmap

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate a playable 2D game map with AI image generation?▼

Choose a map mode first, then generate a foundation-only base image with imagine_text_to_image, plan object placement with an in-world reference mockup, and produce separate props plus collision and placement metadata. A playable map is never a single baked image.

How to extract transparent props from a generated sprite sheet?▼

Generate the prop sheet on a solid #FF00FF magenta background, then run extract_prop_pack.py with the grid rows, columns, and labels. The script chroma-keys the background, isolates connected components, and writes per-prop PNGs plus a manifest.

What map mode should I use for a side-scroller or platformer stage?▼

Use side_scroll_mode for platformers, runners, brawlers, and Metroidvania rooms. It delivers scenery-only parallax layers on a shared stage_canvas, separate platform and hazard objects, collision data, scene hooks, and camera bounds.

Can I use this with Phaser, Godot, Unity, or Tiled?▼

Yes, engine_target supports raw_canvas, Phaser, Tiled JSON, LDtk, Godot TileMap, and Unity Tilemap. For this browser sandbox the default is raw_canvas or Phaser; engine-native exports are used only when explicitly requested.

Why must props stay out of the base map image?▼

Objects needing collision, y-sorting, interaction, reuse, or independent render order must remain separate runtime assets. Baking them into the base prevents editing and correct occlusion, so such images are regenerated or demoted to reference artifacts.

When should I use a prop pack versus one-by-one prop generation?▼

Use square prop packs only for four or more compact decorative props sharing one style. Wide platforms, tall buildings, gates, and collision-aligned objects must be generated one-by-one, as platform strips, or as custom wide packs.