---
title: "klyo SDK for HTML5 games — scores, saves, rewarded ads"
description: "Reference for game developers: leaderboards, cloud saves, ad breaks, rewarded ads and in-browser gameplay clips, with the rules on ads."
url: https://games.klyo.pl/game-sdk/
canonical: https://games.klyo.pl/game-sdk/
type: strona
language: pl
author: klyo
organization: Klyo Illia Krasnopolskyi (NIP 7822656871), Łódź, Polska
contact: kontakt@klyo.pl
updated: 2026-09-09
llms: https://games.klyo.pl/llms.txt
---

# klyo SDK for HTML5 games

One file added to your game and it can talk to the page it runs on: it sends scores to a leaderboard, saves progress on our server, asks for an ad break and lets the player record a clip. The game gets no access to the page, to ads or to the server — it asks, and the page decides.

## How to add the SDK to your game

One line in index.html, before your own script. It also works when somebody opens the game outside the catalogue — calls do not break, they answer immediately.

``

## How to report that the game is ready to play

Call this once the game has loaded and can be played. The page then hides the loading cover and stops the spinner.

`klyo.gotowa();`

## How to send a score to the leaderboard

After every finished round. The score goes to the server leaderboard and to the player's records — including on a second device, if they have an account.

`klyo.wynik(1200, (o) => {
// o.rekord, o.rekord_dzis, o.pozycja_dzis
});`

## How to show the twenty best scores

Three periods: dzien, tydzien, zawsze (day, week, all time). The answer carries player names — the same ones the community shows.

`klyo.tablica.pobierz("dzien", (t) => {
showBoard(t.wpisy);
});`

## How to save progress across devices

Up to 64 KB per player and game, stored on the server. Load at start, save after meaningful changes — not every frame.

`klyo.zapis.zapisz({ poziom: 4, zloto: 120 });
klyo.zapis.wczytaj((z) => {
if (z.ok && z.dane) loadState(z.dane);
});`

## How to place an ad break where it belongs

You choose the moment, not us. Good places are the end of a level and the screen after a loss; a bad one is the middle of a fight. The game waits for the callback before it moves on.

`klyo.przerwa("miedzy-poziomami", () => {
resumeGame();
});`

## How to add a rewarded ad

The player turns it on with a button — watch and collect a bonus. Grant the reward ONLY when the answer has ok set to true; false means there was no ad, it did not finish, or the player closed it.

`bonusButton.onclick = () => {
klyo.nagroda((o) => {
if (o.ok) giveBonus(500);
else say("Bonus next time.");
});
};`

## How to request full screen

Browsers allow full screen only in response to a player's click, so call this from a click handler, not after the game loads.

`klyo.pelnyEkran();`

## How to let players record a clip of your game

One line and the player gets a working record button on the page. Frames never cross the window boundary — the game encodes them itself and hands over finished bytes, which is why this also works on phones, where browsers have no screen recording.

`klyo.obraz(myCanvas);`

## What the SDK does not do, and what you must not upload

**Your game must not carry its own ads.** No third-party network: AdMob, AdSense, Unity Ads, AppLovin, ironSource, Poki, CrazyGames or similar. The upload check rejects such a package and names the network it found.

**Why.** Ads are played by our page around the game frame. That keeps one publisher account, one settlement and a share you can verify. Two publishers on one page view is, to Google, invalid traffic punished by shutting the account down — ours, and indirectly yours.

**The game does not reach the page or the server.** No cookies, no player account, no data from other games: it runs on its own address and talks to the page through these calls only. That is why we can accept other people's games without reading their code line by line.

**Ads are not running yet.** The portal is waiting for Google AdSense approval. Ad breaks and rewarded ads already work: instead of a real ad the page shows a short stand-in screen and then answers exactly as it will later, so you can build and test the whole bonus mechanic before the first cent.

## What happens when somebody opens the game outside klyo

Nothing breaks. An ad break returns at once, scores and saves stay in the browser, and a clip simply has nowhere to go. You can keep one build for everything — you do not need a separate package for us.

## What we require from the package

- An **index.html** file in the root of the ZIP — the game starts there.
- The game must run **without an install and without an account** , in a browser, on phones too.
- Up to 100 MB. The check looks at size, missing files, third-party ad networks and traces of malicious code — in about a dozen seconds.
- The age questionnaire filled in at upload produces the label that decides visibility and entry into the store apps.

---

Źródło: https://games.klyo.pl/game-sdk/ · Wykonawca: klyo software house (Łódź, cała Polska) · Kontakt: kontakt@klyo.pl · Indeks dla modeli językowych: https://games.klyo.pl/llms.txt
