mugon.net docs
SDKsJavaScript

SDK versions

How the SDK version you build with maps to the platform's behaviour.

The way a game and the platform talk to each other is versioned by the major version of @mugon/sdk bundled into the game. Because a published game keeps the SDK it was built with forever, the platform has to understand every major it still runs.

  • js-sdk-version in mugon.toml says which SDK you target.
  • mugon publish verifies the bundle really contains that major and records the major with the game version.
  • The platform selects its behaviour from the recorded major before it creates the iframe. A version recorded with a major the platform doesn't support is refused with a clear message instead of a broken game. When the game reports a different major than recorded, the launch fails as well.

Within one major, changes only add things (new optional fields, new messages), so a game built with any release of a major keeps working. Anything else needs a new major. While the SDK is at 0.x, the same rule applies: the major (0) is the protocol generation.

Updating the SDK

Bump the dependency, rebuild, update js-sdk-version in mugon.toml, publish a new game version. Minor and patch updates need no other change.

On this page