Skip to content

Seam badge, and a pasteable cosmetics.json entry - #9

Merged
timbogdanov merged 1 commit into
mainfrom
feat/seam-and-export
Aug 19, 2026
Merged

Seam badge, and a pasteable cosmetics.json entry#9
timbogdanov merged 1 commit into
mainfrom
feat/seam-and-export

Conversation

@timbogdanov

Copy link
Copy Markdown
Owner

Phase 5 of the v0.2.0 plan — OpenFront fidelity, continued.

The preview now says whether a pattern shows a seam once the game tiles it: Seamless, Slight seam, or Visible seam.

Why this is a port, not a re-derivation

The metric is subtler than it looks. A correctly-tiling periodic pattern legitimately has a hard transition at the wrap — period-8 stripes on a 32-wide canvas put a stripe boundary exactly there. What makes a seam visible is the wrap being an outlier: more discontinuous than the pattern's own interior ever gets.

So the wrap is ranked against the 90th percentile of interior transitions, not their mean. The mean is dragged down by the many identical column pairs inside a periodic pattern, which is precisely what made an earlier version of this metric flag 17 of 28 correctly-tiling patterns.

It also carries the rhythm check, which local adjacency cannot do: period-7 stripes on a 32-wide canvas make a perfectly ordinary-looking edge while the cadence breaks on tiling. Driven in the running app:

Pattern Verdict
Wordmark Seamless
Checker Seamless
Period-7 stripes on 32 wide Visible seam

Cost

Scoring walks the bitmap several times looking for its intrinsic period, so it settles 250 ms after a stroke rather than running on every pointermove.

Proof

The DSL fixture now carries both scores and the label for all 62 programs, and the suite compares them to 1e-9 — pinning the numbers rather than only the verdict, so a port that lands on the right label by luck still fails. All three verdicts appear in the corpus.

cosmetics.json entry

Export gains a pasteable entry. The file keys patterns by their encoded data, so the entry is that key plus a slugified name. role_group is entitlement metadata the game assigns — a new pattern does not claim it.

"APF4h8PhcIfD4XCHw-Fwh8...": { "name": "my_cool_pattern" }

🤖 Generated with Claude Code

https://claude.ai/code/session_01UCrKKTD2mwHx8Fm1EnJiQ3

The preview now says whether a pattern shows a seam once the game tiles it:
Seamless, Slight seam, or Visible seam.

The metric is subtler than it looks, which is why this is a port rather than a
re-derivation. A correctly-tiling periodic pattern legitimately has a hard
transition at the wrap — period-8 stripes on a 32-wide canvas put a stripe
boundary exactly there. What makes a seam visible is the wrap being an OUTLIER,
so it is ranked against the 90th percentile of the pattern's own interior
transitions rather than their mean; the mean is dragged down by the many
identical column pairs inside a periodic pattern, which is what made an earlier
version flag 17 of 28 correctly-tiling patterns.

It also carries the rhythm check, which local adjacency cannot do: period-7
stripes on a 32-wide canvas make a perfectly ordinary-looking edge while the
cadence breaks on tiling. Driven in the app, that case reports Visible seam and
a checkerboard reports Seamless.

Scoring walks the bitmap several times looking for its intrinsic period, so it
settles 250ms after a stroke rather than running on every pointermove.

The DSL fixture now carries both scores and the label for all 62 programs, and
the suite compares them to 1e-9 — pinning the numbers rather than just the
verdict, so a port that lands on the right label by luck still fails. All three
verdicts appear in the corpus.

Export gains the cosmetics.json entry: the file keys patterns by their encoded
data, so the entry is that key and a name, slugified. role_group is entitlement
metadata the game assigns and a new pattern does not claim it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCrKKTD2mwHx8Fm1EnJiQ3
@timbogdanov
timbogdanov merged commit 99b7f45 into main Aug 19, 2026
5 checks passed
@timbogdanov
timbogdanov deleted the feat/seam-and-export branch August 19, 2026 02:17
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