Data processing method, device and electronic equipment in game
By dividing the game into different levels of synchronization zones, and obtaining terrain data and rendering the scene terrain according to the zone level, the problem of large amount of synchronization data in multiplayer online games is solved, improving the smoothness of game screens and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2025-02-13
- Publication Date
- 2026-06-19
AI Technical Summary
In multiplayer online games, using 3D voxel data to store terrain results in a large amount of synchronized data, causing game stuttering or lag, which affects the user experience.
By dividing the virtual scene into different levels of synchronization areas, terrain data of corresponding precision is obtained according to the level of the area, and the scene terrain is rendered in the virtual scene, thus avoiding the need to obtain full-precision terrain data every time.
It significantly reduced the amount of synchronized data, improved the smoothness of the game screen, and enhanced the user's gaming experience.
Smart Images

Figure CN119868940B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a data processing method, apparatus, and electronic device for games. Background Technology
[0002] As the gaming industry continues to develop, players' demand for dynamic open-world environments is constantly increasing. Destructible terrain, as a technical solution that can effectively provide a sense of interaction with the environment, allows players to feel the impact of their actions on the game world in real time, thereby enhancing the game's immersion and realism.
[0003] Currently, in games, to achieve better terrain representation and destructible freedom, three-dimensional voxel data can be used to store terrain, with each voxel storing the distance from that point to the terrain surface.
[0004] However, the current method of storing terrain using 3D voxel data requires a large amount of data to be synchronized in multiplayer online games, which can cause game screen stuttering or lag, thus affecting the user's gaming experience. Summary of the Invention
[0005] This application provides a data processing method, apparatus, and electronic device for games, which can reduce the amount of synchronized data, improve the smoothness of game graphics, and enhance the user's gaming experience. The specific solution is as follows:
[0006] In a first aspect, embodiments of this application provide a data processing method for a game, which provides a graphical user interface through a first terminal. The graphical user interface displays at least a portion of a virtual scene and a first virtual character located in the virtual scene. The first virtual character is a virtual character controlled by the first terminal. The method includes:
[0007] Based on the first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, where the first synchronization area is a local area in the virtual scene.
[0008] Based on the hierarchy of each of the plurality of first synchronization regions, terrain data corresponding to each first synchronization region is obtained, and the accuracy of obtaining the terrain data is positively correlated with the hierarchy of the first synchronization region.
[0009] The scene terrain is rendered in the virtual scene based on the terrain data corresponding to each of the first synchronization areas.
[0010] Secondly, embodiments of this application provide a data processing apparatus for a game, the apparatus comprising:
[0011] The determining unit is configured to, based on the first position of the first virtual character in the virtual scene, set the virtual scene within a preset range of the first position as multiple first synchronization areas of different levels, wherein the first synchronization area is a local area in the virtual scene.
[0012] The acquisition unit is used to acquire first terrain data corresponding to each of the plurality of first synchronization regions according to the hierarchy of each synchronization region, wherein the acquisition accuracy of the first terrain data is positively correlated with the hierarchy of the first synchronization region.
[0013] The rendering unit is used to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.
[0014] Thirdly, this application also provides an electronic device, including:
[0015] Processor; and
[0016] A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method described in the first aspect.
[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a data processing program that is executed by a processor to perform the method described in the first aspect.
[0018] Compared with the prior art, this application has the following advantages: by dividing multiple synchronization regions into layers, the terrain data corresponding to each synchronization region is obtained according to the data acquisition precision corresponding to the layer where each synchronization region is located, and then the scene terrain is rendered in the virtual scene according to the terrain data corresponding to each synchronization region, thus avoiding the need to obtain full-precision terrain data in the virtual scene for each synchronization, and greatly reducing the amount of synchronization data.
[0019] The data processing method in the game provided in this application includes the following steps: Based on the first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, where each first synchronization area is a local area in the virtual scene; based on the level of each synchronization area among the multiple first synchronization areas, first terrain data corresponding to each first synchronization area is obtained, where the accuracy of obtaining the first terrain data is positively correlated with the level of the first synchronization area; and scene terrain is rendered in the virtual scene based on the first terrain data corresponding to each first synchronization area. As can be seen, in this application, the synchronization area is divided into multiple synchronization areas corresponding to different levels, and the data acquisition accuracy corresponding to different levels of synchronization areas is different. By acquiring the terrain data corresponding to each synchronization area based on the data acquisition accuracy corresponding to the level of each synchronization area, and then rendering the scene terrain in the virtual scene based on the terrain data corresponding to each synchronization area, it is possible to avoid acquiring full-precision terrain data in the virtual scene for each synchronization, thereby significantly reducing the amount of synchronization data. Attached Figure Description
[0020] Figure 1 A flowchart of a data processing method in a game provided in an embodiment of this application;
[0021] Figure 2 A schematic diagram of multiple first synchronization regions provided in the embodiments of this application;
[0022] Figure 3 A schematic diagram illustrating the principle of dividing a virtual scene into multiple plots, provided for an embodiment of this application;
[0023] Figure 4 A schematic diagram of the first voxel when the acquisition accuracy of the first terrain data provided in the embodiments of this application is 1 / 2;
[0024] Figure 5 A schematic diagram of the first voxel when the acquisition accuracy of the first terrain data provided in the embodiments of this application is 1 / 4;
[0025] Figure 6 This is a schematic diagram illustrating the surface reconstruction effect of obtaining first terrain data with different precision, provided in an embodiment of this application.
[0026] Figure 7 This is a structural block diagram of an example of a data processing device for a game provided in the embodiments of this application;
[0027] Figure 8 This is a structural block diagram of an example of an electronic device for data processing in games provided in this application embodiment. Detailed Implementation
[0028] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0029] It should be noted that the terms "first," "second," "third," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0030] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.
[0031] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0032] As the gaming industry continues to develop, players' demand for dynamic open-world environments is constantly increasing. Destructible terrain, as a technical solution that effectively provides a sense of scene interaction, allows players to feel the impact of their actions on the game world in real time, thereby enhancing the game's immersion and realism. Currently, to achieve effective terrain representation and destructibility, games use 3D voxel data to store terrain, with each voxel storing the distance from that point to the terrain surface. However, this method of storing terrain using 3D voxel data requires a large amount of data to be synchronized in multiplayer online games, which can cause game stuttering or latency, thus affecting the user's gaming experience.
[0033] Currently, terrain in games is generally stored using heightfields or heightmaps, which are 2D textures. The position of a pixel on the texture represents its position in the XY plane, and the grayscale value of the texture pixel represents its height. The limitation of heightmaps is that each XY point has only one height, which makes it impossible to represent caves, limiting the expressive effect of terrain and the degree of freedom in destructibility.
[0034] To address this issue, 3D voxel data can be used to store the terrain. Each voxel stores the distance from that point to the terrain surface, i.e., signed distance field (SDF) data. Based on this voxel data, isosurface extraction algorithms (including MarchingCube, DualContouring, etc.) can be used to extract the triangular mesh of the terrain surface, which is then used for GPU rendering pipeline drawing. The most intuitive way to synchronize voxels is to record all modified voxel data and then send them in a package. This approach is simple and direct, but it can lead to a data explosion when operating on a large number of voxel data at once.
[0035] For reasons related to the background technology, in order to reduce the amount of data synchronized, the first embodiment of this application provides a data processing method in games. This method is applied to electronic devices, which may be desktop computers, laptops, mobile phones, tablets, etc., or other electronic devices capable of performing data processing in games. This application embodiment is not specifically limited.
[0036] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0037] Figure 1 A flowchart illustrating a data processing method in a game provided in an embodiment of this application. Figure 1 As shown, the method may include S101-S103.
[0038] S101. Based on the first position of the first virtual character in the virtual scene, the virtual scene within the preset range of the first position is set as multiple first synchronization areas of different levels, and the first synchronization area is a local area in the virtual scene.
[0039] S102. Based on the hierarchy of each of the multiple first synchronization regions, obtain the first terrain data corresponding to each first synchronization region. The accuracy of obtaining the first terrain data is positively correlated with the hierarchy of the first synchronization region.
[0040] For example, a graphical user interface (GUI) is provided through a first terminal. The GUI displays at least a portion of a virtual scene and a first virtual character located within the virtual scene. The first virtual character is a virtual character controlled by the first terminal. When the first terminal controls the first virtual character to enter the game or reconnect after a disconnection, a preset range of terrain data in the virtual scene can be determined based on the first position of the first virtual character in the virtual scene. Then, the preset range is divided into multiple first synchronization regions according to preset values corresponding to different levels. The first synchronization region is a circular or annular region with the first virtual character as the center and a preset distance as the radius. The preset distance is used to determine the level of the first synchronization region. The preset distance is negatively correlated with the level of the first synchronization region; that is, the smaller the preset distance, the higher the level of the first synchronization region, and the higher the level of the first synchronization region, the higher the accuracy of the acquisition of the corresponding first terrain data.
[0041] Figure 2 This is a schematic diagram of multiple first synchronization regions provided in an embodiment of this application. For example... Figure 2 As shown, AOI represents the preset area of interest (AOI) in the virtual scene, and LOD represents the level of detail (LOD) of the synchronization area. LOD0, LOD1, and LOD2 represent synchronization areas at different levels. For example, taking the first synchronization area as a circle, the preset values mentioned above are the preset radii. The AOI can be defined with the virtual character's first position in the virtual scene as the center and a preset radius of 200 meters. The LOD0 synchronization area can be defined with the first position as the center and a preset radius of 100 meters. The LOD1 synchronization area can be defined with the first position as the center and a preset radius of 150 meters. The LOD2 synchronization area can be defined with the first position as the center and a preset radius of 200 meters. The preset distance is negatively correlated with the level of the first synchronization area, meaning the synchronization area corresponding to LOD0 has the highest level, and the synchronization area corresponding to LOD2 has the lowest level. The accuracy of the first terrain data acquisition is positively correlated with the level of the first synchronization area, meaning the first terrain data acquisition accuracy for the synchronization area corresponding to LOD0 is the highest, and the first terrain data acquisition accuracy for the synchronization area corresponding to LOD2 is the lowest.
[0042] S103. Render the scene terrain in the virtual scene according to the first terrain data corresponding to each first synchronization area.
[0043] For example, the acquisition precision of the first terrain data in each of the multiple first synchronization regions can be determined based on the hierarchy of each first synchronization region, and then the first terrain data corresponding to each first synchronization region can be acquired based on the acquisition precision of the first terrain data in each first synchronization region. For example, as... Figure 2As shown, if the synchronization region corresponding to LOD0 is acquired with full precision, the synchronization region corresponding to LOD1 with 1 / 2 precision, and the synchronization region corresponding to LOD2 with 1 / 4 precision, then when acquiring the terrain data of the synchronization region corresponding to LOD0, the full terrain data of that region is directly acquired. When acquiring the terrain data of the synchronization region corresponding to LOD1, 1 / 2 of the terrain data of that region can be acquired according to preset rules. Similarly, when acquiring the terrain data of the synchronization region corresponding to LOD2, 1 / 4 of the terrain data of that region can be acquired according to preset rules. The scene terrain is then rendered in the virtual scene based on the first terrain data corresponding to each acquired synchronization region.
[0044] For example, Table 1 compares the effects of the method provided in the embodiments of this application with those of the prior art. As can be seen from Table 1, the method provided in the embodiments of this application significantly reduces the amount of data to be synchronized.
[0045] Table 1
[0046]
[0047] In one optional implementation of this embodiment, before the step of determining multiple first synchronization regions of different levels based on the first position of the first virtual character in the virtual scene, the method further includes: dividing the virtual scene into multiple plots according to a preset size; the step of determining multiple first synchronization regions of different levels based on the first position of the first virtual character in the virtual scene includes: determining multiple first synchronization regions of different levels and the plots included in each first synchronization region based on the plot where the first virtual character is located in the virtual scene.
[0048] For example, the bounding box of the virtual scene can be obtained, the maximum value of the length, width, height and center of the bounding box can be determined, and then the cube corresponding to the virtual scene can be determined according to the above maximum value and the preset side length of the plot; the cube can be evenly divided into multiple plots using the preset side length of the plot as the unit, and finally multiple first synchronization regions of different levels and the plots included in each first synchronization region can be determined.
[0049] For example, each plot consists of multiple voxels. The side length of each voxel can be set; for instance, one voxel represents a 1-meter area, so its side length is 1 meter. The side length of each plot is determined; for example, if a plot contains 16*16*16 voxels, then its side length is L = 16 meters. Then, the bounding box of the virtual scene is obtained, and the maximum value of its length, width, and height is determined to be T. M = (floor(T / L) + 1) * L, meaning M is an integer multiple of L, and M > T. A cube with side length M is constructed, with its center at the center of the virtual scene. This cube contains the entire virtual scene. The cube is then uniformly divided into units of L to obtain N plots corresponding to the virtual scene. Figure 3 This is a schematic diagram illustrating the principle of dividing a virtual scene into multiple plots, as provided in an embodiment of this application. Figure 3 (A) indicates that the virtual scene is divided into multiple plots. Figure 3 (B) represents the voxel data stored in each plot.
[0050] In one optional implementation provided in this embodiment, the hierarchy of each synchronization region may include at least a first level and a second level. Different levels correspond to different synchronization regions. Each first synchronization region includes multiple land parcels, and each land parcel includes multiple voxels. The first terrain data corresponding to each first synchronization region can be obtained by acquiring the voxel data of each voxel in each land parcel corresponding to each first synchronization region.
[0051] In some embodiments, S102 may include S201-S202.
[0052] S201. Obtain voxel data of each plot in the multiple plots included in the second synchronization area, and form terrain data corresponding to the second synchronization area from the voxel data of each plot in the multiple plots. The second synchronization area is the synchronization area belonging to the first level among the multiple first synchronization areas.
[0053] S202. Obtain the voxel data of the first voxel included in each plot in the third synchronization area, and form the first terrain data corresponding to the third synchronization area by the voxel data of the first voxel. The third synchronization area is a synchronization area belonging to the second level among the multiple first synchronization areas. Each plot in the third synchronization area includes multiple voxels, and the first voxel is a portion of the voxels included in each plot in the third synchronization area.
[0054] For example, each level of synchronization region may include multiple plots, and each plot includes multiple voxels. For instance, each plot may include 8*8*8 voxels, 16*16*16 voxels, or 32*32*32 voxels, etc. When the acquisition precision of the second synchronization region is 1, voxel data of all voxels included in each plot within the second synchronization region can be acquired. When the acquisition precision of the third synchronization region is 1 / 2, voxel data of 1 / 2 voxels in each plot included in the third synchronization region can be acquired.
[0055] For example, assume that each first synchronization region can be layered into a first layer LOD0 and a second layer LOD1. The acquisition precision of terrain data in the synchronization region of LOD0 is 1, and the acquisition precision of terrain data in the synchronization region of LOD1 is 1 / 2. Each plot in each synchronization region includes 16*16*16 voxels. The voxel data of each plot in the synchronization region of LOD0, comprising 16*16*16 voxels, can be acquired, and the terrain data corresponding to the synchronization region of LOD0 is composed of the voxel data of each plot in the synchronization region of LOD0. Each plot in the LOD1 synchronization area includes 1 / 2 times the number of 16*16*16 voxels. Specifically, for a plot in the LOD1 synchronization area, the voxel at the lower left corner of the plot is used as the origin of the coordinate system to determine the coordinates of each voxel in the plot. The voxel corresponding to the coordinate point where the z-coordinate is even and the sum of the x and y coordinates is even is taken as the first voxel. The voxel data of the first voxel is obtained. The terrain data corresponding to the LOD1 synchronization area is composed of the voxel data of the first voxel included in each plot.
[0056] In some embodiments, S103 may include S301-S303.
[0057] S301. Render the scene terrain within the second synchronization area based on the voxel data of each plot in the multiple plots included in the second synchronization area.
[0058] S302. Based on the voxel data of the first voxel included in each plot in the third synchronization region, calculate the voxel data of the second voxel included in each plot in the third synchronization region, wherein the second voxel is the voxel included in each plot in the third synchronization region other than the first voxel.
[0059] S303. Render the scene terrain within the third synchronization area based on the voxel data of each of the first voxels and the voxel data of each of the second voxels in the third synchronization area.
[0060] For example, after obtaining the voxel data of each plot within the multiple plots included in the second synchronization area, the scene terrain within the second synchronization area can be rendered and displayed based on the voxel data of each plot within the multiple plots included in the second synchronization area. Then, the voxel data of the first voxel of each plot in the third synchronization area is obtained. The voxel data of the second voxel can be obtained by interpolating the voxel data of the first voxel. That is, based on the voxel data of the first voxel, the voxel data of the second voxel is calculated using an interpolation algorithm, wherein the interpolation algorithm may include an averaging algorithm. Specifically, for a certain second voxel, a preset number of first voxels around the second voxel are determined, and the average value of the voxel data of the preset number of first voxels around each second voxel is calculated to obtain the voxel data of the second voxel. Similarly, the voxel data of all second voxels in each plot in the third synchronization area can be calculated. Based on the voxel data of the first voxels of each plot in the third synchronization area and the voxel data of the second voxels of each plot in the third synchronization area, the scene terrain within the third synchronization area can be rendered.
[0061] For example, Figure 4 This is a schematic diagram of the first voxel when the acquisition accuracy of the first terrain data provided in this application embodiment is 1 / 2. Assuming the acquisition accuracy of the first terrain data corresponding to the synchronization region M is 1 / 2, and each plot in the synchronization region M includes 6*6*6 voxels, for a certain plot in the synchronization region M, using the voxel at the lower left corner of the plot as the origin, the coordinates of each voxel in that plot are determined. The voxels corresponding to the coordinates where the z-coordinate is even and the sum of the x and y coordinates is even are taken as the first voxel, and the remaining voxels are taken as the second voxels. For example... Figure 4 As shown, blue voxels represent the first voxels included in the plot, and gray voxels represent the second voxels included in the plot. Each gray voxel can be interpolated from its surrounding 6 blue voxels; that is, each gray voxel can be obtained by averaging the voxel data of its surrounding 6 blue voxels. At the boundary, gray voxels will have fewer than 6 surrounding blue voxels, so the average of the actual number of blue voxels will be taken. Similarly, the voxel data of the second voxel of each plot included in the synchronization region M can be calculated.
[0062] Figure 5 This is a schematic diagram of the first voxel when the acquisition accuracy of the first terrain data provided in this embodiment is 1 / 4. (See diagram below.) Figure 5 As shown, blue voxels represent the first voxels included in the plot, and gray voxels represent the second voxels included in the plot. Each gray voxel can be interpolated from its surrounding 6 blue voxels; that is, each gray voxel can be obtained by averaging the voxel data of its surrounding 6 blue voxels. At the boundary, gray voxels will have fewer than 6 surrounding blue voxels, so the average will be taken based on the actual number of blue voxels.
[0063] For example, assuming the acquisition precision of the first terrain data corresponding to synchronization region N is 1 / 4, and each plot in synchronization region N includes 6*6*6 voxels, the voxel data of 1 / 4 voxels in each plot in synchronization region N can be obtained. Specifically, for a certain plot in synchronization region N, taking the voxel at the lower left corner of the plot as the origin, the coordinates of each voxel in the plot are determined. The voxels corresponding to coordinates with even x, y, and z coordinates, and the voxels corresponding to coordinates with odd x, y, and z coordinates, are designated as first voxels, and the remaining voxels are designated as second voxels. The voxel data of the first voxels is obtained, and each second voxel can be obtained by averaging the voxel data of its six surrounding first voxels.
[0064] As can be seen from the above interpolation algorithm, the synchronization strategy based on Level of Detail (LOD) provided in this application embodiment is essentially a lossy compression synchronization. Figure 6 This is a schematic diagram illustrating the surface reconstruction effect of acquiring first terrain data with different precision, as provided in an embodiment of this application. Figure 6 As shown, there are some differences between the rendering results of terrain data obtained with 1 / 2 precision and those obtained with 1 / 4 precision and the original results. However, considering that terrain also has Level of Detail (LOD) in the rendering layer—that is, distant objects are drawn with a lower polygon count and closer objects with a higher polygon count—simultaneous rendering effectively results in a near-lossless effect.
[0065] In one optional implementation provided in this embodiment, the initial terrain data in the virtual scene stored on the server and the terminal are the same. During data synchronization, some terrain data in the virtual scene may not change. For example, a cave in the virtual scene is not destroyed between the two synchronization intervals, and the terrain data of the part where the cave is located remains unchanged.
[0066] In some embodiments, rendering scene terrain in the virtual scene based on the first terrain data corresponding to each first synchronization region may include: obtaining initial terrain data of the virtual scene; comparing the first terrain data corresponding to each first synchronization region with the initial terrain data, and replacing the terrain data in the first terrain data corresponding to each first synchronization region that is the same as the initial terrain data with preset parameters to obtain second terrain data corresponding to each first synchronization region; and rendering scene terrain in the virtual scene based on the second terrain data corresponding to each first synchronization region.
[0067] For example, after obtaining the first terrain data corresponding to each first synchronization area, the first terrain data corresponding to each first synchronization area can be compressed, and the compressed first terrain data corresponding to each first synchronization area can be sent to the terminal. The terminal receives the compressed first terrain data corresponding to each first synchronization area, decompresses it, and then renders the scene terrain in the virtual scene. Because the initial terrain data stored on the server and the terminal are consistent, after obtaining the first terrain data corresponding to each first synchronization area, the data in the first terrain data corresponding to each first synchronization area that is the same as the initial terrain data can be replaced with a preset parameter to obtain the second terrain data corresponding to each first synchronization area. The second terrain data is compressed and sent to the terminal. After receiving the data, the terminal identifies a certain terrain data as a preset parameter and then obtains the correct terrain data corresponding to each preset parameter from the initial terrain data.
[0068] For example, during data synchronization, if the SDF value of a voxel is the same as its SDF value in the initial terrain data, the SDF value of that voxel can be replaced using a preset parameter. This means the SDF value can be replaced with a fixed, specific value, thereby reducing data entropy. For instance, in the terrain data corresponding to each first synchronization area, the voxel values of each plot range from -128 to 127. -128 can be used as the preset parameter. When the server collects data, it checks each voxel. If the SDF value of that voxel is the same as its SDF value in the initial terrain data, the SDF value of that voxel will be replaced with -128. After the terminal receives the data, it recognizes a voxel with a value of -128 and retrieves the correct SDF value for that voxel from the initial terrain data.
[0069] This embodiment acquires the initial terrain data of the virtual scene; compares the first terrain data corresponding to each first synchronization region with the initial terrain data, and replaces the terrain data in the first terrain data corresponding to each first synchronization region that is identical to the initial terrain data with preset parameters to obtain the second terrain data corresponding to each first synchronization region; and renders the scene terrain in the virtual scene according to the second terrain data corresponding to each first synchronization region. This can increase the number of identical data in the terrain data corresponding to each first synchronization region, because the more identical data in a data packet, the higher the compression ratio of the data packet. Therefore, this embodiment can improve the data compression ratio and reduce the size of the data packet.
[0070] In one optional implementation provided in this embodiment, the first virtual character can move according to the movement control command of the first terminal, and the movement of the first virtual character will cause the first synchronization area to change.
[0071] In some embodiments, the above method may also include S401-S404.
[0072] S401. In response to a movement control command applied to the first virtual character, control the first virtual character to move to a second position in the virtual scene.
[0073] S402. Based on the second position of the virtual character in the virtual scene, determine the multiple fourth synchronization areas at different levels.
[0074] S403. Based on the hierarchy of each of the plurality of fourth synchronization regions, obtain the third terrain data corresponding to each fourth synchronization region. The accuracy of obtaining the second terrain data is related to the hierarchy of the fourth synchronization region.
[0075] S404. Render the scene terrain in the virtual scene according to the third terrain data corresponding to each fourth synchronization area.
[0076] For example, when the position of the first virtual character changes, causing a change in the synchronization area, the second position of the first virtual character can be determined first. Based on the second position of the first virtual character in the virtual scene, multiple fourth synchronization areas at different levels are determined. Based on the level of each fourth synchronization area, the third terrain data corresponding to each fourth synchronization area is obtained. Specifically, it is determined that there is an overlapping area between the fourth synchronization area and the first synchronization area, and the level to which the overlapping area belongs in the first synchronization area and the level to which the overlapping area belongs in the fourth synchronization area are compared. If the level to which the overlapping area belongs in the first synchronization area is higher than or equal to the level to which the overlapping area belongs in the fourth synchronization area, then the first terrain data corresponding to the overlapping area is used as the third terrain data corresponding to the overlapping area. If the level to which the overlapping area belongs in the first synchronization area is lower than the level to which the overlapping area belongs in the fourth synchronization area, then the voxel data of the third voxel of each plot in the overlapping area is obtained. The voxel data of the third voxel is the voxel data that was not obtained when obtaining the first terrain data corresponding to each plot in the overlapping area. Finally, the scene terrain is rendered in the virtual scene based on the third terrain data corresponding to each fourth synchronization area.
[0077] For example, when rendering scene terrain in the virtual scene based on the first terrain data corresponding to each first synchronization area, the plot objects of each plot corresponding to each first synchronization area store data tags and identifiers (IDs) of virtual characters. The data tags are used to characterize which level the plot belongs to when the first terrain data is acquired. Taking the fourth synchronization region levels as LOD0, LOD1, and LOD2 as examples, when there is an overlap between the fourth synchronization region and the first synchronization region, for a certain plot within the overlapping region, the data acquisition precision corresponding to LOD0 is 1, the data acquisition precision corresponding to LOD1 is 1 / 2, and the data acquisition precision corresponding to LOD2 is 1 / 4. When the data label indicates that the plot belongs to LOD0 in the first synchronization region, it is not necessary to acquire the third terrain data corresponding to the plot; the first terrain data corresponding to the plot can be used as the third terrain data. When the data label indicates that the plot belongs to LOD1 in the first synchronization region and LOD0 in the fourth synchronization region, the remaining 1 / 2 data of the plot is acquired. The third terrain data corresponding to the plot includes the first terrain data corresponding to the plot and the aforementioned acquired remaining 1 / 2 data. When the data label indicates that the plot belongs to LOD1 in the first synchronization region and LOD0 in the fourth synchronization region, the remaining 1 / 2 data of the plot is acquired. When the data is D1 or LOD2, the first terrain data corresponding to the plot can be used as the third terrain data. When the data label indicates that the plot belongs to LOD2 in the first synchronization area and LOD0 in the fourth synchronization area, the remaining 3 / 4 of the plot's data is obtained. The third terrain data corresponding to the plot includes the first terrain data and the remaining 3 / 4 of the data obtained above. When the data label indicates that the plot belongs to LOD2 in the first synchronization area and LOD1 in the fourth synchronization area, 1 / 4 of the remaining data of the plot is obtained. The third terrain data corresponding to the plot includes the first terrain data and 2 / 4 of the remaining data obtained above, making the third terrain data corresponding to the plot half of the total data of the plot. When the data label indicates that the plot belongs to LOD2 in the first synchronization area and LOD2 in the fourth synchronization area, the first terrain data corresponding to the plot can be used as the third terrain data. When there is no overlap between the fourth synchronization region and the first synchronization region, the terrain data of the plot can be obtained as the third terrain data of the plot based on the level of the plot in the fourth synchronization region.
[0078] In this embodiment, when the fourth synchronization area overlaps with the first synchronization area, the third terrain data is obtained according to the level to which the overlapping area belongs in the first and fourth synchronization areas, respectively. This avoids the repeated acquisition of terrain data, further reduces the amount of synchronization data, and improves the efficiency of data synchronization.
[0079] In one optional implementation provided in this embodiment, the virtual scene may include a second virtual character, which may be controlled by a second terminal.
[0080] In some embodiments, the method further includes S501-S503.
[0081] S501. In response to the second virtual character performing a behavior to change the local scene terrain in the virtual scene, obtain the terrain change data of the local scene terrain and the behavior data of the second virtual character;
[0082] S502. In response to the detection that the amount of terrain change data of the local scene terrain is greater than or equal to the amount of behavior data of the second virtual character, render the scene terrain in the virtual scene according to the behavior data of the second virtual character.
[0083] S503. In response to the detection that the amount of terrain change data of the local scene is less than the amount of behavior data of the second virtual character, render the scene terrain in the virtual scene according to the terrain change data of the local scene.
[0084] For example, when a virtual character is online and the synchronization areas remain unchanged, if the second virtual character performs an action that modifies the local terrain of the virtual scene, the terrain change data of the local terrain and the behavior data of the second virtual character can be obtained. For instance, if the second virtual character uses a skill to cut down a tree in the virtual scene, the terrain data corresponding to the tree cut down by the second virtual character in the virtual scene, as well as the operation data generated by the second virtual character during the tree-cutting process, such as deleting some data or changing the data of a certain plot, can be obtained. After obtaining the terrain change data and the behavior data of the second virtual character, the data volume of the terrain change data and the behavior data of the second virtual character can be detected respectively. By comparing the data volume of the terrain change data and the behavior data of the second virtual character, the data corresponding to the data type with the smaller data volume can be selected, and the scene terrain can be rendered in the virtual scene according to the data corresponding to the data type with the smaller data volume. For example, if the detected terrain change data for the local scene is 35 bytes and the second virtual character's behavior data is 40 bytes, then the scene terrain is rendered in the virtual scene based on the terrain change data for the local scene. If the detected terrain change data for the local scene is 64 bytes and the second virtual character's behavior data is 40 bytes, then the scene terrain is rendered in the virtual scene based on the second virtual character's behavior data. When the terrain change data and the second virtual character's behavior data are equal, either the terrain change data can be acquired and the scene terrain rendered in the virtual scene based on the terrain change data, or the second virtual character's behavior data can be acquired and the scene terrain rendered in the virtual scene based on the second virtual character's behavior data.
[0085] For example, the data mentioned above can be of different types, such as spherical operations or cubic operations. A spherical operation would contain a center (3 floats) and a radius (1 float), totaling (3+1)*4 = 16 bytes. A cubic operation would contain a center (3 floats), length, width, and height (3 floats), and rotation (represented by quaternions, 4 floats), totaling (3+3+4)*4 = 40 bytes. Each modified voxel data is an index (uint32) and the modified value int8, which is 5 bytes. If a cubic operation is used, when modifying fewer than 8 voxels, the data size is less than 40 bytes, and the voxel data can be sent directly.
[0086] Optionally, when a virtual character goes offline, the user ID data corresponding to that virtual character in all terrain tiles on the server will be cleared.
[0087] The above is an example of a specific implementation method for model training. In practice, other feasible methods can also be used to train the model, and the embodiments in this application are not limited to this.
[0088] Corresponding to the data processing method in the game provided in the embodiments of this application, the embodiments of this application also provide a data processing device in the game, such as... Figure 7 As shown, the data processing device 700 in the game includes:
[0089] The determining unit 701 is used to set the virtual scene within a preset range of the first position as multiple first synchronization areas of different levels according to the first position of the first virtual character in the virtual scene, wherein the first synchronization area is a local area in the virtual scene.
[0090] The acquisition unit 702 is used to acquire first terrain data corresponding to each of the plurality of first synchronization regions according to the level of each of the first synchronization regions, wherein the acquisition accuracy of the first terrain data is positively correlated with the level of the first synchronization region.
[0091] The rendering unit 703 is used to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas.
[0092] Optionally, the determining unit 701 is specifically used to divide the virtual scene into multiple plots according to a preset size; based on the plot where the first virtual character is located in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, and the plots included in each first synchronization area are determined.
[0093] Optionally, the first synchronization region is a circular or annular region with the first virtual character as the center and a preset distance as the radius, wherein the preset distance is used to determine the level of the first synchronization region.
[0094] Optionally, the preset distance is negatively correlated with the hierarchy of the first synchronization region.
[0095] Optionally, the hierarchy includes at least a first level and a second level, and the acquisition unit 702 is specifically used for...
[0096] The voxel data of each plot in the multiple plots included in the second synchronization area are obtained, and the voxel data of each plot in the multiple plots are used to form the first terrain data corresponding to the second synchronization area. The second synchronization area is a synchronization area belonging to the first level among the multiple first synchronization areas. The voxel data of the first voxel included in each plot in the third synchronization area are obtained, and the voxel data of the first voxel are used to form the first terrain data corresponding to the third synchronization area. The third synchronization area is a synchronization area belonging to the second level among the multiple first synchronization areas. Each plot in the third synchronization area includes multiple voxels, and the first voxel is a partial voxel included in each plot in the third synchronization area.
[0097] Optionally, the rendering unit 703 is specifically configured to: render the scene terrain within the second synchronization area based on the voxel data of each plot in the plurality of plots included in the second synchronization area; calculate the voxel data of the second voxel included in each plot in the third synchronization area based on the voxel data of the first voxel included in each plot in the third synchronization area, wherein the second voxel is the voxel included in each plot in the third synchronization area other than the first voxel; and render the scene terrain within the third synchronization area based on the voxel data of each first voxel and the voxel data of each second voxel in the third synchronization area.
[0098] Optionally, the rendering unit 703 is specifically used to calculate the voxel data of the second voxel included in each plot in the third synchronization area based on the voxel data of the first voxel included in each plot in the third synchronization area through an interpolation algorithm.
[0099] Optionally, the rendering unit 703 is specifically used to obtain the initial terrain data of the virtual scene; compare the first terrain data corresponding to each first synchronization area with the initial terrain data, and replace the terrain data in the first terrain data corresponding to each first synchronization area that is the same as the initial terrain data with preset parameters to obtain the second terrain data corresponding to each first synchronization area; and render the scene terrain in the virtual scene according to the second terrain data corresponding to each first synchronization area.
[0100] Optionally, such as Figure 7 As shown, the data processing device 700 in the game also includes a processing unit 704.
[0101] The processing unit 704 is configured to respond to a movement control command applied to the first virtual character and control the first virtual character to move to a second position in the virtual scene; determine multiple fourth synchronization regions at different levels based on the second position of the first virtual character in the virtual scene; and obtain third terrain data corresponding to each fourth synchronization region based on the level of each fourth synchronization region, wherein the accuracy of obtaining the second terrain data is related to the level of the fourth synchronization region; the rendering unit 703 is further configured to render scene terrain in the virtual scene based on the third terrain data corresponding to each fourth synchronization region.
[0102] Optionally, the acquisition unit 702 is specifically used to determine that there is an overlapping area between the fourth synchronization area and the first synchronization area, and to compare the level to which the overlapping area belongs in the first synchronization area and the level to which the overlapping area belongs in the fourth synchronization area; if the level to which the overlapping area belongs in the first synchronization area is higher than or equal to the level to which the overlapping area belongs in the fourth synchronization area, then the first terrain data corresponding to the overlapping area is used as the third terrain data corresponding to the overlapping area; if the level to which the overlapping area belongs in the first synchronization area is lower than the level to which the overlapping area belongs in the fourth synchronization area, then the voxel data of the third voxel of each plot in the overlapping area is acquired, wherein the voxel data of the third voxel is the voxel data that was not acquired when acquiring the first terrain data corresponding to each plot in the overlapping area.
[0103] Optionally, the processing unit 704 is further configured to: in response to the second virtual character performing a behavior that modifies the local scene terrain in the virtual scene, acquire terrain change data of the local scene terrain and behavior data of the second virtual character; in response to detecting that the amount of terrain change data of the local scene terrain is greater than or equal to the amount of behavior data of the second virtual character, render scene terrain in the virtual scene according to the behavior data of the second virtual character; in response to detecting that the amount of terrain change data of the local scene terrain is less than the amount of behavior data of the second virtual character, render scene terrain in the virtual scene according to the terrain change data of the local scene terrain.
[0104] Corresponding to the data processing method in the game provided in the embodiments of this application, the embodiments of this application also provide an electronic device for data processing in the game.
[0105] like Figure 8 The diagram shown is a structural block diagram of an example of an electronic device for data processing in games provided in an embodiment of this application.
[0106] In this embodiment, an optional hardware structure of the electronic device 800 may be as follows: Figure 8As shown, it includes: at least one processor 801, at least one memory 802 and at least one communication bus 805; the memory 802 contains a program 803 and data 804.
[0107] Bus 805 can be a communication device for transmitting data between components within electronic device 800, such as an internal bus (e.g., CPU-memory bus, where the processor is the central processing unit, or CPU for short) or an external bus (e.g., a universal serial bus port or a peripheral component interconnection fast port).
[0108] Additionally, the electronic device also includes at least one network interface 806 and at least one peripheral interface 807. The network interface 806 provides wired or wireless communication with an external network 808 (e.g., the Internet, intranet, local area network, mobile communication network, etc.). In some embodiments, the network interface 806 may include any number of network interface controllers (NICs), radio frequency (RF) modules, repeaters, transceivers, modems, routers, gateways, any combination of wired network adapters, wireless network adapters, Bluetooth adapters, infrared adapters, near field communication (NFC) adapters, cellular network chips, etc.
[0109] Peripheral interface 807 is used to connect to peripherals, such as peripheral 1 in the figure. Figure 8 809 in the middle), peripheral 2 ( Figure 8 810 in the middle) and peripheral 3 ( Figure 8 (811 in the original text). Peripherals are peripheral devices, which may include, but are not limited to, cursor control devices (such as mice, touchpads, or touchscreens), keyboards, displays (such as cathode ray tube displays, liquid crystal displays), displays or light-emitting diode displays, video input devices (such as cameras or input interfaces coupled to video files), etc.
[0110] The processor 801 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0111] The memory 802 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage device.
[0112] The processor 801 calls the program and data stored in the memory 802 and executes the following steps:
[0113] Based on the first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, and the first synchronization area is a local area in the virtual scene;
[0114] Based on the hierarchy of each of the plurality of first synchronization regions, first terrain data corresponding to each first synchronization region is obtained, and the accuracy of obtaining the first terrain data is positively correlated with the hierarchy of the first synchronization region.
[0115] The scene terrain is rendered in the virtual scene based on the first terrain data corresponding to each of the first synchronization areas.
[0116] Corresponding to the data processing method in the game provided in the embodiments of this application, the embodiments of this application also provide a computer-readable storage medium storing a program for a data processing method in the game, which is executed by a processor to perform the following steps:
[0117] Based on the first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, and the first synchronization area is a local area in the virtual scene;
[0118] Based on the hierarchy of each of the plurality of first synchronization regions, first terrain data corresponding to each first synchronization region is obtained, and the accuracy of obtaining the first terrain data is positively correlated with the hierarchy of the first synchronization region.
[0119] The scene terrain is rendered in the virtual scene based on the first terrain data corresponding to each of the first synchronization areas.
[0120] It should be noted that for a detailed description of the apparatus, electronic device and computer-readable storage medium provided in the embodiments of this application, please refer to the relevant description of the data processing method in the game provided in the embodiments of this application, which will not be repeated here.
[0121] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0122] In a typical configuration, a node device in a blockchain includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0123] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0124] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage media, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0125] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A data processing method in a game, characterized by, A graphical user interface is provided through a first terminal, the display content of which includes at least a portion of a virtual scene and a first virtual character located in the virtual scene, the first virtual character being a virtual character controlled by the first terminal, the method comprising: Based on the first position of the first virtual character in the virtual scene, the virtual scene within a preset range of the first position is set as multiple first synchronization areas of different levels, and the first synchronization area is a local area in the virtual scene; Based on the hierarchy of each of the plurality of first synchronization regions, first terrain data corresponding to each first synchronization region is obtained, and the accuracy of obtaining the first terrain data is positively correlated with the hierarchy of the first synchronization region. Render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas; The method further includes: acquiring third terrain data corresponding to multiple fourth synchronization regions at different levels, wherein the multiple fourth synchronization regions at different levels are determined based on the second position to which the first virtual character moves in the virtual scene; wherein acquiring the third terrain data corresponding to each fourth synchronization region includes: determining that there is an overlapping region between the fourth synchronization region and the first synchronization region, and comparing the level to which the overlapping region belongs in the first synchronization region and the level to which the overlapping region belongs in the fourth synchronization region; if the level to which the overlapping region belongs in the first synchronization region is higher than or equal to the level to which the overlapping region belongs in the fourth synchronization region, then the first terrain data corresponding to the overlapping region is used as the third terrain data corresponding to the overlapping region; if the level to which the overlapping region belongs in the first synchronization region is lower than the level to which the overlapping region belongs in the fourth synchronization region, then the voxel data of the third voxel of each plot in the overlapping region is acquired, wherein the voxel data of the third voxel is the voxel data that was not acquired when acquiring the first terrain data corresponding to each plot in the overlapping region.
2. The method of claim 1, wherein, Before the step of setting the virtual scene within a preset range of the first virtual character's first position in the virtual scene as multiple first synchronization areas of different levels, the method further includes: The virtual scene is divided into multiple plots according to a preset size; The step of setting the virtual scene within a preset range of the first position as multiple first synchronization areas of different levels according to the first position of the first virtual character in the virtual scene includes: Based on the plot of land where the first virtual character is located in the virtual scene, the virtual scene within the preset range of the plot is set as multiple first synchronization areas of different levels, and the plot of land included in each first synchronization area is determined.
3. The method of claim 2, wherein, The first synchronization region is a circular or annular region with the first virtual character as the center and a preset distance as the radius. The preset distance is used to determine the level of the first synchronization region.
4. The method of claim 3, wherein, The preset distance is negatively correlated with the hierarchical level of the first synchronization region.
5. The method of claim 2, wherein, The hierarchy includes at least a first hierarchy and a second hierarchy; obtaining the first terrain data corresponding to each of the plurality of first synchronization regions based on the hierarchy of each of the first synchronization regions includes: The voxel data of each plot in the multiple plots included in the second synchronization area are obtained, and the voxel data of each plot in the multiple plots are used to form the first terrain data corresponding to the second synchronization area. The second synchronization area is the synchronization area belonging to the first level among the multiple first synchronization areas. Obtain voxel data of the first voxel included in each plot in the third synchronization region, and form the first terrain data corresponding to the third synchronization region from the voxel data of the first voxel. The third synchronization region is a synchronization region belonging to the second level among the multiple first synchronization regions. Each plot in the third synchronization region includes multiple voxels, and the first voxel is a portion of the voxels included in each plot in the third synchronization region.
6. The method according to claim 5, characterized in that, The step of rendering scene terrain in the virtual scene based on the first terrain data corresponding to each first synchronization region includes: Based on the voxel data of each plot in the multiple plots included in the second synchronization area, render the scene terrain in the second synchronization area; Based on the voxel data of the first voxel included in each plot in the third synchronization region, calculate the voxel data of the second voxel included in each plot in the third synchronization region, wherein the second voxel is the voxel included in each plot in the third synchronization region other than the first voxel; The scene terrain within the third synchronization area is rendered based on the voxel data of each first voxel and the voxel data of each second voxel in the third synchronization area.
7. The method according to claim 6, wherein calculating the voxel data of the second voxel included in each plot in the third synchronization region based on the voxel data of the first voxel included in each plot in the third synchronization region comprises: Based on the voxel data of the first voxel included in each plot in the third synchronization region, the voxel data of the second voxel included in each plot in the third synchronization region is calculated by an interpolation algorithm.
8. The method according to claim 1, characterized in that, The step of rendering scene terrain in the virtual scene based on the first terrain data corresponding to each of the first synchronization regions includes: Obtain the initial terrain data of the virtual scene; The first terrain data and the initial terrain data corresponding to each first synchronization area are compared, and the terrain data in the first terrain data corresponding to each first synchronization area that are the same as those in the initial terrain data are replaced with preset parameters to obtain the second terrain data corresponding to each first synchronization area. The scene terrain is rendered in the virtual scene based on the second terrain data corresponding to each of the first synchronization areas.
9. The method according to claim 1, characterized in that, The method further includes: In response to a movement control command applied to the first virtual character, the first virtual character is controlled to move to a second position in the virtual scene; Based on the second position of the first virtual character in the virtual scene, multiple fourth synchronization areas at different levels are determined; Based on the hierarchy of each of the plurality of fourth synchronization regions, third terrain data corresponding to each fourth synchronization region is obtained, and the accuracy of obtaining the third terrain data is related to the hierarchy of the fourth synchronization region. The scene terrain is rendered in the virtual scene based on the third terrain data corresponding to each fourth synchronization area.
10. The method according to claim 1, characterized in that, The method further includes: In response to the second virtual character performing a behavior that alters the local scene terrain in the virtual scene, the terrain alteration data of the local scene terrain and the behavior data of the second virtual character are obtained; In response to the detection that the amount of terrain change data in the local scene is greater than or equal to the amount of behavior data of the second virtual character, the scene terrain is rendered in the virtual scene according to the behavior data of the second virtual character; In response to the detection that the amount of terrain change data in the local scene is less than the amount of behavior data of the second virtual character, the scene terrain is rendered in the virtual scene according to the terrain change data in the local scene.
11. A data processing device for games, characterized in that, A graphical user interface is provided through a first terminal, the display content of which includes at least a portion of a virtual scene and a first virtual character located in the virtual scene, the first virtual character being a virtual character controlled by the first terminal, the device comprising: The determining unit is configured to, based on the first position of the first virtual character in the virtual scene, set the virtual scene within a preset range of the first position as multiple first synchronization areas of different levels, wherein the first synchronization area is a local area in the virtual scene; The acquisition unit is used to acquire first terrain data corresponding to each of the plurality of first synchronization regions according to the hierarchy of each of the first synchronization regions, wherein the acquisition accuracy of the first terrain data is positively correlated with the hierarchy of the first synchronization region; The rendering unit is used to render scene terrain in the virtual scene according to the first terrain data corresponding to each of the first synchronization areas; It is also used for: acquiring third terrain data corresponding to multiple fourth synchronization regions at different levels, wherein the multiple fourth synchronization regions at different levels are determined based on the second position to which the first virtual character moves in the virtual scene; wherein, acquiring the third terrain data corresponding to each fourth synchronization region includes: determining that there is an overlapping region between the fourth synchronization region and the first synchronization region, and comparing the level to which the overlapping region belongs in the first synchronization region and the level to which the overlapping region belongs in the fourth synchronization region; if the level to which the overlapping region belongs in the first synchronization region is higher than or equal to the level to which the overlapping region belongs in the fourth synchronization region, then the first terrain data corresponding to the overlapping region is used as the third terrain data corresponding to the overlapping region; if the level to which the overlapping region belongs in the first synchronization region is lower than the level to which the overlapping region belongs in the fourth synchronization region, then the voxel data of the third voxel of each plot in the overlapping region is acquired, wherein the voxel data of the third voxel is the voxel data that was not acquired when acquiring the first terrain data corresponding to each plot in the overlapping region.
12. An electronic device, characterized in that, include: processor; as well as A memory for storing a data processing program, which, when the electronic device is powered on and runs through the processor, executes the method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The system contains a data processing program that is executed by a processor to perform the method as described in any one of claims 1-10.