What is a club ?  

  Group leader ( agent ) After the establishment of the club , You can invite your own group members to become your own club members , Convenient management . The club play is set by the founder , Only club members can join , And the club room all consumes founder room card . Club members do not need to create rooms , Start the game directly for player matching .

Why do you want to be a club ?

(1) Agents no longer need to focus on the players , Manually charge group members , It is no longer necessary to enter the room number , Convenient and convenient , Increase revenue .

(2) Agent set up fun method , Players Click to enter , The system allocates rooms automatically , The situation of playing and cards is avoided .

Three core functions :

(1) Agent to create and view Club related processing .

(2) Players join the club related processing .

(3) Players need to be in the game , The server automatically creates the club room and sits down , And find and match with club players .

Database table and stored procedure : Three tables need to be created :

1. Agent's club information sheet clubinfo, Used to record information about clubs created by an agent .

2. Room list generated by the club clubrooms, It is used to record the room list generated by the club and the corresponding room player list information .

3. List of players joining the club clubplayers, Used to record which club the player joined .

It also needs to create a stored procedure :

1. Create Club related : Judge the identity of the Creator , Create a record table clubinfo.

2. Create club room related : Judge the number of room cards created by the Creator , Record room information to table clubrooms, And the corresponding room information list of the creator club .

3. Related to player joining Club : Add player to club , And remove from the club .

The development process of agent identity creation Club :

(1) Increase of clients “ Create a club ” Interface of , send out “ Create a club ” News of .

(2) Modify private farm server , Forward to game server .

(3) Modify game server , Add Club data table and corresponding stored procedure to store and read Club database table , And add the corresponding message and data structure , Process the judgment and call after receiving the message .

(4) Modify front end performance , After getting the creation success message, it will prompt success .

Join the club function development process :

(1) Add a new client “ Join the club ” Interface of .

(2) Apply to join , Send message to private farm server .

(3) After getting the return message , Show tips .

Modify private farm server and game server :

(1)PriaveteGame::OnEventSocketPrivate Function to add processing application to join the club message processing , And forward it to the game server .

(2) The game server calls the stored procedure after receiving the message. , Will the player ID, Name added to table clubplayers in , And return the join success message .

(3) After receiving the return message, the private farm server forwards it to the client .


The process of entering the game :

(1) Modify add room message structure , With club type or ID, Client Click “ Start the game ”, Send message structure to private farm server .

(2) Modify the server PrivateTableInfo structure , Attached Club ID, stay PriaveteGame::OnTCPNetworkSubJoinPrivate The join room message was received in the function , If the club is , Just traverse the online room , Matching Club ID, If you find a seat available in this room , Just sit down . If you don't find a room , Call the create room function , Create attached clubs ID And sit down , Send updates clubrooms The message of table is updated to the game server .

(3) After successfully joining the room , Return the room joining result message to the client .

(4) When the room is disbanded , Also send updates clubrooms The message of table is updated to the game server .

(5) If you do not allow automatic room creation , You can also move the room creation section to the front end for agents to create rooms manually .


Functions of Agent Management Club :

(1) Add data table information to server and client clubrooms Getting messages and processing for .

(2) In the front-end part, add the corresponding list display and sharing functions for the proxy function .

That's the basic process .