We had Lego in the office recently, and we managed to build a tank, helicopter and even a Loch Ness Monster.

We didn’t do badly from a handful of blocks, but there’s nothing more frustrating than when all you need is another one of those window-y sort of bits – you know, the transparent ones – and it’s not there.

Of course, most Lego sets today are themed – I’m on a waiting list for the new Back to the Future one – and it’s something that’s proved wildly popular with geeks the world over.

But while you will always have all the correct parts in such a set, it does slightly curb the pure creative joy to be had in using the bricks to make something that previously existed only in your head.

That’s where Minecraft comes in. The Swedish game, designed by Markus ‘Notch’ Persson as a personal project back in 2009, took the gaming world by surprise to become a runaway success, with people who download Minecraft on PS3, PC, Xbox, or who use Minecraft adventure maps, building things as cool and diverse as sailing ships or a recreation of King’s Landing from Game of Thrones.

Players have gone wild with the creative possibilities, either building ‘legit’ – i.e. in survival mode where each block must be painstakingly mined by the gamer – or in creative mode, where resources are infinite and readily available.

Needless to say, there’s a Lego Minecraft set now and the game’s creator is a multi-millionaire, though says he wants to create games that are enjoyed on a less mainstream level in future.

But that hasn’t stopped his company, Mojang, from being alert to the possibilities of using the game to change things in the real world.

Last week heralded the inclusion of Ordnance Survey terrain data in Minecraft, meaning players can now build constructions and fight monsters on a geographically accurate map of Snowdonia, but Mojang has already demonstrated the use of the game’s software in redesigning the real world.

It has rebuilt the ‘million programs’ – a 1960s/1970s construction of 1m apartments in Stockholm, Malmo and Gothenburg – in the game, using Google maps, city plans and photographs.

The slums are being renewed by Sweden at the moment, and Mojang saw this as an opportunity to enable residents to make their own in-game edits, such as a new shopping centre or making a park lighter at night.

These ideas are then put to politicians, who can decide if a real world equivalent can be made.

The UN saw the potential in the collaboration and is now working in partnership with Mojang to involve young people in urban planning projects. The first pilot is in Kibera, an informal settlement in Nairobi, Kenya.

One of Minecraft’s chief joys lies in the unparalleled freedom in creating something entirely new or in bringing fictional worlds to life without any more outlay than the cost of the game.

Now, however, town planners the world over are becoming alert to the possibilities the software contains for improving the world we actually inhabit.