OSS TanbouSign in with GitHub

Build 2D games with composable APIs and a browser-based playground

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
1,809
Primary language
TypeScript
License
MIT
Repository last updated
Oct 3, 2026
On this page

Overview

KAPLAY is a library for building 2D games with JavaScript and TypeScript. Game objects combine components for sprites, position, collision areas, physics, health, and other behavior, while update and input events define the game rules in code. Its browser-based KAPLAYGROUND lets developers explore the API and many examples before setting up a local project.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Compose each game object from the behavior it needs

Passing components such as sprite, pos, area, body, and health to add combines rendering, coordinates, collision detection, physics, and state in one game object. Tags support group behavior, such as updating every object marked as an enemy.

Sources: [1]

Connect input, collisions, and frame updates through events

onKeyDown can connect keyboard input to movement, onCollide defines reactions to contact, and onUpdate changes state each frame. Developers can begin with the minimal sprite-loading example and progressively add rules and interactions.

Sources: [1]

Best fit

Fits learning, prototyping, and browser-based 2D game work

KAPLAY fits people learning 2D game concepts with JavaScript or TypeScript and developers who want to test controls and rules quickly. The project advertises more than 90 examples in KAPLAYGROUND, providing a browser-based path for exploring APIs and behavior.

Sources: [1]

Before adoption

Choose a distribution path, namespace style, and release line

Package-manager installations require a bundler such as Vite or esbuild. Global APIs keep experiments concise, but the README recommends considering module imports rather than the global namespace for published games. Larger projects must still design asset handling, scene structure, input modes, and performance validation.

Stable release 3001.0.19 is available, while the reviewed default-branch package manifest identifies 4000.0.0-alpha.27.1. The Node.js requirement for package development and builds also changes from 20 or newer on the stable tag to 24 or newer on that development line. Select one line and keep package versions, examples, and type documentation aligned instead of mixing them.

Sources: [1][2][3][4]

Official sources

  1. [1]KAPLAY 3001.0.19 README(2026-10-04)
  2. [2]KAPLAY 3001.0.19 package manifest(2026-10-04)
  3. [3]KAPLAY package manifest at reviewed commit(2026-10-04)
  4. [4]KAPLAY 3001.0.19 release(2026-10-04)
Supplemental curator note

KAPLAY makes it approachable to prototype a 2D game with a small amount of code and add behavior through components. KAPLAYGROUND suits learning and experiments; package-based projects should pin a chosen release and use a bundler for repeatable development.

Try it in 3 steps

  1. 1

    Open KAPLAYGROUND

    Open the current official browser playground. KAPLAYGROUND does not guarantee that it is pinned to stable 3001.0.19, so this checks the current playground API.

    https://play.kaplayjs.com
  2. 2

    Enter the minimal game code

    Use the global kaplay API currently provided by KAPLAYGROUND to load and place the bean.png image.

    kaplay({ background: "#6d80fa" }); loadSprite("bean", "https://play.kaplayjs.com/bean.png"); add([sprite("bean")]);
  3. 3

    Run the example

    Press the visible “Run” control and confirm that the bean image appears on the blue background.

    Run
Check the official README

Growth

Growth trends · Last 30 days

1,809 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
5
Open PRs
27

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • javascript
  • game-dev
  • game-library
  • kaboom-js
  • kaboomjs
  • game-development
  • game-engine
  • typescript
Stars
1,809
Forks
119
Watchers
11
Open issues
69
Contributors
95
Owner type
Organization
Primary language
TypeScript
License
MIT
Repository last updated
Oct 3, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?