When I’m tired in the evening, I like playing stupid little games. Eat everything. Clean up the rubbish. Find the matching pair. The kind of thing where my brain can finally clock out.

The other evening, I opened Hole.io on YouTube again and realised I’d already played through it. The levels were repeating. I was bored.

Well… why not give myself another three-day challenge and build my own game to rot my brain with? :)

What if I could eat my own city?

Generating a thousand different objects and maps didn’t sound like the most interesting part. But using open GIS data to let someone eat a city they’ve visited, or the neighbourhood they live in? That I liked.

That became Holearth: a browser game where a little hole swallows things, grows, and eventually develops a fairly unreasonable appetite.

The easiest part turned out to be getting map tiles, turning building footprints and roads into a playable scene, and filling it with little objects: trees, cars, street furniture, and things to hoover up.

The street layout comes from real geographic data. The little objects are procedurally placed around it. I don’t need to invent every new level when the planet already has so many places to borrow.

I used Three.js as the base, shadcn/ui for the interface, and sprinkled shaders over the whole thing.

A dust vortex lifting cars and debris from a city street in Holearth
The dust vortex at street level, picking up cars and anything else in its way. Map data © OpenStreetMap contributors, ODbL.

A hungry hole, a lot of tiles

Once the hole reached roughly a kilometre in size, the ordinary map started looking a bit dull. So I decided to switch to satellite imagery.

Much better. Also, more things to download.

Both maps and satellite images have weight. The services supplying them don’t always respond quickly, and sometimes they fail altogether. A game for switching my brain off was giving me plenty to think about.

I ended up loading tiles as the player moves, keeping the nearby world ready without trying to download everything at once.

The beginning of a round needed a different approach. I prepared map data for 20 starting locations and put it on my own server, so starting a game wouldn’t depend entirely on a third-party service answering at that exact moment.

I gave myself a limit: keep the hosted map data under 1 GB. Enough to get people playing quickly, without quietly downloading the whole planet onto my server.

And then the planet becomes dinner

As the hole keeps growing, the flat map gives way to a full 3D globe. Behind it is a photographic panorama of the real Milky Way. Apparently, eating a few cars wasn’t going to be enough.

I also played with different kinds of holes, so I could pick one to suit my mood. Objects react differently depending on which one I choose. It’s a completely unnecessary thing to spend time on, which probably explains why I enjoyed it.

At larger scales, the ground itself starts getting torn away, leaving exposed crust behind. I found that strangely funny, and it works especially well with satellite photos: a familiar landscape, with chunks missing because I ate them.

For three days, I think this was a pretty good experiment. Complicated, silly, and a lot of fun to build.

Now I have something of my own to mindlessly play in the evenings. I’m happy :)

Play Holearth and see how much of your city you can eat.

Thank you to all these sources!

This little game borrows a lot from people who make geographic data, imagery, and tools publicly available. These are the public APIs, tile services, and downloadable datasets used in the project:

Thank you to everyone who builds and maintains these sources. My evening brain rot has a surprisingly impressive foundation.