Open source game server framework NoahGameFrame (NF) server-side environment construction (2)

1. Download NoahGameFrame

1. Enter the open source game server framework NoahGameFrame on GitHub's official interface NoahGameFrame
insert image description here
2. Copy the URL of the resource directory
insert image description here
to be checked out 3. Right-click on any empty folder, select the SVN Checkout... option of TortoiseSVN, and then the Checkout panel will open , fill in the URL of the resource directory copied in the second small step above in the first place, fill in the path of the target file directory to be copied to in the second place, and then click OK to start Checkout 4. After the Checkout is completed, click
insert image description here
OK
insert image description here

2. Download the dependencies of NoahGameFrame

1. After the above series of steps, the complete project has not been downloaded yet. There are three independent repositories in the dependency folder Dependencies of the NoahGameFrame project, which need to be checked out separately. 2. Click LuaIntf @ 928ebad
insert image description here
insert image description here
, and then Jump to the following page
insert image description here
3. Copy the resource directory URL of the LuaIntf project to Checkout
insert image description here
4. Right-click on any empty folder and select the SVN Checkout... option of TortoiseSVN. Then the Checkout panel will open, and fill in the URL of the resource directory copied in the third small step above in the first place. Fill in the path of the target file directory to be copied to in the second place (the target file directory path selected here must be the NoahGameFrame
project Dependencies folder), note that the dependent files here must be checked out to the NoahGameFrame project Dependencies folder, and on GitHub The resource file directory structure should be consistent . Then click OK to start Checkout
Checkout to NoahGameFrame project Dependencies folder
insert image description here
5. Because the Dependencies folder is not an empty folder, a warning will pop up when you copy it to this folder. Just select the first option. 6. The
insert image description here
other two folders are ajson @ 140f885 and concurrentqueue @ ffda5a4 can refer to the LuaIntf project Checkout process above . Finally, the Dependencies folder will form the following file directory structure
insert image description here
7. Check whether the file structure directories of the three dependencies are consistent with those on GitHub. (If it is inconsistent, please move it manually, and it will eventually be consistent with GitHub)
insert image description hereinsert image description hereinsert image description here

3. Build the NoahGameFrame project

1. Double-click the wall in the root directory of the trunk to download the dependency library.bat , and double-click the build_dep.bat in the Dependencies folder . Then wait for the dependent library installation to complete. 4. Use Visual Studio to generate the solution 1. Use Visual Studio 2019 or above to open the project 2. After opening with VS2019 or above, you will be redirected to the SDK version of the project. At this time, click OK to confirm. 3. Click the " Project-Generate Solution " option on the VS navigation bar to start compiling the project. 4. After the project generates the solution, there is an error. The error message is: the file "NFCore.lib" cannot be opened , as long as there is an error message similar to this cannot open other .lib files , the solution is: just click the " Project-Generate Solution " option on the VS navigation bar again , it can be solved. 5. After the project generation solution is completed, there is another common error. The error message is: a problem related to "protoc" . The author has not encountered this problem here, so he cannot take a screenshot. The official solution is Double-click the cpp.bat file in the NFComm\NFMessageDefine directory, and then click the " Project-Generate Solution " option on the VS navigation bar again to solve the problem.
insert image description here
insert image description here


insert image description here

insert image description here

insert image description here

insert image description here
insert image description here

insert image description here
6. Complete the project generation solution. At this time, you can see that there is no error message, indicating that the generation has been completed.
insert image description here

Fourth, run the server

1. Double-click the rund.bat file under the _Out folder to start running the server.
insert image description here
2. After double-clicking the rund.bat file, if there is an error message like the following pop-up window, it means that there is no solution for generating the project in the third step of this article. caused by success.
insert image description here
3. There may be some other pop-up window error messages when running the server for the first time. At this time, you only need to close the server-related windows, and then double-click the rund.bat file under the _Out folder again.
insert image description here
4. The project server starts successfully. If all 6 windows can be successfully opened, it means that the server has started successfully.
insert image description here

5. Test

Download the Unity client of NoahGameFramed, and make related settings (the specific setting steps of the client can refer to the open source game server framework NoahGameFrame (NF) client environment construction ), and then run the client. Enter the local loopback IP 127.0.0.1, click the connect button, and then the Unity Console will print the Connected message, then enter the account name and password are both 123456, and then click the Login button on the login interface to enter normally In the game, the Redis database also records account information.
insert image description here
insert image description here
insert image description here
insert image description here

6. Summary

If there are any problems that have not been perfectly solved in this article, you can leave a message for me or go to Baidu online or go to the official project documentation to have a look. If there is anything that needs to be added or corrected in the future, I will modify it as soon as possible.
Previous: Introduction to Open Source Game Server Framework NoahGameFrame (NF) (1)
Next: Open Source Game Server Framework NoahGameFrame (NF) Client Environment Construction (3)

Guess you like

Origin blog.csdn.net/jianjianshini/article/details/126180520
Recommended