Rexboard Rendered Tiles And Pieces
Developmentrexboard-rendered-tiles-and-piecesRexboard Rendered Tiles And Pieces is an Agent Skill for development published in the rexrainbow/phaser3-rex-notes repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Use this skill when creating RexBoard rendered tiles or pieces with shape, image, sprite, board-aware game objects, addToBoard, CreateTileTexture, createTileTexture, CreateBoardFromTilemap, createBoardFromTilemap, tilemap-rendered boards, or drawing RexBoard tiles. Triggers on: RexBoard shape, RexBoard image, RexBoard sprite, RexBoard rendered chess, addToBoard, createTileTexture, board tilemap rendering.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/rexrainbow/phaser3-rex-notes/blob/HEAD/skills/rexboard/rexboard-rendered-tiles-and-pieces/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rexboard-rendered-tiles-and-pieces, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
RexBoard Rendered Tiles And Pieces
Use this skill when RexBoard chess must be visible Phaser game objects or when board tiles need generated textures.
Use This First
Choose the rendering approach:
| Need | Use |
|---|---|
| Custom visual object | Create Phaser object, then board.addChess(...) |
| Polygon tile/chess object | this.rexBoard.add.shape(...) |
| Static texture piece | this.rexBoard.add.image(...) |
| Animated/frame-based piece | this.rexBoard.add.sprite(...) |
| Reusable tile texture | this.rexBoard.createTileTexture(...) |
| Board from Phaser tilemap | this.rexBoard.createBoardFromTilemap(...) |
Required Setup
This skill assumes RexBoard setup and a board/grid are already available. If not, use rexboard-setup-and-factory, rexboard-grids-and-coordinates, and rexboard-board-and-chess.
References
Read these only when needed:
references/rendered-pieces.md:Shape,Image,Spritefactory signatures andaddToBoard.references/tile-textures.md:CreateTileTextureusage and generated texture workflow.references/tilemap-import.md: board creation from Phaser tilemaps.references/rendered-piece-recipes.md: reduced recipes for drawn tiles, sprite pieces, and generated tile textures.
Core Rules
- Use
board.addChess(...)for custom Phaser game objects. - Use RexBoard
Shape,Image, orSpritewhen tile coordinates should be part of construction. - Set
addToBoard: trueonly when the object should register as board chess immediately. - Use a consistent
tileZconvention for tile visuals, pieces, overlays, and blockers. - Treat
createTileTextureas texture generation only; it does not place chess on the board.
Source File Map
plugins/board/shape/Shape.d.tsandplugins/board/shape/Factory.js.plugins/board/image/Image.d.tsandplugins/board/image/Factory.js.plugins/board/sprite/Sprite.d.tsandplugins/board/sprite/Factory.js.plugins/board/texture/CreateTileTexture.d.ts.plugins/board/tilemap/CreateBoardFromTilemap.d.ts.
Related Skills
rexboard-board-and-chess: chess placement andtileZmodel.rexboard-grids-and-coordinates: board geometry and tile/world conversion.rexboard-map-generation-and-import: tilemap import and generated coordinate sets.rexboard-miniboard-and-composite: rendered pieces inside MiniBoard.
Gotchas
createBoardFromTilemapreturns a board from tilemap data; still inspect the returned board/grid before adding game rules.Shape,Image, andSpritecan target aBoardorMiniBoard.- Passing
addToBoard: falsemeans future code must explicitly callboard.addChess(...)orminiBoard.addChess(...).