Skip to content

ramble 0.9.5: seed is sparse and scattered, not one in every square you have walked - #335

Merged
kh0pper merged 1 commit into
mainfrom
feat/ramble-seed-sparsity
Sep 9, 2026
Merged

ramble 0.9.5: seed is sparse and scattered, not one in every square you have walked#335
kh0pper merged 1 commit into
mainfrom
feat/ramble-seed-sparsity

Conversation

@kh0pper

@kh0pper kh0pper commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Seed spawned in every unlocked cell that was off cooldown. With a couple of dozen cells spread over ~1.8 km that carpeted the map, and most of what you could see sat well outside any walk. Tightening the zoom (#334) hid some of it; this fixes the cause.

Sparse, deterministic, and placed inside the cell

New seedFor(cell, window, { rate }) in wallet.js, copying nestFor's trick deliberately:

sha256("ramble-seed-v1:" + cell + ":" + window)
  • Sparse. One cell in rate (default 4) carries seed, so a walkable frame holds a handful you can actually reach rather than one per square.
  • Deterministic. Nothing stored, nothing to sync, identical on every device — and it cannot be re-rolled by walking out of a cell and back in.
  • Placed, not centred. The position is a hash-derived point inside the cell, like a nest's. Centring every one made a street's worth of seed look like a pegboard.
  • Tunable without a deploy. seed.rate joins nest.rate as a live setting.

The map and the harvest read the same rule

recordSeedPickup now consults the same seedFor gate. Without that the map would be a liar in the other direction — showing seed in one cell in four while every cell quietly paid — and the pip would stop meaning anything. A cell that bears no seed pays nothing, and shows nothing.

harvestableCells returns points rather than cell names, and the zones route passes them straight through, so a pip is drawn where the seed actually is.

Verification

Full suite 4301/4301. check-ports OK, build-registry --check in sync. Backticks 0 and markup sinks 2 in the panel client. Docs updated in both languages, including the new settings row. Ramble 0.9.4 → 0.9.5.

A test-design note worth flagging. Making seed sparse means a ledger test that just picks a cell now passes or fails on the spawn lottery rather than on the ledger. Rather than hunt for cells that happen to hash lucky — which would be a silent trap for whoever edits these next — the ledger tests take an explicit everyCellBears() fixture that pins seed.rate to 1, and the lottery gets its own tests. The zones route test does the same, for the same reason.

New tests cover: determinism across calls, the point landing strictly inside its own cell and off-centre, a new window being a new roll, rate 1 vs rate 4 actually differing in how many cells bear seed, junk input not throwing (this runs on every zones fetch), and — the one that matters most — that a barren cell pays nothing and shows no pip, so the two rules can never drift apart.

@kh0pper
kh0pper merged commit 8313b39 into main Sep 9, 2026
3 checks passed
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