Loading…
Loading…
Quickstart
The starter kit is a complete, tiny game with the two Shardvolt hooks already in it. Change it into yours, or just copy the two lines into a game you already have.
Download the starter kit (.zip)index.html in any text editor. Change the title, colours, speed, what falls, what happens when you miss. Or delete the game part entirely and keep only the two blocks marked >>> SHARDVOLT. Reload the browser tab to see changes.parent.postMessage({ type: 'shardvolt:score', score: 1234 }, '*');
addEventListener('message', (e) => {
if (e.data?.type !== 'shardvolt:adStatus') return;
const { adsOn, loggedIn } = e.data; // e.g. adsOn ? lives = 4 : lives = 3
});Both are optional, but the score puts players on your leaderboard and the perk is what keeps ads on.index.html, or a zip with it at the root plus your images and sounds. Support keyboard and touch. Under 10 MB zipped.index.html, zip the export folder, and add the two hooks anywhere in your code. That's it. If your engine can't easily call parent.postMessage, skip the hooks; the game still works and still earns.