ゲームを公開

このドキュメントでは、PC 版 Google Play Games でゲームを公開する方法について説明します。

始める前に

Google Play Games SDK をゲームに統合します。

ゲームを WAB ファイルとしてパッケージ化する

PC 版 Google Play Games では、ゲームのインストーラを Windows アプリバンドル(WAB)ファイルとして Google Play Console にアップロードする必要があります。WAB ファイルを作成する手順は次のとおりです。

  1. Google Play 公開ツールをダウンロードします。このツールは、Windows コマンドラインまたは PowerShell で実行できます。

  2. 任意の名前で Play 公開構成ファイルを作成します。たとえば、次の形式の play_publishing_config.xml があります。

    <?xml version="1.0" encoding="UTF-8"?>
    <play-publishing-config version="1.0">
      <application>
        <package-name>PACKAGE_NAME</package-name>
        <version-name>VERSION</version-name>
      </application>
      <installer requiresElevation=REQUIRES_ELEVATION>
        <path>PATH</path>
        <installation-path-registry-location>
          <key-name>KEY1</key-name>
          <value-name>VALUE1</value-name>
        </installation-path-registry-location>
      </installer>
      <launcher requiresElevation=REQUIRES_ELEVATION>
        <launch-path-registry-location >
          <key-name>KEY2</key-name>
          <value-name>VALUE2</value-name>
        </launch-path-registry-location>
        <executable-invocation>
          <filename>FILENAME</filename>
          <arguments>ARGS</arguments>
        </executable-invocation>
      </launcher>
      <uninstaller requiresElevation=REQUIRES_ELEVATION>
        <uninstall-path-registry-location>
          <key-name>KEY3</key-name>
          <value-name>VALUE3</value-name>
        </uninstall-path-registry-location>
      </uninstaller>
    </play-publishing-config>

    以下を置き換えます。

    • PACKAGE_NAME: ゲームのパッケージ名。たとえば、test.package.name のように指定できました。
    • VERSION: ゲームのバージョン。たとえば、1.0 のように指定できました。
    • REQUIRES_ELEVATION: 実行可能ファイルを管理者などの昇格された権限で実行する必要があるかどうかを示します。

      • "true": 昇格された権限で実行可能ファイルを実行します。

      • 「false」: 昇格された権限なしで実行可能ファイルを実行します。

    • PATH: ゲームのインストーラ EXE ファイルのパス。このパスは、Play パブリッシング構成の親ディレクトリに対する絶対パスまたは相対パスのいずれかになります。例: path\to\test\installerAuthenticode とコード署名を使用して、ゲームのインストーラ EXE に署名します。

    • KEY1VALUE1: installer 要素で Windows レジストリ キーの Key-Value ペアを指定します。

    • KEY2VALUE2: launcher 要素で Windows レジストリ キーの Key-Value ペアを指定します。

    • KEY3VALUE3: uninstaller 要素で Windows レジストリ キーの Key-Value ペアを指定します。

    • FILENAME: ゲームのランチャー実行可能ファイルのパスを指定します。たとえば、path\to\launcher.exe のように指定できました。

    • ARGS: ゲームのランチャー実行可能ファイルへの引数。これらは省略可能です。

    Google Play の公開構成ファイルの例

    ゲーム インストーラ game_installer.exe、ゲームのランチャー launcher.exe を備えた MyGame というゲームを考えてみましょう。この例では、CDATA の使用方法も示します。play_publishing_config.xml は次のようになります。

    <?xml version="1.0" encoding="UTF-8"?>
    
    <play-publishing-config version="1.0">
      <application>
        <package-name>test.package.name</package-name>
        <version-name>1.0</version-name>
      </application>
      <installer requiresElevation="true">
        <path>game_installer.exe</path>
        <installation-path-registry-location>
          <key-name>SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MyGame</key-name>
          <value-name>InstallPath</value-name>
        </installation-path-registry-location>
      </installer>
    
      <launcher requiresElevation="true">
        <launch-path-registry-location >
          <key-name>SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MyGame</key-name>
          <value-name>ExePath</value-name>
        </launch-path-registry-location>
        <executable-invocation>
          <filename>launcher.exe</filename>
          <arguments><![CDATA[arg1&arg2>arg3]]></arguments>
        </executable-invocation>
      </launcher>
    
      <uninstaller requiresElevation="true">
        <uninstall-path-registry-location>
          <key-name>SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MyGame</key-name>
          <value-name>UninstallString</value-name>
        </uninstall-path-registry-location>
      </uninstaller>
    </play-publishing-config>
    
  3. Windows のコマンドラインまたは Powershell で Play パブリッシング ツールを実行します。

    playpublishingtool.exe build-installer-bundle --input=PLAY_PUBLISHING_CONFIG_PATH --output=WAB_OUTPUT_PATH
    

    同じ名前の既存の WAB ファイルを上書きするには、--force 引数を使用します。

    playpublishingtool.exe build-installer-bundle --input=PLAY_PUBLISHING_CONFIG_PATH --output=WAB_OUTPUT_PATH --force
    

    以下を置き換えます。

    • PLAY_PUBLISHING_CONFIG_PATH: Google Play の公開構成へのパス。たとえば、path\to\play_publishing_config.xml のように指定できました。
    • WAB_OUTPUT_PATH: WAB ファイルへのパス。たとえば、path\to\output_bundle.wab のように指定できました。

    Google Play の公開ツールの使用方法

    現在の作業ディレクトリに、Play 公開ツール バイナリ playpublishingtool.exe、Play 公開構成 play_publishing_config.xml、ゲーム インストーラ game_installer.exe があるとします。

    現在の作業ディレクトリは次のようになります。

    .\
    ├── game_installer.exe
    ├── play_publishing_config.xml
    ├── playpublishingtool.exe
    

    同じディレクトリに installer_bundle.wab という名前の WAB を作成する場合、コマンドは次のようになります。

    playpublishingtool.exe build-installer-bundle --input=play_publishing_config.xml --output=installer_bundle.wab
    

    --force 引数を使用すると、コマンドは次のようになります。

    playpublishingtool.exe build-installer-bundle --input=play_publishing_config.xml --output=installer_bundle.wab --force
    

    成功すると、次のような出力が表示されます。

    Successfully built the installer bundle at installer_bundle.wab
    

    フォルダで WAB ファイルを見つけます。

      .\
      ├── game_installer.exe
      ├── installer_bundle.wab
      ├── play_publishing_config.xml
      ├── playpublishingtool.exe
    

Google Play Console を使用してゲームを公開する

ゲームの WAB を作成したら、Google Play Console にアップロードして、設定と要件を管理します。ゲームを公開する手順は次のとおりです。

PC 版 Google Play Games フォーム ファクタを追加する

ゲームの公開でこの手順が必要になるのは初回のみです。

  1. Google Play Console の左側のメニューで、[テストとリリース > 設定 > 詳細設定](直接リンク)を選択します。
  2. [フォーム ファクタ] タブに移動し、[+ フォーム ファクタを追加] プルダウンから Google Play Games on PC を追加します。

  3. 右側の [PC 版 Google Play Games] フォーム ファクタに対応する [管理] ボタンをクリックします。

  4. [Windows App Bundle ゲームに専用トラックを使用する] オプションを選択します。

  5. [保存] をクリックし、確認ダイアログで再度 [保存] をクリックします。

WAB ファイルをアップロードする

WAB ファイルをアップロードするには:

  1. Google Play Console の左側のメニューで、[テストとリリース > 製品版](直接リンク)を選択します。
  2. [本番環境] ページで、右側のフォーム ファクタのプルダウンから [PC(Windows)版 Google Play Games のみ] を選択します。
  3. [Windows アプリバンドル] タブで、[Windows アプリバンドルをアップロード] ボタンをクリックして WAB ファイルをアップロードします。または、フォーム ファクタのプルダウンの右側にある [Upload a Windows app bundle] ボタンをクリックすることもできます。
  4. [Save] をクリックします。

Windows PC の要件を構成する

Windows PC の要件を構成するには:

  1. Google Play Console の左側のメニューで、[ユーザーを増やす > ストアでの表示 > ストアの設定](直接リンク)を選択します。
  2. [PC の要件] セクションで、右側の [編集] ボタンをクリックします。
  3. フィールドを更新して [保存] をクリックします。

アプリ内購入のグラフィックを設定する

この手順は省略可能です。アプリ内購入のグラフィックを設定する手順は次のとおりです。

  1. Google Play Console の左側のメニューで、[ユーザーを増やす] > [ストアでの表示] > [ストアの掲載情報](直接リンク)を選択します。
  2. [掲載情報] タブの [デフォルトのストアの掲載情報] セクションで、右側の [->](矢印)ボタンをクリックします。[デフォルトのストアの掲載情報] ページが表示されます。
  3. [PC 版 Google Play Games] セクションに移動し、[PC(Windows)版 Google Play Games のアプリ内購入の画像] に画像をアップロードします。
  4. [Save] をクリックします。

変更を審査に送信

  1. Google Play Console の左側のメニューで、[公開の概要] を選択します。
  2. [審査にまだ送信されていない変更] で、[変更を審査に送信] をクリックします。

審査チームが変更を承認すると、Google Play でゲームが検出可能になります。