Game scene data processing method and device, computer program, and readable medium
By dividing the game scene into scene blocks and recording the change data, the client loads and modifys it, solving the problem of slow loading of the game scene and improving the game experience.
Patent Information
- Application Number
- CN202080095170.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-08-21
- Filing Date
- 2020-11-20
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2040-11-20
AI Technical Summary
In the prior art, when there are many resources in the game scene, the game data loading speed is slow and the player's gaming experience is poor.
The game scene is divided into a preset number of scene blocks. The server stores the change data and only records the modified scene blocks and their data. The client loads and modifys them based on the basic data and change data to display the game scene.
It speeds up the creation of game scenes, improves the player's gaming experience, and reduces the problem of low data transmission and low transmission rate.
Smart Images

Figure CN115427124B_ABST
Abstract
Description
[0001] This invention claims priority to a Chinese patent invention filed with the Patent Office of China on August 21, 2020, with invention number 202010846828.4 and title “Method and device for processing game scene data, computer program, and readable medium,” the entire contents of which are incorporated by reference into this invention. Technical Field
[0002] The present invention relates to the field of computer technology, and in particular to a method and device for processing game scene data, a computer program, and a readable medium. Background Art
[0003] Current large-scale survival games can be divided into survival zones and home zones. The survival zone is a public area accessible to all players and allows them to perform any actions. The home zone is controlled by permissions and belongs to specific players, allowing only those players to perform destruction and creation within it. In existing technologies, after logging into the game, players retrieve the game data for the survival and home zones from the server. Based on this data, the client creates the home zone when the game character enters the home. If the home contains a large number of resources, the game data will be large, resulting in slow loading times and a poor gaming experience. Summary of the Invention
[0004] In view of the above problems, the present invention is proposed to provide a method and device for processing game scene data, a computer program, and a readable medium that overcome the above problems or at least partially solve or alleviate the above problems.
[0005] According to one aspect of the present invention, a method for processing game scene data is provided, which is used for a client and includes:
[0006] In response to a request from a game character to enter a game scene, obtaining basic data and first change data corresponding to the game scene, wherein the game scene is composed of a preset number of scene blocks;
[0007] determining, according to the first change data, a first changed scene block in which data is changed in the scene block and first scene block change data contained in the first change data corresponding to the first changed scene block;
[0008] The game scene is displayed based on the basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data.
[0009] According to another aspect of the present invention, there is provided a device for processing game scene data, for use on a client, comprising:
[0010] A scene data acquisition module, configured to, in response to a request from a game character to enter a game scene, acquire basic data and first change data corresponding to the game scene, wherein the game scene is composed of a preset number of scene blocks;
[0011] a first changed data determining module, configured to determine, based on the first changed data, a first changed scene block in which data has been changed in the scene block and first scene block changed data in the first changed data corresponding to the first changed scene block;
[0012] A game scene display module is used to display the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and preset resource data.
[0013] According to another aspect of the present invention, there is provided a computer program comprising computer-readable code, which, when executed on a server, causes the server to execute the method for processing game scene data according to any one of claims 1 to 10.
[0014] According to yet another aspect of the present invention, there is provided a computer-readable medium in which the computer program according to claim 12 is stored.
[0015] The beneficial effects of the present invention are:
[0016] When a game character in the game requests to enter a certain game scene, the basic data and first change data corresponding to the game scene are obtained. During the reading process of the character entering the game scene, the initial game scene is loaded according to the basic data and the scene block where the resource data has been modified is configured accordingly based on the first change data, so that the modified game scene can be displayed at the end of the reading, realizing the game character's experience of the game scene. The embodiment of the present invention stores basic data and change data in the form of scene blocks. The server will save the change data of the scene blocks that have changed in the initial game scene, avoiding the problem of excessive storage and low data transmission rate caused by storing the resource data of the entire game scene. Therefore, when the game character requests to enter the game scene, the change data will be sent to the client. The client can make necessary modifications according to the change data based on the initial game scene to reduce the amount of modification, so that the game character can display the latest game scene resources when entering the game scene, speed up the game scene creation speed, and improve the player's gaming experience.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0019] Figure 1 The following schematically shows a flow chart of a method for processing game scene data according to an embodiment of the present invention;
[0020] Figure 2 The following schematically shows a flow chart of a method for processing game scene data according to an embodiment of the present invention;
[0021] Figure 3 Schematically shows a schematic diagram of the editing effect of terrain and landforms in a game scene according to one embodiment of the present invention;
[0022] Figure 4 The following schematically shows a flow chart of a method for processing game scene data according to an embodiment of the present invention;
[0023] Figure 5 A schematic diagram illustrating the structure of a device for processing game scene data according to an embodiment of the present invention is shown;
[0024] Figure 6 A schematic diagram illustrating the structure of a device for processing game scene data according to an embodiment of the present invention is shown;
[0025] Figure 7 A block diagram schematically shows a server for executing the method according to the present invention; and
[0026] Figure 8 A memory unit for holding or carrying a program code for implementing the method according to the present invention is schematically shown. Specific embodiments
[0028] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0029] In this embodiment, a method for processing game scene data is provided, such as Figure 1 As shown, the method includes:
[0030] Step 101: In response to a request from a game character to enter a game scene, basic data corresponding to the game scene and first change data are obtained from a server, wherein the game scene is composed of a preset number of scene blocks, and the basic data includes scene block basic data corresponding to each scene block;
[0031] Step 102: determining, based on the scene block basic data and the first changed data, a first changed scene block in which data has been changed and first scene block changed data corresponding to the first changed scene block;
[0032] Step 103 : Displaying the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data.
[0033] Embodiments of the present invention are primarily applicable to game terminals, where players can experience games. When a game character, played by a player during the game experience, initiates a request to enter a specific game scene, the request is first parsed to obtain a scene identifier corresponding to the game scene, and then, based on the scene identifier, scene data corresponding to the game scene is obtained. In embodiments of the present invention, the game scene is a home zone scene within the game. For example, the game scene can be Home A owned by game character A within the game, or Home B owned by game character B, which game character A wishes to visit within the game. Furthermore, the scene data corresponding to the game scene specifically includes two parts: basic data and first modified data. The basic data includes the initial game resource data within the home, as designed by the game developer when the home is created. For example, the terrain (e.g., mountains, rivers, etc.), landforms (e.g., deserts, gravel, fallen petals, etc.), items (e.g., houses, furniture, statues, etc.), and plants (e.g., various types of flowers and plants) within the home, as designed by the game developer at the time of creation. The initial game resources are typically very simple. For example, the terrain can be entirely flat, containing only one type of landform, and the home can contain only essential items, such as main city buildings and teleportation points. Basic data can be obtained from the game server. The game terminal sends a data request message carrying a game scene identifier to the game server. The game server returns the basic data for the game scene based on the game scene identifier. To reduce the amount of data transmission, the basic data can also be stored in the game terminal. When the game character first requests to enter the game scene, the basic data is obtained from the server and stored in the game terminal, so that the initial game scene can be quickly loaded based on the basic data. The first change data corresponding to the game scene is generally obtained from the game server. The first change data is the modification data of the game character to the game scene's resources during the game experience, such as changing the main city building in the home from style 1 to style 2. The game server can record the modification data to ensure that the game scene matches the player's modification operation when generating the game scene.
[0034] Secondly, in order to facilitate the storage of change data and speed up the creation of game scenes in the embodiment of the present invention, the game scene is divided into a preset number of scene blocks according to certain rules, and each scene block represents a part of the game scene. For example, the total area of the game home is 4096 square meters, and the game home is divided into 64 blocks. Each scene block represents 64 square meters in the home. The basic data includes the scene block basic data corresponding to each scene block, and the first change data stored by the server can only include the scene blocks involved in the modified content in the home and their corresponding modification data. For example, if the game resources corresponding to scene block 1 are modified, then the first change data includes the first changed scene block 1 and its corresponding modification data, that is, the first scene block change data, so that only the modification content corresponding to the modified scene block in the home needs to be recorded, which reduces the data volume of the change data and improves the data transmission speed. Since the same scene block in the game scene may undergo multiple changes, for example, scene block 1 has undergone two changes. In the first change, the terrain map of scene block 1 was changed from the initial desert to gravel, and in the second change, the terrain map of scene block 1 was changed from gravel back to desert. If the server uses the final change data as storage content, it will record the data "the terrain map corresponding to scene block 1 is desert" in the change data. Therefore, when the game terminal obtains the first change data, it can first determine which scene blocks have changed game data compared to the basic data based on the basic data and the first change data, that is, determine the first change scene block and its corresponding first scene block change data, so as to modify the game resources in each first change scene block based on the initial game scene and the first scene block change data.
[0035] Finally, based on the basic data, the first change data, and the game resource data pre-stored in the game terminal, a game scene is generated and displayed, presenting the game scene in the form of a copy. Specifically, when the game character requests to enter the home, a home is created, and when the game character leaves the home, the home copy is destroyed. Specifically, when the game character requests to enter the home, a default home scene can be loaded based on the basic data and the game server can wait for the first change data to be synchronized. After receiving the first change data, the game terminal only needs to configure the corresponding content in the default home scene based on the first change scene block contained in the first change data and its corresponding first scene block change data. After the configuration is completed, the progress bar displayed in the game for entering the game home ends, and the game character enters the home scene. The game resources displayed in the home scene are the latest game resources for that home scene stored on the server. The game resource data pre-stored in the game terminal may include terrain resource data, landform resource data, plant resource data, and item resource data, among others. The first scene block change data may carry identifiers representing these game resources and modification locations, so that the game resources at the corresponding modification locations can be modified to the game resources corresponding to the game resource identifiers carried in the change data.
[0036] By applying the technical solution of this embodiment, when a game character in the game requests to enter a certain game scene, the basic data and the first change data corresponding to the game scene are obtained. During the reading process of the character entering the game scene in the game, the initial game scene is loaded according to the basic data and the scene block where the resource data is modified is configured accordingly based on the first change data, so that the modified game scene can be displayed at the end of the reading, realizing the game character's experience of the game scene. The embodiment of the present invention stores basic data and change data in the form of scene blocks. The server will save the change data of the scene blocks that have changed in the initial game scene, avoiding the problem of excessive storage and low data transmission rate caused by storing the resource data of the entire game scene. Therefore, when the game character requests to enter the game scene, the change data will be sent to the client. The client can make necessary modifications according to the change data on the basis of the initial game scene, reduce the amount of modification, so that the game character can display the latest game scene resources when entering the game scene, speed up the game scene creation speed, and improve the player's gaming experience.
[0037] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for processing game scene data is provided. In the game, if the game character enters the game scene belonging to itself, the resources in the game scene can be modified, such as Figure 2 As shown, if the game character is a master character, the method includes:
[0038] Step 201: In response to a request from a game character to enter a game scene, basic data corresponding to the game scene and first change data are obtained from a server, wherein the game scene is composed of a preset number of scene blocks, and the basic data includes scene block basic data corresponding to each scene block;
[0039] Step 202: Determine, based on the scene block basic data and the first changed data, a first changed scene block in which data has been changed and first scene block changed data corresponding to the first changed scene block.
[0040] Step 203: Display the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data.
[0041] Step 203 may specifically include:
[0042] Step 203-1, writing the scene block basic data and the first scene block change data into the local memory;
[0043] Step 203-2: submitting the scene block basic data and the first scene block change data in the local memory to the preset engine for rendering, and displaying the rendered game scene;
[0044] In the above embodiment, when the master character requests to enter the game home, the basic data and first change data corresponding to the game home are obtained, and based on each scene block of the game home, the basic data and first change data corresponding to the scene block are written into the local memory of the game terminal, so that the local memory submits the written data to the bottom layer of the engine and hands it over to the game terminal GPU for rendering, thereby displaying the rendered home when the game character enters the home.
[0045] In addition, in order to speed up the loading speed of the game scene and improve the display effect of the game scene, the process of displaying the game scene in step 203 may specifically include:
[0046] Step 203-3: Determine the display priority of the item resources based on the distance between the item resources contained in the game scene and the preset position and the volume of the item resources, wherein the preset position is the initial position of the game character when entering the game scene;
[0047] Step 203-4: Display the item resources in the game scene in order from high to low display priority.
[0048] In the above embodiment, when displaying the item resources of the game scene, the display priority of the item resources can be set according to the volume characteristics of the item resources themselves and the positional relationship between the item resources and the game characters, and the item resources of the game scene can be rendered and displayed according to the priority. For example, larger items are generally more conspicuous than smaller ones. Conspicuous items generally come into the player's field of view more quickly. Therefore, during the rendering and display process of item resources on the game terminal, these items can be prioritized. Furthermore, the conspicuousness of item resources is not only related to the size of the item, but also closely related to the distance between the item resource and the game character. Items of the same size that are closer to the character should be displayed before items that are farther away. To determine the distance relationship between item resources and the game character, the initial position at which the game character enters the game scene, i.e., the aforementioned preset position, can be set. The display priority of each item resource within the game scene can be determined by calculating the distance between the preset position and each item resource and combining it with the item resource's volume. Thus, the game resources within the scene are displayed sequentially according to their priority. When the game character first enters the game scene, each item resource appears gradually, from near to far and from large to small, so that closer and larger items are loaded first. This speeds up the loading of the game scene, shortens the loading time for the game character to enter the scene, and visually improves the player's gaming experience.
[0049] It should be noted that step 203-3 and step 203-4 can not only serve as alternatives to step 203, but can also be combined with step 203-2. When the preset engine renders the item resources in the game scene, it first calculates the display priority of each item resource, and then renders and displays the item resources separately according to the priority order.
[0050] Step 204: outputting an editing interface for the game scene based on the received editing instruction for the game scene;
[0051] Step 205: acquiring operation data on the editing interface frame by frame, and determining, based on the operation data, an editing scene block corresponding to the operation data and editing data corresponding to the editing scene block, wherein the operation data includes at least one of terrain operation data, landform operation data, plant operation data, and item operation data;
[0052] Step 206: Render and refresh the game scene frame by frame based on the edited scene blocks, edited data, and preset resource data.
[0053] In steps 204 to 206, the master character can modify and rebuild the game home belonging to him / her. After entering the game home, the master character can issue editing instructions for the game scene, such as triggering the "home editing" or "home modification" module in the game, and entering the editing interface of the game scene in the game. The editing interface can provide players with various replaceable game resources, such as various types of plants and optional plant planting densities, buildings, sculptures, furniture and other items of various shapes and functions, various landforms such as deserts and gravel, and various landforms such as mountains, rivers, etc. In addition, brushes of various shapes and sizes can be provided to players. Players can use brushes to edit the terrain and landforms in the game scene, such as brushes of various shapes such as heart, square, circle and five-pointed star. Players can adjust the size of the brush by stretching and scaling.
[0054] After the editing interface of the game scene is displayed, the player can make any changes to the resources in the game scene in the editing interface, such as freely editing the terrain, landforms, planting flowers and plants, placing buildings, etc. The game terminal captures the operation data of the editing interface and determines the content that the player wants to edit based on the captured operation data. Specifically, the editing scene block can be determined based on the player's operation position, and the editing data corresponding to the editing scene block can be determined based on the operation content. The operation data may include terrain operation data, landform operation data, plant operation data, and item operation data, wherein the terrain operation data includes the shape and size of the terrain brush, the terrain editing position, and the terrain editing height; the landform operation data includes the shape and size of the terrain brush, the movement trajectory of the terrain brush, and the landform resource selection data; the plant operation data includes the type of plant resource selection, the location of the plant resource selection, and the density of the plant resource selection; the item operation data includes the type of item resource selection, the location of the item resource selection, the direction of the item resource selection, and the associated resource data. For example, for terrain operations, use the brush to click the ground and hold down the mouse to make the terrain rise or fall continuously. Moving the mouse during this process has no effect. For surface operations, click the brush to directly draw the pattern on the surface. Mouse dragging is supported. For object operations, you can drag the target object to the target position. You can also set the association between the target object and the associated object. For example, if the target object is a table, you can set the associated object to a house, and the association can be that the table is located in a certain position in the house. For plant planting operations, you can set the planting density and drag the target plants to plant them at the target position according to the set density. In addition, more specific rules can be set. For example, in addition to the base map landforms, up to 5 other landforms can be set within a certain range of the ground, and mountains and rivers must be within a certain height range, etc.
[0055] Finally, the game scene is rendered using the edited scene blocks and edited data to achieve the desired effect. Specifically, corresponding to steps 203-1 and 203-2, step 206 may include: updating the data in the local memory frame by frame based on the edited data corresponding to the edited scene blocks; submitting the edited data in the local memory to the preset engine for rendering, and refreshing the game scene. The game terminal captures the operation data frame by frame, writes the edited scene blocks and edited data corresponding to the operation data into memory, and submits them to the engine bottom layer for frame-by-frame rendering and display, truly achieving "what you see is what you get." Figure 3 FIG1 shows a schematic diagram of the editing effect of the terrain and landforms in the game scene provided by an embodiment of the present invention. Figure 3 Shown are the landforms drawn by the heart-shaped brush (1), the landforms drawn by the square brush (2), the mountains drawn by the circular brush (3), and the puddles dug by the five-pointed star brush (4).
[0056] Step 207, receiving an instruction to save the operation data;
[0057] Step 208: Based on the editing scene block and the editing data, generate and send second change data to the server, so that the server generates third change data based on the second change data and the first change data, and sends the third change data to the visitor character terminal when there is currently a visitor character in the game scene, wherein the second change scene block included in the second change data is the editing scene block, and the second change data corresponding to the second change scene block is the editing data.
[0058] In steps 207 and 208, the player can click the Save button at any time to send the currently edited home data to the game server for storage to avoid data loss. The player can trigger the scene save module to save the edited game scene. After the game terminal receives the save instruction for the operation data, it generates second change data based on the edited scene block and the edited data corresponding to the operation data, and sends the second change data to the game server for storage. After receiving the second change data, the game server can update the first change data stored in the game server. For example, if the first change data includes the first change data for scene block 1 and the second change data also includes changes to scene block 1, the game server can directly replace the original first change data with the second change data for scene block 1 in the second change data to obtain the third change data. For another example, if the first change data includes the first change data for scene block 2 and the second change data is to restore the game resource data corresponding to scene block 2 to the basic data corresponding to scene block 2, the game server can delete the originally stored first change data for scene block 2. In the embodiment of the present invention, the change data obtained by merging the first change data and the second change data is called the third change data. That is, the first change data in the embodiment of the present invention is the modification data of the initial game scene stored by the game server when the game character enters the game scene, the second change data is the modification data of the current game scene by the master character, and the third change data is the modification data of the modified game scene compared with the initial game scene after the master character modifies the current game scene.
[0059] In addition, the editing interface can also provide undo and redo modules. Players can trigger the undo module to undo the editing effect of the previous step. Triggering the redo module can return the game scene to the effect of the last saved data, thereby improving the fault tolerance of player operations.
[0060] In an embodiment of the present invention, to further improve data transmission speed and save data transmission traffic, data compression can be performed before sending the second change data to the game server. Specifically, the editing data corresponding to each edited scene block is compressed to obtain compressed data corresponding to each edited scene block; and the compressed data is compressed to obtain the second change data corresponding to all edited scene blocks. In a certain game home scene in actual application, the game client divides the editable part of the game home into 64 blocks, each of which is 64*64m2 in size, and stores them in blocks. The various positions, heights, and angles of the terrain, landforms, objects, plants, etc. on each scene block are stored. Due to the limited size of the home scene, technicians compress the basic data or change data corresponding to each scene block into 16-bit data with almost no loss of accuracy, and then compress the entire data again. Statistics on the home sizes of external network players show that the size of almost all home data is within 1MByte, achieving the effect of improving data transmission speed and saving data transmission traffic.
[0061] In the game, if a game character enters a game scene that does not belong to him / herself, and if the owner of the game scene modifies the game scene during the tour in the game scene, the game scene displayed on the visitor's game terminal should also be changed accordingly. The embodiment of the present invention provides another method for processing game scene data, such as Figure 4 As shown, if the game character is a visitor character, the method includes:
[0062] Step 301: In response to a request from a game character to enter a game scene, basic data corresponding to the game scene and first change data are obtained from a server, wherein the game scene is composed of a preset number of scene blocks, and the basic data includes scene block basic data corresponding to each scene block.
[0063] Step 302: Determine, based on the scene block basic data and the first changed data, a first changed scene block in which data has been changed and first scene block changed data corresponding to the first changed scene block.
[0064] Step 303: Display the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data;
[0065] Step 304: When receiving the third change data corresponding to the game scene from the server, the game scene is refreshed based on the third change data and the game character is controlled to return to a preset position, wherein the preset position is the initial position of the game character when entering the game scene.
[0066] In the above embodiment, the description of steps 301 to 303 can be found in Figure 2Based on the description corresponding to steps 201 to 203 in the illustrated embodiment, in step 304, when the visitor character is touring the game scene, if the game scene is modified by the host, that is, when the host character corresponding to the game scene sends the second change data to the game server, the game server will merge the stored first change data and the received second change data to obtain the third change data corresponding to the game scene, and when the game server inquires that there is currently a visitor character visiting the game scene, it sends the third change data to the game terminal corresponding to the visitor character. After the game terminal receives the third change data corresponding to the game scene sent by the game server in real time, it determines the third change scene block and its corresponding third scene block change data based on the basic data stored in the memory and the first change data, thereby submitting the third change scene block and its corresponding third scene block change data to the bottom layer of the engine to achieve re-rendering of the game scene and refresh the currently displayed game scene. After the refresh, the visitor character returns to the initial position when entering the game scene.
[0067] In any embodiment of the present invention, the editable and non-editable areas of the game home can also be defined. For example, each player can have their own home, where the editable area is 512*512m². Including the surrounding non-editable landscape area, the total area is 1024*1024m². In addition, the game home can also provide a one-click switching home style function. Each home style corresponds to specific basic data and surrounding environment data. Styles may include dense forest ancient house, desert pearl, sky city, fairy island, etc. Moreover, the game home is easy to edit and can be refreshed immediately after editing. If the home owner edits the home while the player is visiting another home, the home landscape will immediately change, and the player will be teleported to the location set by the owner. The home editing function can be triggered for the player's own home. It is easy to operate and provides a variety of shapes and sizes of brushes. All operations support undo, redo, and save. Multiple home items can be selected and moved and rotated with one click. Players can save and cancel at any time during the editing process. If they choose to save, the data will be immediately sent to the server, without worrying about data loss.
[0068] In addition, the item resources in the provided preset resource data can come with some small gameplay, for example, material production: some buildings can produce four materials: stone, wood, iron, and cloth; home item production: using the four materials, you can use certain buildings to produce new home items, or find someone to produce them in other homes; planting and stealing vegetables: the farms and ranches in the home provide planting and stealing gameplay; grabbing red envelopes: you can put game coins in the "treasure pot" of the home building, and other players can come to grab red envelopes; battle of mythical beasts: the home can cultivate guardian beasts, and fight in the "pet fortress" of the home building; likes: you can like other players' homes, and the players with the highest number of likes will appear in the rankings, which is convenient for other players to enter excellent homes through the rankings to appreciate and play.
[0069] Further, as Figure 1 The specific implementation of the method, the embodiment of the present invention provides a device for processing game scene data, such as Figure 5 As shown, the device includes:
[0070] A scene data acquisition module 51 is configured to, in response to a request from a game character to enter a game scene, acquire basic data and first modification data corresponding to the game scene from a server, wherein the game scene is composed of a preset number of scene blocks, the basic data includes scene block basic data corresponding to each scene block, and the first modification data includes data modified by the player on resources within the game scene;
[0071] A first changed data determining module 52 is configured to determine, based on the scene block basic data and the first changed data, a first changed scene block in which data has been changed and first scene block changed data corresponding to the first changed scene block;
[0072] The game scene display module 53 is used to display the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data.
[0073] In a specific application scenario, the preset resource data includes at least terrain resource data, landform resource data, plant resource data, and item resource data.
[0074] In specific application scenarios, such as Figure 6 As shown, the game scene display module 53 specifically includes:
[0075] A display priority determination unit 531 is configured to determine the display priority of an item resource based on the distance between the item resource contained in the game scene and a preset position and the volume of the item resource, wherein the preset position is the initial position of the game character when entering the game scene;
[0076] The item resource display unit 532 is used to display the item resources in the game scene in order from high to low display priority.
[0077] In specific application scenarios, such as Figure 6 As shown, the device also includes:
[0078] The editing interface output module 54 is used to output the editing interface of the game scene based on the received editing instructions for the game scene after the game scene is displayed if the game character is the master character;
[0079] An editing data acquisition module 55 is configured to acquire operation data on the editing interface frame by frame, and determine, based on the operation data, an editing scene block corresponding to the operation data and editing data corresponding to the editing scene block, wherein the operation data includes at least one of terrain operation data, landform operation data, plant operation data, and item operation data;
[0080] The game scene refresh module 56 is used to render and refresh the game scene frame by frame based on the edited scene blocks, edited data and preset resource data.
[0081] In specific application scenarios, such as Figure 6 As shown, the game scene display module 53 specifically includes:
[0082] A first memory writing unit 533 is used to write the scene block basic data and the first scene block change data into the local memory;
[0083] The game scene display unit 534 is used to submit the scene block basic data and the first scene block change data in the local memory to the preset engine for rendering, and display the rendered game scene;
[0084] The game scene refresh module 56 specifically includes:
[0085] The second memory writing unit 561 is used to update the data in the local memory frame by frame based on the editing data corresponding to the editing scene block;
[0086] The game scene refresh unit 562 is used to submit the edited data in the local memory to the preset engine for rendering and refresh the game scene.
[0087] In specific application scenarios, such as Figure 6 As shown, the device also includes:
[0088] A save instruction receiving module 57 is used to receive a save instruction for the operation data after rendering and refreshing the game scene frame by frame;
[0089] The second change data generation module 58 is used to generate and send second change data to the server based on the editing scene block and the editing data, so that the server generates third change data based on the second change data and the first change data, and sends the third change data to the visitor character terminal when there is currently a visitor character in the game scene, wherein the second change scene block included in the second change data is the editing scene block, and the second change data corresponding to the second change scene block is the editing data.
[0090] In specific application scenarios, such as Figure 6 As shown, the second change data generating module 58 specifically includes:
[0091] A first compression unit 581 is configured to perform data compression processing on the editing data corresponding to each editing scene block to obtain compressed data corresponding to each editing scene block;
[0092] The second compression unit 582 is configured to perform data compression processing on the compressed data to obtain second change data corresponding to all edited scene blocks.
[0093] In specific application scenarios, terrain operation data includes terrain brush shape and size, terrain editing position and terrain editing height; landform operation data includes terrain brush shape and size, terrain brush movement trajectory and landform resource selection data; plant planting operation data includes plant resource selection type, plant resource selection position and plant resource selection density; item operation data includes item resource selection type, item resource selection position, item resource selection direction and related resource data.
[0094] In specific application scenarios, such as Figure 6 As shown, the device also includes:
[0095] The third change data receiving module 59 is used to refresh the game scene and control the game character to return to the preset position based on the third change data after the game scene is displayed, if the game character is a visitor character, when the third change data corresponding to the game scene is received from the server, wherein the preset position is the initial position of the game character when entering the game scene.
[0096] In a specific application scenario, the basic data also includes a basic style identifier of the game scene, and the scene block basic data matches the basic style of the game scene.
[0097] The various component embodiments of the present invention may be implemented in hardware, as software modules running on one or more processors, or as a combination thereof. Those skilled in the art will appreciate that, in practice, a microprocessor or digital signal processor (DSP) may be used to implement some or all of the functions of some or all of the components of the game scene data processing device according to the embodiments of the present invention. The present invention may also be implemented as a device or apparatus program (e.g., a computer program or computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium or in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0098] For example, Figure 7 A server, such as an application server, that can implement the processing of game scene data according to the present invention is shown. The server conventionally includes a processor 710 and a computer program product or computer-readable medium in the form of a memory 720. The memory 720 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 720 has a storage space 730 for program code 731 for executing any method step in the above method. For example, the storage space 730 for program code may include individual program codes 731 for implementing various steps in the above method respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically as described in reference. Figure 8 The portable or fixed storage unit. The storage unit may have Figure 7 The memory 720 in the server is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Typically, the storage unit includes computer-readable code 731, i.e., code that can be read by a processor such as 710, which, when executed by the server, causes the server to perform the steps of the method described above.
[0099] References herein to "one embodiment," "an embodiment," or "one or more embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Furthermore, please note that instances of the phrase "in one embodiment" do not necessarily all refer to the same embodiment.
[0100] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0101] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0102] Furthermore, it should be noted that the language used in this specification is selected primarily for readability and didactic purposes, rather than for the purpose of explaining or limiting the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is intended to be illustrative rather than restrictive of the scope of the present invention, which is defined by the appended claims.
Claims
1. A method for processing game scene data, used in a client, characterized in that: include: In response to a request from a game character to enter a game scene, obtaining basic data and first modification data corresponding to the game scene, wherein the game scene is composed of a preset number of scene blocks; the basic data reflects initial game resource data of the game scene, and the first modification data reflects modifications to the initial game resources within the game scene; determining, according to the first change data, a first changed scene block in which data is changed in the scene block and first scene block change data contained in the first change data corresponding to the first changed scene block; The game scene is displayed based on the basic data, the first scene block change data corresponding to the first change scene block, and the preset resource data.
2. The method according to claim 1, characterized in that The basic data includes scene block basic data corresponding to each of the scene blocks, and the first change data includes the final modification data of the player on the resources in the game scene recorded by the server before the game character enters the game scene.
3. The method according to claim 1 or 2, characterized in that The obtaining of the basic data and the first change data corresponding to the game scene specifically includes: Obtaining the first change data from the server; The basic data is obtained from the client.
4. The method according to claim 1 or 2, characterized in that The presenting of the game scene specifically includes: Determining the display priority of the item resources according to the distance between the item resources contained in the game scene and a preset position and the volume of the item resources, wherein the preset position is the initial position of the game character when entering the game scene; The item resources in the game scene are displayed in sequence according to the display priority from high to low.
5. The method according to claim 1 or 2, characterized in that After presenting the game scene, the method further includes: If the game character is a master character, outputting an editing interface of the game scene based on the received editing instruction for the game scene; Acquiring operation data on the editing interface frame by frame, and determining an editing scene block corresponding to the operation data and editing data corresponding to the editing scene block based on the operation data, wherein the operation data includes at least one of terrain operation data, landform operation data, plant operation data, and item operation data; Based on the editing scene block, the editing data and the preset resource data, the game scene is rendered and refreshed frame by frame.
6. The method according to claim 5, characterized in that The presenting of the game scene specifically includes: Writing the scene block basic data and the first scene block change data into a local memory; Submitting the scene block basic data and the first scene block change data in the local memory to a preset engine for rendering, and displaying the rendered game scene; The frame-by-frame rendering and refreshing of the game scene specifically includes: updating the data in the local memory frame by frame based on the editing data corresponding to the editing scene block; Submit the edited data in the local memory to the preset engine for rendering, and refresh the game scene.
7. The method according to claim 5, characterized in that After rendering and refreshing the game scene frame by frame, the method further includes: receiving an instruction to save the operation data; Based on the editing scene block and the editing data, second change data is generated and sent to the server, so that the server generates third change data based on the second change data and the first change data, and sends the third change data to the visitor character terminal when a visitor character currently exists in the game scene, wherein the second change scene block included in the second change data is the editing scene block, and the second change data corresponding to the second change scene block is the editing data.
8. The method according to claim 1 or 2, characterized in that After presenting the game scene, the method further includes: If the game character is a visitor character, when the third change data corresponding to the game scene is received from the server, the game scene is refreshed based on the third change data and the game character is controlled to return to a preset position, wherein the preset position is the initial position of the game character when entering the game scene.
9. A device for processing game scene data, used in a client, characterized in that: include: a scene data acquisition module, configured to, in response to a request from a game character to enter a game scene, acquire basic data and first modification data corresponding to the game scene, wherein the game scene is composed of a preset number of scene blocks; the basic data reflects initial game resource data of the game scene, and the first modification data reflects modifications to the initial game resources within the game scene; a first changed data determining module, configured to determine, based on the first changed data, a first changed scene block in which data has been changed in the scene block and first scene block changed data in the first changed data corresponding to the first changed scene block; A game scene display module is used to display the game scene based on the scene block basic data, the first scene block change data corresponding to the first change scene block, and preset resource data.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing game scene data according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Terrain data processing method and device, storage medium, processor and terminal
CN110070609A
Game scene data processing method and device, storage medium and computer equipment
CN112023399A