0
/devs documentation v0.0.1-beta Documentation

SDK · v0.0.1-beta

Overview

SDK for HTML/JS web games that live on the Jugafy platform

Translation in progress. This page is not yet translated to English. The full reference is available in Spanish — see the Spanish version until we ship the English copy.

SDK for HTML/JS web games that live on the Jugafy platform. Provides tracking, leaderboards, progress persistence, player identity, feedback widget and shared UI chrome. No build step — a <script type="module"> that imports what you need.

Current version: v0.0.1-beta. The API may change before v1.0.0. Already-served uploads keep pointing to their version — we don’t break what’s in production.

API quick reference

Storage

  • storage.ready() / storage.set(k,v) / storage.get(k) / storage.remove(k) / storage.clear() / storage.keys() / storage.mode / storage.slug. → storage

Tracking

Scores

  • submitScore(game, name, score, durationMs?, extras?) / getTopScores(game, limit?, opts?) / persistRun(game, opts)scores

Player

  • getPlayerName() / setPlayerName(name) / ensurePlayerName() / sanitizeName(raw)player

UI chrome

  • mountFeedbackWidget() / submitFeedback(payload) / mountTopBar(name, slug) / mountDiscordFooter(target, opts?) / mountLangToggle(target)

i18n

  • t(key) / getLang() / setLang(lang) / onLangChange(fn) / applyI18nTo(root) / SUPPORTED_LANGS

Constants

  • JUGAFY_SDK_VERSION / DISCORD_URL

Roadmap

  • Cross-device storage sync (game_progress server-side table) — gated to 5+ active devs with logged-in users carrying progress.
  • Publish to npm + jsdelivr (@jugafy/sdk@0.0.1) — gated to the same number.
  • TypeScript types — today the SDK is plain JS. If demand shows up on Discord, we ship.
  • v1.0.0 API freeze — when 3+ external devs have shipped to production without SDK-related issues.

Missing something? Drop feedback on #feedback-sdk in our Discord (link in the SDK via mountFeedbackWidget).

Sign in to Jugafy

Save your scores, hit the leaderboard, and sync progress across devices.

Talk to us

Bug, idea, gripe — anything helps us make this better.