One party in memory, streamed to everyone

A room is a single party held in server memory and streamed to every watcher, so everybody sees the same betrayal at the same moment and the model is paid for once per beat however many people are looking.

The alternative, a simulation per visitor, is the default shape for an AI toy and it is wrong for this one twice over. It multiplies the bill by the audience, and it destroys the only thing that makes a simulation worth watching with other people: that it is the same one.

What follows from it

  • Cost is flat in the audience. The marginal watcher is a socket. See cost.
  • One replica, always. Two replicas is one URL serving two different parties. See one replica.
  • No database. State lives in memory and dies with the process, deliberately. What deserves to outlive a process is a file you saved.
  • Rooms start on a watcher. Nothing ticks in a room nobody has opened, and a party under way finishes anyway.

The server owns everything

The server never sends positions. It says where each person is, as a zone, and what they are doing, and the browser walks the figure there. Nothing in the rendering layer may feed back into the simulation except a click to select somebody.

That line is not architectural fastidiousness. Positions computed in a browser are per-watcher, and the moment any of them matters to the simulation you have as many parties as tabs.

You can walk away

Close the tab mid-party and the night plays on without you. Come back and you have missed something, exactly as you would have. A simulation that pauses when unobserved is a recording with extra steps.

Read next

More on the build