KAPLAY uses a flexible plugin system that helps you extend the engine’s functionality with new methods, constants, or even new components.

Let’s take a look at how the default plugin myplugin() is implemented.

// k is the KAPLAY context
function myPlugin(k) {
    return {
        hi() {
            k.debug.log("Hi from myPlugin!");

Now you can use the plugin in your game:

const k = kaplay({
    plugins: [myPlugin],

// call the method!

Also there’s exist an alternative way to use plugins:

const k = kaplay();


You can explore plugins made by the community in our Discord.

kaplay logo