Use these prompts to execute the tasks defined in TASKS_FROM_FEEDBACK.md.
Prompt:
"Your goal is to update the
GridModelservice to orchestrate the full town generation process using the newly createdWFCGeneratorandZoneAllocatorclasses.Requirements:
- Modify
web/src/services/GridModel.ts.- Replace or augment the existing simple generation logic with a new method (e.g.,
generateFullTown(size, seed)).- Step 1 - Roads: Call
WFCGeneratorto generate the road network.- Step 2 - Zones: Pass the generated road grid to
ZoneAllocatorto identify and assign zones (Residential, Commercial, etc.) to the empty areas between roads.- State Management: Ensure the
GridModelstores the complete state: the grid of tiles (including their types, variants, and rotation) and the zoning information.- Output: The final grid state must be accessible so the UI can render it.
Definition of Done:
- Running the generation produces a grid that contains both valid road connections (from WFC) and zoning data (from ZoneAllocator).
- Existing tests for GridModel should pass or be updated to reflect the new logic."
Prompt:
"Your goal is to update the
CityMapcomponent to visually render the town in distinct layers, ensuring that ground, water, roads, and buildings appear in the correct order.Requirements:
- Modify
web/src/services/CityMap.tsx.- Implement a layered rendering approach. The draw order should be:
- Layer 0 (Bottom): Ground/Grass base tiles.
- Layer 1: Water tiles (Rivers/Lakes).
- Layer 2: Road network.
- Layer 3 (Top): Buildings and Zone Overlays.
- Assets: Use placeholder colors or temporary assets if final PNGs are missing, but ensure the code attempts to load the correct asset paths (e.g.,
assets/tiles/building_res_01.png).- Zoning Visualization: If a tile has a zone assigned but no specific building, render a semi-transparent colored overlay (e.g., Green for Residential, Blue for Commercial) so the user can see the zones.
Definition of Done:
- The map renders with clear visual separation between elements.
- Roads are drawn on top of the ground.
- Buildings/Zones are drawn in the correct locations relative to the roads.
- No visual z-fighting or overlapping artifacts."
Prompt:
"Your goal is to implement and integrate a
WaterGeneratorthat adds natural-looking water features (rivers or lakes) to the town grid.Requirements:
- Create or update
web/src/services/generators/WaterGenerator.ts.- Logic: Implement an algorithm to place water tiles. This could be a random walk for rivers or cellular automata for lakes.
- Integration: Ensure this generator runs before or during the road generation phase in
GridModel, so that roads can build bridges or avoid water as needed.- Constraints: Water should not completely block off sections of the map (unless bridges are implemented).
Definition of Done:
- The generated grid contains
TileType.Watertiles.- Water features look somewhat organic (not just scattered single tiles).
- The
GridModelsuccessfully includes these water tiles in its final state."
Prompt:
"Your goal is to update the user interface to give the user control over the new generation features and visibility settings.
Requirements:
- Create or update
web/src/components/Controls.tsx(or the relevant sidebar component).- Layer Toggles: Add checkboxes to toggle the visibility of specific layers (e.g., 'Show Zones', 'Show Grid', 'Show Water').
- Info Display: clearly display the current
SeedandTown Size.- Regenerate: Ensure the 'Regenerate' button triggers the new
generateFullTownmethod from Task 4.1.Definition of Done:
- User can hide/show zones to inspect the road network.
- User can see exactly which seed generated the current map.
- The UI looks clean and fits the application's aesthetic."
Prompt:
"Your goal is to generate or create the visual assets required to make the town look like a town, not a schematic.
Requirements:
- Water Tiles (Task 1.1): Create seamless tiles for water (
water_center,water_edge, etc.) or a simple set of variations. Save toweb/public/assets/tiles/.- Building Tiles (Task 1.2): Create top-down building sprites for different zones:
- Residential (Houses)
- Commercial (Shops/Markets)
- Industrial (Factories/Warehouses)
- Parks (Trees/Fountains)
- Zone Overlays (Task 1.3): Create simple semi-transparent 64x64 PNGs for zone debugging (Green, Blue, Yellow, Red).
Definition of Done:
- All referenced asset paths in the code exist on the filesystem.
- The assets match the pixel-art or vector style of the existing road tiles.
- Tiles align correctly on the grid."