Method and device for updating game view, electronic equipment and storage medium

By dividing the game scene into grids and maintaining a list of objects, the server updates the field of view information, solving the high load problem of the server in the game, realizing efficient field of view updates and data sharing, and reducing the operating pressure of the server.

CN117427335BActive Publication Date: 2026-08-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311434034.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2026-08-25
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

In games, servers face high loads of data synchronization and operational pressure when handling a large number of virtual objects and shared view, especially when multiple clients need to synchronize large amounts of data.

Method used

By dividing the game scene into multiple scene grids and maintaining an object list set, including the relationships between virtual objects, scene grids, and view channels, the server receives a view update request, obtains the location information of the target virtual object, updates the object list set, and sends the view information to the corresponding client to achieve the update of the game's view.

Benefits of technology

It effectively reduces the detection overhead of the server during the movement of virtual objects, lowers the server's operating pressure, and enables data sharing through the vision channel, reducing the pressure of data interaction and synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117427335B_ABST
    Figure CN117427335B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a game view updating method and device, electronic equipment and storage medium, and relate to the technical field of games. The method comprises: receiving a view updating request sent by a first client, the view updating request being a request generated by the first client in response to movement of a target virtual object in a game scene, the game scene being divided into a plurality of scene grids; based on the view updating request, obtaining position information of the target virtual object in the game scene and an object list set corresponding to the target virtual object, the object list set recording at least an association relationship between a virtual object, a scene grid and a view channel, and clients registered in the same view channel receiving data of the same game view; updating the object list set according to the position information, and sending view information corresponding to the target virtual object to a second client according to an updating result, the second client being configured to update the game view according to the view information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method for updating game field of view, a device for updating game field of view, an electronic device, and a computer-readable storage medium. Background Technology

[0002] In games, Area of ​​Interest (AOI) is used to track the position and activity of virtual objects in the game world and only send relevant information to them. In a given game, the game scene is divided into equally sized grids, each containing a certain number of virtual objects. As these virtual objects change within their grids, the server sends corresponding data to the client in real time, allowing the client to present appropriate game content based on the received data. During this process, as players control virtual objects to move within the game scene, the server needs to detect and update the virtual objects in the corresponding grids in a timely manner. When there are many virtual objects in a grid, this undoubtedly increases the server's workload. Furthermore, when there is shared game view, the server needs to update the game view of multiple clients simultaneously. During the update process, due to the number of clients and virtual objects, the amount of data that needs to be synchronized is large, significantly increasing the server's synchronization pressure. Summary of the Invention

[0003] The present invention provides a method, apparatus, electronic device, and computer-readable storage medium for updating game vision, in order to solve or partially solve the problem of high server operating pressure during game vision update.

[0004] This invention discloses a method for updating the field of view in a game, comprising:

[0005] Receive a view update request sent by a first client, the view update request being a request generated by the first client in response to the movement of a target virtual object in the game scene, the game scene being divided into multiple scene grids;

[0006] Based on the vision update request, the location information of the target virtual object in the game scene is obtained, as well as the object list set corresponding to the target virtual object. The object list set records at least the association between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data.

[0007] The object list is updated based on the location information, and the field of view information corresponding to the target virtual object is sent to the second client based on the update result. The second client is a client that has the field of view of the target virtual object and is used to update the game field of view based on the field of view information.

[0008] This invention discloses a device for updating the field of view in a game, comprising:

[0009] The request receiving module is used to receive a view update request sent by a first client. The view update request is a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene is divided into multiple scene grids.

[0010] The information acquisition module is used to acquire the position information of the target virtual object in the game scene based on the vision update request, as well as the object list set corresponding to the target virtual object. The object list set records at least the association relationship between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data.

[0011] The vision update module is used to update the object list set according to the location information, and send the vision information corresponding to the target virtual object to the second client according to the update result. The second client is a client that has the vision of the target virtual object, and is used to update the game vision according to the vision information.

[0012] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0013] The memory is used to store computer programs;

[0014] When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.

[0015] This invention also discloses a computer-readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.

[0016] The embodiments of the present invention have the following advantages:

[0017] In this embodiment of the invention, it can be applied to a server. When the game view displayed by the client needs to be updated, the server can receive a view update request sent by a first client. The view update request can be a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene can be divided into multiple scene grids. Then, based on the view update request, the server can obtain the position information of the target virtual object in the game scene, as well as a list of objects corresponding to the target virtual object. The object list at least records the association between the virtual object, the scene grid, and the view channel. The view channel can be a data sharing interface, where clients registered with the same view channel can receive data from the same game view. Then, the server can update the object list based on the position information. The system updates the view of the target virtual object and sends the view information to the second client, which has the view of the target virtual object. This allows each second client to update the game view based on the view information. During the update process, the server maintains multiple object lists. When a view update request is received from a client, each object list can be updated based on the virtual object's position in the game. This achieves both updating the game view presented to the client based on the update results and managing the position and activities of virtual objects in the game scene through each object list. This effectively reduces the server's detection overhead during virtual object movement and lowers the server's operating pressure. Attached Figure Description

[0018] Figure 1 This is a flowchart of the steps of a game vision update method provided in an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the communication architecture provided in an embodiment of the present invention;

[0020] Figure 3 This is a schematic diagram of the communication architecture provided in an embodiment of the present invention;

[0021] Figure 4 This is a timing diagram of AOI information transmission provided in an embodiment of the present invention;

[0022] Figure 5 This is a structural block diagram of a game vision update device provided in an embodiment of the present invention;

[0023] Figure 6 This is a block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] As an example, in some games, such as SLG (Strategy-based Games) and MMORPG (Massively Multiplayer Online Role-Playing Games), players can often control virtual objects within the game. In SLG games, players can control multiple virtual objects simultaneously, while in MMORPGs, players can control only one. In SLG games, the Area of ​​Interest (AOI) is used to allow players to understand the real-time status of virtual objects controlled by other players or game AI (Artificial Intelligence) on the sandbox map, enabling better strategy development and control. In MMORPGs, players control only one virtual object within the game scene, their field of vision limited to that object's view. Correspondingly, these virtual objects have corresponding field-of-view sizes, while the player's view encompasses the entire large game map, allowing them to understand the real-time status of the map through the view provided by these virtual objects. Furthermore, large-scale online SLG games often have a need for shared vision, such as between alliances, nations, or federations.

[0026] In related technologies, the implementation of Area of ​​Interest (AOI) in games typically involves dividing the entire game scene into grids of equal size. Each grid region contains a certain number of virtual objects, and a list of objects within the grid is maintained. For each virtual object, an interest list is maintained, containing all virtual objects within its field of view. When a virtual object moves into a grid, it retrieves all virtual objects on that grid (excluding itself), checks the distance of each one to see if it is within its field of view, and compares it with its own interest list to identify newly added virtual objects and those that need to be moved out of view, updating its interest list accordingly. For each object within a grid, it checks whether its field of view can see newly added virtual objects and updates the interest lists of those objects. Based on each virtual object's interest list, game status information from its current grid and surrounding grids is periodically sent to it. This information may include the positions, actions, and states of other virtual objects.

[0027] However, in the above process, compared to directly comparing all virtual objects in the game scene, dividing the game into grids significantly reduces the number of virtual objects that need to be compared. But when virtual objects move, it's still necessary to compare each virtual object in the grid according to its field of view to determine if the newly added virtual object can see the virtual objects in the original grid. For each virtual object in the original grid, its distance from the newly added virtual object's field of view also needs to be checked to determine if the newly added virtual object can be seen. When there are many virtual objects in the grid, this puts significant pressure on the server. Furthermore, considering the characteristic of SLG games where players have multiple virtual objects in their field of view on the large map, this solution cannot effectively handle situations where multiple virtual objects have overlapping fields of view. Additionally, when implementing the vision-sharing requirements of alliances in SLG games, this solution requires the server to send protocols to each client in the alliance to achieve data synchronization, resulting in significant server synchronization pressure. Moreover, this solution needs to frequently send the status information of virtual objects in the grid where the virtual object is located and the surrounding grids within its field of view, especially in SLG games where each player has multiple virtual objects on the map, the amount of data that needs to be synchronized will increase significantly.

[0028] In this invention, the system can be applied to a server. When the game view displayed by the client needs to be updated, the server can receive a view update request sent by the first client. This view update request can be a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene can be divided into multiple scene grids. Then, based on the view update request, the server can obtain the position information of the target virtual object in the game scene, as well as a list of objects corresponding to the target virtual object. This object list at least records the association between the virtual object, the scene grid, and the view channel. The view channel can be a data sharing interface, allowing clients registered with the same view channel to receive data from the same game view. The server can then update the object list based on the position information. The system updates the view of the target virtual object and sends the view information to the second client, which has the view of the target virtual object. This allows each second client to update the game view based on the view information. During the update process, the server maintains multiple object lists. When a view update request is received from a client, each object list can be updated based on the virtual object's position in the game. This achieves both updating the game view presented to the client based on the update results and managing the position and activities of virtual objects in the game scene through each object list. This effectively reduces the server's detection overhead during virtual object movement and lowers the server's operating pressure.

[0029] Furthermore, for SLG-type games, by counting the corresponding field of view channels in the grid channel list, the overlapping of multiple virtual objects' fields of view can be handled efficiently and quickly.

[0030] Furthermore, regarding view sharing, multiple clients can register to the corresponding view channel. The server can then synchronize the view information to multiple clients by sending the corresponding view information to the view channel, thereby reducing data interaction between the server and clients and lowering the server's data transmission and synchronization pressure.

[0031] Furthermore, the client performs the corresponding calculations for changes in the state and movement path of virtual objects in the game, distributing the computational burden among the various clients. The synchronization of visual information is only triggered when a virtual object undergoes a state change or a movement path change, which greatly reduces the frequency of information synchronization between the client and the server, and further reduces the server's operating pressure.

[0032] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, some technical features involved in the embodiments of the present invention are explained and described below:

[0033] Client: A game application installed on a mobile device or computer.

[0034] Server: In online games, the server that the client connects to is used to verify the client's identity, implement gameplay, and store data.

[0035] Gateway: A service that accepts client connections and forwards data between the client and the game server.

[0036] MMORPG (Massively Online Role-Playing Game) is a type of online game that allows a large number of players to interact in a virtual world and play fictional characters.

[0037] SLG type games: Strategy games, such as those with a sandbox map, where players develop strategies, manage virtual resources, build virtual bases, recruit virtual objects, and command virtual objects to fight on the sandbox map and ultimately achieve victory.

[0038] AOI: In games, AOI refers to a technology used to track the location and activity of virtual objects in the game world and send relevant information only to them.

[0039] The object list set is used to record the relationships between virtual objects, scene meshes, and view channels.

[0040] Virtual objects can be objects that players control within a game environment.

[0041] Scene grids, based on the characteristics of the game map scene and the characteristics of the virtual objects' actions in the game scene, can divide the game scene into N*N or N*M scene grids. Each scene grid can be a grid of the same size, and the grid size is the smallest unit of view of the virtual objects.

[0042] A vision channel can be a port for receiving data. Multiple clients registered on the same vision channel can receive the same vision information and share the same game vision.

[0043] The game field of view refers to the game screen presented to the player by the client. As the state and / or movement path of virtual objects in the game scene change, the game field of view can change in real time.

[0044] Reference Figure 1 The diagram illustrates a flowchart of a method for updating the game's field of view according to an embodiment of the present invention, which may specifically include the following steps:

[0045] Step 101: Receive a view update request sent by the first client. The view update request is a request generated by the first client in response to the movement of the target virtual object in the game scene. The game scene is divided into multiple scene grids.

[0046] During gameplay, players can control a target virtual object to move within the game scene from the first client. As the virtual object moves, its field of view changes, requiring the first client to update its view in real time. Clients with the target virtual object's field of view also need to update their views synchronously. Specifically, in response to the target virtual object's movement, the first client generates a field of view update request and sends it to the server. The server then processes the data accordingly to update the field of view for the first client and other clients.

[0047] In one feasible implementation, the server can receive a view update request sent by the first client in response to a change in the state or movement path of the target virtual object. The view update request includes the target view information corresponding to the target virtual object. The target view information includes at least the object type of the target virtual object, its current position in the game scene, its current state, its movement speed, and its movement path.

[0048] Among these, the object type can be the type of virtual object in the game as determined by the game genre. For example, in an SLG game, the object type can include infantry, cavalry, artillery, etc., while in an MMORPG game, the object type can include warrior, archer, support, sustain, mage, etc.; the current position can be the identifier of the scene grid. Each scene grid in the game scene can correspond to a coordinate, which can be used to quickly locate the position of the virtual object in the game scene; the current state can be the state of the virtual object in the game scene, including moving, idle, combat, etc.; the movement speed can be the movement speed of the virtual object in the game scene; and the movement path can be the movement path of the virtual object in the game scene. With the above information, the AOI information (i.e., field of view information) of the virtual object in the game can be determined.

[0049] Optionally, to reduce the number of broadcasts and alleviate server load, the information broadcast for virtual object A includes entity type, current location, current state, speed, and movement path. After receiving the data for virtual object A, the client creates the virtual object in the game scene and automatically calculates and drives its behavior based on its state and movement path. The server only synchronizes new data when the virtual object's state or movement path changes. The client then recalculates and re-drives its behavior based on the received data. This allows the client to perform the necessary calculations for changes in the virtual object's state and movement path, distributing the computational burden across all clients. The synchronization of visual information is only triggered when a virtual object's state or movement path changes, significantly reducing the frequency of information synchronization between the client and server, further lowering the server's operating load.

[0050] In one feasible implementation, refer to Figure 2 , 3 A schematic diagram of the communication architecture provided in an embodiment of the present invention is shown, and Figure 4This diagram illustrates the timing of AOI information transmission according to an embodiment of the present invention. Specifically, a client connection list is maintained in the gateway. This client connection list is a collection of multiple client lists, recording the client list corresponding to the view channel ID. When a client logs in, it registers its view channel ID with the gateway according to predetermined rules, and the gateway updates the client list corresponding to the view channel ID. In the server, all server virtual objects of the same client will use the view channel ID as their AOI view ID. Clients 1, 2, and 3 correspond to view channels a and b, respectively. After logging in, each client can register its own view channel ID with the gateway. When the server generates AOI1 information to be sent to view channel a, the server sends it to view channel a of the gateway. The gateway, by querying the registered view channel list, sends the AOI1 information to clients 1 and 3. When the server generates AOI2 information to be sent to view channel b, the server sends it to view channel b of the gateway. The gateway, by querying the registered view channel list, sends the AOI2 information to client 2.

[0051] Step 102: Based on the vision update request, obtain the position information of the target virtual object in the game scene, and the object list set corresponding to the target virtual object. The object list set records at least the association between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data.

[0052] For the server, while dividing the game scene into several scene grids, multiple different object list sets can be maintained, including a virtual object list set, a grid channel list set, and a virtual object channel chat list set. Specifically, the virtual object channel list set can include a list of virtual object channels corresponding to each virtual object, recording all view channels currently in the field of view of a given virtual object; the virtual object list set includes a list of virtual objects corresponding to each scene grid, recording all virtual objects currently located within a given scene grid; and the grid channel list set includes a list of grid channels corresponding to each scene grid, recording all view channels currently in the field of view of a given scene grid.

[0053] In one example, a virtual object list set is used, consisting of multiple virtual object lists. Each virtual object corresponds to a unique scene grid at the current moment. This list is used to record the IDs of all virtual objects on that scene grid at the current moment, corresponding to the scene grid ID. For example:

[0054] Scene Grid A: Virtual Object ①, Virtual Object ②, Virtual Object ③

[0055] Scene Grid B: Virtual Object ④, Virtual Object ⑤, Virtual Object ⑥

[0056] A grid view channel list set, consisting of multiple grid view channel lists, is used to record the list of view channel IDs that currently possess the view of a scene grid ID. For example:

[0057] Scene Grid A: View Channel a, View Channel b, View Channel c

[0058] Scene Grid B: View Channel d, View Channel e, View Channel f

[0059] A virtual object view channel list set, consisting of multiple view channel lists, is used to record the list of view channel IDs that currently have the view of the virtual object, corresponding to that virtual object ID. For example:

[0060] Virtual objects ①: Vision Channel a, Vision Channel b, Vision Channel c

[0061] Virtual objects ②: Vision channel d, vision channel e, vision channel f

[0062] When virtual object ① moves into a scene grid, the virtual object list set is updated, along with the scene grid ID to which virtual object ① belongs. Then, according to the configured rules, a new visible area is obtained. For the newly added visible area, the scene grid ID of the new area is found in the grid view channel list set, and the corresponding grid view channel list is updated. Next, in the virtual object list set, the list of virtual object IDs corresponding to the scene grid ID of the new area is found. For each virtual object ID, its corresponding view channel list in the virtual object view channel list set is found. If the view channel to which virtual object ① belongs is already in the virtual object view channel list, it means that the virtual object has been seen by virtual object ①. If it is not in the view channel list, it means that it has not yet been seen, and the virtual object needs to be broadcast to the view channel to which virtual object ① belongs, and the view channel to which virtual object ① belongs is updated in the virtual object view channel list corresponding to that virtual object ID. For previously visible areas that have lost visibility, the scene grid ID of the lost-visibility area is also found, and the corresponding grid view channel list is updated.

[0063] Furthermore, clients registered in the same vision channel can share the same game vision. For example, data seen by the virtual object ① controlled by player 1 through their client can be sent by the server to vision channel a. If player 2's client is also registered in vision channel a, then all data sent to vision channel a will be received by player 2's client. Therefore, it is equivalent to player B seeing the vision of the virtual object ① controlled by player 1. Thus, according to predetermined rules, the client registers in a vision channel on the gateway and subscribes to a vision channel that broadcasts server messages. A vision channel can contain one or more clients. During vision sharing, the server can assign any virtual object to a vision channel according to set rules. For example, to achieve vision sharing among allies, all players' clients in the alliance will register in the same alliance vision channel, and all virtual objects of all players in the alliance will also belong to the same alliance vision channel, thereby achieving vision sharing.

[0064] Optionally, for virtual objects in the game, their AOI (Area of ​​Interest) field of view can be defined. Depending on the size of the field of view, it can be the scene grid where the virtual object is located, or it can be several scene grids nearby (for example, the AOI field of view can be centered on the scene grid where the virtual object is located, and the surrounding 8 scene grids are the AOI field of view). This invention does not limit this.

[0065] Step 103: Update the object list set according to the location information, and send the field of view information corresponding to the target virtual object to the second client according to the update result. The second client is a client that has the field of view of the target virtual object and is used to update the game field of view according to the field of view information.

[0066] In this embodiment of the invention, the location information can characterize the displacement changes of the target virtual object in the game scene. The displacement changes can include no displacement, moving within the same scene grid, or crossing from one scene grid to another. The server can then update each object list set according to the location information and send the field of view information corresponding to the target virtual object to the second client based on the update results. This allows the second client to update the game field of view based on the received field of view information. On the one hand, it realizes the updating of the game field of view presented by the client based on the update results. On the other hand, it manages the position and activities of virtual objects in the game scene through each object list set, effectively reducing the detection consumption of the server during the movement of virtual objects and reducing the server's operating pressure.

[0067] The second client can include the first client and other clients that have a view of the target virtual object, that is, clients that can see the target virtual object in the game's field of view. For example, as the target virtual object moves, clients that go from not having a view of the target virtual object to having a view of the target virtual object, clients that consistently have a view of the target virtual object, and clients that go from having a view of the target virtual object to losing a view of the target virtual object, etc. These clients need to update their game field of view in a timely manner as the state of the target virtual object changes in the game scene.

[0068] In one feasible implementation, if the location information indicates that the target virtual object is moving within the current scene grid, the server can obtain the first virtual object channel list corresponding to the target virtual object. The first virtual object channel list includes at least one first field of view channel. The server can also obtain the target field of view information of the target virtual object in the game scene and send the target field of view information to a second client that has registered a first field of view channel. The second client is used to update the game field of view based on the target field of view information.

[0069] For example, suppose a player manipulates a virtual object ① in the game scene, and the virtual object ① corresponds to the field of view channel a. When the virtual object ① moves within the scene grid A, its position does not change (no movement across scene grids occurs), but its action state changes (e.g., moving at a constant speed in the corresponding direction). After receiving the field of view update request from the client, the server can obtain the virtual object channel list Q1 corresponding to the virtual object ① from the virtual object channel list set (assuming it includes field of view channels b, c, d, etc.), and then send the AOI information corresponding to the virtual object ① to field of view channels b, c, d, etc., so that clients registered with field of view channels b, c, and d can receive the AOI information corresponding to the virtual object ① and then update the game field of view based on the AOI information.

[0070] In another feasible implementation, if the location information indicates that the target virtual object moves from a first scene grid to a second scene grid in the game scene, the server can obtain the first view channel to which the target virtual object belongs, the list of first virtual objects corresponding to the first scene grid, and the list of second virtual objects corresponding to the second scene grid. The first virtual object list includes at least one first virtual object, and the second virtual object list includes at least one second virtual object. Then, the server obtains the first view information corresponding to the first virtual object and the second view information corresponding to the second virtual object, and sends the first view information and second view information to a second client that has registered the first view channel. The second client is used to perform [further actions] based on the first view information and the second view information. The game's field of view is updated so that when a target virtual object moves from the first field of view grid to the second field of view grid, the first virtual object located in the first field of view grid disappears from the target virtual object's field of view, and the second virtual object located in the second field of view grid enters the target virtual object's field of view. At the same time, based on field of view sharing, the server can send the corresponding first field of view information and second field of view information to the first field of view channel corresponding to the target virtual object, so that clients in the same field of view channel can remove the first virtual object from their field of view and display the second virtual object, etc. While updating the field of view, the server can achieve field of view synchronization by sending the corresponding AOI information to a field of view channel, effectively reducing data interaction with clients and reducing the pressure of field of view synchronization.

[0071] For the server, in addition to updating the client's game view, the object list also needs to be updated accordingly. Specifically, the server can obtain the first grid channel list corresponding to the first scene grid, and then decrement the count of the first view channel in the first grid channel list. If the count of the first view channel in the first grid channel list is 0, the first view channel is deleted from the first grid channel list. If the count of the first view channel in the first grid channel list is not 0, the server obtains the second virtual object channel list corresponding to each first virtual object, then deletes the first view channel from the second virtual object channel list, generates view update information for the first view channel, and then sends the view update information to the second client that registered the first view channel. The second client is used to delete the first virtual object in the game scene according to the view update information. Thus, by counting the view channels in the grid channel list, the server can efficiently handle the overlapping view of multiple virtual objects with the same view channel, reduce the performance overhead of the server traversing virtual objects, and reduce the server's operating pressure.

[0072] For example, virtual objects ① and ② both have a registered view channel of 'a'. Then, virtual objects ① and ② simultaneously move to position H in the scene grid and gain view of scene grid H. At this point, the count of view channel 'a' in scene grid H is 2. Then, virtual object A moves and loses view of scene grid H, so the count of view channel 'y' in scene grid H becomes 1. View channel 'y' still has view of scene grid H. When virtual object B also moves and loses view of scene grid H, the count of view channel 'y' in scene grid H becomes 0, indicating that view channel 'y' has lost view of scene grid H.

[0073] Correspondingly, the second grid channel list corresponding to the second scene grid also needs to be updated accordingly. Specifically, the server can obtain the second grid channel list corresponding to the second scene grid. If the first view channel is in the second grid channel list, the count of the first view channel in the second grid channel list is incremented by one; if the first view channel is not in the second grid channel list, the first view channel is added to the second grid channel list. In this way, by adding the view channel corresponding to the target virtual object to the second grid channel list corresponding to the second scene grid, the AOI information of the target virtual object can be broadcast to the corresponding view channel.

[0074] Furthermore, when the position of the target virtual object changes, in addition to the change in its own field of view, other virtual objects will also experience corresponding changes in their field of view. For the second virtual object in the second scene grid, the server can obtain the third virtual object channel list corresponding to the second virtual object, and then add the first field of view channel to the third virtual object channel list. By adding the first field of view channel to the corresponding virtual object channel list, it is marked that the second virtual object in the second scene grid is owned by the first field of view channel. That is, clients that have registered the first field of view channel can all display the second virtual object.

[0075] Furthermore, if the second grid channel list includes the corresponding second field of view channel, the server can also obtain the target virtual object channel list corresponding to the target virtual object. If the second field of view channel is not in the target virtual object channel list, the second field of view channel is added to the target virtual object channel list, and then the target field of view information is sent to the second client that has registered the second field of view channel. The second client is used to update the game field of view based on the target field of view information. By adding the field of view channel with the second scene grid field of view to the virtual object channel list corresponding to the target virtual object, the server records which field of view channels own the target virtual object so that the corresponding field of view channel can receive the field of view information corresponding to the target virtual object, and then the client presents the corresponding game field of view based on the field of view information.

[0076] Furthermore, the server can also delete the target virtual object from the first virtual object list and add it to the second virtual object list, thereby recording the changes of the virtual object in different scene grids, so that the server can manage the AOI information of the virtual object.

[0077] It should be noted that the embodiments of the present invention include, but are not limited to, the examples described above. It is understood that those skilled in the art can make further settings according to actual needs under the guidance of the ideas in the embodiments of the present invention, and the present invention does not limit such settings.

[0078] In this embodiment of the invention, it can be applied to a server. When the game view displayed by the client needs to be updated, the server can receive a view update request sent by a first client. The view update request can be a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene can be divided into multiple scene grids. Then, based on the view update request, the server can obtain the position information of the target virtual object in the game scene, as well as the object list set corresponding to the target virtual object. The object list set records at least the association relationship between the virtual object, the scene grid, and the view channel. The view channel can be a data sharing interface, where clients registered with the same view channel can receive data from the same game view. Then, the server can update the object list set according to the position information. The system updates the view information of the target virtual object and sends it to the second client, which displays the target virtual object. This allows each second client to update its view of the game based on the view information. During the update process, the server maintains multiple object lists. Upon receiving a view update request from a client, the server can update each object list based on the virtual object's position in the game. This achieves both updating the game view presented to the client based on the update results and managing the position and activity of virtual objects in the game scene through each object list. This effectively reduces the server's detection overhead during virtual object movement and lowers the server's operating pressure.

[0079] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, an example is provided below for illustration:

[0080] s1: The server styles the large map scene into an N*N scene grid, and the size of the scene grid is the smallest unit of the virtual object's AOI field of view.

[0081] s2: The server maintains three object list sets: 1) Virtual object list set, which consists of multiple virtual object lists. Each virtual object corresponds to a unique scene grid at the current moment and is used to record the list IDs of all virtual objects on that scene grid at the current moment, corresponding to the scene grid ID; 2) Scene grid channel list set, which consists of multiple view channel lists and is used to record the list of view channel IDs that have the view of that scene grid at the current moment, corresponding to the scene grid ID; 3) Virtual object channel list set, which consists of multiple view channel lists and is used to record the list of view channel IDs that have the view of that virtual object at the current moment, corresponding to the virtual object ID.

[0082] s3: For any virtual object, define its AOI field of view visibility range. Depending on the size of the field of view, it can be the scene grid where the virtual object is located, or several scene grids nearby where the virtual object is located.

[0083] s4: Define the field of view provided by any virtual object, represented by the field of view channel ID. The ID of the field of view channel is the field of view channel ID registered on the gateway by the client to which the virtual object belongs. For example, if the field of view channel ID of virtual object ① is y, and the scene mesh G is within the visible range of virtual object ①, then it means that the scene mesh G is seen by the field of view channel y.

[0084] s5: The player manipulates virtual object ① on the world map. If the action state of virtual object ① does not change and it does not leave the original scene grid, no action is taken. If the action state of virtual object ① changes, execute s13. If virtual object ① leaves scene grid G ​​and enters a new scene grid H, execute s6.

[0085] s6: Based on the field of view of the virtual object defined in s3, and according to the size of the field of view of the virtual object ①, obtain the scene meshes that have been added to the field of view and the scene meshes that have been lost from the field of view. Execute s7 for the scene meshes that have been added to the field of view, and execute s9 for the scene meshes that have been lost from the field of view.

[0086] s7: The view channel ID of virtual object ① is y. For the newly added view scene mesh H, obtain the view channel list Q2 corresponding to scene mesh H from the scene mesh channel list set. If y is already in the view channel list Q2, it means that the y view channel already has the view of scene mesh H. Increment the count of y in the view channel list Q2 by 1, and then execute s9; if y is not in the view channel list Q2, add y to the view channel list Q2, increment the count of y in the view channel list Q2 by 1, and then execute s8.

[0087] s8: Obtain the virtual object list Q3 on the scene mesh H from the virtual object list set. Synchronize the AOI data of each virtual object in the virtual object list Q3 to the view channel y, update the virtual object channel list set of each virtual object, and add the view channel y to the view channel list of the corresponding virtual object. Execute s11.

[0088] s9: The virtual object's view channel ID is y. The scene mesh H that has lost view is retrieved from the scene mesh channel list set. The view channel list Q5 corresponding to scene mesh H is obtained. y must be in the view channel list Q5. Then, the count of y in the view channel list Q5 is decremented by 1. If the count of y in the view channel list Q5 is not 0, then s11 is executed. If the count of y in the view channel list Q5 becomes 0, then y is removed from the view channel list Q5, and s10 is executed.

[0089] s10: Obtain the virtual object list Q6 on the scene mesh G from the virtual object list set. Synchronize each virtual object in the virtual object list Q6 to the view channel y and delete virtual object ①. Delete the virtual object channel list of each virtual object in the virtual object list Q6 from the view channel y. Execute s11.

[0090] s11: Remove virtual object ① from the virtual object list of scene mesh H and add it to the virtual object list of scene mesh G. Execute s12.

[0091] s12: Obtain the view channel list Q7 of scene mesh G from the scene mesh channel list set, and obtain the view channel list Q8 of virtual object ① from the virtual object channel list set. For each view channel in Q7, if it is already in Q8, no processing is needed; otherwise, synchronize the AOI data of virtual object ① to that view channel and add that view channel to Q8. Return to execute s5.

[0092] s13: Get the list of vision channels for virtual object ① in the virtual object channel list set, synchronize the AOI data of virtual object ① to each vision channel in the vision channel list, and return s5.

[0093] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0094] Reference Figure 5 The diagram illustrates a structural block diagram of a game vision update device provided in an embodiment of the present invention, which may specifically include the following modules:

[0095] The request receiving module 501 is used to receive a view update request sent by the first client. The view update request is a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene is divided into multiple scene grids.

[0096] The information acquisition module 502 is used to acquire, based on the vision update request, the position information of the target virtual object in the game scene, and the object list set corresponding to the target virtual object. The object list set records at least the association relationship between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data.

[0097] The vision update module 503 is used to update the object list set according to the location information, and send the vision information corresponding to the target virtual object to the second client according to the update result. The second client is a client that has the vision of the target virtual object, and is used to update the game vision according to the vision information.

[0098] In some feasible implementations, the object list set includes a virtual object channel list set, which includes a list of virtual object channels corresponding to each virtual object. The virtual object channel list records all view channels that currently have the view of a certain virtual object. The view update module 503 is specifically used for:

[0099] If the location information indicates that the target virtual object is moving in the current scene grid, then the first virtual object channel list corresponding to the target virtual object is obtained, and the first virtual object channel list includes at least one first field of view channel;

[0100] Obtain the target field of view information of the target virtual object in the game scene, and send the target field of view information to a second client that has registered the first field of view channel. The second client is used to update the game field of view based on the target field of view information.

[0101] In some feasible implementations, the object list set further includes a virtual object list set, which includes a list of virtual objects corresponding to each scene grid. The virtual object list records all virtual objects currently located in a certain scene grid. The view update module 503 is specifically used for:

[0102] If the location information indicates that the target virtual object moves from the first scene grid to the second scene grid in the game scene, then the first field of view channel to which the target virtual object belongs, the first virtual object list corresponding to the first scene grid, and the second virtual object list corresponding to the second scene grid are obtained. The first virtual object list includes at least one first virtual object, and the second virtual object list includes at least one second virtual object.

[0103] Obtain the first field of view information corresponding to the first virtual object and the second field of view information corresponding to the second virtual object, and send the first field of view information and the second field of view information to the second client that has registered the first field of view channel. The second client is used to update the game field of view based on the first field of view information and the second field of view information.

[0104] In some feasible implementations, the object list set further includes a grid channel list set, which includes a list of grid channels corresponding to each scene grid. The grid channel list records all view channels that currently possess the view of a certain scene grid. The view update module 503 is further specifically used for:

[0105] Obtain the list of channels for the first grid corresponding to the first scene grid;

[0106] Decrement the count of the first view channel by one in the first grid channel list;

[0107] If the count corresponding to the first field of view channel in the first grid channel list is 0, then the first field of view channel is deleted from the first grid channel list;

[0108] If the count corresponding to the first view channel in the first grid channel list is not 0, then obtain the second virtual object channel list corresponding to each of the first virtual objects;

[0109] The first field of view channel will be deleted from the second virtual object channel list, and field of view update information will be generated for the first field of view channel.

[0110] The field of view update information is sent to a second client that has registered the first field of view channel. The second client is used to delete the first virtual object in the game scene according to the field of view update information.

[0111] In some feasible implementations, the view update module 503 is further used for:

[0112] Obtain the list of channels for the second grid corresponding to the second scene grid;

[0113] If the first field of view channel is located in the second grid channel list, then increment the count corresponding to the first field of view channel in the second grid channel list by one;

[0114] If the first view channel is not in the second grid channel list, then the first view channel is added to the second grid channel list.

[0115] In some feasible implementations, the view update module 503 is further used for:

[0116] Retrieve the channel list of the third virtual object corresponding to the second virtual object;

[0117] Add the first view channel to the third virtual object channel list.

[0118] In some feasible implementations, the second grid channel list includes a second field of view channel, and the field of view update module 503 is further used for:

[0119] Obtain the target virtual object channel list corresponding to the target virtual object;

[0120] If the second view channel is not in the target virtual object channel list, then add the second view channel to the target virtual object channel list;

[0121] The target vision information is sent to a second client that has registered the second vision channel. The second client is used to update the game vision based on the target vision information.

[0122] In some feasible implementations, the view update module 503 is further used for:

[0123] The target virtual object is removed from the first virtual object list and added to the second virtual object list.

[0124] In some feasible implementations, the request receiving module 501 is specifically used for:

[0125] In response to a change in the state or movement path of a target virtual object, a field of view update request is received from a first client. The field of view update request includes target field of view information corresponding to the target virtual object. The target field of view information includes at least the object type of the target virtual object, its current position in the game scene, its current state, its movement speed, and its movement path.

[0126] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0127] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described game vision update method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0128] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described game vision update method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0129] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention.

[0130] The electronic device 600 includes, but is not limited to, components such as: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 310, and a power supply 311. Those skilled in the art will understand that the electronic device structure involved in the embodiments of the present invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the electronic device includes, but is not limited to, mobile phones, tablet computers, laptop computers, PDAs, in-vehicle terminals, wearable devices, and pedometers.

[0131] It should be understood that, in this embodiment of the invention, the radio frequency unit 601 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 310; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 601 can also communicate with networks and other devices through a wireless communication system.

[0132] The electronic device provides users with wireless broadband internet access through the network module 602, such as helping users send and receive emails, browse web pages, and access streaming media.

[0133] The audio output unit 603 can convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into audio signals and output them as sound. Furthermore, the audio output unit 603 can also provide audio output related to specific functions performed by the electronic device 600 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, and a receiver, etc.

[0134] Input unit 604 is used to receive audio or video signals. Input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042. GPU 6041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 606. The image frames processed by GPU 6041 can be stored in memory 609 (or other storage medium) or transmitted via radio frequency unit 601 or network module 602. Microphone 6042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 601 in telephone call mode.

[0135] The electronic device 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 6061 according to the ambient light level, and the proximity sensor can turn off the display panel 6061 and / or backlight when the electronic device 600 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 605 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.

[0136] The display unit 606 is used to display information input by the user or information provided to the user. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0137] User input unit 607 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 6071). Touch panel 6071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to processor 310, receiving and executing commands from processor 310. In addition, touch panel 6071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 6071, user input unit 607 may also include other input devices 6072. Specifically, other input devices 6072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0138] Furthermore, the touch panel 6071 can cover the display panel 6061. When the touch panel 6071 detects a touch operation on or near it, it transmits the information to the processor 310 to determine the type of touch event. Subsequently, the processor 310 provides corresponding visual output on the display panel 6061 according to the type of touch event. It is understood that in one embodiment, the touch panel 6071 and the display panel 6061 are implemented as two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 6071 and the display panel 6061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.

[0139] Interface unit 608 serves as an interface for connecting external devices to electronic device 600. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 608 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 600, or it can be used to transmit data between electronic device 600 and external devices.

[0140] The memory 609 can be used to store software programs and various data. The memory 609 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 609 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0141] The processor 310 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 609, and by calling data stored in the memory 609, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. The processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 310.

[0142] The electronic device 600 may also include a power supply 311 (such as a battery) for supplying power to various components. Preferably, the power supply 311 can be logically connected to the processor 310 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.

[0143] In addition, the electronic device 600 includes some functional modules not shown, which will not be described in detail here.

[0144] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0146] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

[0147] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0148] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0149] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0151] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0152] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0153] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for updating the field of view in a game, characterized in that, include: Receive a view update request sent by a first client, the view update request being a request generated by the first client in response to the movement of a target virtual object in the game scene, the game scene being divided into multiple scene grids; Based on the vision update request, the location information of the target virtual object in the game scene is obtained, as well as the object list set corresponding to the target virtual object. The object list set records at least the association between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data. The object list is updated according to the location information, and the field of view information corresponding to the target virtual object is sent to the second client according to the update result. The second client is a client that has the field of view of the target virtual object and is used to update the game field of view according to the field of view information. The object list set includes a list of virtual object channels corresponding to each virtual object, a list of virtual objects corresponding to each scene grid, and a list of grid channels corresponding to each scene grid. The virtual object channel list records all view channels that currently have the view of a certain virtual object. The virtual object list records all virtual objects that are currently located in a certain scene grid. The grid channel list records all view channels that currently have the view of a certain scene grid. The grid channel list includes a count corresponding to each view channel. The count is used to represent the number of virtual objects corresponding to the view channels that currently have the view of the scene grid.

2. The method according to claim 1, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result includes: If the location information indicates that the target virtual object is moving in the current scene grid, then the first virtual object channel list corresponding to the target virtual object is obtained, and the first virtual object channel list includes at least one first field of view channel; Obtain the target field of view information of the target virtual object in the game scene, and send the target field of view information to a second client that has registered the first field of view channel. The second client is used to update the game field of view based on the target field of view information.

3. The method according to claim 2, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result includes: If the location information indicates that the target virtual object moves from the first scene grid to the second scene grid in the game scene, then the first field of view channel to which the target virtual object belongs, the first virtual object list corresponding to the first scene grid, and the second virtual object list corresponding to the second scene grid are obtained. The first virtual object list includes at least one first virtual object, and the second virtual object list includes at least one second virtual object. Obtain the first field of view information corresponding to the first virtual object and the second field of view information corresponding to the second virtual object, and send the first field of view information and the second field of view information to the second client that has registered the first field of view channel. The second client is used to update the game field of view based on the first field of view information and the second field of view information.

4. The method according to claim 3, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result further includes: Obtain the list of channels for the first grid corresponding to the first scene grid; Decrement the count of the first view channel by one in the first grid channel list; If the count corresponding to the first field of view channel in the first grid channel list is 0, then the first field of view channel is deleted from the first grid channel list; If the count corresponding to the first view channel in the first grid channel list is not 0, then obtain the second virtual object channel list corresponding to each of the first virtual objects; The first field of view channel will be deleted from the second virtual object channel list, and field of view update information will be generated for the first field of view channel. The field of view update information is sent to a second client that has registered the first field of view channel. The second client is used to delete the first virtual object in the game scene according to the field of view update information.

5. The method according to claim 4, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result further includes: Obtain the list of channels for the second grid corresponding to the second scene grid; If the first field of view channel is located in the second grid channel list, then increment the count corresponding to the first field of view channel in the second grid channel list by one; If the first view channel is not in the second grid channel list, then the first view channel is added to the second grid channel list.

6. The method according to claim 3, 4, or 5, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result further includes: Retrieve the channel list of the third virtual object corresponding to the second virtual object; Add the first view channel to the third virtual object channel list.

7. The method according to claim 5, characterized in that, The second grid channel list includes a second field of view channel. The step of updating the object list set based on the location information and sending the field of view information corresponding to the target virtual object to the second client based on the update result further includes: Obtain the target virtual object channel list corresponding to the target virtual object; If the second view channel is not in the target virtual object channel list, then add the second view channel to the target virtual object channel list; The target vision information is sent to a second client that has registered the second vision channel. The second client is used to update the game vision based on the target vision information.

8. The method according to claim 3, characterized in that, The step of updating the object list based on the location information and sending the view information corresponding to the target virtual object to the second client based on the update result further includes: The target virtual object is removed from the first virtual object list and added to the second virtual object list.

9. The method according to claim 1, characterized in that, The step of receiving the view update request sent by the first client includes: In response to a change in the state or movement path of a target virtual object, a field of view update request is received from a first client. The field of view update request includes target field of view information corresponding to the target virtual object. The target field of view information includes at least the object type of the target virtual object, its current position in the game scene, its current state, its movement speed, and its movement path.

10. A device for updating the field of view in a game, characterized in that, include: The request receiving module is used to receive a view update request sent by a first client. The view update request is a request generated by the first client in response to the movement of a target virtual object in the game scene. The game scene is divided into multiple scene grids. The information acquisition module is used to acquire the position information of the target virtual object in the game scene based on the vision update request, as well as the object list set corresponding to the target virtual object. The object list set records at least the association relationship between the virtual object, the scene grid and the vision channel. The vision channel is a data sharing interface, and clients registered with the same vision channel receive the same game vision data. The vision update module is used to update the object list set according to the location information, and send the vision information corresponding to the target virtual object to the second client according to the update result. The second client is a client that has the vision of the target virtual object, and is used to update the game vision according to the vision information. The object list set includes a list of virtual object channels corresponding to each virtual object, a list of virtual objects corresponding to each scene grid, and a list of grid channels corresponding to each scene grid. The virtual object channel list records all view channels that currently have the view of a certain virtual object. The virtual object list records all virtual objects that are currently located in a certain scene grid. The grid channel list records all view channels that currently have the view of a certain scene grid. The grid channel list includes a count corresponding to each view channel. The count is used to represent the number of virtual objects corresponding to the view channels that currently have the view of the scene grid.

11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-9.

12. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Information processing method and device, storage medium and electronic equipment

    CN107890664A

  • Game control method and device, terminal and storage medium

    CN113633963A