Elimination game operation method, device, equipment and storage medium
The state of the element disk in the game is eliminated through the state machine management and the use of random factors to synchronize the element layout, which solves the problem of game synchronization delay in PVP mode and improves the smoothness of the battle.
Patent Information
- Application Number
- CN202410949174.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-07-16
AI Technical Summary
In the PVP mode of eliminating games, there is a large delay in the synchronization of game status data, which affects the smoothness of the battle.
The state of the element disk in the game is managed through a state machine, and the element layout synchronization of the battle players is achieved using random factors, reducing the amount of synchronized data and improving synchronization efficiency.
It effectively improves the smoothness of the battle, solves the problem of game synchronization delay, and makes the game experience smoother.
Smart Images

Figure CN118987624B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and storage medium for running an elimination game. Background Art
[0002] With the rapid development of the digital game industry, various innovative game types continue to emerge. Among them, elimination games are popular for their easy-to-understand gameplay and rich level design. The game levels of elimination games can be divided into PVE (player versus environment) mode and PVP (player versus player) mode. Compared with the PVE mode, the interaction between multiple players in the PVP mode is stronger, which reflects the strong strategic nature of elimination games.
[0003] In the prior art, when the elimination game is in PVP mode, the game status data of the game clients participating in the battle can be synchronized through the game server to achieve the status synchronization of the players in the battle. However, the amount of game status data is large, and there is a large delay when synchronizing the game, which cannot ensure the smoothness of the battle. Summary of the invention
[0004] The present application provides a method, device, equipment and storage medium for running an elimination game, which manages the state of an element disk in the game through a state machine, and synchronizes the element layouts of competing players through random factors, thereby solving the problem of large delays in game synchronization in the prior art and improving the fluency of the battle.
[0005] In a first aspect, the present application provides a method for running an elimination game, which is applied to a first client and includes:
[0006] After the element disk of the game performs a first action to update the element layout of the element disk, a state transition condition corresponding to the element disk is determined through a state machine, the element layout and the state of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state;
[0007] Convert the element disk to the target state corresponding to the state conversion condition and obtain a first random factor, and determine a second action to be performed by the element disk through the state machine, the first random factor and the action rule corresponding to the target state;
[0008] The element disk is controlled to perform the second action to update the element layout, and the first random factor is sent to the second client, so that the second client determines the second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
[0009] In a second aspect, the present application provides an elimination game running device, which is applied to a first client and includes:
[0010] The condition determination module is configured to determine the state transition condition satisfied by the element disk through the state machine, the element layout and the state of the element disk after the element disk of the game performs a first action to update the element layout of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state;
[0011] a state conversion module, configured to convert the element disk to a target state corresponding to the state conversion condition and obtain a first random factor, and determine a second action to be performed by the element disk through the state machine, the first random factor and an action rule corresponding to the target state;
[0012] The state synchronization module is configured to control the element disk to perform the second action to update the element layout, send the first random factor to the second client, so that the second client determines the second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
[0013] In a third aspect, the present application provides a device for running an elimination game, including:
[0014] one or more processors;
[0015] A memory stores one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the elimination game running method as described in the first aspect.
[0016] In a fourth aspect, the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the elimination game running method as described in the first aspect.
[0017] In the present application, the state of the element disk in each stage of a round in the elimination game can be managed by a state machine, and the transition conditions and action rules between the states can be defined, so that the state machine can orderly control the element disk to update the corresponding element layout based on the transition conditions and action rules, which is conducive to optimizing the game's battle fluency. The action to be performed by the element disk is determined according to the action rules of the target state after the element disk is converted and the first random factor, making the game level more controllable and interesting. The first client sends the first random factor to the second client, so that after the second client controls the corresponding element disk to perform the first action, it can determine the second action based on the first random factor and the action rules of the state of the element disk. The second client controls the corresponding element disk to perform the second action to keep synchronization with the element disk of the first client, ensuring the consistency of the element layout of the two clients. The data volume of the random factor is small, and the element layout synchronization of the fighting players is achieved through the random factor, which solves the problem of large delay in game synchronization in the prior art and improves the fluency of the battle. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a flow chart of a method for running an elimination game provided in an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of the state transition of the element disk provided in an embodiment of the present application;
[0020] Figure 3 is a flow chart of the control element panel performing the first action provided by an embodiment of the present application;
[0021] Figure 4 is a first schematic diagram of the element layout of the element disk provided in an embodiment of the present application;
[0022] Figure 5 is a second schematic diagram of the element layout of the element disk provided in an embodiment of the present application;
[0023] Figure 6 is a third schematic diagram of the element layout of the element disk provided in an embodiment of the present application;
[0024] Figure 7 is a fourth schematic diagram of the element layout of the element disk provided in an embodiment of the present application;
[0025] Figure 8 is a flowchart of generating a second action based on a deletion rule provided by an embodiment of the present application;
[0026] Fig. 9 is a flowchart of generating a second action based on a drop rule provided by an embodiment of the present application;
[0027] Fig.10It is a structural schematic diagram of an elimination game running device provided in an embodiment of the present application;
[0028] Fig.11 It is a structural schematic diagram of an elimination game running device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0030] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0031] In a more common existing implementation, when a elimination game is in PVP mode, the game status data of the game clients participating in the battle can be synchronized through the game server to achieve status synchronization of the players in the battle. However, the game status data includes the element layout data and props data of the element disk in the elimination game, and the amount of game status data is large. There is a large delay when synchronizing the game, and the smoothness of the battle cannot be guaranteed.
[0032] To solve the above problems, this embodiment provides a method for running an elimination game, which manages the state of the element disk in the game through a state machine, and realizes the synchronization of the element layout of the opposing players through random factors. Compared with the game state data, the data volume of the random factor is smaller, which can effectively improve the synchronization efficiency of the element layout of the opposing players, thereby optimizing the smoothness of the battle.
[0033] The elimination game running method provided in this embodiment can be executed by an elimination game running device, which can be implemented by software and / or hardware, and can be composed of two or more physical entities, or one physical entity. For example, the elimination game running device can be a first client, which is a terminal device running an elimination game, or a game client of the elimination game.
[0034] The elimination game running device is installed with at least one type of operating system, wherein the operating system includes but is not limited to Android system, Linux system and Windows system. The elimination game running device can install at least one application based on the operating system, and the application can be an application that comes with the operating system, or an application downloaded from a third-party device or server. In this embodiment, the elimination game running device has at least an application that can execute the elimination game running method.
[0035] For ease of understanding, this embodiment is described by taking the first client as an example of the main body that executes the elimination game running method.
[0036] Figure 1 A flowchart of a method for running an elimination game provided in an embodiment of the present application is given. Figure 1 , the elimination game operation method specifically includes:
[0037] S110. After the element disk of the game executes a first action to update the element layout of the element disk, determine the state transition condition satisfied by the element disk through the state machine, the element layout and the state of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state.
[0038] Among them, the element plate is an area for placing various elements in elimination games, and the element layout represents the location information of each element in the element plate. When the element plate is in the normal state, it can receive the operation input by the player to enter other states according to the operation. When the element plate is in the deletion state, some elements in the element plate can be deleted to update the element layout. When the element plate is in the dropping state, some elements can be dropped in the free area of the element plate to update the element layout. When the element plate is in the prop state, the element layout can be updated based on the corresponding triggered props.
[0039] Figure 2 Schematic diagram of the state transition of the element disk provided in the embodiment of the present application. Figure 2 As shown, when the element disk is in a normal state, the operation input by the player can trigger the element disk to enter the deletion state or the prop state. The state machine defines the action rules executed when the element disk is in the deletion state, the prop state and the drop state. When the element disk switches to the deletion state, the prop state and the drop state, the state machine can determine the action performed by the element disk based on the action rules, and control the element disk to perform the action to update the element layout, so that the element disk after the updated element layout can be converted to other states. The element disk will eventually return to the normal state from the drop state, the deletion state and the prop state. At this point, the element disk completes a state cycle, and only when the player inputs an operation again can the element disk be triggered to start the next state cycle. In this regard, this embodiment sets the completion of a state cycle of the element disk as a game round, and defines the state of the element disk in a game round and the action performed as a stage in the game round. Therefore, a game can be divided into multiple game rounds, and a game round can be divided into multiple stages. The switching of game rounds is triggered by the operation input by the player, and the switching of stages within a game round is triggered by the action generated by the action rules defined by the state machine.
[0040] The first action is the action performed by the element disk in the previous stage. After the element disk performs an action to update the element layout, the game enters the next stage. Since the end stage and the initial stage of the two rounds are also adjacent stages, the first action can be an action triggered by the operation input by the player, or an action generated based on the action rules defined by the state machine. When the game enters a new stage, the state machine can determine the state transition conditions that the element disk satisfies in the new stage based on the element layout and the state of the element disk, so as to determine the state of the element disk in the new stage according to the state transition conditions satisfied by the element disk, and then determine the action performed by the element disk in the new stage according to the state of the element disk in the new stage, so as to realize the orderly execution of the action of the switching stage by the element disk and improve the orderliness of the game.
[0041] In this embodiment, when the element tray is in a normal state, a first action is generated based on the operation input by the player, and the element tray is controlled by the state machine to perform the first action to update the element layout. Figure 3 1 is a flow chart of the control element panel performing the first action provided by the embodiment of the present application. Figure 3 As shown, the steps of the control element panel executing the first action specifically include S1101-S1102:
[0042] S1101. In response to a player operation and generating a corresponding first action, the element disk is controlled to perform the first action to update the corresponding element layout; the player operation includes an element exchange operation and a prop use operation.
[0043] The element exchange operation is an operation input by the player to exchange two adjacent elements in the element disk, and the prop use operation is an operation input by the player to use a game prop. Exemplarily, when the player performs the element exchange operation, a first action of exchanging the positions of the two adjacent elements is generated based on the two adjacent elements selected by the element exchange operation. The element disk is controlled by the state machine to execute the first action of exchanging the positions of the two adjacent elements, so that the corresponding two adjacent elements in the element layout exchange positions. Figure 4 and Figure 5 They are respectively a first schematic diagram and a second schematic diagram of the element layout of the element disk provided in the embodiment of the present application. Figure 4 As shown, the elements A and C in the 4th row, 2nd column and 3rd column of the element disk 10 are two adjacent elements selected corresponding to the element exchange operation. At this time, the first action of exchanging elements A and C is generated. After executing the first action, element A is changed from the 4th row, 2nd column to the 3rd column, and element C is changed from the 4th row, 3rd column to the 4th row, 2nd column, and the result is Figure 5 The element layout is shown.
[0044] Further, when the player operation is a prop use operation, based on the game prop selected by the prop use operation, a first action corresponding to the game prop is generated. For example, when the game prop is a global scramble prop, the first action is to scramble the element layout of the element disk according to a preset rule or randomly; when the game prop is a special element generation prop, the first action is to convert some ordinary elements in the element disk into special elements according to a preset rule or randomly. In this embodiment, in order to design a rich and diverse game level and increase the fun of the game level, a random factor can be introduced to generate the first action through the random factor. Exemplarily, when the player operation is a prop use operation, the element disk is converted to a prop state and a second random factor is obtained, and the first action is generated according to the second random factor and the prop use operation. After receiving the prop use operation input by the player, the element disk is switched from a normal state to a prop state, and a first action to scramble the element layout of the element disk is randomly generated according to the second random factor. The element disk is controlled to execute the first action to randomly scramble the element layout of the element disk.
[0045] S1102: Send the player operation to the second client, so that the second client generates a first action according to the player operation, and synchronously updates the element layout of the corresponding element disk according to the first action.
[0046] The second client is another client in the same game as the first client. In order to ensure the synchronization of the game during the game, the first client sends the player's operation to the game server, and the game server forwards the player's operation to the second client. The second client generates the same first action as the first client based on the player's operation. The second client controls the corresponding element disk to execute the first action to synchronize with the element disk of the first client to ensure the consistency of the element layout of the first client and the second client. It can be understood that if the first action generated based on the player's operation is to exchange Figure 4 The positions of the elements A and C in the 4th row, 2nd column and 3rd column in the element tray 10 shown in FIG. 10 , the element layout of the element tray of the second client after executing the first action is as follows: Figure 5 As shown, the element layouts of the first client and the second client after synchronously executing the first action are consistent.
[0047] In this embodiment, when the player operation is a prop use operation, the first client can send the second random factor and the prop use operation to the second client, so that the second client converts the corresponding element disk to the prop state and generates the first action according to the second random factor and the prop use operation. Exemplarily, after obtaining the second random factor, the first client sends the second random factor and the currently received prop use operation to the game server, and the game server forwards the second random factor and the prop use operation to the second client. The second client generates the same first action as that performed by the first client according to the second random factor and the prop use operation, and the second client controls the corresponding element disk to perform the first action to synchronize with the element disk of the first client to ensure the consistency of the element layout of the first client and the second client. In this embodiment, the random factor and the player operation are synchronized to the second client to ensure the consistency of the element layout of the second client and the first client, and the amount of data of the random factor and the player operation is small, which greatly improves the synchronization efficiency of the first client and the second client, thereby improving the fluency of the game battle.
[0048] After the element disk executes the first action to update the element layout of the element disk, the game enters the next stage. At this time, the state machine can determine the state transition condition that the element disk satisfies based on the element layout and the state of the element disk, so as to switch the element disk to a new state and determine the action performed by the element disk in the new stage according to the new state.
[0049] refer to Figure 2 When the element tray is in the normal state, the dropped state or the prop state, the state machine is used to determine whether the element layout meets the first state transition condition of the deletion state. The first state transition condition is that there are at least a preset number of adjacent identical elements in the element layout. Figure 5, when the preset number is 3, after executing the first action of exchanging the positions of element A and element C in the 4th row, 2nd column and 3rd column, there are three consecutive elements A in the element disk 10. At this time, it can be determined that the element disk 10 meets the first state transition condition of the deletion state, so that the element disk can be subsequently converted to the deletion state through the state machine to determine the action performed in this stage based on the deletion rule of the deletion state.
[0050] When the element tray is in the deleted state, the state machine is used to determine whether the element layout satisfies the third state transition condition of the dropped state, and the third state transition condition is that there is a free area in the element layout. Figure 6 is a third schematic diagram of the element layout of the element disk provided in the embodiment of the present application. Figure 6 As shown, the element disk 10 performs deletion in the deletion state. Figure 5 After the three consecutive actions of element A shown, there is a partial free area 11 in the element disk 10. At this time, it can be determined that the element disk 10 meets the third state transition condition of the falling state, so that the element disk can be subsequently converted to the falling state through the state machine to determine the action performed in this stage based on the falling rule of the falling state.
[0051] When the element disk is in the deleted state, dropped state or prop state, the state machine is used to determine whether the element layout meets the second state transition condition of the normal state, and the second state transition condition is that there are no at least a preset number of adjacent identical elements in the element layout. Figure 7 is a fourth schematic diagram of the element layout of the element disk provided in the embodiment of the present application. Figure 7 As shown, when the preset number is 3, there are not more than three consecutive identical elements in the element disk 10. At this time, it can be determined that the element disk 10 meets the second state transition condition of the normal state, that is, the element disk can be subsequently converted to the normal state through the state machine to enter the next round when the player inputs a new operation.
[0052] S120, converting the element disk to a target state corresponding to the state conversion condition and obtaining a first random factor, and determining a second action to be performed by the element disk through the state machine, the first random factor, and an action rule corresponding to the target state.
[0053] Exemplarily, when the element disk meets the first state transition condition of the deletion state in the new stage, the element disk is converted to the deletion state. When the element disk meets the second state transition condition of the normal state in the new stage, the element disk is converted to the normal state. When the element disk meets the third state transition condition of the drop state in the new stage, the element disk is converted to the drop state. It can be understood that when the element disk is converted to the normal state, the player needs to input a new operation to start the next round. Therefore, the state machine does not define the action rules corresponding to the normal state, so that when the element disk is converted to the normal state, the action performed in the new stage will not be triggered according to the action rules.
[0054] The second action is the action performed by the element disk in the new stage. When the element disk is converted to the deletion state or the drop state, the state machine can generate a second action of deleting the element based on the deletion rule corresponding to the deletion state and the element layout, or generate a second action of dropping the element based on the drop rule corresponding to the drop state, the first random factor and the element layout, so that the subsequent element disk performs the second action to delete or drop the element.
[0055] In this embodiment, Figure 8 is a flow chart of generating a second action based on a deletion rule provided by an embodiment of the present application. Figure 8 As shown, the step of generating the second action based on the deletion rule specifically includes S1201-S1202:
[0056] S1201. When the target state is a deletion state, determine an element to be deleted in the element layout according to a deletion rule corresponding to the deletion state.
[0057] S1202: Determine the second action as deleting an element to be deleted in the element layout.
[0058] In this embodiment, the element disk is as follows Figure 5 The deletion rule defined by the state machine is to delete more than a preset number of consecutive identical elements in the element disk. The state machine is based on the deletion rule and Figure 5 According to the element layout shown, it can be determined that the elements A in the 3rd, 4th and 5th columns of the 4th row in the element tray 10 are the elements to be deleted, and the second action is determined to delete the elements A in the 3rd, 4th and 5th columns of the 4th row.
[0059] In this embodiment, Fig. 9 is a flow chart of generating a second action based on a drop rule provided by an embodiment of the present application. Fig. 9 As shown, the step of generating the second action based on the drop rule specifically includes S1203-S1204:
[0060] S1203: When the target state is a dropping state, determine a dropping element and a corresponding dropping area in the element layout according to a dropping rule corresponding to the dropping state and a first random factor.
[0061] S1204: Determine the second action as dropping a corresponding drop element in the drop area.
[0062] In this embodiment, the element disk is as follows Figure 6 The drop rule defined by the state machine is to determine the idle area and the area directly above the idle area as the drop area, determine the element directly above the drop area as the drop element falling in the drop area, and determine the randomly generated element as the drop element located in the drop area of the first row. After switching the element disk to the drop state, request the game server to obtain the first random factor or obtain the preset first random factor. Based on the dropping rule, the 3rd, 4th and 5th columns of the 1st, 2nd, 3rd and 4th rows in the element disk 10 are determined as the dropping areas, and the elements D, B and E in the 3rd, 4th and 5th columns of the 3rd row are determined as the dropping elements of the 3rd, 4th and 5th columns of the 4th row, the elements D, B and E in the 3rd, 4th and 5th columns of the 2nd row are determined as the dropping elements of the 3rd, 4th and 5th columns of the 3rd row, and the elements D, B and E in the 3rd, 4th and 5th columns of the 1st row are determined as the dropping elements of the 3rd, 4th and 5th columns of the 2nd row, and three elements are randomly generated based on the first random factor, and the three randomly generated elements are determined as the dropping elements of the dropping area of the 3rd, 4th and 5th columns of the 1st row. After the drop area and the corresponding drop element are determined, the second action is determined as dropping the corresponding drop element in the drop area in the element disk, that is, element D, element B and element E in the 3rd, 4th and 5th columns of the 3rd row are moved down to the drop area in the 3rd, 4th and 5th columns of the 4th row, and so on. It can be understood that this embodiment randomly generates elements added to the element disk through the first random factor to improve the controllability and fun of the game level, so that the game can be carried out in the direction of planning and design, and provide game experiences of different difficulty levels.
[0063] S130, controlling the element disk to execute a second action to update the element layout, sending the first random factor to the second client, so that the second client determines a second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
[0064] Exemplarily, when the second action is to delete the element to be deleted in the element disk, the state machine controls the element disk to execute the second action to delete the element to be deleted in the element disk. Figure 5 and Figure 6 , the three elements A in the 3rd, 4th, and 5th columns of the 4th row in element disk 10 are the elements to be deleted. After deleting these three elements A from element disk 10, we get Figure 6 When the second action is to drop the dropped element in the corresponding drop area, the state machine controls the element tray to perform the second action to drop the dropped element in the corresponding drop area. Figure 6 and Figure 7 , element D, element B and element E in the 3rd, 4th and 5th columns of the 3rd row in the element disk 10 are the dropped elements of the dropping area of the 3rd, 4th and 5th columns of the 4th row, element D, element B and element E in the 3rd, 4th and 5th columns of the 2nd row are the dropped elements of the dropping area of the 3rd, 4th and 5th columns of the 3rd row, element D, element B and element E in the 3rd, 4th and 5th columns of the 1st row are the dropped elements of the dropping area of the 3rd, 4th and 5th columns of the 2nd row, and the randomly generated element D, element E and element C are the dropped elements of the dropping area of the 3rd, 4th and 5th columns of the 1st row. Element disk 10 moves element D, element B and element E in the 3rd, 4th and 5th columns of the 3rd row to the drop area of the 3rd, 4th and 5th columns of the 4th row, moves element D, element B and element E in the 3rd, 4th and 5th columns of the 2nd row to the drop area of the 3rd, 4th and 5th columns of the 3rd row, moves element D, element B and element E in the 3rd, 4th and 5th columns of the 1st row to the drop area of the 3rd, 4th and 5th columns of the 2nd row, adds randomly generated element D, element E and element C to the drop area of the 3rd, 4th and 5th columns of the 1st row, and obtains Figure 7 The element layout is shown.
[0065] After the element disk performs the second action, the game enters the next stage. If it is determined that the element disk meets the second state transition condition of the normal state based on the element layout and the state of the element disk, the element disk can be converted to the normal state to allow the game to enter the next round.
[0066] Furthermore, after the first client obtains the first random factor when the element disk is in the dropped state, the first random factor is sent to the game server, and the game server forwards the first random factor to the second client. The element layout of the element disk after the second client executes the first action in the previous stage is the same as the element layout of the first client after executing the first action. Therefore, the second client can synchronously convert the element disk to the dropped state based on the element layout, and generate the same second action as that executed by the first client based on the dropping rule of the dropping state and the first random factor. After the second client controls the corresponding element disk to execute the second action, the element layout is updated to a state consistent with the element layout of the first client. For example, when the second client and the first client execute deletion Figure 5After the first action of the three elements A in the 3rd, 4th and 5th columns of the 4th row of the element disk 10, the element disks of the second client and the first client are both converted to the dropping state, and the first client obtains the first random factor and sends the first random factor to the second client. The first client and the second client generate the same second action based on the first random factor, the dropping rule and the same element layout. After the first client and the second client control the element disk to perform the second action, Figure 6 The element layout is shown.
[0067] In this embodiment, when synchronizing the game between the first client and the second client, the player operation and random factors only need to be synchronized once in one round, and the amount of data that needs to be synchronized between the first client and the second client is very small, which greatly improves the synchronization efficiency of the first client and the second client and improves the smoothness of the game battle.
[0068] In one embodiment, reference Figure 2 , the state of the element disk also includes an initialization state and an end state. When the element disk is in the initialization state, in response to a start operation, the element disk is switched to a normal state. Exemplarily, when a game is just entered, the element disk is in the initialization state, and the player clicks the start control in the game interface to input a start operation. The first client switches the element disk from the initialization state to the normal state in response to the start operation, and starts the first round of the game.
[0069] Furthermore, when the element disk is in a normal state, if the element disk meets the fourth state transition condition of the end state, the element disk is converted to the end state; the fourth state transition condition includes that the game duration reaches a preset duration, the number of game steps reaches a preset number of steps, or the game score reaches a preset score. It can be understood that the fourth state transition condition is also a condition for the end of the game. After the element disk is converted from the deletion state, the drop state, or the prop state to the normal state, it represents the end of a round of the game. If the state machine detects that the game meets the fourth state transition condition at this time, the element disk is converted to the end state to end the game. This embodiment controls the start and end of the game in an orderly manner through the startup operation and the fourth state transition condition, thereby improving the orderliness and regularity of the game.
[0070] In summary, the elimination game operation method provided by the embodiment of the present application manages the state of the element disk in each stage of a round in the elimination game through a state machine, and defines the transition conditions and action rules between states, so that the state machine controls the element disk to update the corresponding element layout in an orderly manner based on the transition conditions and action rules, which is conducive to optimizing the game's battle fluency. The action to be performed by the element disk is determined according to the action rules of the target state after the element disk is converted and the first random factor, making the game level more controllable and interesting. The first client sends the first random factor to the second client, so that after the second client controls the corresponding element disk to perform the first action, it can determine the second action based on the first random factor and the action rules of the state of the element disk. The second client controls the corresponding element disk to perform the second action to keep synchronization with the element disk of the first client, ensuring the consistency of the element layout of the two clients. The data volume of the random factor is small, and the element layout synchronization of the fighting players is achieved through the random factor, which solves the problem of large delay in game synchronization in the prior art and improves the fluency of the battle.
[0071] Based on the above embodiments, Fig.10 This is a schematic diagram of the structure of an elimination game running device provided in an embodiment of the present application. Fig.10 The elimination game running device provided in this embodiment specifically includes: a condition determination module 21, a state conversion module 22 and a state synchronization module 23.
[0072] The condition determination module 21 is configured to determine the state transition condition satisfied by the element disk through the state machine, the element layout and the state of the element disk after the element disk of the game performs the first action to update the element layout of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state;
[0073] The state conversion module 22 is configured to convert the element disk to a target state corresponding to the state conversion condition and obtain a first random factor, and determine a second action to be performed by the element disk through the state machine, the first random factor and an action rule corresponding to the target state;
[0074] The state synchronization module 23 is configured to control the element disk to perform a second action to update the element layout, send the first random factor to the second client, so that the second client determines the second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
[0075] Based on the above embodiment, the condition determination module 21 includes: a first action generation unit, configured to respond to the player operation and generate a corresponding first action, control the element disk to perform the first action to update the corresponding element layout; the player operation includes an element exchange operation and a prop use operation; a first synchronization unit, configured to send the player operation to the second client, so that the second client generates a first action according to the player operation, and synchronously updates the element layout of the corresponding element disk according to the first action.
[0076] Based on the above embodiment, the first action generation unit includes: a first action generation sub-unit, which is configured to convert the element disk to the prop state and obtain the second random factor when the player operation is a prop use operation, and generate a first action according to the second random factor and the prop use operation; correspondingly, the first synchronization unit includes: a first synchronization sub-unit, which is configured to send the second random factor and the prop use operation to the second client, so that the second client converts the corresponding element disk to the prop state, and generates a first action according to the second random factor and the prop use operation.
[0077] On the basis of the above embodiments, the condition determination module 21 includes: a first condition determination unit, configured to determine whether the element layout satisfies the first state transition condition of the deletion state through a state machine when the element disk is in a normal state, a dropped state or a prop state, and the first state transition condition is that there are at least a preset number of adjacent identical elements in the element layout; a second condition determination unit, configured to determine whether the element layout satisfies the second state transition condition of the normal state through a state machine when the element disk is in a deleted state, a dropped state or a prop state, and the second state transition condition is that there are not at least a preset number of adjacent identical elements in the element layout; a third condition determination unit, configured to determine whether the element layout satisfies the third state transition condition of the dropping state through a state machine when the element disk is in a deleted state, and the third state transition condition is that there is a free area in the element layout.
[0078] Based on the above embodiment, the state transition module 22 includes: a to-be-deleted element determination unit, configured to determine the to-be-deleted element in the element layout according to the deletion rule corresponding to the deletion state when the target state is the deletion state; and a deletion action generation unit, configured to determine the second action as deleting the to-be-deleted element in the element layout.
[0079] On the basis of the above embodiment, the state transition module 22 includes: a dropping element determination unit, which is configured to determine the dropping element and the corresponding dropping area in the element layout according to the dropping rule corresponding to the dropping state and the first random factor when the target state is the dropping state; and a dropping action determination unit, which is configured to determine the second action as dropping the corresponding dropping element in the dropping area.
[0080] On the basis of the above embodiments, the state of the element disk also includes an initialization state and an end state; accordingly, the elimination game running device includes: a start module, configured to convert the element disk to a normal state in response to a start operation when the element disk is in the initialization state; an end module, configured to convert the element disk to an end state when the element disk is in a normal state if the element disk meets the fourth state transition condition of the end state; the fourth state transition condition includes the game duration reaching a preset duration, the game steps reaching a preset number of steps or the game score reaching a preset score.
[0081] As mentioned above, the elimination game running device provided by the embodiment of the present application manages the state of the element disk in each stage of a round in the elimination game through a state machine, and defines the transition conditions and action rules between the states, so that the state machine controls the element disk to update the corresponding element layout in an orderly manner based on the transition conditions and action rules, which is conducive to optimizing the game's battle fluency. The action to be performed by the element disk is determined according to the action rules of the target state after the element disk is converted and the first random factor, making the game level more controllable and interesting. The first client sends the first random factor to the second client, so that after the second client controls the corresponding element disk to perform the first action, it can determine the second action based on the first random factor and the action rules of the state of the element disk. The second client controls the corresponding element disk to perform the second action to keep synchronization with the element disk of the first client, ensuring the consistency of the element layout of the two clients. The data volume of the random factor is small, and the element layout synchronization of the fighting players is achieved through the random factor, which solves the problem of large delay in game synchronization in the prior art and improves the fluency of the battle.
[0082] The elimination game running device provided in the embodiment of the present application can be used to execute the elimination game running method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0083] Fig.11 is a schematic diagram of a structure of an elimination game running device provided in an embodiment of the present application, with reference to Fig.11 The elimination game running device includes: a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 in the elimination game running device can be one or more, and the number of memories 32 in the elimination game running device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the elimination game running device can be connected through a bus or other methods.
[0084] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the elimination game operation method of any embodiment of the present application (for example, the condition determination module 21, the state conversion module 22 and the state synchronization module 23 in the elimination game operation device). The memory 32 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0085] The communication device 33 is used for data transmission.
[0086] The processor 31 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 32, that is, realizes the above-mentioned elimination game running method.
[0087] The input device 34 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 35 may include a display device such as a display screen.
[0088] The elimination game running device provided above can be used to execute the elimination game running method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0089] An embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute a method for running an elimination game when executed by a computer processor. The method for running an elimination game includes: after the element disk of the game executes a first action to update the element layout of the element disk, determining the state transition condition satisfied by the element disk through a state machine, the element layout and the state of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state; converting the element disk to a target state corresponding to the state transition condition and obtaining a first random factor, determining a second action to be executed by the element disk through the state machine, the first random factor and the action rules corresponding to the target state; controlling the element disk to execute a second action to update the element layout, and sending the first random factor to a second client, so that the second client determines a second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
[0090] Storage medium - any of various types of memory devices or storage devices. The term "storage medium" is intended to include: installation media, such as CD-ROM, floppy disk or tape device; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc. Storage media may also include other types of memory or combinations thereof. In addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, which is connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations (for example, in different computer systems connected by a network). The storage medium may store program instructions (for example, embodied as a computer program) that can be executed by one or more processors.
[0091] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application is not limited to the above elimination game running method, and the computer executable instructions can also execute related operations in the elimination game running method provided in any embodiment of the present application.
[0092] The elimination game running device, storage medium and elimination game running equipment provided in the above embodiments can execute the elimination game running method provided in any embodiment of the present application. For technical details not described in detail in the above embodiments, please refer to the elimination game running method provided in any embodiment of the present application.
[0093] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the protection scope of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A method for running an elimination game, characterized in that: Applied to the first client, including: After the element disk of the game executes a first action to update the element layout of the element disk, the state transition condition satisfied by the element disk is determined through the state machine, the element layout and the state of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state; a first state transition condition satisfied by the normal state, the dropped state and the prop state to be converted to the deleted state is that there are at least a preset number of adjacent identical elements in the element layout, a second state transition condition satisfied by the deleted state, the dropped state and the prop state to be converted to the normal state is that there are not at least a preset number of adjacent identical elements in the element layout, and a third state transition condition satisfied by the deleted state to be converted to the dropped state is that there is a free area in the element layout; Convert the element disk to the target state corresponding to the state conversion condition and obtain a first random factor, and determine a second action to be performed by the element disk through the state machine, the first random factor and the action rule corresponding to the target state; The element disk is controlled to perform the second action to update the element layout, and the first random factor is sent to the second client, so that the second client determines the second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
2. The elimination game running method according to claim 1, characterized in that: The element disk of the game performs a first action to update the element layout of the element disk, including: In response to a player operation and generating a corresponding first action, controlling the element disk to perform the first action to update the corresponding element layout; the player operation includes an element exchange operation and a prop use operation; The player operation is sent to the second client, so that the second client generates the first action according to the player operation, and synchronously updates the element layout of the corresponding element disk according to the first action.
3. The elimination game running method according to claim 2, characterized in that: The step of responding to the player's operation and generating a corresponding first action includes: In the case where the player operation is a prop use operation, the element disk is converted to the prop state and a second random factor is obtained, and a first action is generated according to the second random factor and the prop use operation; Accordingly, sending the player operation to the second client so that the second client generates the first action according to the player operation includes: The second random factor and the item use operation are sent to the second client, so that the second client converts the corresponding element disk to the item state and generates the first action according to the second random factor and the item use operation.
4. The elimination game running method according to claim 1, characterized in that: The determining, through the state machine, the element layout and the state of the element disk, a state transition condition that the element disk satisfies, includes: When the element tray is in a normal state, a dropped state or a prop state, determining by the state machine whether the element layout satisfies a first state transition condition of a deletion state; When the element tray is in a deleted state, a dropped state or a prop state, determining by the state machine whether the element layout satisfies a second state transition condition of a normal state; When the element tray is in the deleted state, the state machine determines whether the element layout satisfies the third state transition condition of the dropped state.
5. The elimination game running method according to claim 1, characterized in that: The determining the second action to be performed by the element disk through the state machine, the first random factor and the action rule corresponding to the target state includes: When the target state is a deletion state, determining the element to be deleted in the element layout according to a deletion rule corresponding to the deletion state; The second action is determined as deleting the element to be deleted in the element layout.
6. The elimination game running method according to claim 1, characterized in that: The determining the second action to be performed by the element disk through the state machine, the first random factor and the action rule corresponding to the target state includes: When the target state is a dropping state, determining a dropping element and a dropping area corresponding to the element layout according to a dropping rule corresponding to the dropping state and the first random factor; The second action is determined as dropping a corresponding drop element in the drop area.
7. The elimination game running method according to claim 1, characterized in that: The state of the element disk also includes an initialization state and an end state; accordingly, the method further includes: When the element disk is in the initialization state, in response to a startup operation, the element disk is converted to the normal state; When the element disk is in a normal state, if the element disk meets the fourth state transition condition of the end state, the element disk is converted to the end state; the fourth state transition condition includes that the game duration reaches a preset duration, the number of game steps reaches a preset number of steps, or the game score reaches a preset score.
8. A device for running an elimination game, characterized in that: Applied to the first client, including: A condition determination module is configured to determine the state transition condition satisfied by the element disk through a state machine, the element layout and the state of the element disk after the element disk of the game performs a first action to update the element layout of the element disk; wherein the state of the element disk includes a normal state, a deleted state, a dropped state and a prop state; a first state transition condition satisfied by the normal state, the dropped state and the prop state to be converted to the deleted state is that there are at least a preset number of adjacent identical elements in the element layout, a second state transition condition satisfied by the deleted state, the dropped state and the prop state to be converted to the normal state is that there are not at least a preset number of adjacent identical elements in the element layout, and a third state transition condition satisfied by the deleted state to be converted to the dropped state is that there is a free area in the element layout; a state conversion module, configured to convert the element disk to a target state corresponding to the state conversion condition and obtain a first random factor, and determine a second action to be performed by the element disk through the state machine, the first random factor and an action rule corresponding to the target state; The state synchronization module is configured to control the element disk to perform the second action to update the element layout, send the first random factor to the second client, so that the second client determines the second action according to the first random factor, and synchronously updates the element layout of the corresponding element disk according to the second action.
9. A device for running elimination games, characterized in that: include: one or more processors; A memory stores one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the elimination game running method as described in any one of claims 1-7.
10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions, when executed by a computer processor, are used to execute the elimination game running method as described in any one of claims 1-7.
Citation Information
Patent Citations
Live broadcast room game synchronization method, system, device and equipment and storage medium
CN114786024A
Method and device for controlling game functions, electronic equipment and storage medium
CN116077931A