tile-grid

Create runtime tile grids in FlatRedBall2 with data/visual split and world-to-tile math.

11|3|Updated Feb 28, 2026
One-click install
npx skills add https://github.com/vchelaru/FlatRedBall2 --skill tile-grid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tile-grid
Source: https://github.com/vchelaru/FlatRedBall2/tree/main/frb-skills/tile-grid
Command: npx skills add https://github.com/vchelaru/FlatRedBall2 --skill tile-grid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates and standardizes the creation of runtime tile grids in FlatRedBall2, enabling a clear data/visual split and efficient world-to-tile math for large grids.

Core Features & Use Cases

  • Data/Visual split pattern and guidance
  • World↔Tile coordinate conversion
  • Lightweight per-tile visuals via ColoredRectangleRuntime vs per-tile entities
  • Guidance for large grids and performance considerations (128×128+)
  • Use cases: city builders, procedural dungeons, cellular automata, puzzles

Quick Start

Define a data-first tile grid by creating a TileType array, initialize grid dimensions (_cols, _rows), set a world-origin, and spawn lightweight ColoredRectangleRuntime visuals synced with the data through WorldToTile/TileToWorld.

Frequently Asked Questions about tile-grid

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a programmatic tile grid at runtime for large procedural worlds?

Runtime tile grid creation uses a data-first model with a TileType array and grid metadata, enforcing a strict data/visual split so code drives logic while visuals render separately for large procedural worlds.

What is the data/visual split pattern for tile grids and why use it?

The data/visual split pattern stores tile state in a TileType data array while rendering lightweight ColoredRectangleRuntime visuals separately, avoiding heavy per-tile entities and improving performance for large 128×128+ grids.

How do I convert between world coordinates and tile positions in FlatRedBall2?

Converting world coordinates to tile indices in FlatRedBall2 requires robust WorldToTile and TileToWorld math, mapping global space to grid cells using a defined world-origin and grid dimensions (_cols, _rows).

Can I use ColoredRectangleRuntime for lightweight per-tile visuals in large grids?

Yes, ColoredRectangleRuntime instances provide lightweight per-tile visuals synced with the TileType data array, recommended over full per-tile entities to maintain performance in large 128×128+ grids.

What types of games benefit from a data-first programmatic tile grid?

Data-first programmatic tile grids suit city builders, procedural dungeons, puzzles, and cellular automata where large grids are driven by code and visuals are rendered separately through ColoredRectangleRuntime.

What are the performance considerations for runtime tile grids larger than 128×128?

Performance considerations for large runtime tile grids involve avoiding full per-tile entities and instead using a data-first TileType array with lightweight ColoredRectangleRuntime visuals to minimize overhead in 128×128+ grids.