Culture / Programming Languages

Tiny JavaScript Games from the JS13kGames Competition

14 Oct 2018 6:00am, by

A unique competition offers JavaScript programmers a chance to stretch their skills while also having some fun. This year nearly 300 games were submitted for the Seventh Annual js13kGames competition — each one with a file size less than 13kB.

“It’s great to see how the competition is evolving,” writes Andrzej Mazur, the contest’s founder, “and that the mindset of some companies is different…” As his brainchild has grown in popularity, “it’s not only me trying to convince them… they are starting to approach me, offering donations, prizes, partnerships, hackathons, and it’s really a pleasure to work with them!”

This year’s list of “partners” included GitHub, Mozilla, Microsoft, and eBay (and well as BLUR, Spartez, Photon, Workday, Game Distribution and Jscramber) — and Mazur hopes its fame will spread even further.

“If you like the competition, please help me share the good news about it with the world,” writes Mazur. “Tell your community about it, post in your group, share with your work teammates, etc. Every little bit helps, thank you!”

This year’s theme was “Offline,” Mazur told aspiring participants, adding “you’re free to interpret, use and abuse it however you want.”

But the final file size of every game had to be less than 13 kilobytes. “There’s nothing like insane constraints to bring out the best in people,” wrote the gaming site Kotaku.

The best way to experience the resulting madness is to play some of the games yourself. The “Entries” page has an icon for each of the 274 games, each one leading to its instructions page (some with feedback from the contest’s judges). Games could be submitted in four categories  — desktop, mobile, and server (for Node.js multiplayer games), plus a new WebXR category for virtual reality games.

And anyone whose game ranked in the top 100 received a commemorative js13k t-shirt.

The official js13kgames site also provided answers to frequently-asked questions — though many of them just ended up capturing the contest’s playful spirit.

Q: Why exactly 13 kB?
A: Well… why not? : )

Q: What’s in it for you? Are you getting paid?
A: Nope, it’s just my own idea and it’s made for pure fun…

Mazur describes himself as an HTML5 game developer, JavaScript programmer, and technical evangelist. But more importantly, he’s the man who stoked the enthusiasm of all of this year’s participants.

“This year the competition broke all the records AGAIN with 274 games,” Mazur wrote on Medium. “Both the quantity and the quality went through the roof  — some cool games I really enjoyed playing ended up around 150th place…

“It’s insane what you can create in 13 kilobytes nowadays.”

To assess so many games, the competition assembled a panel of 16 different judges, including Mazur himself, as well as Ewa Mazur (described as “graphic designer, mom, and wife”). Other judges included GitHub’s senior manager for developer marketing Lee Reilly, indie game writer Jupiter Hadley, and eBay software engineer Abiyasa Suhardi (also a full-stack JavaScript and indie game developer).

And Mazur also warmly offered a special acknowledgment “to all of you who participated, spent countless hours building your games, and submitted a whole bunch of awesome creation.”

“You already won the valuable experience of finishing a game!”

The competition was also meant to be educational. Its official rules urge participants to provide two versions of their games — one compressed into a zip file less than 13 kB, while “the second one should be in a readable form with descriptive variable names and comments (hosted on GitHub).” Obviously, you’re not allowed to link to external libraries or data files (or to off-server images). Although “If you manage to shrink your favorite library below 13 kilobytes including the code itself, then you can use whatever you want.”

And Mazur added playfully that “It doesn’t matter if you’re working alone or with your friends, just remember that the number of prizes is fixed, so you’ll have to share your trophies with your teammates.”

The contest began in mid-August  — on the 13th, of course  — with all entries due by Sept. 13.

And then on Oct. 5, Mazur announced the winners

But what was it like participating in the contest? Though it sounds challenging, Mazur told one audience that there are lots of development tools available to make a game with a small file size, and the biggest problem developers face wasn’t running out of space, but running out of time.

This year’s entrants seemed to agree. “A month sounds a long time, but commitments get in the way,” remembered developer Kev Etchells, “and I had a week in the middle where nothing was worked on, picking it back up again for the final week.”

But an even greater obstacle may have been his enthusiasm. “I didn’t help the situation by deciding to create a second game! I really wanted to create a game for the WebXR category too, so I had to split my time accordingly…”

Virginia-based Nick Shillingford experienced something similar while creating a puzzle game about a long-distance relationship plagued by network issues called Disconnected. “I spent an unreasonable amount of time trying to pick a color palette for the game…” he writes in the game’s README file.

Others managed to finish their game in a big burst of programming. “I spent mostly a half of my weekend developing this game,” wrote the New Zealand-based programmer who created a simple game called 13Kars. “With all the skills that I learned doing that, I’m pretty happy with my effort.”

That sense of accomplishment was an ongoing theme. “The best thing about this game (for me) is that it’s a finished piece,” wrote developer Benjamin Fox. “I have a bad habit of starting personal projects and not finishing them, so was excited to use the competition as a motivation to complete a game.” His game —  Offline: O.E.C.T  — lets players experience the thrills of scrambling up ladders in a building to collect power cells while blasting away at malicious organic batteries come to life.

And Cody Ebberson even created a multi-player game called JS13K Battlegrounds which involves stalking opponents in a desolate post-apocalyptic world. “This was a fun project,” Ebberson wrote in a post-mortem, “and I look forward to doing js13k again next year.”

Kev Etchells added that “my children have enjoyed testing/playing the game which is a huge bonus!”

Indeed, part of the fun of creating an under-13kB game seemed to be talking about it. A “Resources” page on GitHub links to at least 33 “post-mortems” by developers who entered this year’s contest — more than 12 percent of all participants.

But then again, maybe the contest is so unique that it’s something programmers can’t resist talking about. The competition was even featured on the official GitHub blog, in a post offering a list of their favorite games — 13 of them, of course — adding “This was such a difficult list to narrow down, as we enjoyed playing all of the JS13K entries.

“There are hundreds more to discover.”


WebReduce


A digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.