Code Monkey home page Code Monkey logo

planetarium / ninechronicles Goto Github PK

View Code? Open in Web Editor NEW
345.0 17.0 146.0 3.14 GB

Unity client application for Nine Chronicles, a fully decentralized idle RPG powered by the community.

Home Page: https://nine-chronicles.com/

License: GNU Affero General Public License v3.0

Shell 0.13% PowerShell 0.02% C# 94.61% C 0.19% ShaderLab 1.58% HLSL 0.13% Python 1.54% Inno Setup 0.08% Objective-C++ 0.36% Ruby 0.07% Objective-C 1.02% Java 0.26%
unity mmorpg 2d-game blockchain decentralized

ninechronicles's Introduction

Nine Chronicles

Nine Chronicles Banner

CircleCI Discord Planetarium-Dev Discord Invite Discourse posts

Nine Chronicles is a fully open-sourced online RPG without servers — like Bitcoin or BitTorrent, the gamers and miners connect to each other to power a distributed game network. Set in a vast fantasy world, it is governed by its players, and supported by a complex economy where supply and demand are the greatest currency.

Decentralized infrastructure has created new possibilities for online gaming, where communities can become the actual owners of an online world. By fully open sourcing the repositories for Nine Chronicles, players and developers alike can use any part of the game, from the beautiful bespoke 2D assets to in-game logic and code.

To learn more about the codebase and the GraphQL API, visit docs.nine-chronicles.com.

Dependency

Installation

  1. Install Unity Hub
  2. Install Unity 2021.3.37f1 version
  3. Clone repository
    git clone https://github.com/planetarium/NineChronicles.git
    
  4. Navigate to the cloned directory and run the command:
    git config core.hooksPath hooks
    git submodule update --init --recursive
    
  5. Run Unity and build project

To launch Nine Chronicles from the Unity editor, please follow the step-by-step guide.

Command Line Options

  • --private-key : private key to use.
  • --keystore-path : path to store private key.
  • --host : host name.
  • --port : port name.
  • --no-miner : disable mining.
  • --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 uses Assets/StreamingAssets/genesis-block if not provided.
  • --storage-path : path to store chain data.
  • --storage-type : storage type name. Currently supports RocksDBStore (--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.

Using Command Line Options on Unity Editor

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 to clo.json.

Command Line Build

$ /UnityPath/Unity -quit -batchmode -projectPath=/path/to/nekoyume/ -executeMethod Editor.Builder.Build[All, MacOS, Windows, Linux, MacOSHeadless, WindowsHeadless, LinuxHeadless]
  • Example
$ /Applications/Unity/Hub/Editor/2021.3.37f1/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath=~/planetarium/nekoyume-unity/nekoyume/ -executeMethod Editor.Builder.BuildAll

Editor Build

Use the Build menu on the Unity Editor.

Peer Configuration

Reading Order

Peer options for network communication is read in the following order:

  1. Command Line parameter upon execution (--peer)
  2. (On Windows) peers.dat in %USERPROFILE%\AppData\LocalLow\Planetarium
  3. 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.

Format

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.
  • Public key is a hexadecimal string derived from the PrivateKey that is used to create a Swarm object.

Docker-compose Miner Test

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

--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

--console-sink option can send logs via UnityDebugSink instead of ApplicationInsights.

White List

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.

ninechronicles's People

Contributors

area363 avatar atralupus avatar bbeom06 avatar boramqo83 avatar boscohyun avatar caesty avatar crkim88 avatar dahlia avatar danielbae-devcra avatar eugene-doobu avatar greymistcube avatar hyejin-bropark avatar ipdae avatar jaeho0103 avatar jonny-jeahyunchoi avatar limebell avatar longfin avatar moreal avatar namyujeong avatar ninehyejin avatar ninesyu avatar oremal avatar plafina2 avatar planet-submodule-updater avatar riemannulus avatar sky1045 avatar sonohoshi avatar tyrosine1153 avatar u-lis avatar unengine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ninechronicles's Issues

Divide mixpanel events in installation

Currently Mixpanel events only record install/start and install/end in the installer. Dividing these steps will help with assessing install conversion rate.

로컬 상태 업데이트가 되지 않고 있는 정황이 있음

  • 아이템을 팔았는데 상점쪽 내가 판매한 아이템 목록이 비어있음 나갔다 들어오면 업데이트
  • 구매, 판매취소 등으로 메일을 읽었을때 아이템이 인벤토리에 안들어옴
  • 블록높이변경으로 인해 아이템을 잠궈놔도 인벤토리에서 아이템이 그대로 보임

┆Issue is synchronized with this Asana task by Unito

Workshop Not updating Items correctly

process 3

In the images above. I did my best to display whats happening. I entered the Workshop to upgrade two +3 rings. As you can see the NCG is deducted and the transaction is sent. I was then able to repeat the same transaction process. As you see the items are registered in the Workshop Queue. Yet the items still remain in my players inventory. This could be a major exploit if not handled.

@devs

Quest UI doesn't show for the new world update

Cleared stage 201 and unlocked a new recipe and the Quest UI should show the quest that asks you to craft the new recipe but it didn't.
image

Another old bug:
I'm level 210 and this quest is still not done yet.
image

┆Issue is synchronized with this Asana task by Unito

User often cannot use hourglasses to speed up craft

The adress of the user is 0xC0bA278CB8379683E66C28928fa0Aa8bfF3D95E6 and the character is Wabbs.
I have a Leather Belt Wind that I cannot speed up - it says that the item is done but it's not appearing in the inventory. After the reset of the client, it's still crafting
I restarted the game multiple times, I cleared the cache. Same results.

I can speed up other crafts just fine, this is the only item that is not working

┆Issue is synchronized with this Asana task by Unito

Unable to perform any action in game.

Description: This is an old issue that happens rarely sometimes, and when it happens, players can't perform any action in-game, it could be stuck at the loading screen for hours or result in error 26-28.
Normal trouble doesn't resolve the issue and sometimes it's fixed by itself after a while.

Users with the issue:
HotSauce#0725
Kojackcheese#9718
APOLLO#8106

Logs:
From APOLLO: logs.zip

Will update more logs later when users upload it.

[아레나] 비 정상적인 전투가 진행 되는 현상

[테스트 환경]
v100046-rc3

[내용]
상황 정리로 설명 드리겠습니다.
#1. 기존 saranghaeyomilkis 캐릭터로 아레나 배틀 진행
#2. 로딩씬에서 리오그 연달아 발생하다가 28에러 뜨면서 나가짐

#3. byswen 캐릭터로 변경 후 아레나 진행
#4. 로딩씬에서 리오그 엄청 났지만 정상 진행 됨

#5. 다시 saranghaeyomilkis 캐릭터로 변경 후 아레나 진행
#6. 로딩씬에서 리오그 엄청 남
#7. 전투씬에서 byswen 캐릭터가 등장;

#8. 전투씬에 갇힘

관련 로그 공유드립니다.

[Should be]
아레나가 정상 진행 되어야 합니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: log.zip | image.png | image.png | log.zip

판매 금액에 소숫점이 입력된 경우, +10 버튼이 의도대로 동작하지 않습니다.

버전
v100049-2021061001

재연 방법

  • 게임을 켜고 로그인해서 상점으로 들어갑니다.
  • 판매 탭으로 이동합니다.
  • 소지한 아이템을 하나 선택하고, 가격창에 0.11을 입력합니다.
  • +10 버튼을 누릅니다.

기대 결과

  • Total 란에 10.11 이 입력됩니다.

실제 결과

  • Total 란에 10이 입력됩니다.

┆Issue is synchronized with this Asana task by Unito

NCG isn't deducted after purchasing Monster Collection

Reported user: SlimBallin#1687
Address: 0xA28e1679C7498881b127C13368911Cb197017976

He said that he purchased for 1 monster in Monster collection, which costs 500 NCG. He had around 1800 NCG so after that purchase, he would have 1300 NCG left.
Txid for the monster collection: 20ef971e9ad6cf5cd0970e876b1baf60eb04a18941e04531577cd73fd8d2caca

And in the screenshot below, the launcher displays correct amount, but ingame he still has 1800 NCG left.
image

So he went to market and buy some items which cost around 770 NCG (TXID: dddba99777644c71af7c3508c8f7892a7e072aad7dcc279fca00d50093f8a158).
image
image

As you can see in the first image, his ingame changed to 1046.8 NCG first and shortly later the launcher also change to the same amount. Which doesn't exclude the 500 NCG from Monster Collection.

┆Issue is synchronized with this Asana task by Unito

[플레이어] 최초 실행 시 Mining Transactions 단계에서 프레임 드랍이 발생하는 현상

[테스트 환경]
v100049-rc2-internal

[내용]
플레이어 최초 실행 시 Mining Transactions 단계 시작 전에는 프레임이 30프레임이었으나 Mining Transactions 단계 시작 시 프레임 드랍이 발생하며 프레임이 0프레임까지 낮아집니다.

  • Mining Transactions 단계 시작 시에만 프레임 드랍이 발생합니다.

첨부된 영상 참고 부탁드립니다.

[Should Be]
Mining Transactions 단계가 진행되더라도 프레임 드랍 현상이 발생하지 않고 정상적인 프레임을 유지해야 합니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: Mining Transactions 단계에서 프레임 드랍이 발생하는 현상.mp4

[에러] 03에러가 발생합니다.

[테스트 환경]
v100046-rc3

[내용]
03에러가 발생합니다. 관련 로그 공유드립니다.
-> 전투 진행 중 03에러가 발생합니다.

[Should be]
에러 발생 없이 전투가 정상적으로 진행 되어야 합니ㅣ다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: log.zip | image.png

AP potion doesn't sync properly with UI

Step to reproduce:

  1. Use AP potion
  2. The AP bar will be filled instantly
  3. Wait for few minutes
  4. The AP bar will be empty again.

The UI will be fixed when you restart the game, but for players who don't know about this, they will keep using another AP potion and wasting them.

┆Issue is synchronized with this Asana task by Unito

Gears are auto unequipped after an arena fight

Step to reproduce:

  1. Open arena
  2. Inspect any other player's gear
  3. Fight (Not sure if it needs to be the same person who you inspected or can be anyone)
  4. All gear will be unequipped

Another method that related to issue #234 :

  1. Refill stamina on character A.
  2. Switch to character B and do arena
  3. If the refill stamina action got reorged, it will switch back to character A
  4. All gears on character A will be unequipped

┆Issue is synchronized with this Asana task by Unito

[행동력] 전투 자동진행이 끝나고 나면 행동력 5가 항상 남아있는 현상

[테스트 환경]
메인넷 v100047

[내용]
전투 자동진행이 끝나고 나면 행동력 5가 항상 남아있는 현상이 발생합니다.
-> 전투가 끝나면 03에러가 발생하면서 로비로 나오게 되고, 행동력 5가 남아있는걸로 보입니다.
-> 남은 행동력5를 소모하기 위해 전투에 진입하면 오랫동안 로딩하다 03에러와 함께 로비로 나와집니다.

[재현 스탭]
#1. 행동력 리필 (0 -> 120)
#2. 스테이지 진행으로 행동력 소모
-> 1개 스테이지 자동진행으로 끝까지 진행
#3. 행동력이 5/120인 마지막 판이 끝나면 03에러와 함께 로비로 이동
#4. 행동력 5가 남아있음 확인

┆Issue is synchronized with this Asana task by Unito
┆Attachments: image.png

[UI] 중국어(간체)로 실행 시 전투 준비 화면 내 AP 소모량이 노출되지 않는 현상

[테스트 환경]
v100049-rc2-internal

[내용]
전투 준비 화면 내 AP 소모량이 노출되지 않습니다.

  • 미미르, 스테이지 전투 준비화면에서 동일하게 발생하는 현상입니다.

[발생 스텝]

  1. 스테이지 진입
  2. 스테이지 전투 준비 화면 내 AP 소모량 노출 확인
  3. 미미르의 샘 진입
  4. 미미르의 샘 전투 준비 화면 내 AP 소모량 노출 확인

[Should Be]
전투 준비 화면 내 AP 소모량이 정상적으로 노출되어야 합니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: image.png | log.zip

[UI] 코스튬을 장착한 캐릭터의 초상화가 아레나 화면에서는 코스튬을 장착하지 않은 상태의 초상화가 노출되는 현상

[테스트 환경]
v100049-rc2-internal

[내용]
코스튬을 장착한 캐릭터의 초상화가 랭킹 보드에서는 코스튬 초상화로 정상적으로 노출되지만 아레나 화면의 레이팅 보드에서는 코스튬을 장착하지 않은 상태의 초상화가 노출됩니다.

첨부된 영상 참고 부탁드립니다.

[발생 스텝]

  1. 로비에서 랭킹 아이콘 선택
  2. 코스튬을 장착한 캐릭터의 초상화 확인
  3. 아레나 진입
  4. 아레나 레이팅 보드 내 '스텝 2'에서 확인한 캐릭터의 초상화 확인

[Should Be]
코스튬을 장착한 캐릭터의 초상화가 랭킹 보드와 동일하게 아레나의 레이팅 보드에서도 코스튬 초상화로 노출되어야 합니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: 코스튬을 장착한 캐릭터의 초상화가 아레나 화면에서는 코스튬을 장착하지 않은 상태의 초상화가 노출되는 현상.mp4

Error 14 happens after running the stage for few times.

User reported: torotoro#9921
Address: 0x23a70D8D60A4e3b4d8eDb6793Eb7127d49876208

He said that he cleared stage 202 for 3 times and whenever he tries stage 203, error 14 will appear.
This could happen due to reorg but he said that after restarting the game, it reverses all the way back to stage 200, and after a bit stage 202 unlock again.
And when he tried to do stage 202 again, error 14 appears, then after a bit, he is able to join stage 202 without error.

My only explanation for this is because he tried to do stage 203 multiple times, so there are multiple nonces, and because of reorg, some of them are being shown a bit later on.
And when he tried to join stage 202 again, the error appears cuz the block that contain the error message got reorg'ed.

Not sure if I was correct so I will just provide the logs and some related txid
main.zip
e9e74ea15a2bbb01c459fd1285ef0c3dde74707d7da63da798b9706c062073a2
4b89ae3d1d07c8f06d273b7c8472d690c713ec5bf023d0b3f685441bafdd561f
99155e5f77137fb73747af81bef1de757e1b37e328e78ff21d7b45e4d7af0f7e
a0cc30f0c87e0035e9737295248b8feee184863e2c8995d004f693ac44f10f1a
c09feeb6497db1e47cde53e568bc7304022fc4d21bc3b27a576c6d0345b3a773
d377e5e901ca60177cb596ef245fa42ad52223e177a1d7a0a711c8bdaf55a4df

┆Issue is synchronized with this Asana task by Unito

Character getting replaced by another in character selection screen.

This is an old issue that happens sometimes and doesn't cause any serious problems in the past.
But it's happening a lot more in v100045 and it became more troublesome.
image
image

Basically now, when you switch from character A to character B, there is a chance that you are still on character A without knowing it. And then when you try to do a stage or arena fight, it will use character A to fight, but without any gears on them.
Restarting the game and now character A will be completely naked without any gear.

There are few other issues with this bug too but I found the one above is most annoying one.

Here is the logs if it can help investigate this case
logs.zip

런처가 뒤에서 프리로드를 다시 완료해도 싱킹블록 창이 해제되지 않음

  • 게임 실행 후 약 5분 뒤에 싱킹블록 창이 뜨고, 런처에서 5/10부터 다시 데이터를 받기 시작했습니다.
  • 데이터를 다 받아서 다시 Preload Complete 상태로 전환되었습니다.
  • 그래도 플레이어에서 싱킹블록 창이 없어지지 않아 플레이어를 다시 껐다 켜야 했습니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: renderer.log | main.old.log | main.log | Player.log | Player-prev.log | Player.log

[플레이어] 플레이어 종료 시 알 수 없는 팝업창이 출력되는 현상

[테스트 환경]
메인넷 v100049

[내용]
플레이어 종료 시 오류 팝업창이 노출됩니다.
-> 종료 버튼을 통해 플레이어 종료 시에는 노출되지 않습니다.

[발생 스텝]

  1. 플레이어 실행
  2. 플레이어 종료
  3. 오류 팝업창 노출
  4. 플레이어 재 실행
  5. 플레이어 종료 버튼을 이용해 종료
  6. 오류 팝업창 미노출

[Should Be]
플레이어 창 종료 시 오류 팝업창이 노출되지 않아야 합니다.

┆Issue is synchronized with this Asana task by Unito
┆Attachments: 클라이언트 종료 시 오류 팝업창이 노출되는 현상 2.mp4 | 클라이언트 종료 시 오류 팝업창이 노출되는 현상.mp4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.