Guide
Requirements and best practices
What's checked before a game is published, and how to make it feel like the rest of the feed.
Required
index.htmlloads/sdk/v1/hg-sdk.jsbefore the game (without it, the upload is rejected)- You call
HGSDK.gameplayStart()when gameplay starts or continues - You call
HGSDK.gameplayStop()when gameplay stops (losing, pausing or going to the menu) - It has no start screen of its own and the first tap starts the game
- It's played in portrait and adapts to different screen sizes
- It doesn't load ads or ad networks by itself
- All its files are inside the package (nothing loaded from other websites)
- It follows the rules
Optional
Use them only if your game needs them. If you use them, follow the rules on this page.
- Score:
HGSDK.sendScore(score), if your game has a score. Without it, your game simply has no rankings. - Ads:
HGSDK.showAd({ type }), between runs or in exchange for something.
Cover and first tap
Before playing, the website shows your game's cover: logo, name, controls and “TAP TO PLAY”, with your game slightly darkened in the background (or the video you upload).
- Don't make your own start screen: the player would see two.
- Make the first tap start the game: taps go through the cover and reach your game. If a specific button has to be pressed, the player will need to tap twice.
- Don't call
gameplayStart()before the first tap: calling it removes the cover. - If you didn't upload a short cover video, keep your game moving while it waits: that way the cover background looks alive.
Screen and controls
- Portrait: design for a vertical mobile screen (9:16) and adapt the size to the window.
- Simple controls: tap, drag or swipe. On desktop, make it work with the mouse too.
Pause and gameplay
- Switching games: you don't need to program the pause; the SDK pauses on its own.
- Your pause menu: call
gameplayStop()when opening it andgameplayStart()when closing it.
Sound and music
- Use Web Audio or
<audio>: the SDK mutes and pauses them for you, following the website's pause and sound button.
Scores and rankings
- Each player has a single score in each ranking (today, this week and all time): their best.
- The score is a whole number from 0 to 10,000,000 (decimals are rounded down). Send the final score, not every point: once per run is enough.
- Don't rely on
localStoragefor high scores: the website saves them for players who are signed in. - Saving progress: use
localStorageas usual; the SDK keeps each game's data separate, so two games never overwrite each other. The website's Restart button reloads your game, so anything not saved is lost. - If your game has no score, don't call
sendScore, and tick “This game has no score” in the tester.
Ads
- Never load an ad network (AdSense, AdMob…) or ads of your own: ask the website with
showAd. - Your game must work without ads: a
rewardcan answerrewarded: falseat any moment. - Don't call
gameplayStop()orgameplayStart()because of an ad: the SDK freezes and resumes your game on its own. Call them only when the run really stops (losing, pause, menu) and when it continues. If your game does it, it's rejected until you fix it. - Ask for
breakads at natural moments — losing or finishing a level — never in the middle of the action, and not in the player's first run (that part is up to your game). The website decides how often they really appear. - A reward never gives score or anything that ends up in the rankings directly. Revives, continues, extra lives or skins are fine.
Isolation and files
- Your game runs in its own frame: it can't load anything from other websites. Talk to the website only through the SDK, never by calling its pages or its API directly.
- Inside that frame these don't work:
alert(),confirm()andprompt(), opening windows (window.open), forms and full screen. - A .zip or a folder with
index.htmlin the main folder (or inside a single folder that wraps everything). - Allowed types: HTML, JS, CSS, JSON, images, audio, video, fonts, WebAssembly and your engine's data files (Unity, Godot, GameMaker, Defold, Cocos, Construct, Phaser…), including compressed builds (.gz, .br). Server files (PHP…) and hidden files aren't allowed. Names starting with
_hgaren't allowed either. - The maximum size is shown in Upload game. Other limits: 50 MB for the unpacked game and 500 files.
HypercasualGaming