Shock. Incredulity. Somehow an Arduino hobbyist built a Space Invaders arcade game that was only 3.1 inches tall. At just 80 millimeters tall – its joystick is made from a tiny hypodermic needle.
A video on YouTube proudly proclaimed it “the world’s smallest fully functional Space Invaders model”.
But it’s also an example of that special magic that geeks do – and an inspiring story of applied geekery from a very determined tinkerer.
A crazy Steampunk does it himself
The world’s smallest Space Invaders cabinet turns out to be the work of Nicholaus D. Cranch, a developer, UNIX/Linux system administrator and engineer based near Brighton, England. Cranch describes himself as a “programmer, engineer and polymath” in his profile on the Hackaday project site, and according to his professional webpage, he has worked with computers since the 1980s.
On his webpage, he recalled it as “a time without extra libraries to do complicated things. A time when you had to do everything yourself. A time when you had to extract the last drop of processing power from the machine and fit everything into the smallest space.
So, not too much of a surprise, Cranch is now working as a technology consultant.
But it also brought fascinating side projects into his life.
“A few years ago I bought a couple of these really cheap I2C OLED displays just to play around with,” Cranch said in the video about his Space Invaders project. The small screen measures just 25 millimeters in diameter – roughly the same width as a US quarter – offering just 128 by 64 pixels. “They’re very cheap, around $4,” Cranch told me in an email.
But you never know when a creative project will require a small 25mm screen.
Cranch is also a steampunk aficionado, and has begun turning one of the tiny displays into a steampunk prop dubbed the “Cybernetically Enhanced Eye Prosthesis”. Seeing is believing – a device that mechanically lowers a magnifying vision magnifier into position, using ultrasonic sound wave detection to calculate distances and a light-sensitive resistor controlling the aperture of its built-in iris.
Mechanical servos then position an appropriately powered vision-enhancing monocle — and it’s all controlled by an Arduino, an open-source electronics prototyping platform. The OLED screen offers a miniature display of its data (enclosed in a prism).
Cranch called it one of his “crazy Arduino steampunk projects”. And that’s not his only crazy ploy. He told me he was now planning a mechanically operated sundial – and a gentleman’s hat with a built-in cuckoo clock.
But the tiny screen seemed to call with its own implicit challenge.
Could he turn it into a tiny video game cabinet?
A flash of inspiration
Cranch started by grabbing a tiny Arduino Pro Micro board to power the SSD1306 OLED display.
Arduino enthusiasts have traditionally turned to two popular libraries for graphics display drivers – but unfortunately Cranch discovered that the Adafruit GFX and U8Glib libraries were far too slow and gobbled up too much available memory. At this point, he described the experiment as “a total failure”, according to his video, and moved on to the rest of his life.
But then he was able to revive the project later with an ingenious hack. Cranch realized that there is a simpler library just for displaying letters (rather than graphics) called SDD1306_text. And he found that his performance was “much faster and using less system resources”, he told me – although in the end it still wasn’t fast enough.
But by using it as a kind of framework, Cranch realized in a flash of inspiration that he could treat every symbol in the game as a kind of letter. “All glyphs (including aliens, base, etc.) in this game are 5px tall, so I stripped the library down to its bare essentials and hardcoded it to handle 5px characters from above.”
Or, as he put it in a later email, “It’s an ASCII library, but you don’t have to make an ‘A’ look like an ‘A’.”
He also changed the graphics driver so that it only updates parts of the game that have changed position. (“At the end of each iteration of the main program loop…the changed region is sent to the screen,” Cranch said in a comment on the Hackaday project site.)
But alas, even it was always too slow – until he then discovered a second workaround. The driver would accept a different clock rate, a faster 800KHz rather than its default 100KHz.
At this point, Cranch only had 512 bytes of memory left to work with – to implement the entire Space Invaders game. But like any good DIY programmer, he simply hacked the appropriate code and adapted it to the space available to him.
“The game code is entirely mine,” Cranch told me. “I found videos of the original game and just coded it.”
The final touch
Finally, Cranch made his own little cabinet out of hand-cut 1.5mm plywood. (The “Fire” button and joystick are controlled by micro-switches “scavenged from an old mouse,” Cranch explained in the video.) He encased the screen with an old CD case, covered in graphics of appropriate size that he had printed on a color laser printer and then glued in place.
Between matches, it even displays the original 1978 animations waiting for the next quarter, including a display with the initials of its top scorers.
The reactions are surprisingly sweet when he describes it in print or shares a photo. But seeing the little cabinet in real life – and then being invited to play it – provokes a reaction he fondly describes as “childlike excitement: that’s why I created the video”.
The remarkable video includes footage of the game playing – capturing the sound of its tiny beeps. “Excuse my fingers on the way,” Cranch said at one point, “but it’s really that small.”
Seeing this latest labor of love, I had to ask Cranch if there was a particular fondness that led him to Space Invaders, out of all the classic video games of yesteryear?
When the first Space Invaders came out in 1978, he was only 12, he recalls: “I used to go to arcades, but I was always very careful with the 2, £80 a week I was earning as a paperboy.”
His mother, he said, was “also very strict about ‘wasting money on stupid video games’.”
Space Invaders didn’t come into Cranch’s life until his school bought a few Commodore PETs, which they were allowed to play with on rainy days – and which he remembers had only one set installed: Space Invaders. And even then, he said, “being small, quiet and not part of the ‘crowd,’ I never had the opportunity to play.”
Now he has a machine of his own – although Cranch insists he’s not driven by bitter nostalgia. (In 1984, his family had purchased a second-hand Sinclair personal computer, the ZX81, which “came with a whole bunch of games,” Cranch pointed out in his email. program rather than play.” )
Instead, he recalled that Space Invaders “was such a classic. An iconic game that wowed people and pushed the boundaries of 1970s hardware.” So when it came to a side project, he considered it the perfect choice – “complex for its time, but within the realms of possibility for the Arduino”.
He was touched by the widespread reaction of appreciation his project received from his new fans online. “It’s quite humbling to be so interested in what was essentially a Sunday afternoon distraction.”