๐ŸŽฎ
EmilyGaming
Developer Portal
Developer dashboard

Build first. Upload second. Submit scores with a simple API.

EmilyGaming uses a simple API for global scores. Download the starter template before you upload, wire in your game slug, then submit the final score when a run ends.

๐Ÿงฉ

Start with template

Download the starter ZIP and plug in your slug.

๐Ÿ“ฆ

Upload ZIP

Include index.html and all required assets.

๐Ÿ†

Submit final score

Use the API once at game over.

Start with the template before uploading your game.

Starter Template

This is the recommended starting point for new EmilyGaming integrations. Enter your game slug and the template will be configured for you automatically before download.

Use before upload
Slug = your game URL name. Example: modern-defender-fx

Best use

  • โ€ข Download this before building your game
  • โ€ข Replace the sample code with your real gameplay
  • โ€ข Keep the score submit call at real game over

Whatโ€™s inside

starter-game/
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ game.js
โ””โ”€โ”€ README.txt

Global Score API

Use the same route for score submission and leaderboard loading.

No SDK required

Submit score

await fetch('/api/games/YOUR-GAME-SLUG/scores', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Bearer ' + localStorage.getItem('emilygamingUserToken')
  },
  credentials: 'include',
  body: JSON.stringify({
    score: finalScore
  })
});

Get leaderboard

const res = await fetch('/api/games/YOUR-GAME-SLUG/scores', {
  credentials: 'include'
});
const scores = await res.json();

Submit only once

let submitted = false;

async function endGame(score) {
  if (submitted) return;
  submitted = true;

  await submitScore(score);
}

Game ZIP Requirements

Package your game like a clean browser app so EmilyGaming can extract and serve it correctly.

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
Example ZIP structure
my-game.zip
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ css/
โ”‚   โ””โ”€โ”€ style.css
โ”œโ”€โ”€ js/
โ”‚   โ””โ”€โ”€ game.js
โ”œโ”€โ”€ assets/
โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ””โ”€โ”€ audio/
โ””โ”€โ”€ README.txt

Best Practices

Do

  • โ€ข Start from the template before upload
  • โ€ข Submit score only when the round is really over
  • โ€ข Use integers for scores
  • โ€ข Keep file paths relative
  • โ€ข Test while logged in

Avoid

  • โ€ข Downloading the template after upload
  • โ€ข Posting a score every frame
  • โ€ข Using floating point score values
  • โ€ข Depending on absolute file paths
  • โ€ข Submitting multiple times per run