Skip to content

Stops the board jumping when recenter shifts raw coordinates - #825

Open
Moltenfire wants to merge 1 commit into
hiveboardgame:mainfrom
Moltenfire:fix/analysis-board-jump-on-recenter
Open

Moltenfire wants to merge 1 commit into
hiveboardgame:mainfrom
Moltenfire:fix/analysis-board-jump-on-recenter

Conversation

@Moltenfire

Copy link
Copy Markdown
Contributor

Puts the donut on a diet (#806) added Board::recenter(), which periodically translates every piece's raw coordinates to keep them inside the fixed-size storage window. The renderer draws raw coordinates directly and the camera was never adjusted to compensate, so any recenter reads as the whole board panning - reproducible at https://hivegame.com/game/nOxgGLxkSvqw?move=32 by stepping forward one move. Should now be fixed: the camera pans by the exact opposite pixel delta whenever the displayed board's accumulated recenter shift changes, so pieces, overlays, and annotations all land back where they were without touching hit-testing or move submission.

Puts the donut on a diet (hiveboardgame#806) added Board::recenter(), which
periodically translates every piece's raw coordinates to keep them
inside the fixed-size storage window. The renderer draws raw
coordinates directly and the camera was never adjusted to compensate,
so any recenter reads as the whole board panning - reproducible at
https://hivegame.com/game/nOxgGLxkSvqw?move=32 by stepping forward one
move. Should now be fixed: the camera pans by the exact opposite pixel
delta whenever the displayed board's accumulated recenter shift
changes, so pieces, overlays, and annotations all land back where they
were without touching hit-testing or move submission.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U4Y2jNZLSGwpvfWXVxQfzP
klautcomputing added a commit that referenced this pull request Sep 10, 2026
Coordinates were storage indices on a 32x32 torus, so keeping the hive clear of the
seam meant re-basing every piece with `Board::recenter` - and the renderer draws those
coordinates, so a recenter read as the whole board jumping (#825).

Storage becomes a window onto the unbounded plane instead: `WindowArray` carries an
origin, `reframe` slides it to follow the hive, and no piece ever changes coordinates.
That drops `Position::wrap_around`, `canonical_hash::axis_origin`, and the recenter
rebuild. Hashes are unchanged, and perft Base+MLP halves.

Nothing wraps into `0..BOARD_SIZE` any more, so the drawing had to stop assuming it:
halving a row now floors, and the pixel mapping is pinned by the property that says it
- the same hive drawn anywhere looks the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant