A fun game library for HTML5 Games

KAPLAY is a JavaScript & TypeScript game library that makes it easy to create games. It's the successor of Kaboom.JS. Make game development FFF (Fun, Fast, Fantastic).

KAFriend
Friendly API. Easy to learn, easy to teach.
KAFriend
A bunch of examples to get started.
KAFriend
Large community, always ready to help.
KAFriend
Open Source, free to use.
KAPLAY Banner

Make a platformer in no time!

One of the reasons why KAPLAY is so fun is because it's easy to understand and the API is made to be friendly.

kaplay(); // Starts KAPLAY
loadSprite("bean", "/sprites/bean.png"); // Load a sprite
setGravity(1600); // Set the gravity acceleration (pixels per second)

const player = add([ // add() works for adding game object
    sprite("bean"), // Add a sprite
    pos(center()), // Set the position to the center of the screen
    area(), // Add a collision area to the object
    body(), // Add physics to the object
]);

add([ // add() a platform to hold the player
    rect(width(), 48),
    outline(4),
    area(),
    pos(0, height() - 48), // Bottom of the screen
    body({ isStatic: true }), // Static body, it won't move
]);

onKeyPress("space", () => { // when space key is pressed
    if (player.isGrounded()) { // only if it's grounded
        player.jump(); // jump, given from the body() component
    }
});

Voices of KAPLAYERS

Amy's avatar

Amy@amyspark-ng

Clickery Hexagon's developer

The development of KAPLAY has allowed me to make Clickery an awesome game.
JSLegend's avatar

JSLegend@jslegendev

JavaScript content creator

KAPLAY has a very intuitive and easy to use API that makes gamedev a breeze compared to other alternatives.
niceEli's avatar

niceEli@niceEli

Developer

KAPLAY is one of the best libraries for TypeScript I’ve tried. It’s a very simple API yet very powerful.
Candy&Carmel's avatar

Candy&Carmel

Representative of Ghosts community

KAPLAY has amazing and easy to use features for any type of game. It's made making FIGHT fun and interesting.