CN109847338B - Method for automatically rebuilding server for local area network game - Google Patents
Method for automatically rebuilding server for local area network game Download PDFInfo
- Publication number
- CN109847338B CN109847338B CN201910206227.4A CN201910206227A CN109847338B CN 109847338 B CN109847338 B CN 109847338B CN 201910206227 A CN201910206227 A CN 201910206227A CN 109847338 B CN109847338 B CN 109847338B
- Authority
- CN
- China
- Prior art keywords
- game
- server
- substep
- area network
- local area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention relates to the technical field of local area network games, in particular to a method for automatically reconstructing a server of a local area network game, which comprises the following steps of (S100) creating the local area network game; step two (S200), the LAN game server is disconnected, the server is reconnected, if the reconnection time is exceeded, the step three (S300) is operated; step three (S300), reestablishing the server function of the local area network on the game client of other computers; and step four (S400), after the server is reestablished, the server sends a notice to other game clients to recheck the data and continue the game. Has the advantages that: the problem that a player has to quit the function module of the game to re-create the game after the local area network game server is disconnected is solved, the stability of the game is ensured, and the game experience is improved.
Description
Technical Field
The invention relates to the technical field of local area network games, in particular to a method for automatically rebuilding a server of a local area network game.
Background
With the development of network game technology, various local area network games are developed by large game companies around the world. The game player client terminals are connected to the same Wi-fi for game data transmission, so that the game server can be operated on a certain client terminal computer without deploying a special server, but the computer operating the game server needs to keep an operating state, otherwise, other player client terminals cannot transmit data to continue the game. Namely, the existing LAN game has the following disadvantages: if the computer as the server quits the game or is disconnected, other game players can be disconnected with the server end because the client end cannot receive the data of the server end, so that the game is suddenly ended, and bad game experience is brought to the players.
Disclosure of Invention
In order to solve the technical problem, the invention provides a method for automatically rebuilding a server of a local area network game, which solves the problem that the traditional local area network game server is automatically switched among different computers through the steps of an optimization method.
The specific technical scheme is as follows: a method for automatically reconstructing a server for a local area network game comprises the following specific steps:
step one (S100), establishing a local area network game;
step two (S200), the LAN game server is disconnected, the server is reconnected, if the reconnection time is exceeded, the step three (S300) is operated;
step three (S300), reestablishing the server function of the local area network on the game client of other computers;
and step four (S400), after the server is reestablished, the server sends a notice to other game clients to recheck the data and continue the game.
Preferably, the specific process of creating the local area network game in the first step (S100) of the method for automatically reconstructing the local area network game is as follows:
a substep 101(S101) that a game player creates a room in the same local area network, and other game players enter the room and start a game;
substep 102(S102), the client of each game player has its own Socket connection, and is used to send data to the computer running the server and receive data sent from the server, and the server correspondingly stores all client game data according to the sequence of each client entering the game and sends the data to all clients;
in sub-step 103(S103), each game player client obtains information of other clients by connecting to the game server computer, wherein the information includes interface information, game data, and various game-related data such as IP addresses.
Preferably, the step two (S200) in the method for automatically reconstructing a server based on a local area network game includes the following specific processes:
the game is continuously played, the connection condition with the game server is continuously detected, if the data transmission fails, the game is suspended, a reconnection request is initiated, the reconnection request is performed according to the configured time, if the reconnection to the server is successful within the specified time, the game is continued, otherwise, the step three (S300) is entered.
Preferably, the specific process of reestablishing the lan server in step three (S300) of the method for automatically reestablishing the lan server based on the lan game is as follows:
substep 301(S301) sets a value N, N defaults to N =2, and proceeds to substep 302 (S302); substep 302(S302) if the game player is the nth player in the client sequence, then step S303 is entered, otherwise substep 304(S304) is entered; substep 303(S303) creates a room, the created room successfully sends the server-reconstructed successful message data to other clients, and then goes to step four (S400); substep 304(S304) sends a verification request to the nth client in the game list to determine whether the server is being rebuilt, if the message returned by the verification message is not received or the verification message is failed to be sent, the verification message is sent again to perform secondary verification, after the secondary verification, if the message is not received or the message is failed to be sent, N +1 is carried out, and then substep 302(S302) is carried out, if the verification message is received, substep 305(S305) is carried out; substep 305(S305) receives a message that the verification message waits for receiving the server rebuilt message, determines whether the waiting time length is exceeded, and if the waiting time length is exceeded, the substep 304(S304) is re-entered, and if the rebuilt message is received within the time length, the substep four (S400) is entered.
Preferably, the step four (S400) in the method for automatically reconstructing a server based on a local area network game is specifically: and other clients receive the message that the server is successfully rebuilt, update the data of the local server and the data of other game clients according to the obtained new data, and continue the game.
After the technical scheme is adopted, the invention has the beneficial effects that:
compared with the disclosed technical scheme, the technical scheme solves the problems that other player clients cannot continue playing the game and a new game needs to be established again after quitting the game after the local area network game has computer disconnection for operating the local area network game server, and the specific technical scheme is that the server can automatically switch from one client machine to another client machine when the game is played in the local area network, and other clients can immediately and automatically establish another server to continue playing the game even if the client machine in charge of the server loses connection, namely the server is lost. The specific innovation points are as follows: the method comprises the steps of establishing a local area network game, storing all client data according to a sequence, disconnecting the server, reconnecting the server at first, and rebuilding the server according to the sequence of the stored data when the server fails, so that the problem that a player has to quit a functional module of the game to rebuild the game after the local area network game server is disconnected is solved, the stability of the game is ensured, and the game experience is improved.
The technical scheme is characterized in that: the game server is disconnected without quitting the game, and the reconnection reconstruction modules can be flexibly operated in the local area network game, so that the automatic creation of a new server can be realized in the game.
Drawings
FIG. 1 is a general overview of reconnecting a server and recreating a new server
FIG. 2 is a detailed flow chart of the steps of automatically rebuilding a server in a LAN game
Detailed Description
The invention will now be described in more detail with reference to the accompanying figures 1 to 2 and the specific examples, without limiting the invention thereto.
Example one
The general idea of the method for automatically rebuilding the server in the local area network game shown in fig. 1 is as follows: ,
step one (S100), establishing a local area network game;
step two (S200), the LAN game server is disconnected, the server is reconnected, if the reconnection time is exceeded, the step three (S300) is operated;
step three (S300), reestablishing the server function of the local area network on the game client of other computers;
and step four (S400), after the server is reestablished, the server sends a notice to other game clients to recheck the data and continue the game.
Example two
As shown in fig. 2, on the basis of the first embodiment, a detailed flow of the steps of automatically rebuilding the server in the lan game is as follows:
the specific process of creating the local area network game in the first step (S100) is as follows:
a substep 101(S101) that a game player creates a room in the same local area network, and other game players enter the room and start a game;
substep 102(S102), the client of each game player has its own Socket connection, and is used to send data to the computer running the server and receive data sent from the server, and the server correspondingly stores all client game data according to the sequence of each client entering the game and sends the data to all clients;
in sub-step 103(S103), each game player client obtains information of other clients by connecting to the game server computer, wherein the information includes interface information, game data, and various game-related data such as IP addresses.
The specific process of the second step (S200) is:
the game is continuously played, the connection condition with the game server is continuously detected, if the data transmission fails, the game is suspended, a reconnection request is initiated, the reconnection request is performed according to the configured time, if the reconnection to the server is successful within the specified time, the game is continued, otherwise, the step three (S300) is entered.
Step three (S300) the specific process of reestablishing the lan server is:
substep 301(S301) sets a value N, N defaults to N =2, and proceeds to substep 302 (S302); substep 302(S302) if the game player is the nth player in the client sequence, then step S303 is entered, otherwise substep 304(S304) is entered; substep 303(S303) creates a room, the created room successfully sends the server-reconstructed successful message data to other clients, and then goes to step four (S400); substep 304(S304) sends a verification request to the nth client in the game list to determine whether the server is being rebuilt, if the message returned by the verification message is not received or the verification message is failed to be sent, the verification message is sent again to perform secondary verification, after the secondary verification, if the message is not received or the message is failed to be sent, N +1 is carried out, and then substep 302(S302) is carried out, if the verification message is received, substep 305(S305) is carried out; substep 305(S305) receives a message that the verification message waits for receiving the server rebuilt message, determines whether the waiting time length is exceeded, and if the waiting time length is exceeded, the substep 304(S304) is re-entered, and if the rebuilt message is received within the time length, the substep four (S400) is entered.
Step four (S400) specifically includes: and other clients receive the message that the server is successfully rebuilt, update the data of the local server and the data of other game clients according to the obtained new data, and continue the game.
It will be appreciated by those skilled in the art that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The embodiments disclosed above are therefore to be considered in all respects as illustrative and not restrictive. All changes which come within the scope of or equivalence to the invention are intended to be embraced therein.
Claims (3)
1. A method for automatically rebuilding a server of a local area network game is characterized by comprising the following steps:
step one (S100), establishing a local area network game;
step two (S200), the LAN game server is disconnected, the server is reconnected, if the reconnection time is exceeded, the step three (S300) is operated;
step three (S300), reestablishing the server function of the local area network on other game clients;
step four (S400), after the server is reestablished, the server sends a notice to other game clients to recheck the data and continue the game;
the specific process of creating the local area network game in the step one (S100) is as follows:
a substep 101(S101) in which a plurality of game players create a room from one of the game players in the same local area network, and the other game players enter the room and start a game;
substep 102(S102), the client of each game player has its own Socket connection, and is used to send data to the computer running the server and receive data sent from the server, and the server correspondingly stores all client game data according to the sequence of each client entering the game and sends the data to all clients;
substep 103(S103), each game player client acquires information of other clients by connecting to the game server computer;
the specific process of reestablishing the local area network server in the third step (S300) is as follows:
substep 301(S301) sets a value N, which defaults to an initial value of 2, and proceeds to substep 302 (S302); substep 302(S302) if the client of the game player is the nth client in the sequence in which the client enters the game, step S303 is entered, otherwise substep 304(S304) is entered; substep 303(S303) creates a room, the created room successfully sends the server-reconstructed successful message data to other clients, and then goes to step four (S400); substep 304(S304) sends a verification request to the nth client in the game list to determine whether the server is being rebuilt, if the message returned by the verification message is not received or the verification message is failed to be sent, the verification message is sent again to perform secondary verification, after the secondary verification, if the message is not received or the message is failed to be sent, N +1 is carried out, and then substep 302(S302) is carried out, if the verification message is received, substep 305(S305) is carried out; substep 305(S305) receives a message that the verification message waits for receiving the server rebuilt message, determines whether the waiting time length is exceeded, and if the waiting time length is exceeded, the substep 304(S304) is re-entered, and if the rebuilt message is received within the time length, the substep four (S400) is entered.
2. The method of claim 1, wherein the step two (S200) is specifically performed by:
the game is continuously played, the connection condition with the game server is continuously detected, if the data transmission fails, the game is suspended, a reconnection request is initiated, the reconnection request is performed according to the configured time, if the reconnection to the server is successful within the specified time, the game is continued, otherwise, the step three (S300) is entered.
3. The method for automatically rebuilding a server of a local area network game according to claim 1, wherein the fourth step (S400) is specifically: and other clients receive the message that the server is successfully rebuilt, update the data of the local server and the data of other game clients according to the obtained new data, and continue the game.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910206227.4A CN109847338B (en) | 2019-03-19 | 2019-03-19 | Method for automatically rebuilding server for local area network game |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910206227.4A CN109847338B (en) | 2019-03-19 | 2019-03-19 | Method for automatically rebuilding server for local area network game |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109847338A CN109847338A (en) | 2019-06-07 |
CN109847338B true CN109847338B (en) | 2022-04-26 |
Family
ID=66901160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910206227.4A Active CN109847338B (en) | 2019-03-19 | 2019-03-19 | Method for automatically rebuilding server for local area network game |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109847338B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112642144B (en) * | 2020-12-18 | 2023-09-19 | 咪咕互动娱乐有限公司 | Networking method of cloud game, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106452878A (en) * | 2016-10-19 | 2017-02-22 | 北京悦畅科技有限公司 | Service switching method, device and system for local area network |
CN107241387A (en) * | 2017-05-12 | 2017-10-10 | 腾讯科技(深圳)有限公司 | The processing method of request of data, apparatus and system |
CN107670275A (en) * | 2017-10-26 | 2018-02-09 | 广州市雷军游乐设备有限公司 | The method and system of game process disconnection reconnecting |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7849491B2 (en) * | 2002-12-10 | 2010-12-07 | Onlive, Inc. | Apparatus and method for wireless video gaming |
-
2019
- 2019-03-19 CN CN201910206227.4A patent/CN109847338B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106452878A (en) * | 2016-10-19 | 2017-02-22 | 北京悦畅科技有限公司 | Service switching method, device and system for local area network |
CN107241387A (en) * | 2017-05-12 | 2017-10-10 | 腾讯科技(深圳)有限公司 | The processing method of request of data, apparatus and system |
CN107670275A (en) * | 2017-10-26 | 2018-02-09 | 广州市雷军游乐设备有限公司 | The method and system of game process disconnection reconnecting |
Also Published As
Publication number | Publication date |
---|---|
CN109847338A (en) | 2019-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7177950B2 (en) | Synchronization and recovery of peers in a peer to peer environment | |
JP4324199B2 (en) | Violations in peer-to-peer relay networks | |
EP1506491B1 (en) | Dynamic player management | |
WO2018137523A1 (en) | Game server switching method, relevant device and system | |
CN110417915B (en) | Push message transmission method and device, storage medium and electronic equipment | |
US20110230269A1 (en) | Method and device for supporting wireless multi-player gaming with a multi-player game hub | |
JP4970039B2 (en) | Island recovery in peer-to-peer relay networks | |
EP2712119A1 (en) | Abnormality handling method, device and client | |
US8260873B1 (en) | Method and system for grouping user devices based on dual proximity | |
JP2007513401A (en) | Audience in peer-to-peer relay networks | |
CN102710612B (en) | Realize method and the device of interactive communication application in many ways | |
CN109847338B (en) | Method for automatically rebuilding server for local area network game | |
CN104168282A (en) | Cross-platform game communication method and system | |
CN111803954A (en) | Game live broadcast method based on cloud mobile phone, electronic equipment and storage medium | |
CN113382026A (en) | Data processing method, device, related equipment and storage medium | |
CN112003943A (en) | Voice data synchronization method and device | |
CN103581197A (en) | Method and system for processing team data among servers | |
CN112787995B (en) | Game interaction method and system | |
CN110507988A (en) | A kind of game broken string Auto-reconnect method and system | |
CN109857439B (en) | Game version updating method and device | |
CN111195432B (en) | Object display method and device, storage medium and electronic device | |
CN111541608A (en) | Network communication method, system and related device | |
KR20120094321A (en) | Peer to peer communication method between online game clients | |
CN111416849B (en) | Disconnection reconnection method, device and system and computer equipment | |
CN115837159A (en) | Virtual handle control method based on android device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |