js13kGames Competition or How to Write a 13K Game

On August 13, the 13th js13kGames (JS13K) game jam for JavaScript web game developers began. Participants have one month to write browser games that are no larger than 13 kilobytes when compressed to ZIP format. This year’s JS13K theme is “Triskaidekaphobia” — the fear of the number “13.”

Path to Glory - last year's winner JS13K

Path to Glory – last year’s winner JS13K

The jam is organized by web game developer Andrzej Mazur and Enclave Games, a studio for creating indie and mobile web games.

JS13K 2024 will feature five overlapping categories, including browser-based desktop and mobile games, virtual reality and decentralized platform projects, and unfinished games.

WebXR games are created using open source web frameworks A-Frame, Babylon.js, Three.js or PlayCanvas. Launched in 2021, the Decentralized category aims to explore the decentralization aspect of web games. Participants will compete in four competitions: OP Guild, Avalanche, Thirdweb and Arcadia. This year marks the first for the Unfinished category, which allows developers to share the progress of creating their projects.

Winners will receive various prizes, including logo T-shirts, magnet and laser discs, books, games and other attributes dedicated to the past JS13K, as well as a number of certificates.

Lines

As the name of the jam suggests, the project’s code and game assets must be less than or equal to 13 KB in compressed size. The ZIP file must contain an index.html file in the top-level directory structure. Once extracted, it must be run in a browser. The organizers encourage developers to keep the ZIP file simple so that it can be extracted on any platform. Developers can use tools that minify JavaScript source code.

Participants must provide the organizers with two versions of their game. The first version requires minifying and zipping the project to fit within the 13 KB limit, and the second version must be published to GitHub in a human-readable form with descriptive variable names and comments.

JS13K developers are not allowed to use libraries, images, and data files hosted on a server or services that provide data of any kind. For example, Google Fonts are not allowed. Analytics and other statistics gathering scripts are also prohibited. All game assets must comply with the package size limit, but the listed frameworks for WebXR games do not count.

The competition will end on September 13 after 14:00 Moscow time. From that moment on, the organizers will no longer accept applications, but there may be exceptions.

JS13K participants must own the rights to every resource used in the game. Submitted projects will be published and available for everyone to view. The organizers encourage only new and original games to submit.

Projects must work and be playable in at least two browsers: Firefox and Chrome. The more compatible browsers, the better. The game can be developed by one person or a whole team. You can apply to participate via the link. Participants may submit more than one game to the competition. Applications will be processed in approximately two days.

Voting among participants will take place over three weeks from September 15 to October 4, with the winners announced on October 5. More than 20 experts in the field will provide feedback on the games over the same three weeks. Their comments will also be published on October 5.

Competitions from previous years

Last year, JS13K had the theme “The 13th century”. First place went to the game Path Glory by Remi Vanstillandt. In this medieval beat ’em up, players have to fight through waves of enemies on their way to the final boss.

Dante

Dante

The previous year, the competition was dedicated to the theme “Death”. The winner was a puzzle Dante by Salvatore Previti. The 2021 JS13K competition focused on the theme “Space”. The winner was Ryan Malm with his spacewalk simulator Space Garden.

Space garden

Space garden

All works that have won prizes since 2012 can be found via the links below. 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012.

One of the participants of the 2021 JS13K, Frank Force, told me more about my project Space Huggers, which ended up in eighth place in the ranking of best works of the year. In total, 223 games were submitted that year. For Force, the 2021 competition was already the third.

Space Huggers is a run and gun platformer with procedurally generated environments and pixel art. The project is inspired by games like Broforce, Metal Slug and Contra. Force said he created the game engine LittleJS from scratch in pure JavaScript. The project in question uses LittleJS.

Before creating Space Huggers and other projects for JS13K, the developer created more than a thousand small programs. In 2018, Force won second place in the competition with the game Bounce Back. Two years later, his project NoteCraft won in the categories Audio and Innovation. Force later introduced the OS13k operating system, which received a special award from JS13K. Force last participated in JS13k in 2022 with Egg Time Rewind.

Force tried to make the LittleJS engine as compact as possible, but still very productive. The solution uses an object-oriented architecture, which makes it easy to create games. LittleJS uses WebGL to render a large number of sprites at 60 frames per second. The ZzFX tool is responsible for creating sound effects. The input system supports keyboard, mouse, touchscreen and gamepad.

Broforce

Broforce

Space Huggers does indeed sound a lot like Free Lives’ Broforce. The original came out in 2015, and Rambros made the prototype in a single weekend for the Ludum Dare game jam, Force noted. He added that as part of his research for his game, he spent several hours playing both Broforce and the prototype, taking notes.

The developer opted to use procedurally generated levels to save space and ensure replayability. Instead of adding a lot of extra content, Form focused on creating a fun and polished core gameplay. To make it even more challenging, the author decided to add four-player multiplayer to Space Huggers, the first such project at JS13K.

For his project, Force wanted to emulate the look of classic 16-bit games, so Space Huggers uses a pixel art-style sprite sheet. Most of the tiles are 16×16 pixels, with a few smaller 8×8 tiles. The entire game sprite sheet is a 16-bit image measuring 128×48.

Sprite sheet from Space Huggers

Sprite sheet from Space Huggers

When designing the sprites for Space Huggers, Force used the Broforce sprite sheet to help him understand the character designs. In his game, however, he reduced the character animation frames to two. The protagonist of Space Huggers is inspired by Greedo from Star Wars.

The player has a classic platformer move set, including the ability to break blocks and climb walls by jumping. Force noted that one of the most challenging aspects to implement was the way the ladders interact.

The protagonist can use the multi-purpose throw skill for dodging, short-term invulnerability, speed boosts, and other abilities. The main weapon is a pistol that kills most enemies with one shot and destroys objects and terrain in the level. The weapon has a limited range. The player also has access to three grenades.

All enemies use the same base code as the protagonist, so their AI acts more like a bot than typical video game enemies. At a high level, the code sends input to a generic character class in the same way the player would. This approach makes for interesting and complex combat situations while reducing the amount of code required.

The enemy design is inspired by the Spartans from the Halo series. They all use the same sprite, but with different shades and visor colors. The enemies also have different abilities. There are also mini-bosses in the game.

Force used several objects that work together to implement complex behaviors, such as spreading fire. Some of these objects can catch fire, setting nearby objects on fire. Other objects can explode, damaging and pushing nearby objects away, setting more things on fire. There are also barrels of water in the game that can extinguish fires.

All of these objects use just three sprites: a crate, a barrel, and a plate. By using different shades and colors, Force was able to represent many different types of objects.

The main characters respawn via flags after interacting with them. The developer also built in a radar system at the bottom of the screen. It shows where the enemies are in relation to the player.

To give structure to the level design, they have enemy bases that consist of several rooms and follow a specific set of rules. This includes both the level geometry and the placement of enemies and objects. Force called this perhaps the most challenging part of the game.

Space Huggers uses a multi-layered sky system as a background. The parallax of the mountain landscape is generated by an algorithm that creates the landscape using a small piece of code. A gradient of moving stars across the sky emphasizes the feeling of being on another planet.

According to Force, some levels will feature precipitation effects, such as rain and snow. This is a great way to show particle systems and collision physics, and to enhance the atmosphere.

The sound is handled by the open-source ZzFX tool. It is a small, standalone sound effects player that generates audio samples from 20 parameters. In total, Space Huggers uses 11 different sound effects and to make them play correctly, a lot of tweaking was needed.

Force said that with Space Huggers, he completely automated the build process. The developer created a BAT file for Windows that combines all the JS files and runs Google Closure, Uglife, and Roadroller to convert the code. The script also combines the minified code into a single HTML file and archives the HTML using the Efficient Compression Tool.

Over the years, Frank Force has worked on the games Psi-Ops: The Mindgate Conspiracy, Red Faction: Guerrilla, Starhawk, Doom (2016) and Mafia III.

You May Also Like

More From Author