feat: tile sprite loader — slice LimeZu tilesheet into usable floor/wall/furniture tiles #15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Create a tile sprite loader utility that loads the LimeZu Modern Interiors tilesheet (paid version at
assets/Modern_Interiors_RPG_Maker_Version/) and slices it into individual tile images for use in the FarmCanvas SVG.Current State
The
assets/directory has ~30K sprite PNG files including the full LimeZu Modern Interiors tileset, but the frontend (FarmCanvas.jsx) draws rooms as SVG-colored rectangles with simple<rect>furniture. No tiles are loaded or used.Task
assets/Modern_Interiors_RPG_Maker_Version/— it has 48x48 tiles in RPG Maker format (single spritesheet PNG with tiles arranged in a grid)src/frontend/src/tileLoader.js(createsrc/subdir if needed) that:<img>or via Vite asset importgetTile(spritesheet, tileX, tileY)that returns the pixel region for a tile at grid positionFLOOR_TILE,WALL_TILE,WALL_TOP,DOORWAY,DESK,CHAIR,TABLE,SOFA,MONITOR,PLANT,LAMP, etc. — map these to actual tile coordinates on the spritesheetsrc/frontend/public/office/tiles/so Vite can serve them (don't symlink — copy or import)getRoomTileMap(roomId)function that returns a 2D array mapping tile types to positions for each room layoutFarmCanvas.jsxcan import itDependencies
Deliverable
src/frontend/src/tileLoader.jswith tile constants, sprite loading, and coordinate mapping. Verify it imports cleanly by runningnpm run buildin the frontend package.Acceptance Criteria
getTile()returns correct pixel regions for any grid positiongetRoomTileMap()produces valid 2D arrays for all 6 rooms