Local Development

Once you have your game created, you can start to develop and debug.

Open Your Game in a Browser#

  1. Make sure you are logged into Developer Console.
  2. Go to the detail page of the game you'd like to debug against.
  3. Open the Debug URL
  4. You'll be navigated to the game. And it will start the game session as a mock user. The user's data and state will not persist after closing the game.

Point to a Locally Hosted Version#

  1. Open the game in desktop browser first by following the instructions written above.
  2. Start your game local hosting, e.g. your game is hosted at https://localhost:8080/
  3. Find the game's Debug URL, append &game_url=https://localhost:8080/ to it, and navigate.
  4. Now you can find the local game running in the browser and you can debug against it.

Same steps can be also applied to mobile browsers. Please note some features relying on Link app (e.g. Messaging, In-App Purchase, Ads) will not work in this case and throw CLIENT_UNSUPPORTED_OPERATION errors. In order to test those features, please upload, deploy and test directly in Link app.

Using https on localhost#

Please note when you host https://localhost with a self signed certificate. By the browser's setting, the certificate may be recognized as an invalid one. This will stop loading any resource from https://localhost, resulting in loading screen stuck at 0%.

In that case, please double check if there's a security alert in the address bar, and make sure the self signed certificate is trusted. If you happen to be using Chrome, please consider enabling chrome://flags/#allow-insecure-localhost.

Debug features#

There're some handy features we have implemeneted in the debug mode, to enable developers to test some edge cases before testing on a native app.

Dummy users#

By default, you'll start the game as the number 0 dummy user, and in the contact list you can find the other dummy user from 1 to 8.

note

It's a known issue to have the current user in the contact list. A bugfix will address this issue soon.

User 0 to 5 are already playing this game, while 6 to 8 are non-playing users (who don't have a player ID).

Ability to override the user identity#

You can append ?override_uid=0 parameter to the URL (available from 0 to 5) to start the game as a specific user. All these users share the same contact list, so you can send message between them to create contexts.

Message preview#

When calling API that triggers sending a message, such as LinkGame.context.chooseAsync(), LinkGame.updateAsync() and LinkGame.shareAsync(), a preview modal will show you how the message looks like, and a link to simulate the situation when the message is opened.

Developer can combine this link with ?override_uid= parameter to simulate the situation when the link is opened by either the sender or the receiver.

note

It's a known issue that the link should present https://lg.rgames.jp/debug/ instead of https://one.rakuten.co.jp/miniapp/games/. A bugfix will address this issue soon.

note

It's a known issue that sending message to user 8 will reject with an error, which should be resolved without any error. A bugfix will address this issue soon.

note

It's a known issue that the image in the message doesn't show as the same dimension in native app. A bugfix will address this issue soon.

note

It's a known issue that the update message doesn't show a link in the preview. A bugfix will address this issue soon.

note

It's a known issue that the share message prompt doesn't clean its state every time after getting shared, which will need a reload to enable sharing with the same user again in the same game session. A bugfix will address this issue soon.