Simutown
A toolkit for scripting small pixel-town scenes that explain ideas: write a short TypeScript script and the townsfolk walk, talk and pass things on in a film you can play in a browser or render to video. Think manim, for a little town of people. Its town runs live here, on Zurich time.
GitHub ↗ TypeScript · Canvas · no dependencies
Simutown started from the Smallville sandbox of Park et al. (2023), the little town of generative agents, and from manim, which turns maths explanations into code. I wanted the town without the language models: a scene is a short script, the author decides what happens, and the same script always gives the same film, frame for frame. That makes it a tool for explaining things (how word of mouth spreads, how a queue forms) rather than a simulation of anything.
What you see above
The village above is not a video. It is Willow Square, the town that ships with Simutown, drawn live in your browser by the same engine that renders the films. Each of the fourteen townsfolk works through a plan for the day on Zurich time: Bo opens the bakery before dawn, the children are at school until mid-afternoon, Raj does the post round, Emil walks home from the library long after everyone else has gone to bed. Click a building to step inside and see who is there, or click someone to follow them through their day (the People panel shows their plan). The light follows the real Zurich sun for the date, so in winter the lamps come on before five.
Nothing runs on a server. Every day is scripted in advance, with a little variety picked per date: the day is cut into forty-second episodes, and who moves where, who stops for a chat and what they say all come from a generator seeded with the date and the episode number. So anyone who opens this page at the same moment sees the same town.
For now nobody in it thinks: the plans, the thoughts in the bubbles and the lines are all written by hand. Plugging a small language model into a few of the townsfolk, Smallville-style, is the obvious next step.
Using it
Simutown is open source under the MIT licence. The README has the quickstart, and the repository comes with instructions for coding agents, so you can ask one for a scene in a sentence and get a rendered film back.