What is Kontra.js?

Kontra is a lightweight JavaScript gaming micro-library created specifically for the Js13kGames game jam.

The goal of Kontra is not to implement everything you could possibly need to make a game. There are already libraries out there that do that (like Phaser).

Instead, Kontra aims to implement basic game requirements like asset loading, input, the game loop, and sprites to keep the library very small and focused. This allows it to be used when your game size is limited (a la Js13k).

Kontra does provide some more advanced data structures like object pools and quadtrees that have been fine tuned to be small, fast, and memory efficient.

Kontra prides itself in being:

  • Lightweight: tries to take up as little room as possible and strives to reduce the file size every major release.
  • Modular: pick and choose what you want through ES modules.
  • Extensible: everything is customizable and can be extended.
  • Fast: all logic has been removed from the update and render cycles.
  • Memory conscious: takes up as little memory as needed and tries not to be wasteful about the memory it does take up.

Use it When

  • You want to get something up and running fairly quickly.
  • You want a basic structure that is easy to scale and extend.
  • In conjunction with other libraries (like Playground.js).
  • Prototyping.
  • Game jams.

Ready to Get Going?

Support Future Development

Kontra.js is made possible by users like you. Through helping find issues, opening pull requests, and funding continuous development, Kontra.js can continue to provide you with quality improvements and updates.

When you become a Patron, you get access to behind the scenes development logs, the ability to vote on which features to work on next, and early access to development builds.

Top Patrons

  • Karar Al-Remahy
  • UnbrandedTech
  • Innkeeper Games