fix(studio): render game's odd-R hex geometry for both tile spaces and retune tile border to graphite#1642
Merged
Merged
Conversation
This was referenced Jun 12, 2026
refactor(studio): decompose App.tsx non-React corpus into feature modules and shared utilities
#1608
Merged
Merged
Merged
|
Railway preview (MapGen Studio): not provisioned for this PR. Policy (Graphite stacks): previews are created only for the top-of-stack PR by default.
Debug: |
This was referenced Jun 12, 2026
This was referenced Jun 12, 2026
Merged
mateicanavra
force-pushed
the
design/tile-game-geometry
branch
from
June 12, 2026 20:44
a1a9071 to
cbf64b5
Compare
mateicanavra
force-pushed
the
design/pass5-ledger
branch
from
June 12, 2026 20:44
38a2ff7 to
a61ae24
Compare
Owner
Author
Merge activity
|
mateicanavra
changed the base branch from
design/pass5-ledger
to
graphite-base/1642
June 12, 2026 22:05
…quish) + graphite border ink, with the hex-convention audit
mateicanavra
force-pushed
the
design/tile-game-geometry
branch
from
June 12, 2026 22:07
cbf64b5 to
73d50b8
Compare
This was referenced Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Both tile spaces (
tile.hexOddRandtile.hexOddQ) now render the game's actual plot geometry: regular pointy-top hexes on a row-offset (odd-R) lattice, with columns √3·size apart, rows 1.5·size apart, and odd rows shifted east by half a tile.The previous renderer treated
tile.hexOddQas a genuine column-offset lattice and drew a custom squashed flat-top hexagon to tile it exactly. A hex-convention audit (research/03-hex-convention-audit.md) established that Civ7's grid is odd-R, not odd-Q — Firaxis's own debug dumpers indent odd rows, the official direction set has E/W neighbors but no N/S (pointy-top adjacency), and the engine boundary writes(x, y)untransposed. mapgen-core's odd-Q projection puts the offset on the wrong axis, producing a lattice that is not a regular hex tiling, which is why the tiling hexagon had to be vertically compressed and the grid looked squished.tile.hexOddQis now treated as a mislabel of the same game grid. The world frame (√3·width × 1.5·height) is unchanged, soworld.xyco-registration is unaffected.The odd-Q lattice math, its squashed polygon function, and the separate bounds branch for odd-Q are removed. Both
tileCenter,tilePoint, andboundsForTileGridnow use the single odd-R path.Tile border color is changed from mid-luminance slate (
[100, 116, 139, 220]) to graphite ([13, 13, 17, 200],#0d0d11at α200) — one ink in both themes. Borders only appear between filled tiles; unfilled tiles draw nothing. The dark seam recedes into the canvas in dark mode and reads as a crisp graphite grid in light mode without competing with the data palette.Tests are updated so both tile spaces assert regular pointy-top vertices (unit radius, vertex straight above center) and the row-offset lattice spacing (same-row y, odd-row east shift). The engine-side migration of mapgen-core from odd-Q to odd-R is tracked as a separate task, as it is gameplay-affecting and requires its own regression plan.