Skip to content

feat(town): design your own home and yard - #94

Merged
grishaLR merged 3 commits into
stagingfrom
feat/town-builder
Oct 24, 2026
Merged

grishaLR merged 3 commits into
stagingfrom
feat/town-builder

Conversation

@grishaLR

Copy link
Copy Markdown
Owner

What

proto town's builder: people decorate their own home and yard, and the design lives in their own repo as an app.protoimsg.town.layout record (rkey home / yard). Plus a re-skin of the whole town in open pixel art, and phone access.

Builder

  • Lexicon app.protoimsg.town.layout; OAuth scope gains repo:app.protoimsg.town.layout. Existing sessions are asked for it with a consent card (re-runs OAuth for the current scopes) rather than a forced re-login.
  • Shared rules (validateTownLayout): known pieces, on buildable tiles, off the doormat and path, no solid overlap, and never walling anyone in: every open tile stays reachable from the door.
  • Server: town_layouts table (migration 026), indexed from Jetstream and re-read from the owner's PDS on town_layout_saved. Newer records win whatever the arrival order. PDS reads refuse redirects and cap the body at 64KB. Refreshes are coalesced per owner. Layouts go out in town_state.layout and town_layout events.
  • Client: build mode (B or Design): aim with the mouse, a tap or on foot; place, rotate (R), pick up and move (click / E), remove (right-click / Delete). It autosaves with retries, and build mode starts from your own record read fresh, never from a stale view.

Art

  • Every scene now uses OpenPixels by Silveira Neto (CC BY-SA 4.0). The sheet ships unmodified with its licence in assets/town/openpixels/, and the README credits it.
  • Town tiles are 32 px (was 48), so the art draws at 1× next to unchanged avatars. Pixel distances (proximity, speed, view) are unchanged.
  • The neighborhood house is now 8×4 (the door row is unchanged) and the square's fountain is 2×2.

Phones

  • A Town tab in the mobile tab bar (the buddy-list footer that had it is hidden on phones).
  • An on-screen joystick to walk.

i18n

All new strings in all 17 locales.

Deploy notes

  • Run migration 026 (town_layouts).
  • Deploy server and web together: live positions are pixels on the new 32-px grid.
  • packages/web/public/oauth-client-metadata.json (mobile app's sign-in) now lists the same scopes the app requests. It was already missing the rpg scopes.

Testing

  • Server: 248 tests pass (new: layout rules incl. reachability and rotation, layout ordering and refresh coalescing).
  • Web: 40 tests pass. Typecheck and lint are clean.
  • Scenes checked in headless renders of the real engine; build mode tried in the dev town. The joystick hasn't been tried on a real phone yet.

🤖 Generated with Claude Code

grishaLR and others added 3 commits October 24, 2026 17:49
Homes and yards now draw from their owner's app.protoimsg.town.layout
record (rkey home|yard) instead of fixed furniture. In your own space,
press B or Design to place and remove starter pieces; the design saves
to your repo and the server re-reads it so everyone there sees it.

- lexicon: app.protoimsg.town.layout; OAuth scope gains its repo: scope,
  asked for incrementally (requestScopes) rather than forcing re-login
- shared: builtin catalog, build areas, keep-clear tiles, defaults, and
  validateTownLayout (also rejects layouts that wall off any open tile)
- server: town_layouts table (026), indexed from Jetstream and from the
  owner's PDS on town_layout_saved; newer records win regardless of
  arrival order; PDS reads refuse redirects and cap body size;
  coalesced refreshes; town_state.layout and town_layout events
- web: layout rendering and collision, build mode with ghost preview
  and tray, debounced saves with retry, build starts from your own
  record, new pieces (armchair, table, bush, flower bed, lamppost)
- i18n: town.build in all locales

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- rotate pieces that turn (R / Rotate); a quarter turn swaps the
  footprint, and the shared rules and server agree on it
- aim with the mouse or a tap: click a piece to pick it up and move it,
  click to put it down, right-click or Delete to remove; E picks up the
  piece in front of you, Escape puts a carried piece back
- keep-clear is the doormat and path themselves, not a buffer beside
  them: the reachability rule already keeps every tile walkable
- seven yard pieces cut from the ansimuz RPG Town pack (CC0): pumpkins,
  garden plot, boulder, stone, chest, barrel, wildflowers
- README credits the art

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- re-skin every scene from the OpenPixels sheet (Silveira Neto, CC BY-SA
  4.0), shipped unmodified with its licence: wood floor, wallpaper and
  slab walls indoors; grass, picket fence, sand path, round trees and the
  stone well outside; the cottage widened from its own tiles; a paved
  square with the well as its fountain
- pieces use the sheet's art, footprints matched to it; pieces drawn in
  perspective that don't turn well no longer rotate
- town tiles are 32 px (was 48) so the art draws at 1x and avatars sit
  at the scale it was drawn for; pixel distances (proximity, speed, view)
  are unchanged
- the house is 8x4 (door row unchanged); the fountain is 2x2
- no trees behind the square's gates; gate names cap at 12 characters
- phones: a Town tab in the tab bar, and an on-screen joystick to walk
- README credits the art

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
protoimsg Ignored Ignored Oct 24, 2026 9:50pm UTC

@grishaLR
grishaLR merged commit 7c45bba into staging Oct 24, 2026
9 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