Ship HTML games with EmilyGaming global score support built in.
Upload browser games, choose the right scoreboard integration path, and let approved games submit global scores through the EmilyGaming SDK or legacy fallback messaging.
Upload game ZIP
Your package should contain index.html and all required assets.
Enable global scores
Choose SDK-first or fallback messaging for leaderboard support.
Get approved
Approved games can use platform leaderboard and player identity features.
- 1. Upload your HTML game ZIP with relative paths.
- 2. Turn on
enable_global_scoresif you want leaderboard support. - 3. Turn on
uses_emilygaming_sdkif your game already callswindow.EmilyGaming. - 4. Submit one final score at the real end of a run or round.
- 5. Use player name and leaderboard helpers to improve the in-game experience.
Checking the auto-injection option makes the EmilyGaming bridge available in your approved game build. Your game still must submit the final score by calling the SDK or sending an EmilyGaming score message at game over.
Game ZIP requirements
Package your game like a clean browser app so EmilyGaming can extract and serve it correctly from the play directory.
Required
- • A main index.html file
- • All CSS, JS, image, and audio assets inside the ZIP
- • A browser-playable HTML game
Recommended
- • Keep every path relative
- • Include a thumbnail image
- • Add instructions and controls
my-game.zip ├── index.html ├── css/ │ └── style.css ├── js/ │ └── game.js ├── assets/ │ ├── images/ │ └── audio/ └── README.txt
Global score setup options
EmilyGaming uses two upload or update options so developers can choose the cleanest integration path for new games, older ports, and fully native SDK builds.
enable_global_scores
Turn this on when you want the game connected to EmilyGaming global leaderboard support.
- • Lets approved games submit scores to the platform leaderboard
- • Makes the EmilyGaming bridge available in the approved game build
- • Works with SDK submissions or the fallback postMessage listener
uses_emilygaming_sdk
Turn this on if your game already directly calls window.EmilyGaming inside its own code.
- • Use this when your game already contains calls like
submitScore() - • Helps avoid duplicate or conflicting integration logic
- • Best for games built specifically for the EmilyGaming platform
Important: auto-injection does not submit scores by itself
Checking Enable Global Scores makes EmilyGaming available in your approved game. Your game must still tell EmilyGaming when the score is final by calling window.EmilyGaming.submitScore(finalScore) or by posting an emilygaming-score message.
Enable global scores, then add SDK calls or use the fallback postMessage method.
Enable global scores and mark uses_emilygaming_sdk.
Legacy fallback still works, but new games should use the SDK whenever possible.
EmilyGaming SDK
The SDK is the preferred way to connect games to EmilyGaming global score and player identity features.
What developers must add
At the real end of a round, run, or game, call window.EmilyGaming.submitScore(finalScore). Without this call, EmilyGaming does not know what the final score is and cannot save it.
Step 1: Load the SDK
<script src="/emilygaming-sdk.js"></script>
Step 2: Submit score at game over
Submit once when the round or run is actually finished.
async function endGame(finalScore) {
const result = await window.EmilyGaming?.submitScore(Math.floor(finalScore));
if (!result?.success) {
console.warn("Score submit failed", result?.error);
}
}
Step 3: Get the player name
Use the platform player name for menus, HUD labels, or score screens.
const playerName = window.EmilyGaming?.getPlayerName("PLAYER");
Step 4: Load top scores
Pull leaderboard data to show high scores inside your game.
const scores = await window.EmilyGaming?.getLeaderboard();
Step 5: Support in-game usernames
EmilyGaming stores the selected player display name in localStorage, so your game can show a familiar in-game identity even before a score is submitted.
const fallbackName = localStorage.getItem("emilygaming_username") || "PLAYER";
const playerName = window.EmilyGaming?.getPlayerName(fallbackName) || fallbackName;
Complete SDK example
<script src="/emilygaming-sdk.js"></script>
<script>
function getPlayerName() {
const storedName = localStorage.getItem("emilygaming_username") || "PLAYER";
return window.EmilyGaming?.getPlayerName(storedName) || storedName;
}
async function submitFinalScore(score) {
const result = await window.EmilyGaming?.submitScore(Math.floor(score));
if (!result?.success) {
console.warn("Score submit failed", result?.error);
}
}
async function loadTopScores() {
const scores = await window.EmilyGaming?.getLeaderboard();
console.log("Top scores:", scores);
return scores || [];
}
async function endGame(finalScore) {
await submitFinalScore(finalScore);
await loadTopScores();
}
</script>
Legacy fallback: postMessage
Older games can still use direct messaging. EmilyGaming listens for score messages and submits them to the platform leaderboard.
window.parent.postMessage({
type: "emilygaming-score",
score: Math.floor(finalScore)
}, "*");
Upload and update checklist
Before upload
- • Confirm index.html exists
- • Confirm asset paths are relative
- • Decide SDK or fallback integration
On upload/update
- • Turn on global scores if you want leaderboard support
- • Mark SDK usage if your game already calls window.EmilyGaming
- • Save or update your game entry
In your game code
- • Submit the score at game over
- • Use integer score values
- • Do not submit every frame
After approval
- • Test score submission while logged in
- • Check leaderboard values in the game page
- • Verify the player name appears correctly
Best practices
Do
- • Submit score only when the round is really over
- • Use integers for scores
- • Keep file paths relative
- • Test while logged in
- • Use the SDK for new projects
Avoid
- • Posting a score every frame
- • Using floating point score values
- • Depending on absolute file paths
- • Overwriting SDK globals
- • Assuming auto-injection submits scores automatically