Data processing method, device, electronic device and storage medium for turn-based games
By introducing a common game protocol in turn-based games, the game data of virtual characters is encapsulated and sent to the client, the problem of low data processing efficiency during virtual characters switching is solved, and a more efficient data management and shared combat interaction system is achieved.
Patent Information
- Application Number
- CN202210382807.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-04-12
AI Technical Summary
When switching virtual characters in existing turn-based games, they need to perform tedious operations to obtain data from multiple combat interaction systems, resulting in low game data processing efficiency.
By adding a common game protocol, the server can encapsulate and send the game data of all virtual characters that can be controlled by gamers to the game client and save it on the client, thereby reducing the operation steps of data processing when virtual characters are switched.
It realizes the operation steps of reducing data processing when virtual role switching, improves data processing efficiency, and enables all virtual characters to share the combat interaction system.
Smart Images

Figure CN114917589B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, in particular to the field of game technology, and specifically to a data processing method, device, electronic device and storage medium for a turn-based game. Background Art
[0002] A turn-based game is a form of game battle. In a game match, all game players in the game match have their own game rounds. When it is their turn, they can control the virtual character to fight in the game. All game players in the game match fight by taking turns to attack. In the game match, game players can control virtual characters to fight. Virtual characters can have static data related to various battle interaction systems, such as props owned by game players, spells and stunts that can be used, etc., and can also have data related to various battle states, such as spell cooling rounds, whether the virtual character is sealed, etc. At the same time, there can also be various dynamic information, that is, data that needs to be requested from the game server in real time. In the case of a single virtual character, these data are often stored in various battle interaction systems, such as prop data stored in the prop interaction interface system, spell data stored in the spell interaction interface system, and each battle interaction system manages the data it needs.
[0003] In existing turn-based games, in order to manage the combat data, status data, dynamic data, etc. of multiple virtual characters, when the game player switches the current virtual character, it is necessary to write interfaces in all combat interaction systems to request the game server for data or dynamic data related to the combat interaction system corresponding to different virtual characters. Therefore, after the virtual character is switched, cumbersome operations are required to obtain the data of the combat interaction system, which consumes a lot of time and leads to low efficiency of game data processing. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, device, electronic device and storage medium for a turn-based game. By adding a new universal game protocol, a server can encapsulate the game data of all virtual characters controllable by game players and send it to a game client to be stored in the game client, thereby reducing the data processing operation steps and improving data processing efficiency when the virtual characters are switched.
[0005] The present application embodiment provides a data processing method for a turn-based game, which is applied to a game client, including:
[0006] During a current game round of a target game, when a role switching instruction is detected, a target virtual character and its role identifier selected from a plurality of selectable virtual characters are determined according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round;
[0007] Based on the character identifier of the target virtual character, filtering out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player;
[0008] Based on the static data of the combat interaction system of the target virtual character, the game data of all combat interaction systems of the current virtual character are updated, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered;
[0009] Receive a game operation of the current game player, and respond to the game operation based on the battle interaction system.
[0010] The present application embodiment provides a data processing method for a turn-based game, which is applied to a server and includes:
[0011] Receive the battle initialization command sent by the game client;
[0012] Based on the character identifiers of all virtual characters that the current game player can control in the current game round, obtaining combat interaction system static data of all virtual characters that can be controlled in the current game round;
[0013] The combat interaction system static data of all virtual characters controllable in the current game round is sent to the game client to trigger the game client to store and process the combat interaction system static data of all virtual characters controllable in the current game round.
[0014] Accordingly, the embodiment of the present application further provides a data processing device for a turn-based game, which is applied to a game client and includes:
[0015] a determination unit, configured to, during a current game round of a target game, when a role switching instruction is detected, determine a target virtual character selected from a plurality of selectable virtual characters and its role identifier according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round;
[0016] a screening unit, configured to screen out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally based on the character identifier of the target virtual character, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player;
[0017] An updating unit, configured to update the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered;
[0018] The first receiving unit is used to receive the game operation of the current game player and respond to the game operation based on the battle interaction system.
[0019] In some embodiments, the apparatus further comprises:
[0020] A first receiving subunit is used to receive a game battle start operation of the current game player for the target game;
[0021] A first sending subunit is used to send a battle initialization instruction of the current game player to the server based on the game battle start operation, so as to trigger the server to obtain battle interaction system static data of all virtual characters that can be controlled in the current game round based on the character identifiers of all virtual characters that can be controlled by the current game player in the current game round;
[0022] The second receiving sub-unit is used to receive the combat interaction system static data of all the virtual characters controllable in the current game round returned by the server according to the combat initialization instruction, and store and process it.
[0023] In some embodiments, the first sending subunit is further used for:
[0024] Based on the game battle start operation, a battle initialization instruction of the current game player is sent to the server to trigger the server to obtain the battle interaction system static data of all virtual characters controllable in the current game round based on the character identifications of all virtual characters controllable by the current game player in the current game round, and the battle interaction system static data of all virtual characters controllable in the current game round are packaged through a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted by the server to the game client.
[0025] In some embodiments, the apparatus further comprises:
[0026] A first processing unit, configured to clear game data in all combat interaction systems in the current game round;
[0027] The updating subunit is used to update all cleared combat interaction systems based on the combat interaction system static data of the target virtual character.
[0028] In some embodiments, the apparatus further comprises a second processing unit configured to:
[0029] If the combat interaction system to which the combat interaction system static data of the target virtual character belongs exists in all the combat interaction systems after being cleared, writing the combat interaction system static data of the target virtual character into the corresponding combat interaction system after being cleared;
[0030] If it does not exist, the corresponding cleared combat interaction system is loaded based on the combat interaction system static data of the target virtual character, and the game data in the cleared combat interaction system is updated.
[0031] In some embodiments, the apparatus further comprises:
[0032] A second sending subunit is used to send the character identification of the target virtual character as the character identification of the virtual character currently being operated by the current game player to the server, so that the server confirms the virtual character currently being operated by the current game player;
[0033] A third sending subunit is used to send a request for obtaining target dynamic data to the server, triggering the server to obtain the target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the request for obtaining the target dynamic data is a request generated by the current game player triggering the current battle interaction system;
[0034] The third receiving subunit is used to receive the target dynamic data corresponding to the target virtual character returned by the server, and update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0035] In some embodiments, the apparatus further comprises:
[0036] The fourth sending subunit is used to send an acquisition request for the target dynamic data to the server through a data acquisition protocol, wherein the data acquisition protocol is a dynamic data acquisition protocol common to the selectable virtual characters.
[0037] In some embodiments, the apparatus further comprises:
[0038] A fifth sending subunit, configured to send the operation instruction corresponding to the game operation to the server, so as to trigger the server to bind and store the operation instruction with the character identifier of the virtual character being operated by the current game player;
[0039] In some embodiments, the apparatus further comprises:
[0040] The sixth sending subunit is used to send a current game round end instruction to the server to trigger the server to update the current battlefield information and the status information of the virtual character based on the operation instruction bound to the virtual character being operated by the current game player in the current game round.
[0041] Accordingly, the embodiment of the present application further provides a data processing device for a turn-based game, which is applied to a server and includes:
[0042] A second receiving unit, used to receive a battle initialization instruction sent by a game client;
[0043] An acquisition unit, configured to acquire combat interaction system static data of all virtual characters controllable in the current game round based on character identifiers of all virtual characters controllable by the current game player in the current game round;
[0044] The sending unit is used to send the combat interaction system static data of all virtual characters that can be controlled in the current game round to the game client, so as to trigger the game client to store and process the combat interaction system static data of all virtual characters that can be controlled in the current game round.
[0045] In some embodiments, the apparatus further comprises:
[0046] The seventh sending sub-unit is used to package the combat interaction system static data of all virtual characters that can be controlled in the current game round based on a universal data processing protocol and send it to the game client, wherein the universal data processing protocol is configured with encapsulation rules for the data transmitted from the server to the game client.
[0047] In some embodiments, the apparatus further comprises:
[0048] A fourth receiving subunit, configured to receive a character identifier of the virtual character currently being operated by the current game player, sent by the game client;
[0049] A first determining subunit, configured to confirm the virtual character currently being operated by the current game player based on the character identifier of the virtual character currently being operated by the current game player;
[0050] a fifth receiving subunit, configured to receive a target dynamic data acquisition request sent by the game client, and acquire the target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the target dynamic data acquisition request is a request generated by the current game player performing a triggering operation on the current battle interaction system;
[0051] The eighth sending subunit is used to send the target dynamic data corresponding to the target virtual character to the game client, so as to trigger the game client to update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0052] Correspondingly, an embodiment of the present application also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, any step of the data processing method for a turn-based game is implemented.
[0053] Correspondingly, an embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, any step of the data processing method for a turn-based game is implemented.
[0054] The embodiments of the present application provide a data processing method, device, electronic device and storage medium for a turn-based game. By adding a new universal game protocol, a server can encapsulate the game data of all virtual characters that can be controlled by game players and send it to the game client for storage in the game client, so that the data required by all virtual characters in different combat interaction systems can be transmitted through the game protocol. When switching virtual characters, game data management only needs to be completed once, and all virtual characters can share the combat interaction system, thereby reducing the operation steps of data processing when switching virtual characters and improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 A schematic diagram of a scenario of a data processing system for a turn-based game provided in an embodiment of the present application.
[0057] Figure 2 A flowchart of a data processing method for a turn-based game provided in an embodiment of the present application.
[0058] Figure 3 Another flowchart of the data processing method for a turn-based game provided in an embodiment of the present application.
[0059] Figure 4 Another flowchart of the data processing method for a turn-based game provided in an embodiment of the present application.
[0060] Figure 5 A schematic diagram of the structure of a data processing device for a turn-based game provided in an embodiment of the present application.
[0061] Figure 6 Another structural schematic diagram of the data processing device for the turn-based game provided in an embodiment of the present application.
[0062] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0064] The embodiment of the present application provides a data processing method, device, electronic device and storage medium for a turn-based game. Specifically, the data processing method for the turn-based game of the embodiment of the present application can be performed by an electronic device, wherein the electronic device can be a terminal or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. The terminal can also include a client, which can be a game application client, a browser client carrying a game program, or an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms.
[0065] For example, when the data processing method of the turn-based game is run on a terminal, the terminal device stores a game application and is used to present a virtual scene in the game screen. The terminal device is used to interact with the user through a graphical user interface, for example, the game application is downloaded and installed by the terminal device and run. The terminal device may provide the graphical user interface to the user in a variety of ways, for example, it may be rendered and displayed on the display screen of the terminal device, or the graphical user interface may be presented through holographic projection. For example, the terminal device may include a touch display screen and a processor, the touch display screen is used to present the graphical user interface and receive the operation instructions generated by the user acting on the graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, respond to the operation instructions, and control the display of the graphical user interface on the touch display screen.
[0066] For example, when the data processing method of the turn-based game runs on the server, it can be a cloud game. Cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating body of the game application and the main body of the game screen presentation are separated, and the storage and operation of the sound processing method are completed on the cloud gaming server. The game screen presentation is completed on the client of the cloud gaming. The cloud gaming client is mainly used for receiving and sending game data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, a personal digital assistant, etc., but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0067] See also Figure 1 , Figure 1A schematic diagram of a scenario of a data processing system for a turn-based game provided in an embodiment of the present application. The system may include at least one terminal, at least one server, at least one database, and a network. The terminal held by the user can be connected to the servers of different games through a network. The terminal is any device with computing hardware that can support and execute software products corresponding to the game. In addition, the terminal has one or more multi-touch screens for sensing and obtaining the input of the user through touch or sliding operations performed at multiple points on one or more touch-sensitive display screens. In addition, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can be connected to each other through different networks and different servers. The network can be a wireless network or a wired network, such as a wireless network for a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc. In addition, different terminals can also use their own Bluetooth network or hotspot network to connect to other terminals or to servers, etc. For example, multiple users can be online through different terminals and thus connected and synchronized with each other through appropriate networks to support multi-player games. In addition, the system may include multiple databases, the multiple databases are coupled to different servers, and the information related to the game environment can be continuously stored in the databases when different users play the multi-player game online.
[0068] The embodiment of the present application provides a data processing method for a turn-based game, which can be executed by a terminal or a server. The embodiment of the present application takes the locking method of a virtual character executed by a terminal as an example for explanation. Among them, the terminal includes a touch display screen and a processor, and the touch display screen is used to present a graphical user interface and receive an operation instruction generated by a user acting on the graphical user interface. When the user operates the graphical user interface through the touch display screen, the graphical user interface can control the local content of the terminal by responding to the received operation instruction, and can also control the content of the opposite server by responding to the received operation instruction. For example, the operation instruction generated by the user acting on the graphical user interface includes an instruction for starting a game application, and the processor is configured to start the game application after receiving the instruction to start the game application provided by the user. In addition, the processor is configured to render and draw a graphical user interface associated with the game on the touch display screen. The touch display screen is a multi-touch sensitive screen that can sense touch or sliding operations performed simultaneously at multiple points on the screen. The user performs a touch operation on the graphical user interface using a finger, and when the graphical user interface detects the touch operation, the different virtual objects in the graphical user interface of the game are controlled to perform actions corresponding to the touch operation. For example, the game can be any of the games such as casual games, action games, role-playing games, strategy games, sports games, puzzle games, etc. Among them, the game can include a virtual scene of the game drawn on a graphical user interface. In addition, the virtual scene of the game can include one or more virtual objects controlled by a user (or player), such as a virtual character. In addition, the virtual scene of the game can also include one or more obstacles, such as railings, gullies, walls, etc., to limit the movement of virtual objects, such as limiting the movement of one or more objects to a specific area in the virtual scene. Optionally, the virtual scene of the game also includes one or more elements, such as skills, scores, character health status, energy, etc., to provide help to players, provide virtual services, increase scores related to player performance, etc. In addition, the graphical user interface can also present one or more indicators to provide indication information to the player. For example, the game can include a virtual object controlled by a player and one or more other virtual objects (such as an enemy character). In one embodiment, one or more other virtual objects are controlled by other players of the game. For example, one or more other virtual objects can be controlled by a computer, such as a robot using an artificial intelligence (AI) algorithm, to achieve a man-machine battle mode. For example, a virtual object has various skills or abilities that game players use to achieve their goals. For example, a virtual object has one or more weapons, props, tools, etc. that can be used to eliminate other objects from the game. Such skills or abilities can be activated by a game player using one of a plurality of preset touch operations with the touch display screen of the terminal. The processor can be configured to present a corresponding game screen in response to an operation instruction generated by the user's touch operation.
[0069] It should be noted that Figure 1 The scenario diagram of the data processing system of the turn-based game shown is merely an example. The data processing method and scenario of the turn-based game described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person skilled in the art can know that the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0070] Based on the above problems, the embodiments of the present application provide a data processing method, device, electronic device and storage medium for a turn-based game, which are described in detail below. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0071] An embodiment of the present application provides a data processing method for a turn-based game, which can be executed by a game client or a server. The embodiment of the present application takes the data processing method for a turn-based game executed by a game client as an example for explanation.
[0072] See also Figure 2 , Figure 2 This is a flow chart of a data processing method for a turn-based game provided in an embodiment of the present application. The specific flow may be as follows: Steps 101 to 104:
[0073] 101. During a current game round of a target game, when a role switching instruction is detected, a target virtual character and its role identifier selected from a number of optional virtual characters are determined according to the role switching instruction, wherein the optional virtual characters include all virtual characters that can be controlled by the current game player in the current game round.
[0074] In an embodiment of the present application, a virtual character is displayed in a virtual scene, and the virtual scene is displayed on a game interface. Among them, a virtual scene is a virtual environment displayed (or provided) when a game application is running on a terminal. The virtual environment can be a simulation environment of the real world, or a semi-simulated and semi-fictitious three-dimensional environment, or a purely fictitious three-dimensional environment. The virtual environment is used for a virtual environment battle between at least two virtual characters, and there are virtual resources available for at least two virtual characters in the virtual environment. A virtual scene is displayed in the game interface, and one or more virtual characters are displayed in the virtual scene. The virtual character can be a main virtual character controlled by the current game player, or it can be an enemy virtual character in an enemy camp with the main virtual character. Multiple main virtual characters and multiple hostile virtual characters can exist simultaneously in a virtual scene, which is an example here and is not intended to be limiting.
[0075] A virtual character (or hero) refers to an active object in a virtual environment. A virtual character refers to a virtual object in a game that is controlled by a user or player through a terminal. In the embodiment of the present application, a master virtual character refers to a virtual object in a game that is controlled by the current game player through a terminal, that is, a virtual character controlled by the player on this end. An enemy virtual character refers to a virtual object in a game that is controlled by other players through terminals, that is, a virtual character controlled by other players on the other end.
[0076] In order to achieve that when switching virtual characters, there is no need to obtain corresponding data from the server according to the battle interaction system, before the game process of the current game round of the target game, the method may include:
[0077] Receive a game battle start operation of the current game player for the target game;
[0078] Sending a battle initialization instruction of the current game player to the server based on the game battle start operation, so as to trigger the server to obtain battle interaction system static data of all virtual characters controllable in the current game round based on the character identifiers of all virtual characters controllable by the current game player in the current game round;
[0079] The combat interaction system static data of all virtual characters controllable in the current game round returned by the server according to the combat initialization instruction is received and stored.
[0080] In one embodiment, the step of "sending a battle initialization instruction of the current game player to the server based on the game battle start operation to trigger the server to obtain battle interaction system static data of all virtual characters controllable in the current game round based on the character identifiers of all virtual characters controllable by the current game player in the current game round" may include:
[0081] Based on the game battle start operation, a battle initialization instruction of the current game player is sent to the server to trigger the server to obtain the battle interaction system static data of all virtual characters controllable in the current game round based on the character identifications of all virtual characters controllable by the current game player in the current game round, and the battle interaction system static data of all virtual characters controllable in the current game round are packaged through a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted by the server to the game client.
[0082] In order to prevent residual data in the combat interaction system from affecting the state of the combat interaction system of the switched virtual character, the step “when a character switching instruction is detected” includes:
[0083] Clearing the game data in all combat interaction systems in the current game round;
[0084] The updating of the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character comprises:
[0085] Based on the combat interaction system static data of the target virtual character, all cleared combat interaction systems are updated.
[0086] In a specific embodiment, the step of “updating all cleared combat interaction systems based on the combat interaction system static data of the target virtual character” may include:
[0087] If the combat interaction system to which the combat interaction system static data of the target virtual character belongs exists in all the combat interaction systems after being cleared, writing the combat interaction system static data of the target virtual character into the corresponding combat interaction system after being cleared;
[0088] If it does not exist, the corresponding cleared combat interaction system is loaded based on the combat interaction system static data of the target virtual character, and the game data in the cleared combat interaction system is updated.
[0089] Specifically, after the step of "when a role switching instruction is detected, determining a target virtual character selected from a plurality of selectable virtual characters and its role identifier according to the role switching instruction", the method may include:
[0090] Sending the character identifier of the target virtual character as the character identifier of the virtual character currently being operated by the current game player to a server so that the server can confirm the virtual character currently being operated by the current game player;
[0091] Sending a request for obtaining target dynamic data to the server, triggering the server to obtain target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the request for obtaining target dynamic data is a request generated by the current game player triggering the current battle interaction system;
[0092] Receive the target dynamic data corresponding to the target virtual character returned by the server, and update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0093] It should be noted that dynamic data is the description information of some special props or attributes triggered during the battle, such as special description information about certain magic weapons, and description information about the special skills of certain virtual characters' sects. This information can be obtained by the game client in real time requesting the server after the current player controls the mouse to move to the corresponding icon.
[0094] Optionally, the step of “sending a request to the server for obtaining target dynamic data” may include:
[0095] A request for obtaining the target dynamic data is sent to the server via a data obtaining protocol, wherein the data obtaining protocol is a dynamic data obtaining protocol common to the selectable virtual characters.
[0096] 102 , based on the character identifier of the target virtual character, filtering out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally, the combat interaction system static data including the game data of the selectable virtual character of the current game player.
[0097] Among them, the battle interaction system is a system in the client for game players to perform various interactive operations in the game battle. The battle interaction system can include the prop interaction system, spell interaction system, game skill interaction system, etc. The battle interaction system static data is the data related to various battle interaction systems that are fixed after the game player enters the battlefield in the game round of the game, including spells, stunts, magic weapons, etc.
[0098] 103. Update the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the role switching instruction is triggered.
[0099] 104, receiving a game operation of the current game player, and responding to the game operation based on the battle interaction system.
[0100] In order to match the game operation of the current game player with the virtual character currently being controlled, after the step of "receiving the game operation of the current game player", the method may include:
[0101] Sending the operation instruction corresponding to the game operation to the server to trigger the server to bind and store the operation instruction with the character identification of the virtual character currently being operated by the current game player;
[0102] After the current game round ends, it also includes:
[0103] Sending a current game round end instruction to the server to trigger the server to update the current battlefield information and the status information of the virtual character based on the operation instruction bound to the virtual character being operated by the current game player in the current game round.
[0104] An embodiment of the present application provides a data processing method for a turn-based game, which can be executed by a game client or a server. The embodiment of the present application takes the data processing method for a turn-based game executed by a server as an example for explanation.
[0105] See also Figure 3 , Figure 3 This is a flow chart of a data processing method for a turn-based game provided in an embodiment of the present application. The specific flow may be as follows: Steps 201 to 203:
[0106] 201, receiving a battle initialization instruction sent by a game client.
[0107] 202, based on the character identifiers of all virtual characters that the current game player can control in the current game round, obtain combat interaction system static data of all virtual characters that can be controlled in the current game round.
[0108] The combat interaction system static data refers to various combat interaction system-related data that remain unchanged after the game player enters the battlefield during a game round, including spells, stunts, magic weapons, etc.
[0109] 203, sending the combat interaction system static data of all virtual characters controllable in the current game round to the game client, so as to trigger the game client to store and process the combat interaction system static data of all virtual characters controllable in the current game round.
[0110] In one embodiment, the step of “sending to the game client the combat interaction system static data of all virtual characters controllable in the current game round” may include:
[0111] The combat interaction system static data of all virtual characters controllable in the current game round are packaged based on a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted from the server to the game client.
[0112] In another embodiment, after the step of "sending the combat interaction system static data of all virtual characters controllable in the current game round to the game client", the method may include:
[0113] Receiving a character identifier of a virtual character currently being operated by the current game player, sent by the game client;
[0114] confirming the virtual character currently being operated by the current game player based on the character identifier of the virtual character currently being operated by the current game player;
[0115] receiving a target dynamic data acquisition request sent by the game client, and acquiring target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the target dynamic data acquisition request is a request generated by the current game player triggering the current battle interaction system;
[0116] The target dynamic data corresponding to the target virtual character is sent to the game client to trigger the game client to update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0117] Based on the above introduction, the data processing method of the turn-based game of the present application will be further explained by way of example below. Figure 4 , Figure 4 A flow chart of another data processing method for a turn-based game provided in an embodiment of the present application, taking the interaction between a game client and a server as an example, the specific process can be as follows:
[0118] 301. The game client receives a game battle start operation for the target game from the current game player.
[0119] 302. The game client sends a battle initialization instruction of the current game player to the server based on the game battle start operation.
[0120] Among them, the battle initialization instruction is used to trigger the server to obtain the battle interaction system static data of all virtual characters that can be controlled in the current game round based on the character identifications of all virtual characters that can be controlled by the current game player in the current game round.
[0121] 303, the server receives the battle initialization instruction sent by the game client.
[0122] 304. The server obtains combat interaction system static data of all virtual characters controllable in the current game round based on the character identifiers of all virtual characters controllable by the current game player in the current game round.
[0123] 305. The server sends the combat interaction system static data of all the virtual characters controllable in the current game round to the game client.
[0124] 306, the game client receives the combat interaction system static data of all the virtual characters controllable in the current game round returned by the server according to the combat initialization instruction, and stores and processes the data.
[0125] Specifically, before implementing the data processing method for turn-based games, the embodiment of the present application will encapsulate the original protocol interaction between the game server and the game client, so that the game server can encrypt and package the protocol data and send it to the game client, and the game client can cache the protocol data. For example, the game server can send data a and data b to the game client through game protocol A. Data a and data b belong to game protocol A data, which respectively represent the remaining blood volume and remaining magic corresponding to the virtual character. The game client can know that the game protocol sends the remaining blood volume and remaining magic of the virtual character through the protocol number of game protocol A. When the game client reads the remaining blood volume and remaining magic and saves them to the corresponding combat interaction system, the protocol data will be discarded. The above operation steps can be performed on multiple virtual characters to obtain the game protocol A data corresponding to multiple virtual characters; after performing a layer of encapsulation operations, the game server can package the game protocol A data corresponding to multiple virtual characters controlled by virtual players through a new game protocol B and send it to the game client, so that the game client can cache the game protocol A data of different virtual characters. When the current game player performs a virtual character switching operation, the game protocol A data of the virtual character cached by the game client can be read for decryption and analysis, that is, the remaining health and remaining magic of the character can be displayed in the corresponding combat interaction system.
[0126] It should be noted that the game protocol in the embodiment of the present application refers to the protocol for the game client to interact with the game server, and the protocol data includes the protocol number (used to identify the role of the game protocol) and the specific data content. There are three types of protocol data corresponding to the virtual character. The first type is static data that will not change after entering the battle. It only needs to be sent once when the battle is initialized and cached in the game client; the second type is status data that will be updated every round, which needs to be sent every round, and the game client updates the cache; the third type is data that needs to be dynamically requested. The game client informs the server when switching virtual characters, so that when dynamically requesting data, the server returns the protocol data of the currently operating virtual character, and the game client does not cache and directly parses it.
[0127] In order to further illustrate the data processing method for a turn-based game provided in an embodiment of the present application, the application of the data processing method for a turn-based game in a specific implementation scenario will be used as an example for illustration, and the specific application scenario is described as follows.
[0128] (1) The game client receives a game battle start operation for the target game by the current game player, and sends a battle initialization instruction of the current game player to the server based on the game battle start operation.
[0129] (2) After the game server receives the battle initialization command sent by the game client, the game client sends the static protocol data of all virtual characters that the current game player can control. Among them, the static protocol data is the data related to various battle interaction systems that remain unchanged after the current game player enters the battlefield during the game round, including spells, stunts, magic weapons, etc. The game server collects the relevant protocol data in each battle interaction system, encrypts and packages it into a string, and multiple protocol data form a string list. The game server sends the character identifiers of all virtual characters that the current game player can control and their corresponding string lists to the game client through the newly added protocol for sending protocol data, and marks that the data sent this time is static protocol data.
[0130] (3) The game client caches the static protocol data of all characters. Specifically, the game client receives the newly added protocol for sending protocol data. Since the tag field of the received data type is static protocol data, the game client reads a string list consisting of the character identifiers of all virtual characters that the current game player can control and their corresponding protocol data, forms a key-value pair, and caches it in the game client as the static protocol data of the virtual characters.
[0131] (4) When the game client switches a virtual character and detects a character switching instruction, the static data of each combat interaction system is cleared. Specifically, when the game player switches to a different virtual character that can be controlled, the static data of the previous virtual character in each combat interaction system needs to be cleared first to prevent the residual data from affecting the state of the combat interaction system of the switched virtual character. Then, the game client reads the static protocol data of the switched virtual character for decryption and analysis. The static protocol data of the virtual character can be read from the locally cached static protocol data according to the character identifier of the switched virtual character, and the static data of the virtual character is obtained by decryption and analysis. In addition, the game client updates the static data of each combat interaction system. Since the protocols in the static protocol data are all reused old protocols, they are automatically updated to each combat interaction system after decryption and analysis, and no additional work is required. At this time, when the current game player switches to a different virtual character for operation, the operating environment has been switched to the static data of the corresponding virtual character. For example, when the game player opens the spell operation interface, the available spells displayed therein are the available spell list of the switched virtual character.
[0132] In order to further illustrate the data processing method for a turn-based game provided in an embodiment of the present application, another application of the data processing method for a turn-based game in a specific implementation scenario is used as an example for illustration. The specific application scenario is as follows:
[0133] (1) After the current game round ends, the game client sends a current game round end instruction to the game server.
[0134] (2) The game server receives the end-of-game instruction sent by the game client, and sends the status protocol data of all virtual characters that the current game player can control to the game client. Specifically, the status protocol data is the data of various game states that may change in each game round after the current game player enters the game, which may include the cooling round of spells, whether the character is sealed, and other states. The game server needs to obtain the status information of all virtual characters of the current virtual player in the current round after running in each combat interaction system based on the operation information of all virtual characters of different virtual players in the previous round, and encrypt and package the protocol data of these status information into a string. Multiple protocol data form a string list, and send the character identifiers of all virtual characters that the current game player can control and their corresponding string list to the game client through the newly added protocol for sending protocol data, and mark that the status protocol data is sent this time.
[0135] (3) The game client receives the status protocol data sent by the game server, and updates the static protocol data of all virtual characters cached locally based on the status protocol data. Specifically, the game client receives the newly added protocol for sending protocol data, reads out a string list consisting of the character identifiers of all virtual characters that the current game player can control and their corresponding protocol data, forming a key-value pair; and determines whether the game client has previously cached the same type of status protocol data corresponding to the character identifier of the virtual character. If so, it is replaced in the cache; if not, it is cached as the status protocol data of the character.
[0136] (4) When the game client switches a virtual character and detects a character switching instruction, the state data of each combat interaction system is cleared. Specifically, when the game player switches to a different virtual character that can be controlled, the state data of the previous virtual character in each combat interaction system needs to be cleared first to prevent the residual data from affecting the state of the combat interaction system of the switched virtual character. Then, when the current game player switches to a certain virtual character that can be controlled, the state protocol data of the virtual character is read from the cached state protocol data according to the character identifier of the target virtual character, and the state data of the virtual character is obtained by decrypting and parsing. In addition, the game client updates the state data of each combat interaction system. Since the protocols in the state protocol data are all reused old protocols, they are automatically updated to each combat interaction system after decryption and parsing, and no additional work is required. At this time, when the current game player switches to a different virtual character to operate, the operating environment has already switched to the state data of the corresponding virtual character. For example, when the current game player opens the spell operation interface, the cooling state of the spell is the spell cooling state of the virtual character.
[0137] In order to further illustrate the data processing method for a turn-based game provided in an embodiment of the present application, another application of the data processing method for a turn-based game in a specific implementation scenario is used as an example for illustration. The specific application scenario is as follows:
[0138] (1) When a game client switches a virtual character and detects a character switching instruction, the game client sends the character identifier of the target virtual character as the character identifier of the virtual character currently being operated by the current game player to the server, so as to inform the game server of the character identifier of the virtual character currently being operated by the current game player.
[0139] (2) The server receives the character identification of the virtual character currently being operated by the current game player, thereby confirming the virtual character currently being operated by the current game player.
[0140] (3) When the current game player opens the target combat interactive system, a target dynamic data request is triggered, and the game client initiates a request to the game server, sending a request to the game server for obtaining the target dynamic data.
[0141] (4) The game server searches for dynamic data related to the virtual character currently being operated by the current game player, encrypts and packages the dynamic protocol data, and sends it to the game client. Specifically, when the game server receives a request from the game client to obtain the target dynamic data, it obtains the corresponding dynamic data from the combat interaction system according to the character ID of the virtual character currently being operated by the current game player, and packages it into dynamic protocol data and sends it to the game client.
[0142] (5) When the game client receives the newly added protocol for sending protocol data, it directly decrypts and parses the newly added protocol for sending protocol data to obtain the dynamic data therein without caching it locally. Then, the dynamic data obtained by decryption and parsing can be directly updated to the currently operating combat interaction system.
[0143] In summary, the embodiment of the present application provides a data processing method for a turn-based game. By adding a general game protocol, the server can encapsulate the game data of all virtual characters controllable by game players and send it to the game client for storage in the game client, so that the data required by all virtual characters in different combat interaction systems can be transmitted through the game protocol. When the virtual characters are switched, the game data management only needs to be completed once, and all virtual characters can share the combat interaction system, thereby reducing the data processing operation steps when the virtual characters are switched, and improving the data processing efficiency.
[0144] In order to better implement the data processing method for the turn-based game provided in the embodiment of the present application, the embodiment of the present application also provides a data processing device based on the above turn-based game. The meanings of the terms are the same as those in the data processing method for the turn-based game, and the specific implementation details can refer to the description in the method embodiment.
[0145] See also Figure 5 , Figure 5 A structural schematic diagram of a data processing device for a turn-based game provided in an embodiment of the present application, which is applied to a game client, and the device includes:
[0146] The determining unit 401 is used to determine, during a current game round of a target game, when a role switching instruction is detected, a target virtual character selected from a plurality of selectable virtual characters and its role identifier according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by the current game player in the current game round;
[0147] A screening unit 402 is used to screen out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally based on the character identifier of the target virtual character, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player;
[0148] An updating unit 403 is used to update the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered;
[0149] The first receiving unit 404 is used to receive the game operation of the current game player, and respond to the game operation based on the battle interaction system.
[0150] In some embodiments, the apparatus further comprises:
[0151] A first receiving subunit is used to receive a game battle start operation of the current game player for the target game;
[0152] A first sending subunit is used to send a battle initialization instruction of the current game player to the server based on the game battle start operation, so as to trigger the server to obtain battle interaction system static data of all virtual characters that can be controlled in the current game round based on the character identifiers of all virtual characters that can be controlled by the current game player in the current game round;
[0153] The second receiving sub-unit is used to receive the combat interaction system static data of all the virtual characters controllable in the current game round returned by the server according to the combat initialization instruction, and store and process it.
[0154] In some embodiments, the first sending subunit is further used for:
[0155] Based on the game battle start operation, a battle initialization instruction of the current game player is sent to the server to trigger the server to obtain the battle interaction system static data of all virtual characters controllable in the current game round based on the character identifications of all virtual characters controllable by the current game player in the current game round, and the battle interaction system static data of all virtual characters controllable in the current game round are packaged through a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted by the server to the game client.
[0156] In some embodiments, the apparatus further comprises:
[0157] A first processing unit, configured to clear game data in all combat interaction systems in the current game round;
[0158] The updating subunit is used to update all cleared combat interaction systems based on the combat interaction system static data of the target virtual character.
[0159] In some embodiments, the apparatus further comprises a second processing unit configured to:
[0160] If the combat interaction system to which the combat interaction system static data of the target virtual character belongs exists in all the combat interaction systems after being cleared, writing the combat interaction system static data of the target virtual character into the corresponding combat interaction system after being cleared;
[0161] If it does not exist, the corresponding cleared combat interaction system is loaded based on the combat interaction system static data of the target virtual character, and the game data in the cleared combat interaction system is updated.
[0162] In some embodiments, the apparatus further comprises:
[0163] A second sending subunit is used to send the character identification of the target virtual character as the character identification of the virtual character currently being operated by the current game player to the server, so that the server confirms the virtual character currently being operated by the current game player;
[0164] A third sending subunit is used to send a request for obtaining target dynamic data to the server, triggering the server to obtain the target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the request for obtaining the target dynamic data is a request generated by the current game player triggering the current battle interaction system;
[0165] The third receiving subunit is used to receive the target dynamic data corresponding to the target virtual character returned by the server, and update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0166] In some embodiments, the apparatus further comprises:
[0167] The fourth sending subunit is used to send an acquisition request for the target dynamic data to the server through a data acquisition protocol, wherein the data acquisition protocol is a dynamic data acquisition protocol common to the selectable virtual characters.
[0168] In some embodiments, the apparatus further comprises:
[0169] A fifth sending subunit, configured to send the operation instruction corresponding to the game operation to the server, so as to trigger the server to bind and store the operation instruction with the character identifier of the virtual character being operated by the current game player;
[0170] In some embodiments, the apparatus further comprises:
[0171] The sixth sending subunit is used to send a current game round end instruction to the server to trigger the server to update the current battlefield information and the status information of the virtual character based on the operation instruction bound to the virtual character being operated by the current game player in the current game round.
[0172] See also Figure 6 , Figure 6 Another structural schematic diagram of a data processing device for a turn-based game provided in an embodiment of the present application, which is applied to a server, includes:
[0173] The second receiving unit 501 is used to receive a battle initialization instruction sent by a game client;
[0174] An acquisition unit 502 is used to acquire combat interaction system static data of all virtual characters controllable in the current game round based on the character identifiers of all virtual characters controllable by the current game player in the current game round;
[0175] The sending unit 503 is used to send the combat interaction system static data of all virtual characters that can be controlled in the current game round to the game client, so as to trigger the game client to store and process the combat interaction system static data of all virtual characters that can be controlled in the current game round.
[0176] In some embodiments, the apparatus further comprises:
[0177] The seventh sending sub-unit is used to package the combat interaction system static data of all virtual characters that can be controlled in the current game round based on a universal data processing protocol and send it to the game client, wherein the universal data processing protocol is configured with encapsulation rules for the data transmitted from the server to the game client.
[0178] In some embodiments, the apparatus further comprises:
[0179] A fourth receiving subunit, configured to receive a character identifier of the virtual character currently being operated by the current game player, sent by the game client;
[0180] A first determining subunit, configured to confirm the virtual character currently being operated by the current game player based on the character identifier of the virtual character currently being operated by the current game player;
[0181] a fifth receiving subunit, configured to receive a target dynamic data acquisition request sent by the game client, and acquire the target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the target dynamic data acquisition request is a request generated by the current game player performing a triggering operation on the current battle interaction system;
[0182] The eighth sending subunit is used to send the target dynamic data corresponding to the target virtual character to the game client, so as to trigger the game client to update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
[0183] The embodiment of the present application provides a control device for a virtual character. During a current game round of a target game, when a character switching instruction is detected by a determining unit 401, a target virtual character selected from a number of optional virtual characters and its character identification are determined according to the character switching instruction, wherein the optional virtual characters include all virtual characters that a current game player can control in the current game round; a screening unit 402 screens out combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally based on the character identification of the target virtual character, wherein the combat interaction system static data includes the game data of the optional virtual character of the current game player; an updating unit 403 updates the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, wherein the current virtual character is a virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered; a first receiving unit 404 receives a game operation of the current game player, and responds to the game operation based on the combat interaction system. The embodiment of the present application can add a universal game protocol so that the server can encapsulate the game data of all virtual characters that can be controlled by game players and send it to the game client to be stored in the game client, so that the data required by all virtual characters in different combat interaction systems can be transmitted through the game protocol. When the virtual characters are switched, the game data management only needs to be completed once, and all virtual characters can share the combat interaction system, thereby reducing the data processing operation steps when the virtual characters are switched, and improving the data processing efficiency.
[0184] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal or a server, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC), a personal digital assistant (PDA), or other terminal devices. Figure 7 As shown, Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 600 includes a processor 601 having one or more processing cores, a memory 602 having one or more computer-readable storage media, and a computer program stored in the memory 602 and executable on the processor. The processor 601 is electrically connected to the memory 602. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0185] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device 600, executes various functions of the electronic device 600 and processes data by running or loading software programs and / or modules stored in the memory 602, and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.
[0186] In the embodiment of the present application, the processor 601 in the electronic device 600 loads instructions corresponding to the processes of one or more application programs into the memory 602 according to the following steps, and the processor 601 runs the application programs stored in the memory 602 to implement various functions:
[0187] During a current game round of a target game, when a role switching instruction is detected, a target virtual character and its role identifier selected from a plurality of selectable virtual characters are determined according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round;
[0188] Based on the character identifier of the target virtual character, filtering out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player;
[0189] Based on the static data of the combat interaction system of the target virtual character, the game data of all combat interaction systems of the current virtual character are updated, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered;
[0190] Receive a game operation of the current game player, and respond to the game operation based on the battle interaction system.
[0191] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0192] Optional, such as Figure 7 As shown, the electronic device 600 further includes: a touch screen 603, a radio frequency circuit 604, an audio circuit 605, an input unit 606, and a power supply 607. The processor 601 is electrically connected to the touch screen 603, the radio frequency circuit 604, the audio circuit 605, the input unit 606, and the power supply 607, respectively. Those skilled in the art can understand that Figure 7 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0193] The touch display screen 603 can be used to display the graphical player interface and receive the operation instructions generated by the player acting on the graphical player interface. The touch display screen 603 can include a display panel and a touch panel. Among them, the display panel can be used to display the information input by the player or the information provided to the player and various graphical player interfaces of the electronic device, and these graphical player interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel can be used to collect the touch operation of the player on or near it (such as the operation of the player using any suitable object or attachment such as a finger, a stylus on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the player's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 601, and can receive the command sent by the processor 601 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 601 to determine the type of touch event, and then the processor 601 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 603 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 603 can also be used as a part of the input unit 606 to realize the input function.
[0194] In the embodiment of the present application, the processor 601 executes the game application to generate a graphical player interface on the touch screen 603. The touch screen 603 is used to present the graphical player interface and receive operation instructions generated by the player acting on the graphical player interface.
[0195] The radio frequency circuit 604 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals between the network device or other electronic devices.
[0196] The audio circuit 605 can be used to provide an audio interface between the player and the electronic device through a speaker and a microphone. The audio circuit 605 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 605 and converted into audio data, and then the audio data is output to the processor 601 for processing, and then sent to another electronic device through the radio frequency circuit 604, or the audio data is output to the memory 602 for further processing. The audio circuit 605 may also include an earplug jack to provide communication between an external headset and an electronic device.
[0197] The input unit 606 may be used to receive input numbers, character information or player feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to player settings and function controls.
[0198] The power supply 607 is used to supply power to various components of the electronic device 600. Optionally, the power supply 607 can be logically connected to the processor 601 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 607 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0199] although Figure 7 Not shown, the electronic device 600 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0200] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0201] As can be seen from the above, the electronic device provided by this embodiment, when a role switching instruction is detected during the game process of the current game round of the target game, determines the target virtual character and its role identification selected from a number of optional virtual characters according to the role switching instruction, wherein the optional virtual character includes all virtual characters that the current game player can control in the current game round; based on the role identification of the target virtual character, the combat interaction system static data corresponding to the target virtual character is filtered out from multiple combat interaction system static data stored locally, and the combat interaction system static data includes the game data of the optional virtual character of the current game player; based on the combat interaction system static data of the target virtual character, the game data of all combat interaction systems of the current virtual character are updated, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the role switching instruction is triggered; receives the game operation of the current game player, and responds to the game operation based on the combat interaction system. The embodiment of the present application adds a universal game protocol, which enables the server to encapsulate the game data of all virtual characters controllable by game players and send it to the game client to be stored in the game client, so that the data required by all virtual characters in different combat interaction systems can be transmitted through the game protocol. When the virtual characters are switched, the game data management only needs to be completed once, and all virtual characters can share the combat interaction system, thereby reducing the data processing operation steps when the virtual characters are switched, and improving the data processing efficiency.
[0202] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0203] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer program can be loaded by a processor to execute the steps in any of the data processing methods for turn-based games provided in the embodiments of the present application. For example, the computer program can execute the following steps:
[0204] During a current game round of a target game, when a role switching instruction is detected, a target virtual character and its role identifier selected from a plurality of selectable virtual characters are determined according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round;
[0205] Based on the character identifier of the target virtual character, filtering out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player;
[0206] Based on the static data of the combat interaction system of the target virtual character, the game data of all combat interaction systems of the current virtual character are updated, wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered;
[0207] Receive a game operation of the current game player, and respond to the game operation based on the battle interaction system.
[0208] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0209] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0210] Since the computer program stored in the storage medium can execute the steps in any one of the data processing methods for turn-based games provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the data processing methods for turn-based games provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0211] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0212] The above is a detailed introduction to the data processing method, device, electronic device and storage medium for a turn-based game provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application. Ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A data processing method for a turn-based game, applied to a game client, characterized in that: include: During a current game round of a target game, when a role switching instruction is detected, a target virtual character and its role identifier selected from a plurality of selectable virtual characters are determined according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round; Based on the character identifier of the target virtual character, filtering out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player; Clearing data of all combat interaction systems of the current virtual character, and updating game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, so that when the operation interface corresponding to each combat interaction system is displayed, only the combat interaction system static data associated with the combat interaction system in the combat interaction system static data of the target virtual character is displayed through the operation interface; wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered; Receive a game operation of the current game player, and respond to the game operation based on the battle interaction system.
2. The data processing method for a turn-based game according to claim 1, characterized in that: Prior to the current game round of the target game, also includes: Receive a game battle start operation of the current game player for the target game; Sending a battle initialization instruction of the current game player to the server based on the game battle start operation, so as to trigger the server to obtain battle interaction system static data of all virtual characters controllable in the current game round based on the character identifiers of all virtual characters controllable by the current game player in the current game round; The combat interaction system static data of all virtual characters controllable in the current game round returned by the server according to the combat initialization instruction is received and stored.
3. The data processing method for a turn-based game according to claim 2, characterized in that: The sending of the battle initialization instruction of the current game player to the server based on the game battle start operation to trigger the server to obtain the battle interaction system static data of all virtual characters that can be controlled in the current game round based on the character identifiers of all virtual characters that can be controlled by the current game player in the current game round, includes: Based on the game battle start operation, a battle initialization instruction of the current game player is sent to the server to trigger the server to obtain the battle interaction system static data of all virtual characters controllable in the current game round based on the character identifications of all virtual characters controllable by the current game player in the current game round, and the battle interaction system static data of all virtual characters controllable in the current game round are packaged through a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted by the server to the game client.
4. The data processing method for a turn-based game according to claim 1, characterized in that: When a role switching instruction is detected, it also includes: Clearing the game data in all combat interaction systems in the current game round; The updating of the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character comprises: Based on the combat interaction system static data of the target virtual character, all cleared combat interaction systems are updated.
5. The data processing method for a turn-based game according to claim 4, characterized in that: The static data of the combat interaction system based on the target virtual character is updated and cleared, and includes: If the combat interaction system to which the combat interaction system static data of the target virtual character belongs exists in all the combat interaction systems after being cleared, writing the combat interaction system static data of the target virtual character into the corresponding combat interaction system after being cleared; If it does not exist, the corresponding cleared combat interaction system is loaded based on the combat interaction system static data of the target virtual character, and the game data in the cleared combat interaction system is updated.
6. The data processing method for a turn-based game according to any one of claims 1 to 5, characterized in that: When a role switching instruction is detected, after determining a target virtual character selected from a plurality of optional virtual characters and its role identifier according to the role switching instruction, the method further comprises: Sending the character identifier of the target virtual character as the character identifier of the virtual character currently being operated by the current game player to a server so that the server can confirm the virtual character currently being operated by the current game player; Sending a request for obtaining target dynamic data to the server, triggering the server to obtain target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the request for obtaining target dynamic data is a request generated by the current game player triggering the current battle interaction system; Receive the target dynamic data corresponding to the target virtual character returned by the server, and update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
7. The data processing method for a turn-based game according to claim 6, characterized in that: The sending a request for obtaining target dynamic data to the server includes: A request for obtaining the target dynamic data is sent to the server via a data obtaining protocol, wherein the data obtaining protocol is a dynamic data obtaining protocol common to the selectable virtual characters.
8. The data processing method for a turn-based game according to claim 6, characterized in that: After receiving the game operation of the current game player, the method further includes: Sending the operation instruction corresponding to the game operation to the server to trigger the server to bind and store the operation instruction with the character identification of the virtual character currently being operated by the current game player; After the current game round ends, it also includes: Sending a current game round end instruction to the server to trigger the server to update the current battlefield information and the status information of the virtual character based on the operation instruction bound to the virtual character being operated by the current game player in the current game round.
9. A data processing method for a turn-based game, applied to a server, wherein the server establishes a wireless communication connection with a game client, and the game client is used to execute the data processing method for a turn-based game according to any one of claims 1 to 8, characterized in that: include: Receive the battle initialization command sent by the game client; Based on the character identifiers of all virtual characters that the current game player can control in the current game round, obtaining combat interaction system static data of all virtual characters that can be controlled in the current game round; The combat interaction system static data of all virtual characters controllable in the current game round is sent to the game client to trigger the game client to store and process the combat interaction system static data of all virtual characters controllable in the current game round.
10. The data processing method for a turn-based game according to claim 9, characterized in that: The sending of the combat interaction system static data of all virtual characters controllable in the current game round to the game client includes: The combat interaction system static data of all virtual characters controllable in the current game round are packaged based on a general data processing protocol and sent to the game client, wherein the general data processing protocol is configured with encapsulation rules for data transmitted from the server to the game client.
11. The data processing method for a turn-based game according to claim 9, characterized in that: After sending the combat interaction system static data of all virtual characters controllable in the current game round to the game client, the method further includes: Receiving a character identifier of a virtual character currently being operated by the current game player, sent by the game client; confirming the virtual character currently being operated by the current game player based on the character identifier of the virtual character currently being operated by the current game player; receiving a target dynamic data acquisition request sent by the game client, and acquiring target dynamic data corresponding to the target virtual character based on the character identifier of the virtual character being operated by the current game player, wherein the target dynamic data acquisition request is a request generated by the current game player triggering the current battle interaction system; The target dynamic data corresponding to the target virtual character is sent to the game client to trigger the game client to update the game data of the current battle interaction system to the target dynamic data corresponding to the target virtual character.
12. A data processing device for a turn-based game, applied to a game client, characterized in that: include: a determination unit, configured to, during a current game round of a target game, when a role switching instruction is detected, determine a target virtual character selected from a plurality of selectable virtual characters and its role identifier according to the role switching instruction, wherein the selectable virtual characters include all virtual characters that can be controlled by a current game player in the current game round; a screening unit, configured to screen out the combat interaction system static data corresponding to the target virtual character from a plurality of combat interaction system static data stored locally based on the character identifier of the target virtual character, wherein the combat interaction system static data includes the game data of the selectable virtual character of the current game player; An updating unit, configured to perform data clearing processing on all combat interaction systems of the current virtual character, and update the game data of all combat interaction systems of the current virtual character based on the combat interaction system static data of the target virtual character, so that when the operation interface corresponding to each combat interaction system is displayed, only the combat interaction system static data associated with the combat interaction system in the combat interaction system static data of the target virtual character is displayed through the operation interface; wherein the current virtual character is the virtual character corresponding to the combat interaction system operated by the current game player before the character switching instruction is triggered; The first receiving unit is used to receive the game operation of the current game player and respond to the game operation based on the battle interaction system.
13. A data processing device for a turn-based game, applied to a server, wherein the server establishes a wireless communication connection with a game client, and the game client is used to execute the data processing method for a turn-based game according to any one of claims 1 to 8, characterized in that: include: A second receiving unit, used to receive a battle initialization instruction sent by a game client; An acquisition unit, configured to acquire combat interaction system static data of all virtual characters controllable in the current game round based on character identifiers of all virtual characters controllable by the current game player in the current game round; The sending unit is used to send the combat interaction system static data of all virtual characters that can be controlled in the current game round to the game client, so as to trigger the game client to store and process the combat interaction system static data of all virtual characters that can be controlled in the current game round.
14. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the data processing method for a turn-based game as described in any one of claims 1 to 11 by calling the computer program stored in the memory.
15. A storage medium, characterized in that: The storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the data processing method for a turn-based game as claimed in any one of claims 1 to 11.
Citation Information
Patent Citations
Game data processing method, device and system
CN108771867A
Interface display method and device, data processing method and device, terminal and server
CN111190591A