Excel Easter eggs ended 24 years in the past—however this open-source Space Invaders undertaking retains the enjoyable alive
I’ve at all times preferred the truth that older variations of Excel had hidden video games tucked away inside them. Microsoft stopped doing that years in the past, however Excel customers by no means utterly stopped having enjoyable with spreadsheets. I lately discovered an open-source Space Invaders-style sport that runs fully inside Excel.
Excel used to cover video games in plain sight
But the Easter eggs finally disappeared
Microsoft snuck some genuinely surprising video games into older variations of Excel. Excel 95 had the Hall of Tortured Souls, a Doom-style 3D maze, Excel 97 had a flight simulator (pictured above), and Excel 2000 had a driving sport known as Dev Hunter.
But that custom did not final. In 2002, Bill Gates informed Microsoft staff that Trustworthy Computing had turn into the corporate’s highest precedence, with a specific give attention to safety and reliability. Around the identical time, newer variations of Excel stopped delivery with these sorts of hidden video games. This meant we misplaced the intrigue and pleasure of discovering that the spreadsheet program we use for budgets and reviews accommodates a wholly pointless online game.
Microsoft is not the one firm to have turned a spreadsheet into a spot for video games. Back within the 2000s, an OpenOffice Calc Easter egg allow you to play a Space Invaders clone instantly in a spreadsheet. Two a long time later, due to VBA and somebody’s laborious work, I discovered myself doing basically the identical factor in Excel.
Play “Space Defenders” in Excel
Turn your spreadsheet into an arcade machine
Evanml2030’s Excel-SpaceInvader project on GitHub is an open-source VBA model of the traditional arcade sport. Download the macro-enabled Space Defenders workbook, open it in desktop Excel, and play instantly contained in the workbook.
Macro-enabled Excel information could be malicious, so at all times double-check what you are opening first. I opened this file in Safe Mode (by holding Ctrl as I opened Excel) and inspected its VBA (Alt+F11) earlier than I performed it. For extra particulars, scroll to the Security part beneath.
It’s way more recognizably Space Invaders than I anticipated. You transfer your ship back and forth, hearth on the incoming enemies, and attempt to clear them earlier than they attain you. The controls are easy: use the Left and Right Arrow keys to maneuver and the Spacebar to fireside. The sport runs inside Excel’s regular window, with the workbook successfully changing into the sport display screen. When you get hit, you are greeted with an abrupt “Uh oh, collision detected” alert, and you’ll click on Launch to play once more.
On one playthrough, I did encounter a glitch the place a falling object all of the sudden appeared subsequent to my rocket and ended the sport. Other than that, although, it labored excellently and performed like a correct arcade sport.
How to get began
If you’ve got learn the safety info beneath and are snug continuing, obtain the XLSM workbook from the project’s GitHub page. In Windows File Explorer, right-click the file and choose Properties. On the General tab, look underneath Security, verify Unblock, and click on OK.
You’ll additionally have to allow ActiveX controls in Excel for the sport to work. Open a clean workbook, go to File > Options > Trust Center > Trust Center Settings > ActiveX Settings, choose the choice you need, and click on OK. Once that is accomplished, shut the clean workbook, open the Space Defenders workbook, and allow its macros and ActiveX controls if prompted.
Remember to vary your ActiveX settings again whenever you’ve completed taking part in. This setting applies to Excel typically, somewhat than simply this workbook, so leaving it modified can have an effect on how Excel handles ActiveX controls in different information.
There’s a shocking quantity of code behind it
Excel is doing excess of displaying a couple of footage
For me, the fascinating half was seeing how the sport truly works. The VBA handles the sport state, motion, enemies, bullets, collisions, timing, and the repeated updates wanted to make all the pieces seem to maneuver easily.
It makes use of DoEvents, which permits Excel to course of different occasions whereas the sport is working. Without that, a VBA routine that frequently loops by the sport would shortly make Excel really feel unresponsive.
The undertaking additionally calls a few Windows API features. GetAsyncKeyState, from user32.dll, is used to detect keyboard enter, whereas QueryPerformanceCounter and QueryPerformanceFrequency, from kernel32.dll, are used for high-resolution timing.
The graphics are dealt with in an particularly Excel-ish method. The sport dynamically creates Microsoft Forms Image.1 ActiveX controls and makes use of them to show the assorted sprites. In different phrases, these issues flying across the display screen aren’t some particular Excel game-rendering system. They’re controls being created and manipulated by VBA.
I discover that extra fascinating than the truth that you’ll be able to play the sport itself. Someone has successfully constructed a small arcade-game framework inside a spreadsheet app.
Security: Opening a macro-enabled file from the net
In this case, I did not discover something regarding
Before taking part in, I inspected the workbook’s VBA to see what it was truly doing. I did not discover code that launches exterior packages, makes community requests, reads or deletes information, modifies the Windows registry, or makes use of apparent code obfuscation. I additionally did not discover an computerized Workbook_Open() or Auto_Open() routine.
The Windows API calls I discovered are used for the sport itself: GetAsyncKeyState handles keyboard enter, whereas QueryPerformanceCounter and QueryPerformanceFrequency present high-resolution timing. The ActiveX controls are used to show the sport’s pictures.
That doesn’t suggest you must mechanically belief each macro-enabled Excel file you obtain. It signifies that, on this explicit workbook, I did not discover something that appeared to do something past run the sport.
Microsoft disables ActiveX controls by default in Microsoft 365 and Office 2024, so you could encounter extra safety warnings when opening the workbook. That’s one other good motive to deal with downloaded macro-enabled information with warning.
Excel is a playground
You needn’t know VBA or construct a whole sport inside Excel to get inventive with it. I’ve used Excel’s humble grid to get creative in some surprisingly different ways, like making pixel artwork, planning a room, making a stop-motion animation, designing a board sport, and even mapping out a crochet sample. You simply need to cease pondering of Excel as someplace you solely put numbers.


