What does the 13KB size limit mean in js13kGames?
Updated
The 13KB size limit means your entire submitted game — all code, markup, styles, images, audio, and any other assets — must fit within 13 kilobytes after packaging. It is the defining rule of js13kGames, a coding competition for web game developers, and it applies to the final compressed submission rather than to your source files.
What exactly counts toward the 13KB
The limit is measured on the packaged, ready-to-run version of the game, not on your development folder. In practice that means everything the browser needs to load and play the game counts:
- JavaScript — your game logic, engine code, and any libraries you include
- HTML and CSS — the page structure and styling
- Images and sprites — every graphic asset
- Audio — sound effects and music
- Fonts and other data — anything else shipped with the game
If it has to be downloaded for the game to work, it counts. A common point of confusion is that source code and build tooling do not count — only the output that players receive.
Why compression makes the limit less brutal than it sounds
13KB is the size of the packaged submission, and packaging usually includes compression. A ZIP archive, or a compressed bundle served to the browser, can shrink text-heavy code dramatically. That is why competitors can fit surprisingly complete games into the limit: repetitive code, whitespace, and verbose identifiers compress well.
The practical consequence is that the limit rewards two things at once:
- Small raw output — fewer bytes before compression
- Compressible output — code and data that shrink well
Techniques that help include minifying code, removing unused libraries, generating assets procedurally instead of shipping image files, and writing compact audio or synthesizing sound at runtime.
How the limit shapes what you build
Because every byte is contested, the constraint pushes design decisions in specific directions:
| Pressure | Typical response |
|---|---|
| Large image files | Procedural graphics, canvas drawing, or tiny palettes |
| Recorded audio | Generated sound via the Web Audio API |
| Heavy frameworks | Hand-written code or micro-libraries |
| Verbose code | Minification and short identifiers |
The result is that the 13KB limit is not just a technical rule — it is the creative premise of the competition. Developers trade asset size for cleverness, and the constraint itself becomes part of the challenge and the fun.
What the limit is not
It is not a limit on your source repository, your build scripts, or your development environment. You can write as much readable, well-organized source code as you like, use a bundler, and keep assets in a working folder — as long as the final packaged game that gets submitted stays within 13KB. The rule targets the artifact players run, not the process you used to make it.
If you are deciding whether to enter, the practical test is simple: build your game, package it the way it will be submitted, and check the size of that package. If it fits in 13KB, you are within the rule that defines js13kGames.