Behind the scenes
How Naijapolis is built
A cozy 3D city builder that opens in a phone’s browser and runs without a connection. Here is how it is made: the technologies, the algorithms, the methods and the way it reaches players.
A nine-part engineering series · diagrams in every part
Nine parts, one game.
Each part stands alone, explains one idea with a diagram, and ends with something you can try yourself. Read them in order or jump to the one you are curious about.
- Build
One file, no framework
How a 3D city builder becomes a single page that opens on a cheap phone, and how the build keeps it that way.
Read part 1 → - Architecture
A kernel you can test
Pure rules on the inside, the messy browser on the outside, and the small API between them.
Read part 2 → - Simulation
The city’s heartbeat
Power grids, service coverage, mood and the monthly tick: the simulation that makes a town feel alive.
Read part 3 → - Graphics
Ground, water and light
A height-mapped island, a sky made of maths, soft shadows from tiny textures, and a game that lowers its own quality to stay smooth.
Read part 4 → - Audio
Highlife from maths
A generative soundtrack that follows the time of day, and the scheduling trick that stops it stumbling on a busy phone.
Read part 5 → - Data
Sharing without trust
Saves, city codes and the scoreboard: how one set of rules runs on both sides and nothing from outside is believed.
Read part 6 → - Delivery
Shipping and staying up
Tests that play the game, a pipeline that guards the budget, and a server stack that can lose a copy without a failed request.
Read part 7 → - Nature
Growing trees, flowers and water
Plants and rivers as recipes plus a seed: how a few numbers become a baobab, a flower bed and a river with a waterfall.
Read part 8 → - Systems
Waste and the politics of rubbish
A stock and a flow with a feedback loop in it: how a town’s refuse becomes floods, outbreaks and votes, and what a player can do about it.
Read part 9 →
The whole system,
in one picture.
The numbers beside the boxes are the parts of the series that explain them.
What is not in here
We share how things work, not how to get past them. You will not find passwords, keys, internal addresses, exact limits, or the settings of our defences in this series. Where a topic touches security, we describe the principle and leave out the specifics. That is on purpose: a design that is safe should still be safe when its approach is public.
Who this is for
Curious players, students, and anyone who builds things for the web or for games on modest devices. If you have ever wondered how a 3D game fits in one page, how a town simulates itself, or how a server can lose a machine without dropping a request, start at Part 1.
Or just play.
Everything in this series is running under the game right now.
Play Game