Home › AI Game Development › Kontra
What is Kontra? The lightweight JavaScript gaming micro-library
Kontra is a lightweight JavaScript gaming micro-library, optimised for js13kGames — the small building blocks for a browser game, without the weight of a full engine.
Kontra in one paragraph
Kontra (github.com/straker/kontra) is a lightweight JavaScript gaming micro-library, optimised for js13kGames — the annual competition to build a complete game in 13 kilobytes or less. All the documentation lives on the project’s GitHub Pages site at straker.github.io/kontra. It is a micro-library, not a full engine: it gives you the small, focused pieces a game needs, and leaves the game itself to you.
The project passed 1,000 stars by early December 2026 and is released under the MIT licence. Be honest about its state: its last commit was 2026-01-30, so it is a stable library with real users, not one under active development. That is not a defect for a micro-library — the code is small, the API is settled, and it still does the job it was written for — but you should know it before you build on it.
What Kontra actually does
Kontra does not build your game. It gives you the small pieces every browser game needs, in as little code as possible.
1. Small building blocks for browser games
Kontra is a gaming micro-library: the focused helpers a JavaScript game needs — game loop, sprites, input, and the like — without the structure and weight of a full game engine. You assemble the pieces yourself, and the library stays out of the way.
2. Optimised for js13kGames
Kontra is optimised for js13kGames, where the whole game must fit in 13 kilobytes. When every byte counts, a micro-library that does only what you need is the point — a full engine would eat the budget before the game starts.
3. Documentation on the project site
All the documentation is on the GitHub Pages site at straker.github.io/kontra. The README itself is short — the docs site is where the library is actually explained.
4. A community in the game-jam channels
To chat about Kontra, the README points to the #kontra channel of the js13kGames Slack or the Gamedev.js Discord. Development is funded by users through Patreon, with patrons getting development logs, votes on what gets worked on, and early access to development builds.
Download and setup
Install Kontra from npm — the package is kontra — or clone the repository from GitHub. Full setup and API documentation is on the Kontra documentation site. To contribute, read the contributing file in the repository.
What it costs
Kontra is free — MIT licence, no subscription, no paid version. The project is funded voluntarily by users through Patreon, which buys development logs, votes on features and early access to builds — not the library itself.
Who Kontra is for
js13kGames entrants
You have 13 kilobytes and a month. Kontra is built for exactly that: small helpers that leave the byte budget for your game.
Game jam developers
You need a game in a weekend. A micro-library gives you a loop, sprites and input in minutes, without learning an engine’s whole structure.
JavaScript developers learning games
You know JavaScript and want to make a game. Kontra’s small surface means you learn the game, not the framework.
Developers who want tiny games
You like small, fast, dependency-light web games. A micro-library keeps the download small and the code yours.
Kontra at a glance
- Project: straker/kontra — “kontra: lightweight JS game engine”
- Licence: MIT — free and open source
- Popularity: over 1,000 GitHub stars by early December 2026
- Language: JavaScript, on npm as kontra
- Built for: js13kGames — games that fit in 13 kilobytes
- Docs: straker.github.io/kontra
- Community:
#kontrain the js13kGames Slack and the Gamedev.js Discord - Status: stable library — last commit 2026-01-30, not under active development
Honest limits
Kontra is a micro-library, not a full engine — it gives you small pieces and expects you to build the game around them, so if you want scenes, physics and an editor out of the box, pick a full engine instead. Its last commit was 2026-01-30, so it is a stable library with real users rather than one under active development; the code works, but do not expect new features to land. And the README is minimal by design — the real documentation is on the GitHub Pages site, so start there rather than in the repository. Our AI game development service builds small web games on libraries like Kontra, so you get a finished, playtested game instead of a weekend of setup.
Want a game without doing the setup?
Kontra is one of the tools behind our AI game development service: we build your game, playtest everything by hand, and hand over a finished game with its source code. Mini-games from £499, full 2D games from £1,499, 3D games from £2,999. You bring the idea; we do the building.
Have a game idea?
Tell us the idea — a sentence is enough. We will tell you what it takes and what it costs, honestly.