Simple and practical online game server architecture

Source: Internet
Author: User
This article is not the online game server architecture currently operated by the company where juruntang is located. Instead, it is a simple and practical online game server architecture planned in the current stage.

The essence of online games is the relationship between people. The more people there are, the more relationships there are, the more people they can keep. In the first three days of server activation, the maximum number of players is allowed. To ensure that the player level reaches a certain level after one month, the gameplay can be fully expanded. The more servers in a single group, the better, for PVE games, it is best to accommodate about 10 thousand people. In this case, when the traffic loss rate is 50% in a month, about 5000 people are in a group of servers, and a strong social structure has been created. Various advanced gameplay methods have a foundation. For PVP user-washed games, the higher the number of users, the better. Two good national war games, "Journey" reached 40 thousand people in each group, "Genghis Khan", speculation at least reached 20 thousand people.

Using the perfect and commonly used line separation structure, after the operation to the later stage, there will be a small number of people per line, within the line, and between the line and line are not interactive. However, if there is no line, when the service is started, all the users are stacked in the same hand village, and they are basically unable to play. Tianlong Babu puts forward a better solution to build a map of multiple parallel hand villages, one master and multiple slaves. when starting the service, try to accommodate the influx of new users as much as possible, high-level players can only go back to the home village from other maps.

Each box in indicates an independent process app component. If the downtime of each service process affects some users, the overall service is not interrupted. After the downtime process is restarted, it can be integrated into the whole, and all services can continue.

Image Attachment

GLS: Game Login server, game Login server, someProgramInstead of the core component, GLS calls external interfaces to perform basic user name and password authentication. In addition, many ancillary functions need to be implemented: logon queuing (which is very helpful for the server), GM super logon channel (GM can enter the game without queuing), and activating user control during the test period, restrict user logon and control the Client Version.

DB: in essence, it is the large memory buffer of the background SQL. It isolates database operations and compares the data in the memory. It only regularly writes changed data into the SQL statements in batches. SystemAlgorithmAnd high development stability requirements.

Center: All components must be registered here. The session Status of online players is stored in a centralized manner and connected to each component through heartbeat. All external interfaces are also passed here.

Role entry: select a role after a player logs on to the game.

GS: game server, the core component, the same map, and all game logic-related functions are completed here.

Gate: establishes regular links with users, mainly for sockt forwarding, blocking malicious packets, and protecting Gs. The protocol encryption and decryption function allows one gate to share multiple Gs, reducing the risk of map connection failure.

Im, relationship, consignment: other components, responsible for the corresponding cross-map global game logic.

Details are the devil. This architecture is simple, clear, and clear. It is essentially different from other online game architectures. Team'sCodeDevelopment Capability and project management capability are the key points. One GS has limited capacity. In the current hardware environment, an experienced developer should be able to reach the upper limit of 1500 people. The upper limit of the entire architecture, the bottleneck is the center scheduling pressure, and the DB read and write pressure.

End the process by referencing a piece of thought:
============
Http://blog.csdn.net/lfhfut/archive/2010/04/14/5483266.aspx

4. There is no advanced technology in game development.

First, we need to clarify that a game project is an engineering project, not a scientific research project.

The purpose of a project is to meet the established requirements with limited human and financial resources. The requirements are not very high from the previous analysis, the demand implementation process is not very advanced.

At least in the projects I 've been through, there are no amazing heroes like ghosts and gods, and no great algorithms have been created. What we do is to use the current technology and existing methods, combined into a software product, a software product integrated with the program, art, planning labor force.

In the process of game development, no, no more technical experts are required. All you need is patience and a sense of responsibility.
==============
Finally, I would like to like this: Dia is a good software for drawing flowcharts across platforms. The routine use of juruntang has completely replaced Visio.

Refer:

Baiyunge's blog
Http://blog.csdn.net/lfhfut/archive/2007/09.aspx

A classic network game server architecture
Http://www.cppblog.com/johndragon/archive/2008/04/10/46768.html

Architecture of legend 3
Http://bbs.gameres.com/showthread.asp? Threadid = 47752 & page = 10
The fifth and fifth floors are divided into two parts. Juruntang[Source: gameres.com]Combined to facilitate viewing

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.