Reprinted Please note: http://blog.csdn.net/herm_lib/article/details/8654396
The first thing we need to determine is that the premise of being able to provide full servers throughout the region is that there is no public space for the game, so that anyone can freely access and then have a space of vision, like the new hand village of MMORPG, the main city and the like; while the copy and battlefield are private local spaces, your role's access is conditional. The two differences are critical.
Next, let's take a look at a processing strategy with PVP servers in all regions. The structure can be simplified as much as possible. The logical server and Hall server are as follows:
Here, lobbyd1 (less d in the figure) is used to manage pvpd processes. One lobbyd manages multiple pvpd without any association between them.
Let's take a look at how lobbyd and pvpd are associated.
Pvpd actively connects to lobbyd. Here, the logical server (logicd) and combat server (pvpd) use different access servers.
Let's briefly describe the processing process. The general process of adding a role to the battle (the details may vary ):
[1] obtain the combat room number and hash it to a lobbyd Based on the room number;
[2] register with lobbyd to allow others to see the number of people in certain rooms, and obtain pvpd address information (such as IP & Port) and Access Credential (ticket ); (can I obtain the number of people in the room from pvpd ?)
[3] connect to the specified pvpd based on the above address information and enter the specified room based on the room number and credential;
[4] fighting ....
[5] The battle ends and the connection is disconnected.
Here, pvpd uses an independent access server. Generally, there are 10 messages in the battle, so it is acceptable to perform a connection or disconnection operation.