CPH Drive

How a city becomes a game

CPH Drive has one rule: nothing is invented. If a street, a tree or a lamp post is in the game, it is because an official survey or an open map says it is there.

Rådhuspladsen under an overcast sky in CPH Drive, the origin of the game’s coordinate system.
Rådhuspladsen, where the game’s coordinates start: every position is metres east and south of this square.
  1. Survey the streets

    Kerbs, carriageway, road paint, speed bumps and traffic islands are traced from Københavns Kommune’s survey, on top of the OpenStreetMap road graph with its one-way streets and speed limits. The result is cut into 154 chunks of 500 m.

  2. Raise the buildings

    The municipal 3D city model is matched to today’s GeoDanmark footprints, so demolished blocks are gone and new districts stand. Each of the 96,384 footprints carries its register facts: storeys set the rows of windows, wall material and age set the facade colour.

  3. Measure the green

    31,781 tree crowns are measured from Danmarks Højdemodel, the national elevation model, and change colour with the season. The ground itself follows the DVR90 terrain.

  4. Fill the streets

    Cars and buses follow the city’s traffic counts from 212 stations by the hour, cyclists its bike counts, and buses the Rejseplanen timetable. Parked cars fill the mapped parking at the counted occupancy.

  5. Run it in the browser

    Three.js draws the city and Rapier runs the car physics at 60 steps a second in a Web Worker, so the simulation never waits for a frame. Chunks stream in around the car and out behind it.

  6. Plug in the live city

    At run time the game asks DMI for the weather, follows aircraft around Kastrup, reads Vejdirektoratet’s traffic alerts, and tunes the car radio to DR.

The data, and its licences

SourceWhat the game usesLicence
Københavns Kommune open dataCity of CopenhagenSurveyed kerbs, carriageway, road paint, trees, lighting masts, signals, signs, bus stops, parking, cycle routes and traffic counts.CC BY 4.0
Copenhagen 3D city modelCity of CopenhagenThe building geometry of the inner city, reconciled with today’s footprints.CC BY 4.0
DatafordelerKlimadatastyrelsenBBR building facts, GeoDanmark footprints, the DHM elevation model, Skråfoto aerial photos and Danish place names.CC BY 4.0
OpenStreetMapOpenStreetMap contributorsThe road network, speed limits, one-way streets, shops, restaurants and sights.ODbL 1.0
DMIDanish Meteorological InstituteLive weather observations, with MET Norway for the forecast.DMI open data
RejseplanenRejseplanen A/SBus lines, stops and the weekday timetable.CC BY 4.0
VejdirektoratetDanish Road DirectorateLive traffic alerts and road works.Open data
OpenSky NetworkOpenSky NetworkLive aircraft over the city.OpenSky terms
DRDanmarks RadioLive Danish radio in the car, streamed and never stored.Public broadcast streams

The full list, with every dataset and the tool that processes it, is in the game’s data sources document.