Uploading a Game
Overview
Once you have set up everything that is needed in the store listing section as well as configured the payment configuration, you can upload your game into your publishing platform. In doing so, you need to create a Client ID and Client Secret both for your game and Build Util. In this section, you will learn about:
- Creating Build Util Client Credentials.
- Creating Game Client Credentials.
- Uploading a Game.
- Setting Up Version.
Creating Build Util Client Credentials
In order to upload your game, first you need to create a Build Util credential as through the Build Util your game will be able to be uploaded to your platform. In doing so, please follow these steps:
How to Create Build Util Client Credentials
- In the Admin Portal, click the Clients sidebar menu and the Clients page will appear.
- Here, click the Create New button
to create a new Build Util Client Credentials.
- Then, the Create New OAuth2 Client window will appear.
Here, the Client ID is automatically filled by default. You can click the Copy button to copy the Client ID.
- After that, you need to select Confidential as the Client Type as you are creating a Build Util client which is private.
- Then, you need to create a client secret. In doing so, you can create your own client secret or let the Admin Portal generates secret for you by clicking the
button.
You must be aware that a client secret has to be unique if you want to create it yourself.
- Once you have generated a client secret either by yourself or by the system, you can copy the secret by clicking the Copy button
.
- Then, you need to input a client name in the Client Name box.
- Next, select the Publisher Namespace from dropdown list. Here, the publisher’s namespace is being selected.
- After that, you need to select which target audience you are going to use by selecting from the Target Audience dropdown list.
The Target Audience dropdown selection refers to the Resource Servers that should accept the token as the audience is filled with BuildInfo and IAM’s client.
- Then, in the Base URI box, input the base URI.
- Next, in the Redirect URI box, input the redirect URI.
- Click the Create button
to proceed or click the Cancel button
to cancel the process.
- Once the client is created, you will be redirected to the Clients detail panel. Here, you can review the client information and change some values if needed.
- In the Clients detail page, go to the Permissions tab to add permission of the newly created client.
- Click the Add button
to add permissions to the clients. The Add Client Permissions modal will appear.
- Input the permissions resource name in the Resource box.
Please note that you need to be authorized to see the resources in the AccelByte resources that you will use to fill the Resource box.
- Select the action from the action selection. The permission you give will impact the client's ability to access AccelByte resources.
- Once you are done, click the Confirm button
to proceed or Cancel button
to cancel the process.
- Finally the client permissions will be updated in the Client Permissions panel.
Creating Game Client Credentials
As a game developer, you need to connect your Game Platform using SDK. In doing so, you need to provide game client credentials in order to connect. In doing so, please follow these steps:
How to Create Game Client Credentials
- In the Admin Portal, click the Clients Sidebar menu and the Clients page will appear.
- Here, click the Create New button
to create a new Build Util Client Credentials.
- Then, the Create New OAuth2 Client window will appear.
Here, the Client ID is automatically filled by default. You can click the Copy button to copy the Client ID.
- After that, you need to select Confidential as the Client Type as you are creating a Game client which is private.
- Then, you need to create a client secret. In doing so, you can create your own client secret or let the Admin Portal generates secret for you by clicking the
button.
You must be aware that a client secret has to be unique if you want to create it yourself.
- Once you have generated a client secret either by yourself or by the system, you can copy the secret by clicking the Copy button
.
- Then, you need to input a client (game) name in the Client Name box.
- Next, select which namespace you want the Build Util client will belong to from the Namespace dropdown list.
- After that, you need to select which target audience you are going to use by selecting from the Target Audience dropdown list. If you do not select any audience, means that the configuration is available for all clients.
- Then, in the Base URI box, input the base URI.
- Next, in the Redirect URI box, input the redirect URI.
- Click the Create button
to proceed or click the Cancel button
to cancel the process.
- Once the client is created, you will be redirected to the Clients detail panel. Here, you can review the client information and change some values if needed.
- In the Clients detail page, go to the Permissions tab to add permission of the newly created client.
- Click the Add button
to add permissions to the clients. The Add Client Permissions modal will appear.
- Input the permissions resource name in the Resource box.
Please note that you need to be authorized to see the resources in the AccelByte resources that you will use to fill the Resource box.
- Select the action from the action selection. The permission you give will impact the client's ability to access AccelByte resources.
- Once you are done, click the Confirm button
to proceed or Cancel button
to cancel the process.
- Finally the client permissions will be updated in the Client Permissions panel.
Uploading Game using BuildUtil
Once you have created the client credentials both for the Build Util and Game, you can begin to upload the game into your publishing platform. In doing so, you need to make sure that you have the game binary of the game you want to publish already been preprared.
How to Upload Game Using BuildUtil
There are two ways uploading game using Build Util. Please see the steps below for both ways:
Upload Game Using Build Util First Option
- First you need to download the latest Build Util.exe and save the file in your directory.
- Then, open your terminal or command line to run the latest Build Util by using; ./justice-build-util-v3.3.1-linux_amd64 configure -i.
There is a case in Linux where you cannot locate the latest Build Util you have downloaded. When it happens, you need to perform chmod +x ./justice-build-util-v3.3.1-linux_amd64 in order to change the access level the Build Util so that it can be executed in Linux.
After that, a new line in your terminal or command line will appear: Insert IAM URL: Please input the IAM URL and press Enter.
Then, a new line will appear: Insert Uploader’s client id: Please input the Build Util client ID that you have created previously when you are creating the Build Util Client and Client Secret and press Enter.
Next, a new line will appear: Insert Uploader’s client secret: Please input the Build Util client secret that you have generated previously when you are creating the Build Util Client and Client Secret and press Enter.
After that, a new line will appear: Insert Log level (OPTIONAL): Here, the log level is used to set the log information history as complete as possible such as debug log history. The default value is to leave it blank as it is and press Enter.
Your terminal will look like this if you input the correct value:
Alternatively, from your command line, type following command to fill the credential :
./justice-build-util-v3.3.1-linux_amd64 configure --clientid <buildutil_client_id> --clientsecret <buildutil_client_secret> --iamurl <iam_url>
After you press Enter, you will go back to your base. In this process, you can start to upload a game using Build Util by using the
./justice-build-util-v3.3.1-linux_amd64 upload -i
and press Enter.After you press Enter, a new line will appear: Using config file: Here, you need to input the directory to the config file from the Build Util configuration in the previous steps. In doing so, find the
.justice-build-util-id
from your directory. For example, the value will look like this;/home/taufiqi/.justice-build-util-id
. Then, press Enter.
The file might also hidden, so you need to unhide all the folders and files to find the desired file.
A new line will appear: Insert IAM_ROLE_CACHE_EXPIRATION [3600]: Here, leave it blank as it is optional and then press Enter.
Next line will appear: Insert IAM_JWKS_REFRESH_INTERVAL [3600]: Here, leave it blank as it is optional and then press Enter.
A new line will appear: Insert IAM_REVOCATIONLIST_REFRESH_INTERVAL [3600]: Here, leave it blank as it is optional and then press Enter.
When you press Enter in this process, there will be a moment waiting before a new line appears. In that process, the client is requesting a token from IAM server.
Next, a new line will appear: Insert Type of app (GAME/DLC) [GAME]: There are two types of game that is supported, GAME and DLC. The default value is GAME, but if you want DLC, you can just type DLC in the provided field. If you want to use GAME, you can just leave it blank and press Enter.
A new line will appear: Insert URL for the BuildInfo service: Here, input the base URL of the game you are going to upload. For example; https://alpha.justice.accelbyte.net. Then press Enter.
A new line will appear: Insert Namespace of the build: Input the publisher’s namespace and press Enter.
A new line will appear: Insert Absolute path to SDK config: This line requires an absolute path to your SDK config. In doing so, you need to make sure that you already have a compatible file and a clear path to the desired file for example;
/home/taufiqi/Downloads/UnitySDKConfig.json
. Here is the preview of the Unity SDK:
{
"PublisherNamespace":"accelbyte",
"Namespace":"accelbyte",
"ClientId":"899e6970d63b4df893e6da7d346c4989",
"RedirectUri":"http://127.0.0.1"
}
Once done, press Enter.
Here, there will be a moment before a new line appear. The short moment indicates that the client is validating the SDK client to the IAM server.
A new line will appear: Insert Absolute directory of build output: Input the absolute path directory where your game resides. For example;
/home/taufiqi/Documents/samplegame
. Once done, press Enter.A new line will appear: Insert Relative path to main executable: Here, you need to input a relative path to your game, it can be in a form of .exe, .msi, .sh or any other type of file.
Relative path means that it does not require full path, but only the main path of the folder where the game resides.
When you input the path, the Player client application can directly run the game. For example: other/otherexe.exe
. Once done, press Enter.
A new line will appear: Insert AppId (unique title) of the game: Here, input the name of the game for example other123. The required value is only alphanumeric. Once done, press Enter.
A new line will appear: Insert Version of the game: Input the version of the game. The versioning needs to follow the game version in Admin Portal. Once done, press Enter.
A new line will appear: Insert Version of BuildInfo endpoint (1 or 2) [2]: Input the Buildinfo version whether you are going to use the version 1 or 2 depending on your needs. The default value is version 2. Once done, press Enter.
A new line will appear: Insert Platform id for the game [win32 win64 windows linux darwin]: Input the platform ID for the game to be uploaded into whether it is in windows or linux. Here, win64 is being used as an example. Once done, press Enter.
A new line will appear: Insert Preferred chunk size (OPTIONAL; integer (in bytes) [DEFAULT]: The chunk size means that the game binary will be uploaded in chunks. If you divide the game into smaller and smaller chunks, then the downloadable file through Build Info will be lesser. In doing so, the Launcher will need longer time to download the game. You can also divide the game into bigger chunk, in doing so it will be easily downloadable but will consume more of your bandwidth. You can leave it blank as the default value is in bites. Once done, press Enter.
A new line will appear: Insert Ignoreconfig file absolute path (OPTIONAL): By inputting values here, you can ignore some files that you do not want to be uploaded along with the uploading game. In doing so, you can just simply input the path that you are going to ignore. For example; you want to ignore all the .iso file in the game directory, thus you can just input .iso. You can also not include all the file in a folder that means all the files in the folder other will not be uploaded. Then, you can also not include a single file. In doing so, you just input the name of the file that you do not want to include in the uploading process. Once done, press Enter.
A new line will appear: Insert Log level (OPTIONAL): Here, the log level is used to set the log information history as complete as possible such as debug log history. The default value is to leave it blank as it is and press Enter.
Overall, the uploading steps in terminal or command line will look like this:
- When you press Enter, there will be summary where you can see the value you have input before.
- Input “y” to proceed or “n” to cancel the process. In this example, input “y”. In doing so, the game will begin uploading.
- Your game will be successfully uploaded when you see the “Resultant BUILID…”. Your uploaded game will be available in the Admin Portal in the Apps menu.
Upload Game Using Build Util Second Option
First you need to download the latest Build Util.exe and save the file in your directory.
Then, open your terminal or command line to run the latest Build Util by using;
./justice-build-util-v3.3.1-linux_amd64 configure -i
. There is a case in Linux where you cannot locate the latest Build Util you have downloaded. When it happens, you need to perform;chmod +x ./justice-build-util-v3.3.1-linux_amd64
in order to change the access level the Build Util so that it can be executed in Linux.After that, a new line in your terminal or command line will appear: Insert IAM URL: Please input the IAM URL and press Enter.
Then, a new line will appear: Insert Uploader’s client id: Please input the Build Util client ID that you have created previously and press Enter.
Next, a new line will appear: Insert Uploader’s client secret: Please input the Build Util client secret that you have generated previously anc press Enter.
After that, a new line will appear: Insert Log level (OPTIONAL): Here, the log level is used to set the log information history as complete as possible such as debug log history. The default value is to leave it blank as it is and press Enter.
Your terminal will look like this if you input the correct value:
Alternatively, from your command line, type following command to fill the credential:
./justice-build-util-v3.3.1-linux_amd64 configure --clientid <buildutil_client_id> --clientsecret <buildutil_client_secret> --iamurl <iam_url>
- Set up the Game SDK configuration. Please see below for the example fo the Unity SDK configuration.
{
"PublisherNamespace":"accelbyte",
"Namespace":"accelbyte",
"ClientId":"899e6970d63b4df893e6da7d346c4989",
"RedirectUri":"http://127.0.0.1"
}
- Then, Run upload command. Please use the note below for more information:
- --url (-u): Base URL to the service. For example:
./justice-build-util-v3.3.1-linux_amd64
.- --namespace (-n): The publisher namespace.
- --appID (-a): The app id of the game to upload. The app id should be unique, one for each game.
- --dir (-d): Absolute path of the directory containing file to be uploaded.
- --entrypoint (-e): entrypoint/executable game relative path in build folder. Please note that this is relative against the game directory (--dir). For example, if the entrypoint is /home/dev/GameA/executable/Game.exe and the specified directory is /home/dev/GameA, then the entrypoint value should be executable/Game.exe.
- --version (-v): Version of the game to upload. For example 1.0.0, 1.0-alpha, etc.
- --platformId (-p): The target platform identifier where the uploaded game will run. Pick one of these value: [ win32, win64, windows, darwin, linux-ia32, linux-amd64, linux-generic ]. For example, you’re targeting the Windows 32-bit then pick the win32.
- --sdkconfig (-f): Absolute path to the SDK config file.
- --ignore (-g): Optional.Absolute path to the ignore file. If you’re going to ignore certain files, create ignore file with same pattern with git ignore file and save it somewhere. You can also just place the file named .ignoreconfig inside the directory of the game to be uploaded and just skip this flag. In that case, BuildUtil will automatically read your file.
Here is the syntax to upload command:
./justice-build-util-v3.3.1-linux_amd64 upload -u <base_url> -n <publisher_namespace> -a <game_appid> -v <game_version> -e <entrypoint_file> -f <absolute_path_to_sdk_config> -d <absolute_path_to_game_directory> -p <game_ platformid>
For example :
./justice-build-util-v3.3.1-linux_amd64 upload -u https://alpha.justice.accelbyte.net -n accelbyte -a other123 -v 1.0 -e "otherexe.exe" -f "/home/taufiqi/Downloads/UnitySDKConfig.json" -d "/home/taufiqi/Documents/samplegame" -p win64
Viewing the Uploaded Game and Set as Current
After you have successfully uploaded your game using Build Util, you can check your uploaded game in the Apps menu in Admin Portal. Please follow these steps to view your uploaded game.
How to View the Uploaded Game and Set as Current
- Click the Apps sidebar menu in Admin Portal to view the Apps page.
- In the Apps page, select the Build Info version from the dropdown selection and select Build Info Ver.2 as the uploaded game using the version 2.
- Then, the Apps list will be updated. Here, find the game you uploaded from the list. In this process, the name of the uploaded game is other123.
- Click the View button
to view the uploaded game details. The uploaded game details page will appear.
- In the Build panel, click the Set as current button
to set the uploaded game as the current available version. The Set as current modal will appear.
- Click the Set button
to proceed and click the Cancel button
to cancel the process.
Setting Up the Current Version from Build Util
You can also set up a version as current using Build Util through the command prompt or terminal. This process is actually resulting in the same output as using the Admin Portal, only in a different way.
How to Set Up the Current Version from Build Util
In order to set up the current version using Build Util, you need to run setcurrent command with following parameters:
- --url (-u): Base URL to the service. For example https://alpha.justice.accelbyte.net.
- --appID (-a): Game’s AppId which will be updated.
- --namespace (-n): The publisher namespace.
- --platformId (-p): The target platform identifier where the uploaded game will run. Pick one of these value : [ win32, win64, windows, darwin, linux-ia32, linux-amd64, linux-generic ]. For example, you’re targeting the Windows 32-bit then pick the win32.
- --version (-v): Version of the game to upload. For example 1.0.0, 1.0-alpha, etc.
Here is the example of the updated command:
./justice-build-util-v3.3.1-linux_amd64 setcurrent --url https://alpha.justice.accelbyte.net -a other123 -n accelbyte -v 1.0 -p win64
Also here is an example of how it looks in the terminal:
Downloading Game Using BuildUtil
You can download the game using Build Utilas an optional choice for debugging purpose.
The real mechanism of download should only happen in Launcher.
How to Download Game Using Build Util
To download a game run download command with following parameters:
- --url (-u): Base URL to the service. For example https://alpha.justice.accelbyte.net.
- --namespace (-n): The publisher namespace.
- --dir (-d): The directory where the game will be downloaded
- --sourceID (-b): The build Id of the game.
- --buildInfoVersion (-r): The BuildInfo version to be used. If you’re uploading the game and specifying -r flag as 1, then fill this param with value 1. If no value of -r supplied during upload, then fill this param with value 2. Any values other than 1 and 2 are invalid.
Here is the example of the updated command:
./justice-build-util-v3.3.1-linux_amd64 download -d ~/Documents/samplegame -n accelbyte -b Ru3DBU-sLr --url https://alpha.justice.accelbyte.net -r 2
Also, here is the example how it looks like in terminal:
Once you are done, you can find the downloaded file in the directory that you have specified before.