By the late eighties gamers had become all too familiar with the uncertain nature of the licensed game. The general gaming public saw many titles based on movie and television franchises of varying quality for well over a decade, but games based on toy licenses were more of an oddity. However, UK software house Codemasters brought such a title to the NES in 1991 in the form of Micro Machines, a unique top-down racer that featured a variety of different miniature vehicles dashing across real-life backdrops, including breakfast tables and bubble baths. And on top of its distinctive premise Micro Machines was ironically a game unlicensed by Nintendo, released on a range of different cartridges that bypassed the infamous CIC lockout chip on the NES.

"Codemasters had reverse engineered the console, and built a development system which would allow us to write games"

Codemasters - founded by young siblings Richard and David Darling in 1986 - had established themselves by creating budget games for home computers. The NES was not hugely popular in the UK at the time, as home computers from companies like Sinclair, Acorn and Commodore dominated the market. But in the US the NES was a rip-roaring success, so Codemasters began looking across the pond to get in on the action. Micro Machines designer Andrew Graham tells us how Codemasters got started on NES development and how he was assigned to the title as a twenty-year-old coder. "Codemasters had reverse engineered the console, and built a development system which would allow us to write games. That was when they contacted me," he explains. "I had done a couple of projects for Codemasters from home on the Commodore 64. One of them was a port of the Oliver Twins' Pro Ski Simulator. On the strength of this the Darlings asked me if I would be willing to do a NES project." With the primary platforms in the UK mainly using disks or cassette tapes, this made the proposition of creating a NES game all the more intriguing, as Graham adds. "I had been writing home computer games for a while, but to be able to write games that would be burned onto a ROM and put in a cartridge was a dream come true."

After Graham's involvement, the other key person brought into the fold was artist Paul Perrot, whose introduction to gaming was typical of the DIY nature of the UK development scene. "I was an aspiring but as yet unsuccessful cartoonist in 1988 and ran into Richard Darling in a pub at Christmas. He convinced me to give it a go and it seemed a fun thing to have a go at. It wasn't a hard sell!" he tells us, going on to reveal the humble nature of development. "Andrew and I shared a Portakabin for the duration of the project. It was pretty cold in winter as we only had an oil heater. We'd play each other at the game to see who would brace the cold to make coffees in Codemasters's renovated farmhouse." As was usual of development teams at the time, there were only a few more people involved in the creation of the game, with others working off-site. "I never even met Andrew's brother who did the graphics for a couple of the maps," Perrot explains.

Before any mention of toy licenses, Micro Machines originally pursued a different direction. "Micro Machines was originally designed as a beach buggy racing game," Graham reveals. "We had graphics done for it with sand dunes to jump over. At the time it was called 'California Buggy Boys'. While working on this, deals were being made for the distribution of our products, and this brought Codies into contact with toy firm Galoob. The NES was enormous in the US at the time, and Nintendo had a tight control over the market for games and peripherals."

"Anyone who could get around the technical and legal restrictions could make a lot of money"

This partnership lead to one of the NES's most-loved, yet infamous, add-ons: the Game Genie, released in 1990. This literal game-changing device allowed players to temporarily alter their games and punch in a variety of cheats. Of course, this landed Galoob and Codemasters in hot water with Nintendo. The Japanese giant tried suing Galoob, but ended up losing. "Anyone who could get around the technical and legal restrictions could make a lot of money," Graham appropriately adds. But it's clear that the Game Genie wasn't the only tool Codemasters had built. "We also had a device that allowed you to load games to the NES from a CD. In a sense the games that we were writing for the NES at the time were a side-line to these devices."

It was alongside Codemasters' tinkering and the huge success of the Game Genie that Galoob - now part of Hasbro - gave the plucky British company the licence for its Micro Machines toy line. Thus, California Buggy Boys was no more, and the transition into the toy-based racer began. "They sent us the full set of toys, which ended up strewn around the Portakabin," Graham tells us, going on to explain the efforts undertaken to stay faithful to the licence. "We were trying to include the full range of Micro Machines, so there were boats and helicopters, which didn't work so well from a gameplay perspective. They also had strange Mad Max-type vehicles that we needed to include. In the later games we just put in whatever vehicles we wanted, regardless of whether they had a toy for it or not."

This dedication to following the licence also impacted the level design, with the finished game featuring imaginative settings and hazards such as school desks with rulers for bridges, breakfast tables with globs of honey slowing racers down, and pool tables that had players driving into pockets and being teleported out of others to continue the race. "At first I was keen for the cars to be racing in full-scale environments, since that is what kids are imagining when they are playing with the toys," Graham tells us, "but it had been suggested that we set the game in toy-scale environments. I have to admit that I was resistant to the idea at first, but eventually I came around to it, thinking that it would certainly set the game apart from others. Once we started thinking about the kind of places the cars could be racing in, it became clear that we could have a lot of fun."

"I just tried to represent a global collection of kids really to be racially inclusive"

This process naturally involved some graphical changes to California Buggy Boys, but Perrot was up to the task. "I used various iterations of Deluxe Paint on the Commodore Amiga, starting with Deluxe Paint II. Initially I was swapping 3 1/2 inch disks between the program and the data disks. Then I got an external 3.5 inch drive which was a fairly special day. Frequent power cuts in the Portakabins made the days extra fun!" But alongside the annoyances, it appears there were relaxing moments, too. "We'd go to the pub at lunchtime, play pool and come up with ideas for maps. Like the Pool Table map, unsurprisingly."

To sit alongside the bright aesthetics and the imaginative tracks there was a series of cartoonish characters that players could choose as their avatar for racing (as well as the opposing A.I.), with quite a range in terms of race and gender. "I painted up some water-coloured pics for each one and David Darling signed off on them," Perrot explains. "I just tried to represent a global collection of kids really to be racially inclusive. They're fairly clichéd, and possibly not one hundred percent politically correct today, but I ran into someone only last week who actually remembered most of their names, which was surprising."

To accompany the bright and joyful nature of the game, a good soundtrack was needed. Composer Matt Gray was hired due to his previous work with Codemasters on compositions and conversations for the Commodore 64, including series like Dizzy and The Last Ninja. He explains the odd set of tools required for the job. "Codemasters gave me a modified NES which had been re-housed in the cardboard packaging box with an RS lead so I could code from PC. It was an ancient PC with the old floppy disks. Very slow, very temperamental." And due to his previous experience with the Commodore 64, Gray used it as a starting point for composing. "I was able to fairly quickly write a new music player based on my Commodore 64 SID player and replicate some of the signature sounds such as chord-plexing, vibratio and pitch bends. However, the NES's sound chip was no match for the mighty SID so ultimately I had to adapt my style to it."

"The 'Smoke on the Water' influence was pretty blatant for the race start riff"

The in-game music featured during menus and in-between races, and was comprised of cheerful little ditties. But for those with a knowledge of classic rock, it's obvious that the track played before each race is eerily similar to Smoke on the Water by Deep Purple. "The 'Smoke on the Water' influence was pretty blatant for the race start riff," admits Gray. But it seems the soundtrack also foreshadowed popular songs to come. "People have commented on the title theme being the basis for 'Clocks' by Coldplay," Gray continues. "I remember the first time I heard Clocks and commenting to a musician friend that I used to play the arpeggiated chord sequence all the time. I think he thought I was insane! Shame I modified it slightly for Micro Machines, otherwise I could have had a case!"

Micro Machines's launch was unfortunately held up by the Galoob vs. Nintendo court case, but that didn't stop Codemasters and Canadian-based publisher Camerica from indulging in some clever promotion; one example was selling the game on the Home Shopping Club with an endorsement by 1990 Nintendo World Champion Thor Aackerlund. Even with the late release, the game proved to be a hit with players and critics alike, with outlets praising its simple arcade-like controls and the brilliant two player head-to-head mode – a points-based mode where players must gain a lead to make the other disappear off the screen. As a result, it stands as one of the best unlicensed games for the NES and is one of the console's best racing titles - if not the best.

And like the toys it was based on, the different types of unlicensed cartridges for Micro Machines can form a small collection. Among them are gold, silver cartridges published by Camerica for the US and Canada, a Game Genie-esque cartridge released in the UK and EU, a cartridge used for Codemasters's Aladdin Deck Enhancer, and a yellow Famicom cartridge published under the name BIC, with the game labelled as Micro Motion. However, due to various hardware revisions on the frontloading NES, the success of booting up the game can vary on this version of the system.

After its initial stint on the NES, the game was ported to numerous other consoles and home computers (the SNES edition actually gained a licence from Nintendo), kick-starting a series that went through multiple hardware generations and saw remakes on both home and mobile platforms - in fact, Codemasters is about to release a new version of the game years after losing the licence. But looking back on the original game, Graham reflects on the experience of making games for the NES. "Come to think of it, the age of releasing games on ROM is long gone now. That door is closed. It was nice to have the experience of having your game boot up instantly from a cartridge." Perrot adds to Graham's nostalgic sentiment by reflecting on the special type of freedom games developers had in the late eighties. "We had a lot of latitude as everything was signed off in-house. I think there was a lot of trust and belief in what we were doing and to not have a bunch of suits micromanaging (no pun intended) every aspect of the project was something that today is maybe unheard of."

Thanks to Andrew Graham, Paul Perrot and Matt Gray for their time. Thanks to Jason Falcus for setting up the interview with Andrew Graham. You can play Andrew Graham's new game, Time Monkeys, on Apple TV and iOS.