Game display method, device, electronic device and medium
By using control nodes to manage game objects in the game server, the problems of resource occupation and traffic waste in multiplayer games are solved, and efficient game object synchronization and free planning and design are achieved.
Patent Information
- Application Number
- CN202210648378.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-09
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-06-09
AI Technical Summary
In multiplayer games, a large number of logically simple game objects occupy server resources, resulting in lag and waste of traffic. The existing technical solutions limit the freedom of game performance and planning and design.
The game object is managed by the control node. The game server synchronizes the target control node after receiving the scene switching command. The game client displays the game object managed by the control node. The data of the game object is stored in the control node and synchronized accordingly.
It improves the synchronization efficiency of game objects, reduces the number limit, ensures the game performance and improves the freedom of planning and design.
Smart Images

Figure CN114984571B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a game display method, a game display device, an electronic device, and a computer-readable storage medium. Background Art
[0002] An Area of Interest (AOI) is the area visible to the player in real time within the game scene. The AOI changes as the player's position within the scene changes. Game object information, such as monsters or other players, can be displayed within the AOI. Of course, game objects can also move away and disappear from the player's AOI. The server can synchronize game object information with the player. When synchronizing game object information, the player's AOI must be determined to determine which game objects should appear within the AOI and which should be removed.
[0003] In multiplayer games, the game scene within a player's Area of Interest (AOI) often requires the creation of a large number of game objects. Most of these objects have very simple logic, such as dropped pickups (guns, ammunition, items discarded by players), and various collectibles (trees, rocks, etc.). These game objects are massive, and if they were all stored as independent entities on the server (an entity is used to represent any type of game object in the game world), they would consume a large amount of server resources, cause lag, and waste player traffic and bandwidth. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a game display method and a corresponding game display device, an electronic device, and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] An embodiment of the present invention discloses a game display method, which is applied to a game server, wherein the game server is communicatively connected to a game client, and the game server includes a control node, wherein the control node stores data information of a controlled game object. The method includes:
[0006] Receive a game scene switching instruction sent by the game client, and determine a target game scene to be displayed by the game client according to the game scene switching instruction, and determine a first target control node included in the target game scene;
[0007] The first target control node is synchronized to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0008] Optionally, it also includes:
[0009] Receive a game object creation instruction sent by the game client, and search for a second target control node that can accommodate a second target game object to be created according to the game object creation instruction;
[0010] If the second target control node is found, the data information of the second target game object is stored in the second target control node;
[0011] The second target control node is synchronized to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0012] Optionally, it also includes:
[0013] If the second target control node cannot be found, a new control node is created according to the location information of the second target game object, and the data information of the second target game object is stored in the new control node;
[0014] The new control node is synchronized to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized new control node.
[0015] Optionally, after storing the data information of the second target game object in the second target control node, the method further includes:
[0016] Adjust the position information of the second target control node according to the position information of the second target game object.
[0017] Optionally, the control node has a corresponding control range, and searching, according to the game object creation instruction, for a second target control node that can accommodate the second target game object to be created includes:
[0018] Search for a candidate second target control node based on the location information of the second target game object, the location information of the control node, and the control range. When the candidate second target control node is found, determine whether the candidate second target control node can accommodate the second target game object.
[0019] Optionally, the control node has a corresponding control quantity, and the determining whether the candidate second target control node can accommodate the second target game object includes:
[0020] If the number of game objects currently controlled by the candidate second target control node is less than the number of game objects controlled by the candidate second target control node, and it is determined that after adjusting the position information of the candidate second target control node according to the position information of the second target game object, the game objects controlled by the candidate second target control node are still within the control range of the candidate second target control node, then it is determined that the candidate second target control node can accommodate the second target game object.
[0021] Optionally, adjusting the position information of the second target control node according to the position information of the second target game object includes:
[0022] Determine center position information between the position information of the second target game object and the position information of the game object controlled by the second target control node;
[0023] Adjust the position corresponding to the position information of the second target management and control node to the position corresponding to the center position information.
[0024] Optionally, creating a new control node according to the location information of the second target game object includes:
[0025] Create the new control node at the position corresponding to the position information of the second target game object.
[0026] Optionally, it also includes:
[0027] Receive a game object deletion instruction sent by the game client, and determine a third target control node responsible for controlling the third target game object to be deleted according to the game object deletion instruction;
[0028] The data information of the third target game object is deleted from the third target control node, and after deletion, the third target control node is synchronized to the game client, so that the game client deletes and displays the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0029] Optionally, after deleting the data information of the third target game object from the third target control node, the method further includes:
[0030] If the data information of the controlled game object does not exist in the third target control node after deletion, the third target control node is deleted;
[0031] If data information of the controlled game objects still exists in the third target control node after deletion, the position information of the third target control node is adjusted according to the position information of the remaining game objects in the third target control node.
[0032] Optionally, it also includes:
[0033] receiving a verification request sent by the game client based on the synchronized fourth target control node, and determining a fourth target control node corresponding to the synchronized fourth target control node;
[0034] The fourth target control node performs verification according to the verification request, so that the game client executes the game object interaction instruction; the synchronized fourth target control node is the control node synchronized to the game client and responsible for controlling the fourth target game object required to interact in the game object interaction instruction.
[0035] An embodiment of the present invention further discloses a game display method, which is applied to a game client, wherein the game client is in communication with a game server, and the game server includes a control node, wherein the control node stores data information of the controlled game objects, and the method includes:
[0036] In response to a game scene switching operation on the game client, generating a corresponding game scene switching instruction;
[0037] Sending the game scene switching instruction to the game server, so that the game server determines the target game scene to be displayed by the game client according to the game scene switching instruction and determines the first target control node included in the target game scene, and then synchronizes the first target control node to the game client;
[0038] The first target game object is displayed on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0039] Optionally, after the game client displays the first target game object according to the data information of the first target game object stored in the synchronized first target control node, the method further includes:
[0040] The first target game object is packaged into an independent game object to interact with the controlled virtual character; the controlled virtual character is controlled by the game client.
[0041] Optionally, it also includes:
[0042] In response to a game object creation operation for the game client, generating a corresponding game object creation instruction;
[0043] Sending the game object creation instruction to the game server, so that the game server finds a second target control node that can accommodate the second target game object to be created according to the game object creation instruction and stores data information of the second target game object in the second target control node, and then synchronizes the second target control node to the game client;
[0044] The second target game object is added and displayed on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0045] Optionally, it also includes:
[0046] In response to a game object deletion operation on the game client, generating a corresponding game object deletion instruction;
[0047] Sending the game object deletion instruction to the game server, so that the game server determines a third target control node responsible for controlling the third target game object to be deleted according to the game object deletion instruction and deletes the data information of the third target game object from the third target control node, and then synchronizes the third target control node to the game client;
[0048] The third target game object is deleted and displayed on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0049] Optionally, it also includes:
[0050] In response to a game object interaction operation on the game client, generating a corresponding game object interaction instruction, and determining whether execution of the game object interaction instruction requires verification by the game server;
[0051] If verification by the game server is required, determining, according to the game object interaction instruction, a fourth target control node responsible for controlling the synchronization of the fourth target game object required for interaction to the synchronization of the game client;
[0052] Sending a verification request to the game server based on the synchronized fourth target control node, so that the game server determines a fourth target control node corresponding to the synchronized fourth target control node, and the fourth target control node performs verification according to the verification request;
[0053] After verification, the game object interaction instruction is executed.
[0054] An embodiment of the present invention further discloses a game display device, which is applied to a game server, wherein the game server is communicatively connected to a game client, and the game server includes a control node, wherein the control node stores data information of the controlled game objects, and the device includes:
[0055] a first receiving and determining module, configured to receive a game scene switching instruction sent by the game client, and determine a target game scene to be displayed by the game client according to the game scene switching instruction, and determine a first target control node included in the target game scene;
[0056] The first synchronization module is used to synchronize the first target control node to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0057] Optionally, it also includes:
[0058] A receiving and searching module, configured to receive a game object creation instruction sent by the game client, and search for a second target control node that can accommodate a second target game object to be created according to the game object creation instruction;
[0059] a storage module, configured to store the data information of the second target game object in the second target control node if the second target control node is found;
[0060] The second synchronization module is used to synchronize the second target control node to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0061] Optionally, it also includes:
[0062] A creation and storage module, configured to create a new control node according to the location information of the second target game object if the second target control node cannot be found, and store the data information of the second target game object in the new control node;
[0063] The third synchronization module is used to synchronize the new control node to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized new control node.
[0064] Optionally, it also includes:
[0065] The first adjustment module is used to adjust the position information of the second target control node according to the position information of the second target game object.
[0066] Optionally, the control node has a corresponding control range, and the receiving and searching module includes:
[0067] The search and judgment submodule is used to search for a candidate second target control node based on the location information of the second target game object, the location information of the control node, and the control range, and when the candidate second target control node is found, determine whether the candidate second target control node can accommodate the second target game object.
[0068] Optionally, the control node has a corresponding control quantity, and the search and judgment submodule includes:
[0069] A determination unit is used to determine that the candidate second target control node can accommodate the second target game object if the number of game objects currently controlled by the candidate second target control node is less than the number of game objects controlled by the candidate second target control node, and it is determined that after adjusting the position information of the candidate second target control node according to the position information of the second target game object, the game object controlled by the candidate second target control node is still within the control range of the candidate second target control node.
[0070] Optionally, the first adjustment module includes:
[0071] a determination submodule, configured to determine central position information between the position information of the second target game object and the position information of the game object controlled by the second target control node;
[0072] An adjustment submodule is configured to adjust the position corresponding to the position information of the second target management and control node to the position corresponding to the center position information.
[0073] Optionally, the creation and storage module includes:
[0074] A creation submodule is used to create the new control node at a position corresponding to the position information of the second target game object.
[0075] Optionally, it also includes:
[0076] A second receiving and determining module is configured to receive a game object deletion instruction sent by the game client, and determine a third target control node responsible for controlling a third target game object to be deleted according to the game object deletion instruction;
[0077] A deletion and synchronization module is used to delete the data information of the third target game object from the third target control node, and after deletion, synchronize the third target control node to the game client, so that the game client deletes and displays the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0078] Optionally, it also includes:
[0079] a deletion module, configured to delete the third target control node if data information of the game object under control does not exist in the third target control node after the deletion;
[0080] The second adjustment module is used to adjust the position information of the third target control node according to the position information of the remaining game objects in the third target control node if data information of the controlled game objects still exists in the third target control node after deletion.
[0081] Optionally, it also includes:
[0082] a third receiving and determining module, configured to receive a verification request sent by the game client based on the synchronized fourth target control node, and determine a fourth target control node corresponding to the synchronized fourth target control node;
[0083] A verification module is used for the fourth target control node to perform verification according to the verification request, so that the game client executes the game object interaction instruction; the synchronized fourth target control node is a control node synchronized to the game client and responsible for controlling the fourth target game object required to interact in the game object interaction instruction.
[0084] An embodiment of the present invention further discloses a game display device, which is applied to a game client. The game client is communicatively connected to a game server. The game server includes a control node. The control node stores data information of controlled game objects. The device includes:
[0085] A first generating module, configured to generate a corresponding game scene switching instruction in response to a game scene switching operation on the game client;
[0086] A first sending module is configured to send the game scene switching instruction to the game server, so that the game server determines the target game scene to be displayed by the game client according to the game scene switching instruction and determines the first target control node included in the target game scene, and then synchronizes the first target control node to the game client;
[0087] The first display module is configured to display the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0088] Optionally, it also includes:
[0089] A packaging module is used to package the first target game object into an independent game object to interact with a controlled virtual character; the controlled virtual character is controlled by the game client.
[0090] Optionally, it also includes:
[0091] A second generating module is configured to generate a corresponding game object creation instruction in response to a game object creation operation on the game client;
[0092] A second sending module is configured to send the game object creation instruction to the game server, so that the game server finds a second target control node that can accommodate the second target game object to be created according to the game object creation instruction and stores data information of the second target game object in the second target control node, and then synchronizes the second target control node with the game client;
[0093] The second display module is used to add and display the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0094] Optionally, it also includes:
[0095] A third generating module is configured to generate a corresponding game object deletion instruction in response to a game object deletion operation on the game client;
[0096] a third sending module, configured to send the game object deletion instruction to the game server, so that the game server determines, according to the game object deletion instruction, a third target control node responsible for controlling the third target game object to be deleted and deletes the data information of the third target game object from the third target control node, and then synchronizes the third target control node with the game client;
[0097] The third display module is configured to delete and display the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0098] Optionally, it also includes:
[0099] a generation and determination module, configured to generate a corresponding game object interaction instruction in response to a game object interaction operation on the game client, and determine whether execution of the game object interaction instruction requires verification by the game server;
[0100] a determination module configured to determine, if verification by the game server is required, a fourth target control node responsible for controlling synchronization of a fourth target game object requiring interaction with the game client according to the game object interaction instruction;
[0101] a fourth sending module, configured to send a verification request to the game server based on the synchronized fourth target control node, so that the game server determines a fourth target control node corresponding to the synchronized fourth target control node, and the fourth target control node performs verification according to the verification request;
[0102] The verification module is used to execute the game object interaction instruction after passing the verification.
[0103] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the game display method described above.
[0104] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the game display method described above are implemented.
[0105] The embodiments of the present invention include the following advantages:
[0106] In an embodiment of the present invention, a control node in a game server is responsible for controlling game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by a game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design. BRIEF DESCRIPTION OF THE DRAWINGS
[0107] Figure 1 This is a schematic diagram of the client's AOI field of view;
[0108] Figure 2 This is a flowchart of a method for displaying a game provided by an embodiment of the present invention;
[0109] Figure 3 This is a schematic diagram of a model of a Union-SubEntity management and control relationship in an embodiment of the present invention;
[0110] Figure 4 is a flowchart of another game display method provided by an embodiment of the present invention;
[0111] Figure 5 is a flow chart of a game display method according to an embodiment of the present invention;
[0112] Figure 6 This is a schematic diagram of adding a new SubEntity to the game scene;
[0113] Figure 7 This is a schematic diagram of the logical processing of SubEntity on the server and client;
[0114] Figure 8 This is a flowchart of another method for displaying a game provided by an embodiment of the present invention;
[0115] Figure 9 This is a structural block diagram of a game display device provided by an embodiment of the present invention;
[0116] Figure 10 It is a structural block diagram of another game display device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0117] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It is obvious that the embodiments described are only some embodiments of the present invention, rather than all embodiments. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention are within the scope of protection of the present invention.
[0118] Entity: All game objects are entities, divided into those that need to be synchronized with the client and those that don't. Those that need to be synchronized with the client primarily include monsters, players, and items on the ground. Those that don't need to be synchronized with the client are typically logical entities, such as entities that control weather and time. This article primarily focuses on entities that need to be synchronized, and the term "entity" below also refers to entities that need to be synchronized.
[0119] AOI (Area Of Interest): Area of interest, which represents the client's field of view in online games; to reduce overhead, the client will only synchronize entities within the AOI. Figure 1 The figure below shows the client's AOI field of view. In the server scene, there is player A. The dotted circle represents player A's AOI. In addition, there are three entities: Entity 1, Entity 2, and Entity 3. At this time, player A's client will only synchronize the status of Entity 2 and Entity 3, and will not synchronize the status of Entity 1.
[0120] In multiplayer games, the game scene within a player's Area of Interest (AOI) often requires the creation of a large number of game objects. Most of these objects have very simple logic, such as dropped pickups (guns, ammunition, items discarded by players), and various collectibles (trees, rocks, etc.). These game objects are massive, and if they were all stored as independent entities on the server (an entity is used to represent any type of game object in the game world), they would consume a large amount of server resources, cause lag, and waste player traffic and bandwidth.
[0121] There are two main existing technical solutions. The first is to allow each logically simple game object to exist as an independent entity, but minimize the number of simultaneous entities. For example, some less important logically simple game objects can be converted to pure client-side entities, shortening the lifecycle of logically simple game objects, such as drop pickups that disappear after a period of time. The other is to retain all necessary logically simple game objects and store their data in a central node. Since all data is stored centrally, the amount of data stored is large, and the player's position can only be synchronized by actively querying the server when moving.
[0122] The first solution has the disadvantage of limiting the number of logically simple game objects, reducing the game's performance and design freedom. The second solution is difficult to implement and maintain, and is also expensive. This is because in mature game engines, synchronization of entities within an Area of Interest is fully automatic, while the second solution requires active querying.
[0123] One of the core concepts of the embodiment of the present invention is that the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives the game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0124] The following describes in detail a game display method provided by this application from the perspective of a game server.
[0125] Reference Figure 2 , shows a flowchart of the steps of a game display method provided by an embodiment of the present invention, which is applied to a game server, the game server is in communication with a game client, and the game server includes a control node, which stores data information of the controlled game objects. Specifically, the method may include the following steps:
[0126] Step 201: Receive a game scene switching instruction sent by the game client, and determine the target game scene that the game client needs to display according to the game scene switching instruction, and determine the first target control node included in the target game scene.
[0127] Game objects can refer to a large number of game objects with simple logic, including dropped pick-up objects (guns, ammunition, items discarded by players, etc.), various collectible objects (trees, stones, etc.), etc. Game objects can be represented by SubEntity.
[0128] A control node is an entity responsible for managing subentities. It stores data about the game objects it controls and can be represented by a Union. A Union can be configured to manage various types of subentities. However, for clarity, a single type of Union can be used to manage a specific type of subentity. For example, building subentities can be assigned to one type of Union, while pickable items on the ground can be assigned to another type of Union.
[0129] In embodiments of the present invention, game objects in a game server do not exist independently, but are instead managed by a control node. In one example, a circle with a specified radius and the control node's location as the center can be used as the control range of the control node, and game objects within the control range can be controlled.
[0130] Reference Figure 3 The figure shows a model diagram of a Union-SubEntity management relationship in an embodiment of the present invention. In the server-side scenario, there is Union A. The dotted circle surrounding Union A represents the management scope of Union A, and SubEntity 1 and SubEntity 2 are within the management scope of Union A. In addition, there is Union B. The dotted circle surrounding Union B represents the management scope of Union B, and SubEntity 3 and SubEntity 4 are within the management scope of Union B. Each Union manages the SubEntities within a certain range (dotted circle) around it. The data of these SubEntities are stored in the Union and synchronized with the Union. In addition, the management node can be virtual and not displayed on the game server or game client.
[0131] When the AOI of the player in the game client changes, it can trigger the game client to generate a corresponding game scene switching instruction and send the game scene switching instruction to the game server. After the game server receives the game scene switching instruction, it can determine the target game scene that the game client needs to display according to the game scene switching instruction, and determine the first target control node located in the target game scene.
[0132] Step 202: Synchronize the first target control node to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0133] In an embodiment of the present invention, after determining the target game scene that the game client needs to display, the location information of each control node in the game server can be used to find out which control nodes are within the range of the target game scene. For ease of distinction, the control node found here is named the first target control node, and the first target control node can then be synchronized to the game client. Since the first target control node stores the data information of the first target game object under control, the first target control node synchronized in the game client also stores the data information of the first target game object under control. The game client can use the data information of the first target game object stored in the synchronized first target control node to display the first target game object on the game client.
[0134] In summary, in an embodiment of the present invention, the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0135] Reference Figure 4 , shows a flowchart of the steps of another game display method provided by an embodiment of the present invention, which is applied to a game server, the game server is in communication with a game client, and the game server includes a control node, which stores data information of the controlled game objects. Specifically, the method may include the following steps:
[0136] Step 401: Receive a game scene switching instruction sent by the game client, and determine the target game scene that the game client needs to display according to the game scene switching instruction, and determine the first target control node included in the target game scene.
[0137] Game objects can be large in number and simple in logic, and can be represented by SubEntity. A control node can be an Entity responsible for managing SubEntity. The control node stores data about the controlled game objects and can be represented by Union.
[0138] In an embodiment of the present invention, the game objects in the game server do not exist independently, but are instead managed by a control node. When a player's AOI changes in a game client, the game client can be triggered to generate a corresponding game scene switching instruction. The game scene switching instruction is used to switch the current game scene displayed by the player's AOI to a target game scene. The game scene switching instruction can be sent to the game server. After receiving the game scene switching instruction, the game server can determine the target game scene to be displayed by the game client based on the game scene switching instruction, as well as the first target control node located in the target game scene.
[0139] Step 402: Synchronize the first target control node to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0140] In an embodiment of the present invention, after determining the first target control node contained in the target game scene that the game client needs to display, the first target control node can be synchronized to the game client, and the game client can use the data information of the first target game object stored in the synchronized first target control node to display the first target game object on the game client.
[0141] Step 403: Receive the game object creation instruction sent by the game client, and search for a second target control node that can accommodate the second target game object to be created according to the game object creation instruction.
[0142] In an embodiment of the present invention, when a game player performs a specific game object creation operation on a game client, the game client can be triggered to generate a corresponding game object creation instruction. The game object creation instruction is used to create a new game object in the current game scene. The game object creation instruction can be sent to a game server. After the game server receives the game object creation instruction, it can search for a second target control node that can accommodate the second target game object to be created according to the game object creation instruction.
[0143] Step 404: If the second target control node is found, the data information of the second target game object is stored in the second target control node.
[0144] In an embodiment of the present invention, after finding the second target management and control node that can accommodate the second target game object to be created, the data information of the second target game object can be stored in the second target management and control node.
[0145] In an optional embodiment of the present invention, after storing the data information of the second target game object in the second target management and control node, the following steps may be further performed:
[0146] Adjust the position information of the second target control node according to the position information of the second target game object.
[0147] The position information of the control node is determined based on the position information of all the game objects it controls. Therefore, when the game objects controlled by the control node change, the position information of the control node needs to be adjusted accordingly.
[0148] In an optional embodiment of the present invention, the following steps may be performed to adjust the position information of the second target control node according to the position information of the second target game object:
[0149] Determine the center position information between the position information of the second target game object and the position information of the game object controlled by the second target control node; and adjust the position corresponding to the position information of the second target control node to the position corresponding to the center position information.
[0150] The position of the control node can be set to the position center of all the game objects it controls. In this embodiment of the present invention, after the data information of the second target game object is stored in the second target control node, the position of the second target control node can be adjusted to the position center of all the game objects it currently controls.
[0151] In an optional embodiment of the present invention, the control node has a corresponding control range. For step 403, the following steps may be performed:
[0152] Sub-step S11, searching for a candidate second target control node based on the location information of the second target game object, the location information of the control node and the control range, and when the candidate second target control node is found, determining whether the candidate second target control node can accommodate the second target game object.
[0153] In this embodiment of the present invention, candidate second-target control nodes that are potentially capable of accommodating the second-target game object are searched based on the location information of the second-target game object, the location information of the control node, and the control range of the control node. In one example, when searching for a Union that can accommodate a SubEntity, the Union's management range radius is set to r. Only Unions within a circle with a radius of 2r, centered at the SubEntity's location, need to be traversed. This method can speed up the search.
[0154] In an optional embodiment of the present invention, the control node has a corresponding control quantity. For sub-step S11, the following steps may be performed:
[0155] If the number of game objects currently controlled by the candidate second target control node is less than the number of game objects controlled by the candidate second target control node, and it is determined that after adjusting the position information of the candidate second target control node according to the position information of the second target game object, the game objects controlled by the candidate second target control node are still within the control range of the candidate second target control node, then it is determined that the candidate second target control node can accommodate the second target game object.
[0156] A Union has a constant that controls the maximum number of SubEntities it can manage. This is to avoid problems such as data lag during synchronization caused by a single Union being too large. For example, a player can throw objects on the ground. If the player continues to do this, thousands of SubEntities can exist in a small area. If all of them are placed in a single Union, they will not be smoothly synchronized to the player client. Therefore, there are two conditions for determining whether a Union can accommodate a SubEntity: the number of SubEntities managed by the Union has not reached the upper limit; and after the Union is adjusted to the new position, all of its SubEntities remain within its management range. It should be noted that the management ranges of Unions can overlap, so when searching, just find the first Union that can accommodate it.
[0157] In the embodiment of the present invention, the control quantity refers to the maximum number of game objects controlled by the control node. By setting the control quantity appropriately, it is possible to ensure that the SubEntity is smoothly synchronized to the game client.
[0158] Step 405: Synchronize the second target control node to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0159] In an embodiment of the present invention, after finding a second target control node that can accommodate the second target game object to be created, the second target control node can be synchronized to the game client, and the game client can use the data information of the second target game object stored in the synchronized second target control node to add and display the second target game object on the game client.
[0160] In an optional embodiment of the present invention, if the second target management and control node cannot be found, the following steps may be further performed:
[0161] If the second target control node cannot be found, a new control node is created according to the location information of the second target game object, and the data information of the second target game object is stored in the new control node; the new control node is synchronized to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized new control node.
[0162] In an embodiment of the present invention, if a second target control node that can accommodate the second target game object to be created cannot be found, a new control node can be created based on the location information of the second target game object, and the data information of the second target game object can be stored in the new control node. The newly created control node can be synchronized to the game client, and the game client can use the data information of the second target game object stored in the synchronized newly created control node to add and display the second target game object on the game client.
[0163] In an optional embodiment of the present invention, the following steps may be performed to create a new control node according to the location information of the second target game object:
[0164] Create the new control node at the position corresponding to the position information of the second target game object.
[0165] A new control node may be created at a position corresponding to the position information of the second target game object.
[0166] In order to enable those skilled in the art to better understand steps 403 to 405 of the embodiment of the present invention, an example is given below to illustrate:
[0167] Reference Figure 5 FIG. 1 is a flow chart of a method for displaying a game according to an embodiment of the present invention. The specific process is as follows:
[0168] 1. When a SubEntity is added to the game scene, it will search for a Union nearby that can accommodate it. Figure 6 The figure below shows a schematic diagram of adding a new SubEntity to the game scene. The dotted circle in the figure represents the control range of the Union.
[0169] 2. If no Union that can accommodate the data is found, a new Union is created in its place and the SubEntity data is inserted into the newly created Union.
[0170] 3. If a Union that can accommodate the data is found, its data is directly inserted into the corresponding Union and the position of the Union is adjusted to the center of the positions of all the SubEntities it manages.
[0171] In addition, by Figure 6As you can see, the positions of the Union and SubEntity are not consistent. For example, in the second image in the upper right corner, the Union is located at the center of the dotted circle, which does not coincide with the positions of SubEntity 1 and 2. In this case, the following situation may occur: the SubEntity is within the AOI, but the Union that manages it is not. In this case, it will not be synchronized to the player client and the player will not be able to see it. In this case, you can avoid reducing the player's actual viewing distance by expanding the player's AOI, for example, by increasing the radius of the player's AOI by the radius of the Union management, so that the Union is within the AOI.
[0172] In an optional embodiment of the present invention, a specified game object may be deleted on the game client. Specifically, the following steps may be performed:
[0173] Receive a game object deletion instruction sent by the game client, and determine a third target control node responsible for controlling the third target game object to be deleted based on the game object deletion instruction; delete the data information of the third target game object from the third target control node, and after deletion, synchronize the third target control node to the game client, so that the game client deletes and displays the third target game object on the game client based on the data information stored in the synchronized third target control node that does not contain the third target game object.
[0174] In an embodiment of the present invention, when a game player performs a specific game object deletion operation on a game client, the game client can be triggered to generate a corresponding game object deletion instruction. The game object deletion instruction is used to delete the specified game object in the current game scene. The game object deletion instruction can be sent to a game server. After the game server receives the game object deletion instruction, it can determine the third target control node responsible for controlling the third target game object to be deleted based on the game object deletion instruction.
[0175] After determining the third target control node responsible for controlling the third target game object that needs to be deleted, the data information of the third target game object can be deleted from the third target control node. After deletion, the third target control node can be synchronized to the game client. The game client can use the data information stored in the synchronized third target control node that does not contain the third target game object to delete and display the third target game object on the game client.
[0176] In an optional embodiment of the present invention, after deleting the data information of the third target game object from the third target control node, the following steps may be further performed:
[0177] If, after deletion, the data information of the controlled game object does not exist in the third target control node, the third target control node will be deleted; if, after deletion, the data information of the controlled game object still exists in the third target control node, the position information of the third target control node will be adjusted according to the position information of the remaining game objects in the third target control node.
[0178] When deleting a SubEntity, if its Union no longer manages any SubEntity after deletion, the Union will be deleted directly; otherwise, only the position of the Union will be adjusted.
[0179] In an optional embodiment of the present invention, a player may interact with a game object displayed by a game client by performing the following steps:
[0180] Receive a verification request sent by the game client based on the synchronized fourth target control node, and determine the fourth target control node corresponding to the synchronized fourth target control node; the fourth target control node performs verification according to the verification request, so that the game client executes the game object interaction instruction.
[0181] Among them, the synchronized fourth target control node is a control node that is synchronized to the game client and is responsible for controlling the fourth target game object required to interact in the game object interaction instruction.
[0182] In an embodiment of the present invention, when a game player performs a specific game object interaction operation on a game client, the game client can be triggered to generate a corresponding game object interaction instruction, which is used to interact with the specified game object in the current game scene. It can be determined whether the execution of the game object interaction instruction requires verification by the game server. If necessary, the fourth target control node synchronized to the game client responsible for controlling the fourth target game object required for interaction can be determined based on the game object interaction instruction. A verification request is sent to the game server based on the synchronized fourth target control node. After receiving the verification request, the game server can determine the fourth target control node corresponding to the synchronized fourth target control node and perform verification through the fourth target control node. After the verification is passed, the game client can execute and complete the game object interaction instruction.
[0183] Reference Figure 7The figure below illustrates the logical processing of a SubEntity on both the server and client sides. When within the player's Area of Interest (AOI), the SubEntity's data is automatically synchronized to the client along with the Union. On the client side, the SubEntity is packaged as an independent Entity for player interaction. When communication with the server is required, it is handled through the Union. Player-SubEntity interactions fall into the following categories: 1. No server-side validation is required, and no data changes are made. This can be handled locally on the client side, executing only step 1. 2. Server-side validation is required, but no data changes are made. In this case, steps 1, 2, and 3 are executed. When data changes are possible, all steps must be executed. For other clients, only changes to the SubEntity need to be synchronized, executing only steps 4 and 5. Upon leaving the player's AOI, the SubEntity is destroyed from that client side, along with the Union.
[0184] In summary, in an embodiment of the present invention, the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0185] In this invention, on the server side, SubEntities do not exist independently but are instead managed by an Entity called a Union. When a SubEntity is located within the player's Area of Interest (AOI), the Union that manages it is typically also located within the player's AOI, enabling automatic synchronization through the engine's mechanisms. Once the Union is synchronized to the client, the SubEntity is repackaged as an independent Entity for player interaction. When communication with the server is required, it is handled through the Union.
[0186] The position of a Union can be the average of the positions of all its managed SubEntities, so as SubEntities are added or removed, the Union's position will also change. In some engines, static (position-invariant) SubEntities can also be replaced with a Union position-invariant version. This requires only a few simple modifications when inserting or deleting SubEntities. For example, when searching for accommodating Unions, only those within the Union's control range are searched; insertions and deletions do not change the Union's position.
[0187] The following describes a game display method provided by this application from the perspective of a game client. In order to avoid repetition, only a brief description is given here. The specific implementation process of this method can refer to the process described from the perspective of a game server.
[0188] Reference Figure 8 , shows a flowchart of the steps of another game display method provided by an embodiment of the present invention, which is applied to a game client, the game client is in communication with a game server, and the game server includes a control node, which stores data information of the controlled game objects. Specifically, the method may include the following steps:
[0189] Step 801: In response to a game scene switching operation on the game client, a corresponding game scene switching instruction is generated.
[0190] Step 802: Send the game scene switching instruction to the game server, so that the game server determines the target game scene that the game client needs to display and the first target control node contained in the target game scene according to the game scene switching instruction, and then synchronizes the first target control node to the game client.
[0191] Step 803: Display the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0192] In an optional embodiment of the present invention, the SubEntity can be packaged into an independent Entity on the game client for player interaction. Specifically, the following steps can be performed:
[0193] The first target game object is packaged into an independent game object to interact with the controlled virtual character.
[0194] Among them, the controlled virtual character is controlled through the game client.
[0195] In an embodiment of the present invention, a player can control a virtual character in a game through a game client. The player can control the controlled virtual character to interact with a first target game object through the game client. The first target game object can be packaged as an independent game object.
[0196] In an optional embodiment of the present invention, a new game object may be created on the game client by performing the following steps:
[0197] In response to the game object creation operation for the game client, a corresponding game object creation instruction is generated.
[0198] The game object creation instruction is sent to the game server, so that the game server finds a second target control node that can accommodate the second target game object to be created according to the game object creation instruction and stores the data information of the second target game object in the second target control node, and then synchronizes the second target control node to the game client.
[0199] The second target game object is added and displayed on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0200] In an optional embodiment of the present invention, a specified game object may be deleted on the game client. Specifically, the following steps may be performed:
[0201] In response to a game object deletion operation on the game client, a corresponding game object deletion instruction is generated.
[0202] The game object deletion instruction is sent to the game server, so that the game server determines the third target control node responsible for controlling the third target game object to be deleted according to the game object deletion instruction and synchronizes the third target control node to the game client after transferring the data information of the third target game object from the third target control node.
[0203] The third target game object is deleted and displayed on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0204] In an optional embodiment of the present invention, it is also possible to interact with the game object displayed by the game client, and specifically the following steps can be performed:
[0205] In response to the game object interaction operation for the game client, a corresponding game object interaction instruction is generated, and it is determined whether execution of the game object interaction instruction requires verification by the game server.
[0206] If verification by the game server is required, a fourth target control node responsible for controlling the synchronization of the fourth target game object required for interaction to the synchronization of the game client is determined according to the game object interaction instruction.
[0207] Based on the synchronized fourth target control node, a verification request is sent to the game server, so that the game server determines the fourth target control node corresponding to the synchronized fourth target control node, and then the fourth target control node performs verification according to the verification request.
[0208] After verification, the game object interaction instruction is executed.
[0209] In summary, in an embodiment of the present invention, the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0210] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0211] Reference Figure 9 , shows a structural block diagram of a game display device provided by an embodiment of the present invention, which is applied to a game server. The game server is in communication with a game client. The game server includes a control node. The control node stores data information of the controlled game objects. Specifically, the control node may include the following modules:
[0212] A first receiving and determining module 901 is configured to receive a game scene switching instruction sent by the game client, and determine a target game scene to be displayed by the game client according to the game scene switching instruction, and determine a first target control node included in the target game scene;
[0213] The first synchronization module 902 is used to synchronize the first target control node to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0214] In an embodiment of the present invention, the following further comprises:
[0215] A receiving and searching module, configured to receive a game object creation instruction sent by the game client, and search for a second target control node that can accommodate a second target game object to be created according to the game object creation instruction;
[0216] a storage module, configured to store the data information of the second target game object in the second target control node if the second target control node is found;
[0217] The second synchronization module is used to synchronize the second target control node to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0218] In an embodiment of the present invention, the following further comprises:
[0219] A creation and storage module, configured to create a new control node according to the location information of the second target game object if the second target control node cannot be found, and store the data information of the second target game object in the new control node;
[0220] The third synchronization module is used to synchronize the new control node to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized new control node.
[0221] In an embodiment of the present invention, the following further comprises:
[0222] The first adjustment module is used to adjust the position information of the second target control node according to the position information of the second target game object.
[0223] In an embodiment of the present invention, the control node has a corresponding control range, and the receiving and searching module includes:
[0224] The search and judgment submodule is used to search for a candidate second target control node based on the location information of the second target game object, the location information of the control node, and the control range, and when the candidate second target control node is found, determine whether the candidate second target control node can accommodate the second target game object.
[0225] In an embodiment of the present invention, the control node has a corresponding control quantity, and the search and judgment submodule includes:
[0226] A determination unit is used to determine that the candidate second target control node can accommodate the second target game object if the number of game objects currently controlled by the candidate second target control node is less than the number of game objects controlled by the candidate second target control node, and it is determined that after adjusting the position information of the candidate second target control node according to the position information of the second target game object, the game object controlled by the candidate second target control node is still within the control range of the candidate second target control node.
[0227] In an embodiment of the present invention, the first adjustment module includes:
[0228] a determination submodule, configured to determine central position information between the position information of the second target game object and the position information of the game object controlled by the second target control node;
[0229] An adjustment submodule is configured to adjust the position corresponding to the position information of the second target management and control node to the position corresponding to the center position information.
[0230] In an embodiment of the present invention, the creation and storage module includes:
[0231] A creation submodule is used to create the new control node at a position corresponding to the position information of the second target game object.
[0232] In an embodiment of the present invention, the following further comprises:
[0233] A second receiving and determining module is configured to receive a game object deletion instruction sent by the game client, and determine a third target control node responsible for controlling a third target game object to be deleted according to the game object deletion instruction;
[0234] A deletion and synchronization module is used to delete the data information of the third target game object from the third target control node, and after deletion, synchronize the third target control node to the game client, so that the game client deletes and displays the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0235] In an embodiment of the present invention, the following further comprises:
[0236] a deletion module, configured to delete the third target control node if data information of the game object under control does not exist in the third target control node after the deletion;
[0237] The second adjustment module is used to adjust the position information of the third target control node according to the position information of the remaining game objects in the third target control node if data information of the controlled game objects still exists in the third target control node after deletion.
[0238] In an embodiment of the present invention, the following further comprises:
[0239] a third receiving and determining module, configured to receive a verification request sent by the game client based on the synchronized fourth target control node, and determine a fourth target control node corresponding to the synchronized fourth target control node;
[0240] A verification module is used for the fourth target control node to perform verification according to the verification request, so that the game client executes the game object interaction instruction; the synchronized fourth target control node is a control node synchronized to the game client and responsible for controlling the fourth target game object required to interact in the game object interaction instruction.
[0241] In summary, in an embodiment of the present invention, the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0242] Reference Figure 10 , shows a structural block diagram of another game display device provided by an embodiment of the present invention, which is applied to a game client. The game client is in communication with a game server. The game server includes a control node. The control node stores data information of the controlled game objects. Specifically, the control node may include the following modules:
[0243] A first generating module 1001 is configured to generate a corresponding game scene switching instruction in response to a game scene switching operation on the game client;
[0244] A first sending module 1002 is configured to send the game scene switching instruction to the game server, so that the game server determines the target game scene to be displayed by the game client according to the game scene switching instruction and determines the first target control node included in the target game scene, and then synchronizes the first target control node to the game client;
[0245] The first display module 1003 is configured to display the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
[0246] In an embodiment of the present invention, the following further comprises:
[0247] A packaging module is used to package the first target game object into an independent game object to interact with a controlled virtual character; the controlled virtual character is controlled by the game client.
[0248] In an embodiment of the present invention, the following further comprises:
[0249] A second generating module is configured to generate a corresponding game object creation instruction in response to a game object creation operation on the game client;
[0250] A second sending module is configured to send the game object creation instruction to the game server, so that the game server finds a second target control node that can accommodate the second target game object to be created according to the game object creation instruction and stores data information of the second target game object in the second target control node, and then synchronizes the second target control node with the game client;
[0251] The second display module is used to add and display the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
[0252] In an embodiment of the present invention, the following further comprises:
[0253] A third generating module is configured to generate a corresponding game object deletion instruction in response to a game object deletion operation on the game client;
[0254] a third sending module, configured to send the game object deletion instruction to the game server, so that the game server determines, according to the game object deletion instruction, a third target control node responsible for controlling the third target game object to be deleted and deletes the data information of the third target game object from the third target control node, and then synchronizes the third target control node with the game client;
[0255] The third display module is configured to delete and display the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
[0256] In an embodiment of the present invention, the following further comprises:
[0257] a generation and determination module, configured to generate a corresponding game object interaction instruction in response to a game object interaction operation on the game client, and determine whether execution of the game object interaction instruction requires verification by the game server;
[0258] a determination module configured to determine, if verification by the game server is required, a fourth target control node responsible for controlling synchronization of a fourth target game object requiring interaction with the game client according to the game object interaction instruction;
[0259] a fourth sending module, configured to send a verification request to the game server based on the synchronized fourth target control node, so that the game server determines a fourth target control node corresponding to the synchronized fourth target control node, and the fourth target control node performs verification according to the verification request;
[0260] The verification module is used to execute the game object interaction instruction after passing the verification.
[0261] In summary, in an embodiment of the present invention, the control node in the game server is responsible for controlling the game objects, and the control node stores data information of the controlled game objects. When the game server receives a game scene switching instruction sent by the game client, it first determines the first target control node contained in the target game scene that the game client needs to display, and synchronizes the first target control node to the game client, thereby displaying the first target game object controlled by the first target control node on the game client. By adopting the above method, on the server side, the game object does not exist independently, but is managed by the control node. The data of the game object is stored in the control node and synchronized with the control node. Under this technology, the game object can be synchronized to the player client more efficiently, and there is no need to impose too many restrictions on its number, which ensures the performance of the game and improves the freedom of planning and design.
[0262] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0263] An embodiment of the present invention also provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned game display method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0264] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned game display method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0265] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0266] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0267] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0268] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0269] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0270] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0271] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0272] The above describes in detail a method for displaying a game, a device for displaying a game, an electronic device, and a computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for displaying a game, characterized in that: Applied to a game server, the game server is communicatively connected to a game client, the game server includes a control node, the control node is used to control game objects within the corresponding control range of the control node, or the control node is used to control any type of game object, or a type of control node is used to control a corresponding type of game object; The control node stores data information of the controlled game objects, and the method includes: Receive a game scene switching instruction sent by the game client, and determine a target game scene to be displayed by the game client according to the game scene switching instruction, and determine a first target control node included in the target game scene; The first target control node is synchronized to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
2. The method according to claim 1, characterized in that Also includes: Receive a game object creation instruction sent by the game client, and search for a second target control node that can accommodate a second target game object to be created according to the game object creation instruction; If the second target control node is found, the data information of the second target game object is stored in the second target control node; The second target control node is synchronized to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized second target control node.
3. The method according to claim 2, characterized in that Also includes: If the second target control node cannot be found, a new control node is created according to the location information of the second target game object, and the data information of the second target game object is stored in the new control node; The new control node is synchronized to the game client, so that the game client adds and displays the second target game object on the game client according to the data information of the second target game object stored in the synchronized new control node.
4. The method according to claim 2, characterized in that After storing the data information of the second target game object in the second target control node, the method further includes: Adjust the position information of the second target control node according to the position information of the second target game object.
5. The method according to claim 4, characterized in that The searching, according to the game object creation instruction, for a second target control node that can accommodate the second target game object to be created includes: Search for a candidate second target control node based on the location information of the second target game object, the location information of the control node, and the control range. When the candidate second target control node is found, determine whether the candidate second target control node can accommodate the second target game object.
6. The method according to claim 5, characterized in that The control node has a corresponding control quantity, and the determining whether the candidate second target control node can accommodate the second target game object includes: If the number of game objects currently controlled by the candidate second target control node is less than the number of game objects controlled by the candidate second target control node, and it is determined that after adjusting the position information of the candidate second target control node according to the position information of the second target game object, the game objects controlled by the candidate second target control node are still within the control range of the candidate second target control node, then it is determined that the candidate second target control node can accommodate the second target game object.
7. The method according to claim 4, characterized in that The adjusting the position information of the second target control node according to the position information of the second target game object includes: Determine center position information between the position information of the second target game object and the position information of the game object controlled by the second target control node; Adjust the position corresponding to the position information of the second target management and control node to the position corresponding to the center position information.
8. The method according to claim 3, characterized in that The creating a new control node according to the position information of the second target game object includes: Create the new control node at the position corresponding to the position information of the second target game object.
9. The method according to claim 1, characterized in that Also includes: Receive a game object deletion instruction sent by the game client, and determine a third target control node responsible for controlling the third target game object to be deleted according to the game object deletion instruction; The data information of the third target game object is deleted from the third target control node, and after deletion, the third target control node is synchronized to the game client, so that the game client deletes and displays the third target game object on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
10. The method according to claim 9, characterized in that After deleting the data information of the third target game object from the third target control node, the method further includes: If the data information of the controlled game object does not exist in the third target control node after deletion, the third target control node is deleted; If data information of the controlled game objects still exists in the third target control node after deletion, the position information of the third target control node is adjusted according to the position information of the remaining game objects in the third target control node.
11. The method according to claim 1, wherein Also includes: receiving a verification request sent by the game client based on the synchronized fourth target control node, and determining a fourth target control node corresponding to the synchronized fourth target control node; The fourth target control node performs verification according to the verification request, so that the game client executes the game object interaction instruction; the synchronized fourth target control node is the control node synchronized to the game client and responsible for controlling the fourth target game object required to interact in the game object interaction instruction.
12. A method for displaying a game, characterized in that: Applied to a game client, the game client is communicatively connected to a game server, the game server includes a control node, the control node is used to control game objects within the corresponding control range of the control node, or the control node is used to control game objects of any type, or a type of control node is used to control game objects corresponding to a type; The control node stores data information of the controlled game objects, and the method includes: In response to a game scene switching operation on the game client, generating a corresponding game scene switching instruction; Sending the game scene switching instruction to the game server, so that the game server determines the target game scene to be displayed by the game client according to the game scene switching instruction and determines the first target control node included in the target game scene, and then synchronizes the first target control node to the game client; The first target game object is displayed on the game client according to the data information of the first target game object stored in the synchronized first target control node.
13. The method according to claim 12, characterized in that After the game client displays the first target game object according to the data information of the first target game object stored in the synchronized first target control node, the method further includes: The first target game object is packaged into an independent game object to interact with the controlled virtual character; the controlled virtual character is controlled by the game client.
14. The method according to claim 12, characterized in that Also includes: In response to a game object creation operation for the game client, generating a corresponding game object creation instruction; Sending the game object creation instruction to the game server, so that the game server finds a second target control node that can accommodate the second target game object to be created according to the game object creation instruction and stores data information of the second target game object in the second target control node, and then synchronizes the second target control node to the game client; The second target game object is added and displayed on the game client according to the data information of the second target game object stored in the synchronized second target control node.
15. The method according to claim 12, characterized in that Also includes: In response to a game object deletion operation on the game client, generating a corresponding game object deletion instruction; Sending the game object deletion instruction to the game server, so that the game server determines a third target control node responsible for controlling the third target game object to be deleted according to the game object deletion instruction and synchronizes the third target control node with the game client after transferring data information of the third target game object from the third target control node; The third target game object is deleted and displayed on the game client according to the data information stored in the synchronized third target control node that does not contain the third target game object.
16. The method according to claim 12, characterized in that Also includes: In response to a game object interaction operation on the game client, generating a corresponding game object interaction instruction, and determining whether execution of the game object interaction instruction requires verification by the game server; If verification by the game server is required, determining, according to the game object interaction instruction, a fourth target control node responsible for controlling the synchronization of the fourth target game object required for interaction to the synchronization of the game client; Sending a verification request to the game server based on the synchronized fourth target control node, so that the game server determines a fourth target control node corresponding to the synchronized fourth target control node, and the fourth target control node performs verification according to the verification request; After verification, the game object interaction instruction is executed.
17. A game display device, characterized in that: Applied to a game server, the game server is communicatively connected to a game client, the game server includes a control node, the control node is used to control game objects within the corresponding control range of the control node, or the control node is used to control any type of game object, or a type of control node is used to control a corresponding type of game object; The control node stores data information of the controlled game objects, and the device includes: a first receiving and determining module, configured to receive a game scene switching instruction sent by the game client, and determine a target game scene to be displayed by the game client according to the game scene switching instruction, and determine a first target control node included in the target game scene; The first synchronization module is used to synchronize the first target control node to the game client, so that the game client displays the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
18. A game display device, characterized in that: Applied to a game client, the game client is communicatively connected to a game server, the game server includes a control node, the control node is used to control game objects within the corresponding control range of the control node, or the control node is used to control game objects of any type, or a type of control node is used to control game objects corresponding to a type; The control node stores data information of the controlled game objects, and the device includes: A first generating module, configured to generate a corresponding game scene switching instruction in response to a game scene switching operation on the game client; A first sending module is configured to send the game scene switching instruction to the game server, so that the game server determines the target game scene to be displayed by the game client according to the game scene switching instruction and determines the first target control node included in the target game scene, and then synchronizes the first target control node to the game client; The first display module is configured to display the first target game object on the game client according to the data information of the first target game object stored in the synchronized first target control node.
19. An electronic device, characterized in that: include: 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, the steps of a game display method as described in any one of claims 1-11 or 12-16 are implemented.
20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of a game display method according to any one of claims 1 to 11 or 12 to 16 are implemented.
Citation Information
Patent Citations
Game AOI management method and device and electronic equipment
CN111111189A
Game interface processing method and device, electronic equipment and readable medium
CN114130014A