This Real Time Strategy Game Is Just 13 Kilobytes

The Js13kGames competition challenges game developers to create teeny, tiny games in Javascript.
Image: Voidcall

Programmer Dominic Szablewski has done something that’s not easy: he coded and built a fully functional real time strategy (RTS) game that comes in at just under 13 kilobytes. Dubbed Voidcall, the game was inspired by classic RTS titles like Command and Conquer and Command and Conquer: Red Alert. Despite its diminutive size, the game still manages to include a lot of the features of a bigger title, including fully polygonal and textured models, a 3D rendered height map, and full unit pathfinding.


The open source game was Szablewski’s latest submission to the Js13kGames competition, a JavaScript coding contest for HTML5 game developers with a twist: all crafted game submissions must, assets and all, fall under 13 kB in size. Voidcall comes on the heels of last year’s submission by Szablewski: Underrun, a similarly-petite twin stick shooter using WebGL.

“Cramming an RTS into 13kb is really tough,” Szablewski told Motherboard. “You need a lot of code for just the basics that are expected of this type of game. I worked really hard to compress the tech as much as I could, but in the end I still had very little space left for the graphics, models and actual gameplay.” As a result, there’s a few understandable constraints on gameplay and features. For example, Szablewski says you can't order one of your grunts to attack a specific enemy, but only the closest one. Similarly, the game’s medic unit can only heal the unit closest to it. “I simply ran out of time and space to implement these things,” he said.

To drive the challenge of the size constraints home, Szablewski was quick to note that a single screenshot of his game is bigger than the game itself, and the entirety of the game’s source code fits on a single page at the default font. “Finding an art style that works within this size limit is quite hard,” Szablewski said. “Even if you go with pixel graphics, it's difficult to create something that looks coherent and like a real game.”


He pointed to other Js13kGames entries like Daniel Lawrence’s Xycore and Mateusz Tomczyk’s The Wandering Wraith as good examples of games that managed to come in under the size limit—but still provide a compelling art style.

The Js13kGames competition has been ongoing since 2012, and all past years’ submissions and winners are cataloged here. The theme of this year’s Js13kGames competition was “back,” a general theme developers can broadly interpret as they see fit. Thanks to corporate sponsors like Mozilla and Github, winners can net up to $20,000 in prizes.

Andrzej Mazur, a programmer at Enclave Games who runs the Js13kGames competition, told Motherboard he was inspired by events like the the JS1k (JavasScript 1 kilobyte) coding challenge, as well as efforts like 10k Apart and A List Apart, where coders were tasked with building websites in under 10 kilobytes.


“Limitation spawns creativity, and js13kGames is a great example of creative limitation—you can't make every possible type of game given the size limit, so it must be properly planned beforehand,” Mazur told me. “A deadline means you have to finish something before September 13th, so you learn to deliver projects, which is a valuable skill in your day job.”

Mazur said the Js13kGames content usually receives around 250 entries each year, and has penned a blog post detailing how judging for the competition works. Voting for this year’s contest is still underway, and winners will be announced on October 5.

As for Szablewski, he said those looking to participate in the competition would be well served by starting small and building out to fit the space constraints, as opposed to trying to force a bigger idea into a smaller space. “Next year I'll build something that doesn't require so much tech,” he said.