feat: room-specific furniture layouts mapped to tile positions #19

Closed
opened 2026-05-20 15:57:25 +00:00 by agent-cos · 0 comments

Goal

Define per-room furniture layouts using actual tile coordinates from the LimeZu furniture sprites, so each room has a proper interior layout instead of generic SVG rects.

Current State

FarmCanvas.jsx has a renderFurniture() function that draws simple colored <rect> elements per room — a conference table in briefing, sofa/coffee table in commons, war table in warroom, desk+monitor in engineering, desk+lamp in quiet, table+screens in ops. These are placeholder rects.

Task

  1. Create src/frontend/src/furnitureLayouts.js that defines per-room furniture:
    export const furnitureLayouts = {
      briefing: [
        { tile: 'CONFERENCE_TABLE', tx: 2.5, ty: 2, w: 3, h: 2 },
        { tile: 'CHAIR', tx: 1.5, ty: 2.5 },
        { tile: 'CHAIR', tx: 5.7, ty: 2.5 },
        { tile: 'PLANT', tx: 0.5, ty: 0.5 },
      ],
      commons: [
        { tile: 'SOFA', tx: 1, ty: 1.5, w: 3, h: 1.2 },
        { tile: 'COFFEE_TABLE', tx: 1.5, ty: 3, w: 2, h: 1 },
        { tile: 'PLANT', tx: 5, ty: 3 },
      ],
      // ... all 6 rooms
    };
    
  2. Map furniture tile types to actual sprite coordinates from the LimeZu tilesheet (e.g., the conference table might be at tile (4,0) on the furniture sheet)
  3. Export a getFurnitureForRoom(roomId) function that returns the layout array
  4. Export a FURNITURE_TILES constant mapping logical names → spritesheet coordinates

Technical Notes

  • Furniture is placed in tile coordinates (tx, ty relative to room origin) — same coordinate system as rooms
  • Each furniture item can span multiple tiles (w, h) or be single-tile
  • Some furniture (chairs, plants) are rotated variants — define these

Acceptance Criteria

  • All 6 rooms have furniture layouts with proper tile references
  • Layouts match the current room dimensions (no furniture outside room bounds)
  • Furniture tile types map to valid spritesheet coordinates
## Goal Define per-room furniture layouts using actual tile coordinates from the LimeZu furniture sprites, so each room has a proper interior layout instead of generic SVG rects. ## Current State `FarmCanvas.jsx` has a `renderFurniture()` function that draws simple colored `<rect>` elements per room — a conference table in briefing, sofa/coffee table in commons, war table in warroom, desk+monitor in engineering, desk+lamp in quiet, table+screens in ops. These are placeholder rects. ## Task 1. Create `src/frontend/src/furnitureLayouts.js` that defines per-room furniture: ``` export const furnitureLayouts = { briefing: [ { tile: 'CONFERENCE_TABLE', tx: 2.5, ty: 2, w: 3, h: 2 }, { tile: 'CHAIR', tx: 1.5, ty: 2.5 }, { tile: 'CHAIR', tx: 5.7, ty: 2.5 }, { tile: 'PLANT', tx: 0.5, ty: 0.5 }, ], commons: [ { tile: 'SOFA', tx: 1, ty: 1.5, w: 3, h: 1.2 }, { tile: 'COFFEE_TABLE', tx: 1.5, ty: 3, w: 2, h: 1 }, { tile: 'PLANT', tx: 5, ty: 3 }, ], // ... all 6 rooms }; ``` 2. Map furniture tile types to actual sprite coordinates from the LimeZu tilesheet (e.g., the conference table might be at tile (4,0) on the furniture sheet) 3. Export a `getFurnitureForRoom(roomId)` function that returns the layout array 4. Export a `FURNITURE_TILES` constant mapping logical names → spritesheet coordinates ## Technical Notes - Furniture is placed in tile coordinates (tx, ty relative to room origin) — same coordinate system as rooms - Each furniture item can span multiple tiles (w, h) or be single-tile - Some furniture (chairs, plants) are rotated variants — define these ## Acceptance Criteria - [ ] All 6 rooms have furniture layouts with proper tile references - [ ] Layouts match the current room dimensions (no furniture outside room bounds) - [ ] Furniture tile types map to valid spritesheet coordinates
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sscoble/spatial-office#19
No description provided.