I think education is ready for something new. Ohm City is my attempt to bring complex economics into your world: a small city in the browser where you make decisions and see what happens. The connections are the same as in the real world, but the city is small enough to understand them. I built it because I believe that when people see the consequences of their own decisions, they understand things in a way that no textbook can match. This is just the beginning. The city keeps growing, and so does my idea of what it can become.
When I was younger, I spent hours and nights in video games. I loved every minute of it. But imagine where I could have ended up if all those hours had gone into something that actually helps in real life. Things like how to do your taxes, how supply and demand work, or why inflation makes everything more expensive. Now I am a teacher, and every week I build and adjust new materials for my students. At some point I thought: I know how to build good lessons, so why not build a city that brings all of this to life? That is how Ohm City started.
In a time where AI takes over more and more tasks, I believe learning needs real human interaction: people who talk, argue and think together. That is my first principle, and it is the reason I built Ohm City.
I have always liked the idea of a flipped classroom: you prepare on your own, and the time together goes to conversations, arguments and thinking together. But preparation often feels like homework, and then it simply does not happen. Without the preparation, the good conversations never start.
Ohm City is my idea for that problem. The city makes economic concepts visible: supply and demand, cause and effect, what happens when one decision hits everyone else. You explore these things at your own pace, because it feels like a game, not like homework. And when you talk about it with others afterwards, you have already lived through the situation. That is when the real learning starts: what happened, why it happened, and what you would do differently.
Ohm City is a browser game built for the phone in your pocket. I build it with the help of AI: I research the options, make the decisions and test every build myself, and AI helps me write the code. Behind most things you see in the city there are dozens of small decisions I had to think through. Here is what the city is made of, and the thinking behind it.
The city runs on three.js (a 3D library for the browser), a custom physics engine, and plain JavaScript. I pack all of it into a single HTML file, because one file is easy to update, easy to test, and easy to roll back if something goes wrong on a Friday evening. Every library the game uses comes with the game itself, and my build script checks each one against its fingerprint on every single build. I wanted to make sure that everything you load comes from one place, and that a strict web filter never blocks a piece of the game because it tries to reach some other server.
The streets and street names come from OpenStreetMap, so you are driving on real roads with real names. The game builds the sidewalks, crossings and building blocks from that data when it loads. I cannot offer the graphics of GTA, but you do not have to download a huge game first: the whole city runs right in your browser. The same street network also drives the traffic: every car follows the real roads and stops at traffic lights.
Ohm City has been through many versions that I never published. A lot of experimenting went into finding the right visual style, and I chose this one because it gives the best result for the computing power a phone can offer. The image goes through a chain of effects before it reaches your screen. There is ambient occlusion to give buildings depth, bloom so headlights and shop signs glow, and a colour grade that gives the city its own palette. I chose AgX tone mapping because it handles bright and dark areas the way film does, and it keeps the colours natural even when the sun is low. All of that had to work on a phone, so every effect earns its place by what it adds to the feeling of the city.
Three.js is moving to a new graphics engine called WebGPU, but many Android phones do not support it yet. I had a choice: write the shaders in the old language and rewrite them later, or write them in the new one (called TSL) and find a way to run them on older hardware right now. I chose the second option, because I would rather do the hard work once. When I found that the compatibility bridge between TSL and the older renderer had bugs, I fixed them: on some phones a hardware limit crashed the materials, and the fog was not connected correctly. That was a deep dive into the engine's source code, but now the shaders are ready for WebGPU whenever the phones catch up.
I knew early on that lighting would make or break the mood, especially at night. Every street lamp in Ohm City is a real light source. To make that work on a phone, I divide the city into a grid of small cells when the game loads, and for each cell I store which lamps can actually reach it, and only if there is no building in the way. The shader then only checks those few lamps instead of testing every single one. That approach took a while to get right, but it means that a phone from 2020 can light the same city as a gaming PC.
I know that players lose interest quickly if a game does not feel real. Even though this is a browser game with limited resources, I decided to add rain, wet reflections, morning mist, wind, and spray behind the tyres, because I wanted the city to feel alive and authentic. The wet streets use a real mirror camera below the road to create the reflections. If that turns out to be too much for an older device, the game notices and scales down automatically: there are three quality levels, and a battery saver kicks in when the frame rate drops. So I get the atmosphere I want on newer phones, and the game still runs well on older ones.
A full day passes while you drive, and the speed of time is not the same throughout the day. Dawn and dusk run slowly because they are the most beautiful part, and midday goes faster because less changes visually. It gives the city a rhythm that feels natural even though a whole day takes less than ten minutes.
Every type of pedestrian is drawn in a single call, even when there are dozens of them on screen. To make that possible, I bake the bone movements of every animation into a texture before the game starts, so the graphics chip does all the work, not the main processor. Your own avatar uses the same system, so when you change your outfit, the game does not have to set up anything new. I chose half-float textures for the bone data because they use half the memory, and on a phone with a small graphics chip, that is the difference between smooth and stuttering.
Here is something most players will never notice: the car physics are deterministic. That means every player gets exactly the same result on every device, every time. When I started thinking about how to build the physics for the cars, I looked at what was already out there. Most physics engines are built for general-purpose simulation: they handle things like soft bodies, joints, ragdolls, and gravity in three dimensions. For a city where cars drive on flat roads, most of that is unnecessary weight, and it makes the code harder to control and harder to trust.
So I studied how floating-point numbers actually work on different devices and learned that even something as simple as a sine function can give slightly different results depending on the browser and the hardware. I built a custom physics engine that uses its own sine and cosine functions and only the operations that are guaranteed to give the exact same answer everywhere. The same physics code also runs on the server, so the server can check that a move really happened the way the game says it did. That matters because the in-game economy has to be fair: if players can fake earnings, the economic model stops teaching anything real.
That was probably the most challenging part of the whole project, and I learned a lot about how computers handle numbers at the lowest level.
The demo you are playing right now comes as plain files from Cloudflare Pages. The full version with missions runs on my own server.
I designed the game so that I never need to know who plays it. Players use codes, and I cannot connect a code to a person's name. The in-game economy uses double-entry bookkeeping, just like a real company: every time Watts move from one place to another, both sides are recorded, and the books have to balance. I chose that approach because Ohm City is about how a real business works, and a game economy that loses track of its money would teach the wrong lesson. When I change the database, I only ever add things, never remove anything, so older game saves always keep working.
I run more than a hundred automated checks on every build, in two different browser engines, from small probes to full drives through the city. Reference screenshots catch the moment something looks different from last time. My build system has a ratchet: quality numbers can go down, but they can never go up. If they do, the build stops. A separate check makes sure that nothing private ends up in the version players see. Every push to the repository runs these checks automatically on GitHub. After all of that, I play every build on my iPhone myself.
Behind all of this there are formal Architecture Decision Records where I wrote down the big choices: what options I had, what I tried, and why I picked one over the others. A strict rule in the code says which part is allowed to talk to which other part, and the build fails if anything breaks that rule. I keep these records because in a project that grows over years, you need to know not just what you built, but why you built it that way. That way, even as the project grows, I always know why something works the way it does.
I am also working on a pipeline where I upload learning material as a PDF, and AI agents turn it into a mission in the game.
If one of these parts makes you curious, write to me at contact@ohmcity.org.
Figures and clothing based on models by Quaternius (quaternius.com), CC0; some under CC BY 3.0 (creativecommons.org/licenses/by/3.0), adapted for Ohm City.
I designed Ohm City so that I never need to know who plays it. The demo has no accounts, no codes and no names.
Your progress stays in your own browser: your Watts, your character and your settings. Some browsers delete it after a while without a visit. Then the city starts again from the beginning.
The demo sets no cookies and uses no analytics, tracking or advertising. I run no server of my own for the demo. Cloudflare delivers the files.
For the full legal details, see Privacy at the bottom right of the start screen.
I built this city for you, and I want to know what you think. If you have a question, an idea, a bug to report, or just something nice to say, pick one and write to me. I read every message myself.
Best with headphones.
Tap Share , then “Add to Home Screen”. Start Ohm City from your home screen, and the whole screen is yours.No Share button? Tap ••• first.