Playing the Nine Chronicles main network with the Unity editor

The Nine Chronicles published by Planetarium is developed with Unity. It means the Nine Chronicles can be executed by Unity Editor. So this article will show you how to play the Nine Chronicles main network.

Install Unity

Here’s how to install Unity with Unity Hub.

Install Unity Hub

  1. Click the Unity Hub download link for your operating system

  2. Run the downloaded Unity Hub installation file

Install Unity(2021.3.5f1)

  1. Click Unity(2021.3.5f1) installation link for Unity Hub

  2. Unity(2021.3.5f1) installation proceeds with Unity Hub running

Prepare the Nine Chronicles repository

Here I cover how to use Git CLI and Fork as a way to clone a repository.

Cloning with the Git CLI

  1. Install the Git CLI for your operating system

  2. Clone the Nine Chronicles repository

    git clone https://github.com/planetarium/NineChronicles.git
    cd NineChronicles
    git submodule update --init --recursive
    git config core.hooksPath hooks
    
  3. Checkout to the main branch

    git checkout main
    git submodule update --recursive
    

Cloning with the Fork

  1. Install the Fork for your operating system

  2. Run the Fork and clone the Nine Chronicles repository

    • Click File > Clone menu.

    • Enter URL and Location and click the Clone button.

      • URL: https://github.com/planetarium/NineChronicles.git
      • Location: In the image below, I specified it as “/Users/seungmin/Repositories/NineChronicles”.

  3. Checkout to the main branch

Play the Nine Chronicles with the Unity editor

Open the Nine Chronicles project with the Unity Hub

  1. Run the Unity Hub

    Unity account creation and licensing are not covered here. You can also proceed for free(Unity Personal License).

  2. Open the Nine Chronicles project

Configure clo.json

The clo.json file is a file that sets various options related to the blockchain network.

  1. Create a clo.json file in /nekoyume/Assets/StreamingAssets/ based on the cloned path

  2. Fill in the clo.json file as shown below and save it

    {
      "GenesisBlockPath": "https://download.nine-chronicles.com/genesis-block-Nine Chronicles-main",
      "NoMiner": true,
      "RpcClient": true,
      "RpcServerHost": "9c-main-rpc-1.nine-chronicles.com",
      "RpcServerPort": 31238,
      "ApiServerHost": "https://api.9c.gg/graphql"
    }
    

Prepare a Private key

If you already have a Private Key

  1. Use the Key Store

    You can find more information about the Key Store here.

    • Put your Protected Private Key into the Key Store path.
  1. (not recommended) Setting the private key directly in the clo.json file

    • Add a "PrivateKey" entry to the existing clo.json file.

      {
        "PrivateKey": "your-pivate-key"
      }
      

Generate a new Private Key

  • You can generate a new Private Key on Play step.

Play

You are now ready to access to the Nine Chronicles mainnet and play.

  1. Open the Game scene

  2. Click the Play button

  3. Sign in

    • Go to [3.1. Sign up] if there is no Protected Private Key in the Key Store path.

    • If there is no Protected Private Key in the Key Store path, go to [3.1. Sign up].

    • If you enter “PrivateKey” in the clo.json file, this process will be skipped.

    • Confirm the address of the selected account in the login pop-up and enter passphrase.

    • And click the GAME START button.

    3.1. Sign up

    You can generate the Private Key and the Protected Private Key in this step.

Conclusion

So far, I have introduced how to connect to the Nine Chronicles main network using the Unity Editor.
In order to maintain this method, you will need to consistently pull the main branch of the Nine Chronicles repository.

I plan to introduce various tips based on this content in the future.

2 Likes