Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report