Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
Feature 17: live hosted show on a plaza stage inside /play
The platform already has Living Stages: an embodied AI host runs a real-time show with spatial voice, lip-sync, synced captions, an audience question queue, and a verified on-chain $THREE tip leaderboard where a tip pre-empts the host's next line in about a second. All of it works, and none of it is reachable from the world yet. Half of this build has landed: src/game/plaza-stage.js is the landmark (platform, canvas marquee via screen-texture.js, a proximity gate, a 45 s show-state poll while a player is near), multiplayer/src/plaza-stage.js derives the stage id, PLAZA_STAGE in multiplayer/src/world-features.js is the server-validated footprint, and api/stage/index.js answers GET /api/stage?coin=<mint> and claims a plaza with POST /api/stage { action: 'plaza', agentId, coinMint }. But nothing imports plaza-stage.js (coincommunities.js never mounts it), and the show client it dynamically imports on first proximity, src/game/plaza-stage-show.js, does not exist. Finish it: mount the landmark and write the show client so the event crowd can attend a show without leaving /play.
Where the code lives
- Show engine (server):
multiplayer/src/rooms/StageRoom.js,multiplayer/src/stage-show.js(the pureShowDirectorwith beats OPENER, TIP_SHOUTOUT, ANSWER, BANTER, GAME),multiplayer/src/stage-schemas.js,multiplayer/src/stage-registry.js. Room registered asstage_worldwithfilterBy(['stageId'])inmultiplayer/src/index.js - Show client (page-level, reuse it):
src/stage.js,src/stage-net.js,src/stage-element.js, served atpages/stage.html. The host's performance is already extracted out of that page intosrc/shared/stage-voice.js(StageVoice: fetches/api/tts/speak, routes it through the host'sPositionalAudio, taps anAnalyserNodefor lip-sync, and stops cleanly when the next beat pre-empts it), written to be imported by the plaza show client too - Show API:
api/stage/index.js(directory, create, golive, endshow,nextShowAtscheduling, plus the?coin=read and theplazaclaim; onestageDetail()serves the?id=and?coin=reads so /stage and the plaza never see two shapes of the same show),api/stage/host.js(the host's words; the prompt names $THREE as the only coin the host may mention, andsanitizeLinestrips control characters and dashes from every spoken line before it becomes a caption),api/stage/tip.js(on-chain verified, idempotent per signature); host voice viaapi/tts/speak - The world to mount into:
src/game/coincommunities.js(main scene), landmark placement precedent insrc/game/wheel-station.jsandsrc/game/home-town.js; server-validated landmark coordinates inmultiplayer/src/world-features.js - Multiplayer client for the world room:
src/game/community-net.js(Colyseuswalk_world); the stage join is a second, concurrent room connection
What to build
- The stage landmark. Built in
src/game/plaza-stage.jsbut not mounted: construct it fromcoincommunities.jsnext to the wheel station and the war portal. The marquee already reads the show state fromGET /api/stage?coin=: live now, next show time (nextShowAt), or a designed idle state. The footprint isPLAZA_STAGEat (18, 26) with a 5 m radius inworld-features.js; the attendance ring around it isSTAGE_ATTEND_REACH(8 m past the edge, so 13 m from the stage centre), sized to contain the golden-angle seat ring StageRoom deals out (RING_RADIUS6 m plus 1.6 m per concentric ring, so 6.0/7.6/9.2 m from the stage origin). A nearer ring,STAGE_MARQUEE_REACH, is where the marquee is still legible and where the 45 s show-state poll (REFRESH_MSinplaza-stage.js) runs. - Proximity attendance. Walking near the stage joins the coin's
stage_worldroom alongside the existingwalk_worldconnection.stageIdis already derived:plazaStageId(mint)inmultiplayer/src/plaza-stage.jsis uuidv5 of the mint, which is both thestage_worldfilterBykey and thestages.ida plaza claim writes, so client and server agree offline. Writesrc/game/plaza-stage-show.js(the moduleplaza-stage.jslazy-imports on first proximity) aroundstage-net.jsandsrc/shared/stage-voice.jsrather than rewriting either: the host avatar on stage speaks with TTS voice, lip-sync, and captions, synced across every attendee. Walking away (pastLEAVE_HYSTERESIS_M, 3 m beyond the edge) leaves the stage room cleanly. - Audience presence. Attendees get the server-assigned ring seats StageRoom already deals out, rendered as marked spots in front of the stage; the question queue is reachable from the in-world chat bar while attending.
- Tips in-world. A tip action at the stage that runs the existing
api/stage/tip.jsflow (this is an on-chain $THREE spend: render recipient, amount, and token and get the user's explicit confirmation before signing, every time). The tip leaderboard renders on the marquee, and a landed tip pre-empts the host beat exactly as it does on /stage. - Cost discipline. Everything here mounts lazily on first proximity and fully unmounts when the show is over and the player leaves. No stage room connection, no TTS fetches, no per-frame work for players who never approach. When no show exists and none is scheduled, the stage is a quiet decorated landmark, not an error.
Verify
- Two browsers on
npm run dev(multiplayer server running locally permultiplayer/README.mdif present, else against the deployed room): create a show viaapi/stage/index.js, go live, and confirm both clients hear and read the same utterances at the stage, seats assigned, question queue round-trips. - Tip path exercised end to end on a test amount with the confirmation gate shown; leaderboard updates; replaying the same signature does not double-count.
- Walk-away tears down the stage room connection (network tab shows the socket close); a player who never approaches the stage opens zero stage requests.
npm testgreen.
Report format
Files shipped, how stageId is derived, the join and teardown lifecycle in three sentences, what the marquee shows in each state, and the data/changelog.json entry.