board-modes

Guides correct use of the 2D and 3D board projections when drawing or projecting onto the overworld chunk board.

2|1|Updated Jun 28, 2026
One-click install
npx skills add https://github.com/lxsmnsyc/overwander --skill board-modes-lxsmnsyc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: board-modes
Source: https://github.com/lxsmnsyc/overwander/tree/main/.claude/skills/board-modes
Command: npx skills add https://github.com/lxsmnsyc/overwander --skill board-modes-lxsmnsyc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? The overworld board in this game can be drawn in two projections—a laid-back 3D trapezoid or a flat top-down 2D grid—and code that assumes one projection or reads the wrong constants produces broken rendering, misplaced sprites, and incorrect pointer hit-testing. ## Core Features & Use Cases - Projection selection rules: Explains that viewFor(width, height) picks flat for portrait screens and laid-back otherwise, with the player's Flat board setting as the only override. - Querying the live view: Directs all drawing code to boardView() for mode, depth, rise, squash, aspect, and span instead of the fixed GROUND_* constants in src/canvas/tilt.ts. - Screen registration before projection: Requires setBoardScreen(width, height) before projecting points, covering painters, pointer handlers, and browser tests like spotOf in e2e/walk.ts. - Use Case: When adding a new overworld effect such as a shadow or weather layer, consult this Skill to decide how it must behave on the flat board and which view values to read. ## Quick Start Ask the assistant to review or write canvas drawing code for the overworld board and confirm it reads the projection from boardView() rather than assuming a tilt.

Frequently Asked Questions about board-modes

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

FAQPage Schema
How do I project a point onto the overworld board correctly?▼

Call setBoardScreen(width, height) with the measured screen size before projecting any point, because the projection answers for whichever screen was last named. Painters do this once per frame, pointer handlers after measuring their own box.

How is the 2D versus 3D board mode decided?▼

The function viewFor(width, height) chooses the flat board when the screen is taller than it is wide and the laid-back board otherwise. The only override is the player's Flat board setting, passed through setBoardFlat.

Should drawing code use GROUND_DEPTH, GROUND_RISE, and GROUND_SQUASH?▼

No. Those constants in src/canvas/tilt.ts describe only the laid-back board and exist for sprite-sheet cutting tools. Live drawing code must read depth, rise, and squash from boardView() so it follows the active projection.

What changes when the board is drawn flat from above?▼

The flat board has no third dimension, so shadows become round patches under feet rather than leaned silhouettes, and weather is drawn against the glass instead of standing in the world. Anything added that stands in the air needs defined flat behavior.

Why is my close-range framing wrong on small screens?▼

Screens whose shorter side is under CLOSE_SCREEN pixels are framed around CLOSE_RADIUS cells instead of the full live circle. Read span and compass from boardView() rather than BOARD_RADIUS when sizing anything off the frame.