Introduction

What Remix gives a game developer, how a game runs on the platform, and the ways you can build and ship one.

Remix is a platform for web games. A game is a single HTML document. Remix runs it inside a player frame on the mobile app, on remix.gg and on Remix Desktop, and it supplies the player, the scoring, the social layer and the progression features around it.

You bring the game. The platform brings players, identity, scores, named leaderboards, achievements, cloud saves, turn-based and realtime multiplayer, purchases and distribution.

How a Game Runs

Every game is one HTML document that loads the Remix SDK. Uploads through Remix Desktop, the CLI and the HTTP API add the SDK script tag for you, and Remix serves the game inside a frame on each surface. The SDK talks to the host through messages, so a game never needs to know which surface it is on.

The lifecycle is short:

  1. The game boots and calls sdk.ready(). The host answers with the player, the safe area and any saved state.
  2. The player plays. The game writes saves, leaderboard records and achievement unlocks as the moment happens.
  3. The run ends. The game calls gameOver exactly once with the score. The host draws the results screen.
  4. The host sends play when the player wants to go again. The game resets its run without reloading the page.

Leaderboards and achievements are declared once in the project's remix.json and served by the platform everywhere. An achievement declared there shows up on the game page on every surface with no extra UI work in the game. Named leaderboards are ranked by the platform and shown by the game itself through sdk.leaderboards.

Ways to Build

  • Remix Desktop is the creator app. Describe a game and the built-in agent writes it, previews it and publishes it, with the platform features wired in. Its Details page is where you manage achievements, and its agent can draw achievement icons in your game's art style.
  • Bring your own game. Any HTML5 game that follows the SDK contract can be uploaded. Use the Studio on remix.gg or the HTTP API to create the game and push versions.
  • Three.js games can use @remix-gg/three, a thin wrapper that owns the renderer, the viewport, the loop, input and the platform handshake. See Three.js.