Skip to main content

Prepare the app

  1. Open Develop apps and create an app. The app’s identifier is the game identifier and must match id in manifest.json.
  2. Put manifest.json, the entry page, and nl-game-sdk.js in the game directory.

Pack

A game package is a zip file with the .nlgame extension and manifest.json at the root. Increase build by one before each upload. The Tap Tap template’s pack.sh is a useful reference:

Upload

Call the upload endpoint with your forum session. The form field file is the game package:
A successful upload returns HTTP 201 with {release, findings, url}. findings are warnings from the static scan. On failure: See Manifest, scopes, and game packages for the package checks. A game is registered automatically on its first upload with no approved scopes, pending review.

Channels and review

After review, staff approve scopes and release the package to beta or stable. They can set a rollout percentage, disable a game, or revoke a build. Revoked builds are deleted from the app’s local cache, and active connections are disconnected. A new build takes effect the next time the user starts the game. When the web version opens a page for an old build, the SDK redirects to the current version.

Test

  • Browser: open https://www.nodeloc.com/games/{slug} in a desktop browser. The forum redirects to the web version and completes authorization. Room invite links are /games/{slug}?room=….
  • App: open the game from the app directory or an invite link. The app downloads the game package and verifies its signature, and shows a retry option if loading fails.
  • Use nl.debug.log for debug logs.

Pre-launch checklist

  • build is greater than the previous one; scopes lists only what you use; network.connect lists only the addresses you need.
  • No inline scripts, external scripts, or eval. Large images are compressed to WebP, and the package is at most 20 MB.
  • Call nl.ready() within 3 seconds. Pause when sent to the background, and turn on setExitGuard during a match.
  • Handle AUTH_REQUIRED (show a sign-in button), USER_CANCELLED (not an error), SCOPE_DENIED, and NOT_SUPPORTED.
  • Read game energy numbers from nl.energy.getWallet() instead of hard-coding them.
  • Multiplayer games: the client does not referee, and it recovers from reconnections and sequence gaps.