-
Notifications
You must be signed in to change notification settings - Fork 163
Get Started
- Install Unity Hub
- Install Unity 2020.3.5f1 version
- Clone repository
git clone https://github.com/planetarium/NineChronicles.git
- Nagivate to the cloned directory and run the command:
git config core.hooksPath hooks git submodule update --init --recursive
- Run Unity and build project
To launch Nine Chronicles from the Unity editor, please follow the step-by-step guide.
-
--private-key
: private key to use. -
--keystore-path
: path to store private key. -
--host
: host name. -
--port
: port name. -
--no-miner
: disable mining. -
--minimum-difficulty
: configure minimum mining difficulty accepted by the network. -
--peer
: add peer. Multiple peers can be added with--peer peerA peerB ...
. -
--ice-servers
: TURN server information used for NAT traversal. Multiple servers can be added with--ice-servers serverA serverB
. -
--genesis-block-path
: path of genesis block. Supports http(s) paths and usesAssets/StreamingAssets/genesis-block
if not provided. -
--storage-path
: path to store chain data. -
--storage-type
: storage type name. Currently supportsRocksDBStore
(--storage-type rocksdb
). -
--rpc-client
: starts client mode that does not store chain data. -
--rpc-server-host
: rpc server host name. -
--rpc-server-port
: rpc server port name. -
--auto-play
: automatically generate character and enter battle stage in the background. -
--console-sink
: print logs on console. -
--development
: run in development mode. Shows debugging UI and log level configuration.
To use the above command line options on Unity Editor or on build player, Assets/StreamingAssets/clo.json
must be created. Below is an example:
{
"privateKey": "",
"host": "127.0.0.1",
"port": 5555,
"noMiner": true,
"peers": ["02ed49dbe0f2c34d9dff8335d6dd9097f7a3ef17dfb5f048382eebc7f451a50aa1,nekoyume1.koreacentral.cloudapp.azure.com,58598"]
}
-
Assets/StreamingAssets/clo.json
is excluded from version control.-
Assets/StreamingAssets/clo_nekoalpha_nominer.json
could be provided as a preset. To use this file, change the name toclo.json
.
-
$ /UnityPath/Unity -quit -batchmode -projectPath=/path/to/nekoyume/ -executeMethod Editor.Builder.Build[All, MacOS, Windows, Linux, MacOSHeadless, WindowsHeadless, LinuxHeadless]
- Example
$ /Applications/Unity/Hub/Editor/2020.3.4f1/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath=~/planetarium/nekoyume-unity/nekoyume/ -executeMethod Editor.Builder.BuildAll
Use the Build
menu on the Unity Editor.
Peer options for network communication is read in the following order:
- Command Line parameter upon execution (
--peer
) - (On Windows)
peers.dat
in%USERPROFILE%\AppData\LocalLow\Planetarium
-
Assets\Resources\Config\peers.txt
inside NineChronicles project.
Since the current project doesn't include option 3, the game will run in a single node if peer configuration in either option 1 or 2 are not provided.
Peer list is stored in plain text format and each line includes a node's publickey,host-name,port,version
.
Ex)
02ed49dbe0f2c34d9dff8335d6dd9097f7a3ef17dfb5f048382eebc7f451a50aa1,nekoyume1.koreacentral.cloudapp.azure.com,58598
02d05be62f8593721f5abfd28fb83c043ed9d9585f45b652cb67fd6eee3fd3748f,nekoyume2.koreacentral.cloudapp.azure.com,58599
- Host name and port must be public.
- If
--host
is not provided upon execution, the actual host name and port could be different from the original due to the automatic relay communication via STUN/TURN. Therefore, nodes that are used as peers on other nodes must provide its--host
option on execution.
- If
- Public key is a hexadecimal string derived from the
PrivateKey
that is used to create aSwarm
object.
Seed private key and node host are hardcoded for local testing purposes.
- Build
LinuxHeadless
and run the command below:
cd nekoyume/compose
docker-compose up --build
--auto-play
option can be used to generate character and automate battle stages in the background.
Currently, character's name is generated with the first 8 characters of the node's Address
and repeats stage 1 battle at the TxProcessInterval
.
--console-sink
option can send logs via UnityDebugSink
instead of ApplicationInsights
.
You can use nekoyume/Assets/AddressableAssets/TableCSV/Account/ActivationSheet.csv
to manage white lists.
id,public_key
1,029d256bc6943cd9d18712b1fe1fdd061705d2ffa644a7705b3cf90f408d1ee278
If PublicKeys
are registered in ActivationSheet.csv
, only transactions that have been signed with the PrivateKeys of those PublicKeys can be mined.
White list feature will not be activated if there are no PublicKeys
registered in ActivationSheet.csv
.
Home
| Get Started
| Manuals
| Reference