# Step 2B Object-Free Tileset And Map Composition Guide

## Purpose

Step 2B converts the approved Step 1 map design into a production-ready, object-free Godot map pack. It should solve terrain, paths, collision, navigation, zones, spawns, exits, camera limits, and tile composition only.

Do not generate final props, pickups, houses, trees, signs, chests, cliffs, gates, walls, landmarks, foreground occluders, or interactable sprites in Step 2B. Those belong to Step 2A and are added one at a time after the map-only Godot scene works.

The result of Step 2B should let Step 3 build a playable empty map in Godot: ground, paths, readable blocked edges, collision, navigation, zones, safe/no-spawn regions, exits, and map-scale visual quality. The map may include reserved object slots, but no final object art.

## Why This Is The Default

Godot's 2D map workflow supports separation cleanly:

- `TileMapLayer` is one tile layer backed by a `TileSet`; use several layers for a full map.
- `CanvasItem`/`Node2D` Y-sort is for later object/player draw ordering, so objects should not be baked into terrain.
- `Area2D` is the right primitive for later pickups, triggers, exits, readable signs, doors, and object interaction regions.

A flat painted map with objects embedded in it fights collision, Y-sort, interaction, occlusion, reuse, and object-by-object QA. Step 2B must keep the terrain map clean so Step 2A objects can be placed and tested independently.

## Required Pack Structure

```text
map-pack/
  README.md
  map_design_page.png
  preview/
    ground_only_map.png
    clean_map_reference.png
    object_free_runtime_preview.png
    navigation_overlay.png
    zone_overlay.png
    collision_overlay.png
    spawn_overlay.png
    exit_overlay.png
    object_slot_overlay.png
    scale_reference.png
  tiles/
    individual/
      grass_base_01.png
      grass_base_02.png
      dirt_path_01.png
      grass_to_dirt_edge_n.png
      grass_to_dirt_corner_ne.png
    ground_tiles.png
    detail_tiles.png
    transition_tiles.png
    obstacle_or_boundary_tiles.png
    tile_source_manifest.json
    tileset_atlas.json
    terrain_rules.json
    previews/
      grass_5x5_repeat_preview.png
      dirt_5x5_repeat_preview.png
      transition_sample_preview.png
  metadata/
    map.json
    tile_layers.json
    collisions.json
    navigation.json
    zones.json
    spawn_tables.json
    exits.json
    object_slots.json
    visual_tests.json
    import_plan.md
  validation-report.md
```

Do not include production `props/`, `sprites/`, `objects/object_catalog.json`, `prop_atlas.json`, or `pickup_atlas.json` in Step 2B. If a generated tool insists on including object art, the Step 2B verdict must be `production_ready: false` until those objects are removed or moved to Step 2A review.

## Step 2B Inputs

Use only the approved Step 1 map design and object inventory.

Step 2B should read object information only to reserve future placement slots and keep terrain clear around them. It should not attempt to make final object sprites or object atlases.

Required Step 1 inputs:

- approved map/chunk scope
- declared map pixel size, tile size, grid size, and viewport
- object-free or ground/background intent
- main route and optional routes
- blocked-edge language
- collision rules for terrain and boundaries
- zone boundaries
- spawn/no-spawn intent
- exit/connection notes
- object inventory and approximate future placement footprints
- visual style, palette, and terrain/material examples

## Tile Requirements

- Base tile size defaults to 64x64 unless Step 1 declares otherwise.
- Important base terrain and transition cells must exist as individual source PNGs under `tiles/individual/` before sheets are assembled.
- Individual source tiles must be authored as reusable cells, not cropped from a full map mockup, object container, labeled design page, or screenshot.
- Tiles must contain no labels, arrows, UI borders, contact-sheet cell borders, crop handles, neighboring-cell leftovers, fake checkerboards, or debug guide colors.
- Base terrain must include enough variants to avoid obvious repetition.
- Transition tiles must cover the terrain boundaries that appear in Step 1: edges, outer corners, inner corners, path caps, T-junctions, crossroads, stairs/ramps, bridges, cliff/wall edges, or theme-specific transitions.
- Base terrain must include 3x3 or 5x5 repeat previews.
- Transitions must include sample previews proving edge/corner/junction alignment.
- Blocking boundary tiles should be visually readable as blocked terrain, not invisible walls.
- Detail tiles must be non-blocking unless metadata declares otherwise.

## High-Fidelity Tile Art Contract

Ask for oversampled source art by default. If the final Godot tile is 64x64, the generator should create or author the tile source at 128x128 or 256x256, then downsample to the final 64x64 tile for import. If the final tile size is different, use the same 2x or 4x source-to-runtime rule.

Each production Step 2B pack should include:

- `tiles/source_2x/` or `tiles/source_4x/` when the generator can provide larger source cells
- final runtime tiles under `tiles/individual/`
- `tile_source_manifest.json` linking each final tile to its source scale
- a compact `tiles/style_reference_strip.png` with approved palette, brush texture, contrast, path edge style, flower/pebble/moss density, and boundary language
- 5x5 repeat previews for every base terrain family, not just one grass sample
- transition samples for every transition family actually used by the map
- one zoomed gameplay crop that shows the map at the expected camera scale

Quality targets:

- preserve Step 1's terrain density, not just its rough route shape
- avoid flat empty grass fields unless Step 1 explicitly asks for them
- avoid obvious repeated stamps, cloned speckle patterns, checkerboard rhythm, or tiled diagonal noise
- make path edges organic but still tile-compatible
- make blocked edges visually rich enough to guide the player without objects
- keep micro-detail subtle enough that the player and future objects remain readable
- use richer local variation in color, value, and texture while staying within the approved palette
- downsample cleanly; no blurry upscales, crushed detail, or muddy compression

Visual rejection rule:

- If any 5x5 preview shows obvious stamp repetition, regenerate that tile family.
- If the object-free runtime preview looks like a generic test field instead of the approved Step 1 map, do not send it to Step 3.
- If the tiles are technically valid but visually dull, set `production_ready: false` and list the tile families that need higher-fidelity regeneration.

## Object-Free Map Requirements

Step 2B must produce an object-free playable map:

- `ground_only_map.png` contains terrain, paths, floor shadows, water, cliffs/edge terrain, and flat non-interactive ground detail only.
- No houses, trees, signs, chests, gates, walls, fences, shrines, pickups, NPCs, prize items, landmarks, roofs, canopies, or other gameplay objects are baked into the runtime ground.
- `object_free_runtime_preview.png` shows what Step 3 should look like before objects are added.
- `object_slot_overlay.png` may mark future object footprints and ids, but those marks must not appear in runtime art.
- `metadata/object_slots.json` reserves future object placement ids, rough footprint rectangles/polygons, expected role, clearance needs, and Step 1 object id. It does not define final art.

Object slots should be enough for later placement work:

```json
{
  "slots": [
    {
      "slot_id": "slot_signpost_north_exit_01",
      "step1_object_id": "signpost_north_exit",
      "role": "interactable_sign",
      "position_px": [2048, 896],
      "reserved_footprint_px": [1920, 800, 256, 256],
      "clearance_px": 64,
      "notes": "Future sign should face south toward player and point toward north exit."
    }
  ]
}
```

## Metadata Requirements

`metadata/map.json` should declare:

- map id, display name, scope, and theme
- pixel size, tile size, grid size, and viewport
- coordinate spaces used by every metadata file
- camera limits
- `production_ready`
- `step3_map_ready`
- overlay image paths and overlay scale when needed
- source Step 1 reference path

`metadata/tile_layers.json` should rebuild the map from tiles:

- ground/base layer
- path/road/floor layer
- transition layer
- non-blocking detail layer
- boundary/obstacle terrain layer when terrain itself blocks
- optional debug overlay references, disabled by default

`metadata/collisions.json` should include:

- map boundary collision
- terrain blockers
- soft blockers only when Step 1 asks for them
- no object collisions, except reserved placeholder footprints in `object_slots.json`

`metadata/navigation.json` should include:

- walkable navigation polygons or tile regions
- main route polyline
- optional route polylines
- chokepoint widths
- chase/no-chase regions when relevant

`metadata/zones.json` should include practical Godot `Area2D` polygon regions.

`metadata/spawn_tables.json` should include spawn regions and safe/no-spawn regions. It should not spawn pickups as object art; pickup slots belong to later object work.

`metadata/exits.json` should include transition regions and destination notes.

`metadata/visual_tests.json` should include map-only tests:

- player start inside walkable area
- camera limits
- route readability
- blocked edges
- collision sanity points
- navigation/chokepoint checks
- zone entry checks
- spawn/no-spawn checks
- exit trigger checks
- no object pixels baked into runtime ground
- no debug overlays in runtime preview

## Visual QA Gate

Passing JSON checks is not enough. Before Step 3, compare Step 2B against Step 1 and approve only when:

- the object-free map still feels like the approved Step 1 design
- the main path shape is preserved
- terrain density and blocked-edge language are preserved
- the map is not reduced to sparse repeated tiles or a generic test field
- future object slots line up with the Step 1 object-composite intent
- walkable routes have the requested width and spacing
- the map edge reads as blocked without relying only on invisible collision
- the runtime preview has no labels, arrows, route lines, zone colors, collision colors, or guide marks
- tile repetition is acceptable at gameplay zoom
- transition tiles do not create hard square borders or missing corners
- collision/navigation/zone overlays are useful and coordinate-aligned

Repair before Step 3 when:

- the map is technically rebuildable but visually worse than Step 1
- terrain cells look like crops from a painting instead of reusable tiles
- route shape, blocked edges, or map mood drift from Step 1
- object art is baked into `ground_only_map.png`
- the pack includes final props/pickups/object atlases
- overlays are vague decorative pictures instead of implementation references

Reject when:

- the object-free map cannot be rebuilt from `tile_layers.json`
- map coordinates and overlay scale are inconsistent
- runtime preview includes debug art
- production readiness is claimed while tiles are placeholder, cropped, or missing transition coverage
- final object art is mixed into Step 2B

## Step 2B Prompt Template

```text
Create a production-ready Step 2B object-free Godot 4 tileset and map-composition pack from the approved Step 1 map design page.

This is not an object-generation request. Do not generate final houses, trees, signs, gates, walls, fences, chests, shrines, pickups, prizes, NPCs, foreground occluders, interactables, prop atlases, pickup atlases, or object catalogs.

Your job is to produce the terrain/map pack only:
- reusable terrain tiles
- transition tiles
- terrain rules
- tile layer composition
- collision metadata
- navigation metadata
- zones
- spawn/no-spawn regions
- exits
- future object slot reservations
- map-only visual QA previews

Follow only the approved Step 1 map scope, dimensions, tile size, viewport, terrain theme, route shape, blocked-edge language, collision rules, zone regions, spawn rules, and exit notes.

The output must be a zip-ready `map-pack/` folder with:
- `preview/ground_only_map.png`
- `preview/clean_map_reference.png`
- `preview/object_free_runtime_preview.png`
- `preview/navigation_overlay.png`
- `preview/zone_overlay.png`
- `preview/collision_overlay.png`
- `preview/spawn_overlay.png`
- `preview/exit_overlay.png`
- `preview/object_slot_overlay.png`
- `preview/scale_reference.png`
- `tiles/individual/*.png` for important terrain and transition cells
- `tiles/ground_tiles.png`
- `tiles/detail_tiles.png`
- `tiles/transition_tiles.png`
- `tiles/obstacle_or_boundary_tiles.png` when terrain boundaries use tile art
- `tiles/tile_source_manifest.json`
- `tiles/tileset_atlas.json`
- `tiles/terrain_rules.json`
- tile repeat previews and transition sample previews
- `metadata/map.json`
- `metadata/tile_layers.json`
- `metadata/collisions.json`
- `metadata/navigation.json`
- `metadata/zones.json`
- `metadata/spawn_tables.json`
- `metadata/exits.json`
- `metadata/object_slots.json`
- `metadata/visual_tests.json`
- `metadata/import_plan.md`
- `validation-report.md`

Production requirements:
- Preserve the approved Step 1 ground composition, path shape, blocked-edge density, terrain mood, and readability.
- Build the declared Godot world from tiles and metadata, not from one giant generated image.
- Keep the runtime map object-free. No gameplay-relevant object art may be baked into `ground_only_map.png` or `object_free_runtime_preview.png`.
- Use object slots only to reserve future placement footprints and ids for Step 2A/Step 4 object work.
- Generate important terrain cells individually before assembling sheets.
- Generate tile sources at 2x or 4x resolution when possible, then downsample final runtime tiles to the declared Godot tile size.
- Include `tiles/source_2x/` or `tiles/source_4x/` plus manifest links when larger source cells are delivered.
- Include `tiles/style_reference_strip.png` defining palette, brush texture, detail density, path edges, and boundary style.
- Do not crop production tiles from full-map concept art unless they are repainted/repaired and pass repeat/transition previews.
- Include 5x5 repeat previews for every base terrain family used by the map.
- Include transition samples for edges, corners, caps, junctions, and theme-specific boundaries used by this map.
- Include one gameplay-scale crop proving the terrain reads well at the expected camera zoom.
- Reject or repair any tile family whose 5x5 preview shows obvious repeated stamps, checkerboard rhythm, or generic flat filler.
- Use exact tile size and coordinate spaces declared in Step 1.
- Overlay images must match the map pixel size or declare `overlay_scale` in `map.json`.
- Runtime art must contain no labels, arrows, route lines, collision colors, zone outlines, object slot markers, debug guides, UI borders, or explanatory text.
- `tile_layers.json` must rebuild ground, path, transition, detail, and boundary/obstacle terrain layers.
- `collisions.json` must define terrain/map collision only.
- `navigation.json`, `zones.json`, `spawn_tables.json`, and `exits.json` must match Step 1.
- `object_slots.json` must reserve future object placements without requiring object art.
- The validation report must explicitly say `production_ready: true` and `step3_map_ready: true` only if the map-only pack passes both technical validation and visual QA.

If you cannot meet these requirements, set `production_ready: false`, `step3_map_ready: false`, and list exactly what must be repaired. Do not claim prototype-ready as a substitute for production-ready.
```

## Step 3 Gate

Step 3 may import the map-only pack when:

- `production_ready: true`
- `step3_map_ready: true`
- visual QA confirms the object-free map matches the approved Step 1 intent
- no final object art is mixed into the Step 2B runtime pack

After Step 3 succeeds, move to Step 2A/Step 4 object work one object at a time.
