Get the App
SLTechnology News&Howtos  ›  Servers  › 

From Zero Learning Game Server Development (1) starting from a multiplayer online real-time game

Shulou Source: shulou.com Published: 2022-06-02 06:49:57 10月03日 Update

Words written in the front

Often students or beginners ask me how to read and learn the code of an open source software, and many friends face projects left by former colleagues at work, because of imperfect documentation, few code comments, and a large number of projects. I can't start. In the future, this article will answer the above questions through a multiplayer online real-time game, the last game.

In fact, when I was a student, I was also confused about the above questions, but later, I found that for projects with missing documents and notes, I needed to explore by myself. Although it was a challenge, it was also an opportunity-a good learning opportunity. Because at least there is code, as Master Hou Jie said, "in front of the source code, there are no secrets", so we should "read the fucking code".

So, in this series of articles, when we analyze the game source code of "the Last War", we will not follow the traditional way of thinking: first introduce the summarized program structure, and then introduce the details of each module, because, when we are faced with a set of unfamiliar source code, especially in the case of missing documents, we can't grasp the overall structure of the project at all. We can only read and debug the code module by module from scratch, so our series of articles also follow this idea to teach beginners to understand the code of an open source project step by step with real cases.

Let's first take a look at the content of the game. Here are some screenshots of the game screen:

This is a 5v5 real-time RPG competitive game similar to Arena of Valor and dota.

Method: Wechat searches the official account "easyserverdev" (Chinese name: high-performance server development). After following the official account, reply "the last battle source code" in the official account to get the download link. (sprinklers and code sellers please stay away! ) if you follow the requirements, you will receive the following download link, and the code of this link is constantly updated. You can update the latest source code regularly through svn:

The logic of the client is relatively simple, mainly some game effects and animation (based on Unity 3D), so here we mainly analyze the server-side source code of the game.

Let's first introduce the recommended source code running and development environment (my configuration):

Windows 7

Visual Studio 2010

There are many modules on the server side. Here is a project diagram of the main module:

Starting with the next article, we will show you how to learn such source code. It is not easy to organize the source code, if you like this article, help to give this article a like.

Welcome to the official account "easyserverdev". If you need my help with any technical or professional problems, you can contact me through this official account, which not only shares the experience and stories of high-performance server development, but also provides free technical answers and career answers for the majority of technical friends. If you have any questions, you can leave a message on the Wechat official account directly, and I will reply to you as soon as possible.

Tags: Source code code public project server service module problem learning development technology documentation missing link analysis real-time at the same time students ideas articles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Docker Shulou Information Linux Apple