-
Notifications
You must be signed in to change notification settings - Fork 41
Getting Started
This document guides you through building and running the Nine Chronicles launcher (a.k.a. 9c-launcher) with the game on your own computer from scratch. Following this guide, you can play NineChronicles with a launcher connected to the mainnet that works like the released launcher. We hope you can easily start participating and/or contributing to Nine Chronicles from here.
- Windows 10 or 11 is recommended.
- Linux/macOS also works, but the compatibility is not guaranteed.
- Also, Apple Silicon devices won't be able to launch the game itself.
-
Node.js
- LTS version is recommended. (In Aug. 2022, v16 is recommended)
- yarn
- .NET
-
Powershell 6 < for
yarn build-headless
on Windows - Optional
- curl
Due to the usage of symbolic links and submodules, you need to use some flags when cloning. In case if you forgot to do so, follow the guides in the Troubleshooting section.
git clone -c core.symlinks=true https://github.com/planetarium/9c-launcher --recursive
cd 9c-launcher
git checkout main # In case you're contributing, skip this
git pull
git submodule update --recursive --init
yarn install
yarn lefthook install # installs git hook for contributing, feel free to skip
The launcher depends on two other software: the game itself and the headless. The headless is responsible for communicating with the blockchain, and the game is a Unity client providing the gameplay experience of the Nine Chronicles. You can set them up using these command:
yarn build-headless # This builds NineChronicles.Headless.
yarn bundle-player # This downloads the latest Nine Chronicles Unity client version from the internet.
The launcher needs a configuration to tell the headless to which chain to use and how to set up and communicate with the desired chain. You can easily do this when if you're connecting to the mainnet.
curl https://download.nine-chronicles.com/9c-launcher-config.json -o dist/config.json
yarn codegen
yarn dev
# Press `Ctrl + C` on terminal to shut down the launcher
-
curl ... dist/config.json
- Downloads the latest configuration of the mainnet, which allows you to use it just like a released launcher.
-
yarn codegen
- Generates graphQL code from defined schema.
That's it! Enjoy the game with your own launcher! 🎮
Mostly, it's because the new version of NineChronicles Unity client is not built and uploaded to S3 yet. To resolve this, just wait for a while for the CI to build and upload NineChronicles Unity client.
Note In case you're using your customized source code or running under unsupported platform, this may not work but you can run the launcher itself.
If you close the launcher on your taskbar, not terminal, this could happen when you run yarn dev
again.
- Open the Task Manager. - You can open it by pressing Ctrl + Shift + Esc.
- See details in
Process
tab, you can find the livingElectron
app. - If you see an instance of 'Nine Chronicles' they need to be terminated as well. - Manually kill those living processes.
- The
yarn dev
should work now. - To prevent this, we recommend terminating the launcher with Ctrl + C.
Outdated as of https://github.com/planetarium/9c-launcher/pull/1817. We'll remove this section as the change makes into the upstream.
Running or building the launcher may fail if you're running Windows. To enable the symbolic links, follow the guides in the link below.
- Windows 10 version 1703 or newer: the Microsoft documentation to enable the Developer Mode
- Older Windows: Git For Windows, ‘Symbolic Links’
After doing so, run these commands in the launcher folder:
git config core.symlinks true
git checkout -- src/v2