Blog · Behind the scenes

How we put real downtown Cairo inside a taxi game

When you drive your cab in Crazy Cairo and Talaat Harb leads to the square it's supposed to lead to, that's no accident. The streets in the game are the real streets, taken from an open map. But a map alone isn't a game, and this is the story of the difference.

The 1Gamed team ·

It started with a real map

We started from OpenStreetMap, the open map written by volunteers around the world. From it we took the whole of downtown: an area of roughly 2.75 by 3 kilometres, from the Nile Corniche to Ramses and Ataba.

The map of central Cairo as the game uses it: the Nile, streets and buildings, with Tahrir, Talaat Harb, Ramses and Ataba marked
The map the game is built from. Light buildings come from the map itself, dark ones we generated. Map data © OpenStreetMap contributors.

These are the numbers that ended up in the game's map file:

ItemCount
Street segments2,264
Buildings from the map itself3,679
Buildings we generated to fill the gaps13,137
Street and place names1,825
Real places marked299
Points in the road network25,070

What the map didn't say

The first time we drew the map as it was, downtown came out empty. The streets were all there, but most of the buildings weren't, and the blocks between the roads sat empty. So we wrote code that looks at every empty block and fills it with buildings along the street front. Of every five buildings you see, roughly four were generated and only one comes from the map.

The opposite happened too: some buildings on the map were whole city blocks drawn as a single shape. We split those into separate roofs so they read as neighbouring buildings, like the real downtown. The Corniche needed its own attention, because the generator kept placing buildings on the river side until we told it that was a promenade.

A top-down view of a street in Crazy Cairo: rooftops with water tanks and laundry, a cab and traffic
Rooftops are painted to look lived in: water tanks, satellite dishes and laundry.

Small things that matter

  • Shops where they really are: the map has 65 places to eat, 62 hotels, 38 cafés, 25 banks and 12 cinemas, and the game paints their signs in their real locations.
  • Hand-drawn landmarks: famous places get rooftops drawn especially for them, and a brown tourist sign to tell you where you are.
  • Names in Arabic: many places are only on the map in English, so we wrote their Arabic names by hand. Felfela is فلفلة.
  • Metro entrances are where they should be, all 11 of them.

The one-way street

One-way streets are real in the game, and the other traffic respects them. But when we built the GPS that shows you the way to your fare, we made it ignore them. There's a comment in the game's code that explains why in one line: a Cairo cabbie ignores one-ways.

A junction in Crazy Cairo with the green GPS line leading to the fare, trees and pedestrian crossings
The green GPS line. If it runs the wrong way down a street, that's on purpose.

So what?

A map gives a game something that's hard to fake: the feeling that you know the place. If you've lived in Cairo you'll catch yourself taking a route you know by heart. If you've never seen it, you've still driven around its real centre.

Take a drive yourself: play Crazy Cairo in your browser. The game credits its map on the title screen, because none of this would exist without the work of OpenStreetMap's contributors.