본문으로 건너뛰기
ZokoGames

로그인

이 페이지는 아직 번역되지 않아 영어로 표시됩니다.

Versioning and migration notes

이 페이지의 내용

Versioning and migration notes

The script URL is the contract#

https://sdk.zokogames.com/zokogames-sdk-v1.js

The v1 in the file name is the major version. Inside a major version the SDK stays backwards compatible: methods, argument shapes, return values and error codes you already use keep working. The current release is 1.0.0 and the exact number is exported as SDK_VERSION in the bundle (the SDK sends it to the portal during the handshake).

What may change inside v1 without notice:

  • New methods, new optional arguments and new fields on returned objects.
  • New error codes. Always keep a default branch in switch (e.code) that takes the safe path.
  • Calls that are accepted but not yet used by the portal (reportGameCompletedPercentage, setGameContext, trackOrder) start doing something.
  • Bug fixes and stricter validation of arguments that were already documented as invalid.

What requires a new major version (v2) and a long overlap:

  • Removing or renaming a method, argument or documented error code.
  • Changing the meaning of an existing return value.
  • Changing the wire protocol in a way old SDK builds cannot answer.

The portal checks the protocol version during init(). A game built against v1 keeps working while v1 is served.

Do not self-host an old copy#

Load the script from the URL above rather than copying it into your build, so fixes reach your players. If you must bundle a copy (an offline build), keep the ZokoGames global name so the upload validator still recognises the SDK, and update the copy whenever the changelog lists a release.

Migration notes#

1.0.0 (first release)#

There is nothing to migrate from earlier ZokoGames versions. If you come from another portal's SDK, use the migration guide. The points that bite most often:

  • Errors are plain { code, message } objects, not Error instances. Use e.code, not e instanceof Error.
  • init() never rejects. Check SDK.environment instead of catching.
  • SDK.data methods are synchronous and throw, they do not return promises.
  • getUserToken accepts signingKeyType for ported code but signs every token the same way (RS256, one key set).
  • __dangerousUserId is for display only. Identify players on your server through the verified token.
  • There is no client store or purchase API. See in-game purchases.

Engine wrappers#

Wrappers share one browser bridge with the JavaScript SDK. When you update a wrapper, re-export your web build and re-test in the Preview tool. Wrapper-specific changes are listed on each engine page and in the changelog.

How to upgrade safely#

  1. Read the changelog for the release.
  2. Run the game with ?sdk_debug=true and look for new warnings.
  3. Check error handling still takes the safe path for unknown codes.
  4. Test in local mode, then in the Preview tool, then in a build preview from the console.
  5. Ship the update. See updating a live game.

이 페이지에 불분명하거나, 틀리거나, 빠진 내용이 있나요? 지원팀에 알려 주세요 · 미리보기 도구에서 게임 테스트하기

쿠키 설정

ZokoGames가 사용할 수 있는 쿠키를 선택하세요. 필수 쿠키는 사이트가 작동하는 데 꼭 필요해서 항상 켜져 있어요.

  • 로그인, 언어, 그리고 이 선택 사항에 사용돼요. 항상 켜져 있어요.

  • 최근 플레이한 게임 같은 정보를 이 기기에 기억해요.

  • 무작위 방문자 ID로 플레이 횟수와 페이지 방문을 집계해 서비스 개선에 활용해요.

  • 맞춤 광고를 허용해요. 광고는 무료 게임 운영에 쓰여요.