The game login process in the player's eyes is very simple, only need to click the login button;
In fact, this process is not as simple as imagined, especially in the hands of the tour, will generally join the third-party channel;
Let's write down the whole process of this login.
One sign-in channel (client) process:
1 Client Input channel account user_name and password password;
2 Login, Login SDK after successful, will return a token;
3 Save token;
Incoming:
app_id, App_key, user_name, password
Return:
token
Description
APP_ID and App_key are the game producers in the Access Channel SDK when the application;
User_name and password need to apply for themselves, and some channels support visitors to log in.
Two Get server list (client) process
1 after successful login can get server list server_list;
2 Display server list;
Return:
server_list
Description
The list of game servers is usually obtained directly by configuring a link in the client;
This configuration file can be updated by updating the resource.
Three-Link login Service (client) 1 client Select server;
2 The IP and port of the login service can be obtained by selecting the server;
3 Login to get the IP and port of the game suit;
Incoming:
token
Return:
IP, Port
Description
The IP and port of the game suit will be returned after the login is successful.
Four authentication token (server side) 1 login service to get incoming token from the client;
2 token to the certification service, to the channel verification;
3 Channel verification will return the aid after successful, and then save the authentication information (will be used when logging into the game suit);
4 Assign the game suit IP and port according to load Balancer, return to the client;
Incoming:
app_id, App_key, token
Channel return:
Aid
Return to client:
IP, port, aid
Description
Channel validation is also a link, which is given in the development documentation of the channel;
If the client is logged in with a visitor account, then the aid will not change after the account is bound, unless the device is replaced, or the game is uninstalled and reinstalled;
The authentication information is saved in order to prevent the player from directly logging into the game clothing without certification.
The large hand tour backend will have multiple game servers, and the login service will assign a game suit to the player based on load balancing.
Five link game Suit (client) 1 Get the login service return IP and port and aid after disconnecting from the login service link;
2 Take the new IP and port login game suit;
Incoming:
Aid
Six game clothing (server side) 1 to get aid after the certification service to verify that the player is logged in;
2 After successful authentication, the player's role information on the server is returned.
3 Play the game;
Return:
Role Information
The above is the full flow of large-scale hand-tour login.
This process will involve three parties: the client, the channel, the service side;
The service end is divided into three kinds: Login clothing, certification clothing, game clothing.
Here's a simple picture:
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Large Hand Tour Login process