MMORPG game server design

Source: Internet
Author: User
Tags dedicated server
MMORPG Game server design MMORPG Unlike other online games on the LAN, it is an online game with over people connected to the entire internet. End-to-end design is extremely important Basic server settings In large online games, it is usually designed as a C/S structure. The client no longer performs logic processing on data, but is just a sending and receiving device that receives operation information from players, then it is fed back to the server, and then processed by the server and sent back to the client. The client performs graphical processing to present a colorful game world to players. Login Server This can also be called a connection server. The client of an online game is usually connected to this server, and then the connection server depends on different needs, the game message is forwarded to other corresponding servers (logic and map servers) because it is the object directly connected by the client, and it also bears the burden of verifying the customer's identity. Map Server This can also be called a continuous Event Server. The actions performed by the target object (player) on this server are continuous events. For example, if a player moves from point A to point B, such an action takes some time to move. Therefore, moving is a continuous event. Logic Server This can be called an instantaneous event server. In this server, all actions performed by the processing object (player) can be Completed within the disconnection time. For example, if a player buys a bottle of medicine from a store, after the player confirms the purchase, the server deducts the player's game currency and then adds the corresponding medicine bottle to the player's backpack. This The two operations are only the addition and subtraction of two numbers for the server. After the addition and subtraction of the two numbers are calculated, the event can be completed. Therefore, we can say that this event is an instantaneous event. Server group Improvement However, in actual application, the structure of the game server is more complex than the three service structures mentioned above, however, they are all expanded under the three most basic server architectures. The expansion is mainly based on other auxiliary functions. Two types of servers, database servers, billing servers, and chat servers, which are independent of logic servers, may be added in actual applications. Database Server The database server actually uses a server to read and write databases. This is especially important in large online games. In large online games, the amount of gamer data to be processed is very large. If a dedicated server is not used for processing, this server group may be dragged down. Billing Server It is usually used in commercial online games to record the online time of players, It provides a basis for billing, and is also the most important part of the entire server group. Once a problem occurs, operators do not have to make money. Chat Server The chat function in the game is a kind of instantaneous action, which is theoretically placed in the Logic Server for processing. However, in large online games, this function is not closely related to other parts of the game, so you can create a function server independently. Server Cluster settings In the Application Process of Large Games, the number of players to be processed may exceed, and a common server cannot complete the work to be done. Therefore, in actual application, generally, a group of multiple servers work together to complete a function. For example, the map server can divide all the regions in the game into N as needed. Items And then let the events in this region be processed by a specific server. The purpose of this operation is to reduce the computing workload of a server and build the entire system into a distributed network. But doing so will also cause a problem: when a player moves from Area 1 to Area 2. In this case, you must first Delete the player from Server 1 and then add the player to Area 2. At the same time, it is necessary to transfer the gamer data information from Server 1 to server 2 (because when the server group is working, the gamer information can only be stored on the server in the current region ), that is to say, once a player moves across servers, Data communication is inevitable on the server side. Because this movement is not regular, the player's server may reach other servers. In this way, if the server group contains N map servers, then, each server may be connected to other N-1 servers, a total of N x n Items Connection. If a common socket design is used for such a number of connections, it is likely to cause various problems in the communication between servers. For this reason, between the servers of commercial online games, mature third-party communication is usually used. Middleware, such Ace and ice are used as transmission layers for network connection.

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.