The fun and open source game library for HTML5 Games

KAPLAY (/ˈkæpleɪ/) is a JavaScript and TypeScript game library that makes it easy to create games for the web. It's free, open-source and fun.

KAFriend
Friendly API. Easy to learn, easy to teach.
KAFriend
A bunch of examples and assets to get started.
KAFriend
Strong support for TypeScript.
KAFriend
Is Open Source, free and always will be.
KAPLAY Banner

An enjoyable API based on blocks

KAPLAY is enjoyable and fun to use and easy to learn. That's why we've designed it to be based on blocks and functions. Here are some of the most common blocks you'll use.

Hoverable & Clickable

add([
  sprite("bean"), 
  area()
]);

Add a sprite

add([
  sprite("bean"), 
  pos(20, 40)
]);

Add a text

add([
  text("ohhi"), 
  pos(20, 40)
]);

Load assets

loadSprite("sprite", "/bean.png");
loadFont("font", "/font.ttf");
loadSound("sound", "/sound.mp3");

Run on update

onUpdate(() => {
  // code 
});

Run on draw

onDraw(() => {
  // code 
});

Run on loop

loop(1, () => {
  // every 1s 
});

Wait for run

wait(1, () => {
  // after 1s 
});

No more long nested methods likeobj.position.transform.translate(10, 20) Just simple and fun to use methods and functions.

Voices of KAPLAYERS

What our users say about KAPLAY. We are proud to have such a great community.

Endel's avatar

Endel@endel

Colyseus.io, Brawlball.io and Mazmorra.io creator

KAPLAY API is incredibly intuitive and easy to read. I love how it combines simplicity with power, it’s a truly innovative library that brings HTML5 games to life!
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.
Isaac Pante's avatar

Isaac Pante@ipante

Game Designer & College Teacher

KAPLAY is the best framework to teach programming and create fast and furious video games. We already won three awards with it, and counting!
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.
Amy's avatar

Amy@amyspark-ng

Clickery Hexagon's developer

The development of KAPLAY has allowed me to make Clickery an awesome game.
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.

Our great sponsors ❤

People who contributed to KAPLAY.js 🎉