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).
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
}
});
Amy@amyspark-ng
Clickery Hexagon's developer
The development of KAPLAY has allowed me to make Clickery an awesome game.
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@niceEli
Developer
KAPLAY is one of the best libraries for TypeScript I’ve tried. It’s a very simple API yet very powerful.