Game display control methods, devices, computer equipment and media

By masking the game scene and setting color information, the game map is automatically generated, solving the problems of low efficiency and error-proneness in existing technologies for generating game maps, and achieving efficient and accurate game map generation.

CN115888103BActive Publication Date: 2025-10-28NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211355524.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-01
Publication Date
2025-10-28
Estimated Expiration
2042-11-01

AI Technical Summary

Technical Problem

In existing technologies, generating game maps requires manual processing of image resources, which is inefficient and prone to errors.

Method used

By acquiring multiple scene regions corresponding to different depth levels in the game scene, performing masking processing to obtain masking information, and setting corresponding color information according to the depth level and initial color information, the game map is automatically generated.

Benefits of technology

It improves the efficiency of generating game maps, avoids errors caused by manual operation, and ensures the accuracy and consistency of the generated game maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115888103B_ABST
    Figure CN115888103B_ABST
Patent Text Reader

Abstract

This application discloses a game display control method, apparatus, computer device, and medium. The embodiments of this application acquire a game scene, which includes multiple scene regions corresponding to different depth levels. The scene regions are masked to obtain masking information. Initial color information corresponding to the scene region is obtained based on its depth level. Based on the initial color information and the masking information, corresponding color information is set for the scene region. A game map is generated from the scene regions, and the game map includes blocks with corresponding color information. In this application embodiment, different colors can be automatically set for different depth levels based on the initial color information and masking information of the scene regions to generate a flat-painted style game map that marks different scene regions with different colors. This improves the efficiency of game map generation and also avoids errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game technology, specifically to game display control methods, devices, computer equipment, and media. Background Technology

[0002] In recent years, with the development of game technology, game content has become increasingly diversified, gradually enriching users' daily lives. In some games, a game map is displayed on the game interface, allowing players to understand the game environment and their location within it.

[0003] In existing technologies, game developers typically categorize and capture screenshots of 3D game scenes to obtain image resources, which are then overlaid to generate a game scene map. However, this method requires manual processing and image overlay, which is time-consuming, labor-intensive, inefficient, and prone to errors. Summary of the Invention

[0004] This application provides a method, apparatus, computer device, and medium for displaying games, which can improve the efficiency of generating game maps and avoid errors.

[0005] This application provides a game display control method, comprising: acquiring a game scene, the game scene including multiple scene regions corresponding to different depth levels; performing masking processing on the scene regions to obtain masking information corresponding to the scene regions; acquiring initial color information corresponding to the scene regions according to the depth level corresponding to the scene regions; setting corresponding color information for the scene regions according to the initial color information and the masking information corresponding to the scene regions; and generating a game map from the scene regions, the game map including blocks corresponding to the color information.

[0006] This application embodiment also provides a game display control device, including: a scene acquisition unit for acquiring a game scene, the game scene including multiple scene areas corresponding to different depth levels; a masking processing unit for masking the scene areas to obtain masking information corresponding to the scene areas; a color acquisition unit for acquiring initial color information corresponding to the scene areas according to the depth level corresponding to the scene areas; a color setting unit for setting corresponding color information for the scene areas according to the initial color information and the masking information corresponding to the scene areas; and a map generation unit for generating a game map from the scene areas, the game map including blocks corresponding to the color information.

[0007] This application also provides a computer device, including a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute steps in any of the game display control methods provided in this application.

[0008] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the game display control methods provided in this application.

[0009] This application embodiment can acquire a game scene, which includes multiple scene regions corresponding to different depth levels; perform masking processing on the scene regions to obtain masking information corresponding to the scene regions; obtain initial color information corresponding to the scene regions according to the depth level corresponding to the scene regions; set corresponding color information for the scene regions according to the initial color information and the masking information corresponding to the scene regions; and generate a game map from the scene regions, the game map including blocks corresponding to the color information.

[0010] In this application, after obtaining the masking information of the scene area, different colors can be automatically set for different depth levels based on the initial color information and masking information corresponding to the scene area, so as to generate a flat-painted style game map that marks different scene areas with different colors. This solves the problems of long processing time and easy errors caused by manually processing game maps, improves the efficiency of generating game maps, and can also avoid errors. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1a This is a schematic diagram of a scene illustrating the game display control method provided in an embodiment of this application;

[0013] Figure 1b This is a flowchart illustrating the game display control method provided in an embodiment of this application;

[0014] Figure 1c This is a flowchart illustrating the process of determining basic color information provided in an embodiment of this application;

[0015] Figure 1dThis is a flowchart illustrating the process of determining interpolated color information corresponding to multiple scene regions, provided in an embodiment of this application.

[0016] Figure 2a This is a schematic diagram illustrating the application of the game display control method provided in this application embodiment in a game engine;

[0017] Figure 2b This is a flowchart illustrating a game display control method provided in another embodiment of this application;

[0018] Figure 2c This is a schematic diagram of a game scene provided in an embodiment of this application;

[0019] Figure 2d This is a schematic diagram of the game map provided in an embodiment of this application;

[0020] Figure 2e This is a schematic diagram of yet another game map provided in an embodiment of this application;

[0021] Figure 2f This is a schematic diagram of yet another game map provided in an embodiment of this application;

[0022] Figure 2g This is a flowchart illustrating the process of determining interpolated color information corresponding to multiple scene regions, provided in another embodiment of this application.

[0023] Figure 2h This is a schematic diagram illustrating material examples provided in the embodiments of this application;

[0024] Figure 2i This is a schematic diagram of yet another game map provided in an embodiment of this application;

[0025] Figure 2j This is a schematic diagram of existing methods for generating game maps;

[0026] Figure 3 This is a schematic diagram of the structure of the game display control device provided in the embodiments of this application;

[0027] Figure 4 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0029] Before providing a detailed explanation of the embodiments of this application, some terms involved in the embodiments of this application will be explained.

[0030] The terms "first," "second," etc., used in this application may be used to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. "At least one" means one or more; for example, at least one scene region can be one scene region, two scene regions, three scene regions, or any integer greater than or equal to one. "Multiple" means two or more; for example, multiple scene regions can be two scene regions, three scene regions, or any integer greater than or equal to two scene regions.

[0031] The game scene refers to the game environment displayed (or provided) by the application when it runs on the terminal. This game scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. The game scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional. This application embodiment does not limit the dimension of the game scene. For example, the game scene may include the sky, land, and ocean, and the land may include environmental elements such as deserts and cities. The user can control a virtual character to move within this game scene.

[0032] The game map, in this context, refers to a map used to help players determine the location of their controlled character within the game world. It can be a small map typically placed in the corner of the game interface, or a panoramic map displayed after navigating to preset controls. The elements displayed on the game map generally vary depending on the game genre, and may include the player character, surrounding terrain, allied units or structures, enemies, important locations, or items. The game map can use lines, symbols, colors, and text annotations to depict the natural geography and other elements of the game scene.

[0033] Among them, the game interface refers to the interface of the application provided or displayed through the graphical user interface. This interface includes the graphical user interface for user interaction and the game screen, which is the screen of the game scene.

[0034] A game engine refers to a pre-written, editable computer game system or the core component of an interactive real-time graphics application. These systems provide game designers with a variety of tools needed to create games, aiming to enable them to easily and quickly develop game programs without starting from scratch. Most support multiple operating platforms, such as Linux, Mac OS X, and Microsoft Windows. A game engine includes the following systems: a rendering engine (i.e., a "renderer," including 2D and 3D graphics engines), a physics engine, a collision detection system, sound effects, a scripting engine, computer animation, artificial intelligence, a network engine, and scene management.

[0035] Custom Stencil refers to a custom depth, which allows certain objects to be rendered to another depth buffer (called a custom depth buffer).

[0036] Shader: refers to a shader used for real-time rendering in games.

[0037] Render Target refers to the rendering target, which is a texture that can be written at runtime.

[0038] Material instances are child objects of shaders, inheriting from them but not being able to modify the shader's calculation logic; they can only modify the parameters exposed by the shader.

[0039] PostProcessVolume refers to the post-processing volume, which allows for the combination and selection of attributes and functions that affect color, tone mapping, and lighting, thereby defining the overall appearance of the scene.

[0040] SceneCapture2D refers to the scene capture component, a tool in UE4 that enables scene capture.

[0041] This application provides a method, apparatus, computer device, and medium for displaying and controlling games.

[0042] Specifically, the game's display control device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0043] In some embodiments, the game's display control device can also be integrated into multiple electronic devices. For example, the game's display control device can be integrated into multiple servers, and the game's display control method of this application can be implemented by multiple servers.

[0044] In some embodiments, the server may also be implemented as a terminal.

[0045] For example, refer to Figure 1a In some embodiments, a schematic diagram of a game display control system is provided, which can implement a game display control method. The game display control system may include at least one terminal 1000, at least one server 2000, at least one database 3000, and a network 4000. The terminal, server, and database can interact with each other via the network.

[0046] The system comprises the following components: A server acquires the game scene, which includes multiple scene regions corresponding to different depth levels; it performs masking on these scene regions to obtain masking information; based on the depth level of each scene region, it obtains the initial color information for that region; based on the initial color information and the masking information, it sets the corresponding color information for each scene region; and it generates a game map from these scene regions, which includes blocks with corresponding color information. A database stores player data from gameplay on the terminal. A network is used for data transmission between the server and the terminal; the network can be a wireless or wired network, such as a wireless LAN (WLAN), LAN, cellular network, 2G network, 3G network, 4G network, or 5G network.

[0047] The following sections provide detailed descriptions. It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments. It is understood that in the specific embodiments of this application, user-related data is involved. When the following embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0048] In this embodiment, a method for controlling the display of a game is provided, such as... Figure 1b As shown, the specific flow of the game's display control method can be as follows:

[0049] 110. Obtain the game scene, which includes multiple scene areas corresponding to different depth levels.

[0050] Here, "scene region" can refer to a region within a game scene. For example, the area occupied by building A in a game scene can be considered the scene region corresponding to that building. In this embodiment, the scene region corresponding to a depth level can be the area occupied by a pixel (scene model) at that depth level within the game scene.

[0051] For example, the game scene can be divided into 1 to 7 depth levels based on its depth. The higher the depth level value, the farther the pixels within that scene are from the virtual camera; conversely, the higher the depth level value, the closer the pixels within that scene are to the virtual camera.

[0052] Scene depth can refer to the depth information of a game scene. For example, scene depth can include the depth values ​​of pixels in the game scene. The scene depth value can be represented by the number of pixels that a rendered point in the game scene is far from the camera. In the game scene, the closer a point is to the virtual camera, the smaller its scene depth value, and the farther away a point is from the virtual camera, the larger its scene depth value.

[0053] Optionally, the range of game scenes whose scene depth is obtained can be customized. For example, the scene depth of a portion of the game scenes can be obtained to generate a game map of that portion, or the scene depth of all game scenes can be obtained to generate a game map of all game scenes.

[0054] In some implementations, different depth levels can be set for different scene model components in the game scene. This allows for assigning different colors to each scene model component based on its depth level, automatically generating a game map that uses different colors to mark different scene model components, thus improving the efficiency of game map generation. Specifically, before acquiring the game scene, the process also includes:

[0055] Obtain game scenes, including:

[0056] Identify multiple scene model components from the game scene;

[0057] Different depth levels are set for the scene regions corresponding to multiple scene model components to obtain multiple scene regions with different depth levels.

[0058] In this context, a scene model can refer to the model of objects in a game scene. For example, a scene model can include, but is not limited to, multiple static virtual objects, specifically including ground, mountains, rocks, vegetation, and buildings. A scene model component can refer to a group of scene models composed of multiple scene models. For example, multiple vegetation models forming a forest or multiple road surface models connected together to form a road can be considered a scene model component.

[0059] For example, a game scene may include four scene model components: buildings, roads, rivers, and mountains. These four scene model components can be set to depth levels 1 to 4 respectively, that is, the scene areas corresponding to these four scene model components can be set to depth levels 1 to 4 in sequence.

[0060] Optionally, after setting the depth level for the scene model component, the depth level information and the color parameters corresponding to each depth level can be stored in the material module for easy access.

[0061] Optionally, before acquiring the game scene, the process further includes: if there are at least two scene model components in the game scene that correspond to the same scene depth, setting different depth levels for the at least two scene model components; if there are at least two scene model components in the game scene that belong to the same scene area, setting the same depth level for the at least two scene model components. This allows for a reasonable differentiation of the scene areas where all scene model components in the game scene reside, improving the accuracy of the generated game map.

[0062] 120. Perform masking on the scene area to obtain the masking information corresponding to the scene area.

[0063] In this context, a mask, also known as a veil, essentially uses material calculations to determine whether a model is displayed or not, using 0 and 1 to represent visibility. For example, based on the depth value of the scene area, a mask can be used to occlude areas of the model with greater scene depth, thus displaying areas with less scene depth. Similarly, at least one of the RGB color channels of the scene area can be occluded to display some colors. The mask used in this embodiment can be generated based on the scene area and used to cover areas of the model within the scene area. In practical use, the virtual mask can be a 3D or 2D mask, which can be adjusted according to actual needs; no specific limitation is made here.

[0064] Masking information can refer to information related to masking, such as parameters (either 0 or 1) used to characterize whether masking information is displayed or not, or color information of a scene area after it is masked. For example, masking information may include, but is not limited to, the display or non-display of the position of a scene area, or the display or non-display of the color channels corresponding to the scene area.

[0065] Optionally, masking can reduce the dimensionality of color information in the scene area to improve the efficiency of subsequent processing. Furthermore, using the processed color information as interpolation weights ensures that the processed display effect matches the scene area, increasing the accuracy of color settings for the scene area. Specifically, masking is performed on the scene area to obtain corresponding masking information, including: based on the color information of the scene area, masking is performed on the game scene to obtain the single-channel color information corresponding to the scene area. For example, the GB color channel in the RGB color channel of the scene area can be masked, thus displaying only the R color channel's color information, and this is used as the masking information.

[0066] 130. Based on the depth level of the scene area, obtain the initial color information corresponding to the scene area.

[0067] Initial color information can be set for scene regions at different depth levels to distinguish them. For example, initial color information can be preset for different depth levels, or the initial color information for any depth level can be set based on the color information corresponding to the depth level associated with that depth level.

[0068] In some implementations, the first color information can be quickly determined based on the scene depth of the game scene to improve processing efficiency. Specifically, before obtaining the initial color information corresponding to the scene region based on the depth level of the scene region, the following steps are also included:

[0069] Obtain the scene depth of the game scene;

[0070] Based on scene depth, generate virtual masks in the game scene;

[0071] Based on the masking information of the virtual mask, determine the basic color information.

[0072] For example, the scene depth of the game scene can be processed based on a preset mask algorithm such as the BoxMask-3D function, and a virtual mask can be generated based on the processing result. The processing result can be used as the basic color information, or the basic color information can be determined after further processing of the processing result.

[0073] Optionally, scene depth can include the model depth of the scene models in the game scene and the maximum depth of the game scene. Model depth can refer to the depth value of the pixels corresponding to the scene models in the game scene. The maximum depth of the game scene is the overall depth of the game scene, which can usually be set differently depending on the specific game engine, such as a maximum depth of 250,000.

[0074] For example, such as Figure 1c As shown, the model depth can be divided by the overall scene depth to obtain the parameter value. A mask can then be generated in the game scene based on this depth parameter to obtain occlusion information. It's understandable that scene models may not exist in all locations within the game scene. Therefore, after dividing the model depth by the maximum depth, the parameter value corresponding to areas with scene models will be non-zero, while the parameter value corresponding to scene areas without scene models will be zero. Thus, the mask can be used to distinguish between scene areas with parameter values ​​of zero and areas with non-zero parameter values ​​in the game scene.

[0075] Optionally, the masking information of the virtual mask can be a parameter representing whether the mask displays or does not display information, such as 0 for scene regions where a scene model exists and 1 for scene regions where a scene model does not exist. Alternatively, the masking information of the virtual mask can also be a parameter value of the model depth divided by the maximum depth.

[0076] Optionally, after obtaining the parameter value, it can be rounded down to obtain the first color information. By rounding down, the decimal part of the parameter value can be removed, so that when setting the color of an area in the game scene, a single-color area can be obtained, rather than an area with a gradient color.

[0077] In some implementations, the color parameters of different areas of the virtual mask can be interpolated using the masking information of the virtual mask, so as to set different display colors for different areas in the automated game scene, thereby improving the efficiency and accuracy of game map generation. Specifically, the virtual mask includes a first masking area and a second masking area. Based on the masking information of the virtual mask, basic color information is determined, including:

[0078] Based on the color parameters corresponding to the first masking area and the color parameters corresponding to the second masking area, the third color value of the first color channel and the fourth color value of the second color channel are determined respectively.

[0079] Using the masking information of the virtual mask as interpolation weights, the third and fourth color values ​​are interpolated to obtain the basic color information.

[0080] The color parameter can be a preset value, which can be represented by RGB color value or hexadecimal color value, such as black as RGB(0,0,0) and red as RGB(255,0,0), or black as #000000 and red as #FF00001.

[0081] Interpolation, also known as intrinsic interpolation, is based on the principle of determining a specific function f(x) using the known function values ​​at several points within a certain interval. The values ​​of this specific function are then used as approximations of f(x) at other points within the interval. In this application, the interpolation methods include any one or a combination of various interpolation algorithms such as the inverse distance multiplication method, Kriging, minimum curvature method, multiple regression method, radial fundamental function method, linear interpolation method, natural neighbor interpolation method, and nearest neighbor interpolation method. This application does not impose any particular limitations on these methods. For example, linear interpolation can be used to approximate the original function f(x) using a straight line passing through points A and B, and based on interpolation weights, the color to be displayed in the scene area can be numerically estimated using these two points.

[0082] In this context, a color channel refers to a channel that stores color information. In interpolation, a color channel can be represented as a point in the interpolation process; for example, in linear interpolation, point A and point B represent channels A and B, respectively. In this embodiment, the color information stored in the color channel is the color value. For instance, channel A can store the color parameters corresponding to red, and channel B can store the color parameters corresponding to green.

[0083] Interpolation weights refer to the weights used to soften channel colors during the interpolation process.

[0084] For example, interpolation can be performed using the Lerp function expression Lerp(A, B, Alpha), such as... Figure 1c As shown, the color parameter corresponding to the first masking region is used as the color value of channel A in the expression, the color parameter corresponding to the second masking region is used as the color value of channel B in the expression, and the masking information of the virtual mask is used as the interpolation weight Alpha in the expression. Based on the masking information of the virtual mask, A and B are blended, and the blended result is output. Since the masking information of the virtual mask represents data that is either 0 or 1, the output result after blending A and B is the color value of the region where the scene model exists and the color value of the region where the scene model does not exist; these two color values ​​are either the color value of A or B. If the masking information of the virtual mask represents the parameter value of the model depth divided by the maximum depth, then the parameter value is the color value of the blended A and B, which may not be either the color value of A or B.

[0085] Optionally, the first color channel is the A channel in the interpolation process, and the second color channel is the B channel in the interpolation process.

[0086] Optionally, the first masking region is the region where the scene model exists, and the second masking region is the region where the scene model does not exist in the game scene.

[0087] Optionally, the color parameters corresponding to the first masking area and the second masking area can be set to be the same, such as both being red. Thus, the color obtained by mixing these two color parameters is also red, which can be used as the background color of the game scene. If no scene area is detected in the subsequent process, the background color can be displayed to prompt the user.

[0088] In some implementations, color information can be set for multiple scene regions at different depth levels in the game scene, and the color information set for the scene region in the previous process can be used in the next process to set different display colors for different regions in the game scene, so that the colors of each block of the generated game map are different, increasing the accuracy of the generated game map. Specifically, the initial color information includes first color information and second color information. According to the depth level corresponding to the scene region, the initial color information corresponding to the scene region is obtained, including:

[0089] If the depth level of the scene area meets the preset conditions, obtain the basic color information and use the basic color information as the first color information;

[0090] If the depth level corresponding to the scene region does not meet the preset conditions, obtain the interpolated color information corresponding to the previous scene region, and use the interpolated color information corresponding to the previous scene region as the first color information. The previous scene region is the scene region preceding the scene region according to the depth level.

[0091] For example, such as Figure 1d As shown, the custom template for this scene can be subtracted by 1. The subtracted portion is the scene region with a custom depth (i.e., depth level) of 1 in the game scene, i.e., the first scene region. The basic color information can be used as the first color information of the first scene region, and the color parameters corresponding to the first scene region can be used as the second color information to determine the first color value of the first color channel (channel A) and the second color value of the second color channel (channel B). Then, based on the masking information corresponding to the first scene region as the interpolation weight, the first and second color values ​​are interpolated to obtain the interpolated color information corresponding to the first scene region. The value of the first scene region (e.g., the scene region with a custom depth of 1) can be subtracted by 1 again to obtain the scene region with a custom depth of 2, i.e., the second scene region. The color parameters corresponding to the second scene region are used as the second color information of the second scene region, and the interpolated color information is used as the first color information of the second scene region to determine the first color value of the first color channel (channel A) and the second color value of the second color channel (channel B). Then, based on the masking information corresponding to the second scene region as the interpolation weight, the first and second color values ​​are interpolated to obtain the interpolated color information corresponding to the second scene region. After obtaining the interpolated color information corresponding to the scene region with a custom depth of 2, it is possible to continue to detect whether there are scene regions other than the scene regions with custom depths of 1 and 2. If there are, and if there is a scene region with a custom depth of 3, the interpolated color information corresponding to the scene region with a custom depth of 2 is used as the first color information of the scene region with a custom depth of 3, and the second color information of the scene region with a custom depth of 3 is obtained. This process is repeated until the detection ends.

[0092] In some implementations, scene regions in the game scene can be detected sequentially to traverse all depth levels of scene regions in the game scene in an orderly manner, avoiding errors and omissions and increasing the accuracy of the generated game map. Specifically, the preset condition is that the scene region is the first scene region sorted by depth level.

[0093] The depth levels can be arranged in a preset order. This preset order can be based on the scene depth, such as sorting the depth levels from highest to lowest scene depth, or sorting them from lowest to highest scene depth.

[0094] For example, if the depth levels include depth levels 1 to 3 ordered from low to high, then the scene region corresponding to depth level 1 can be the first scene region, and the scene region corresponding to depth level 1 is the scene region preceding the scene region corresponding to depth level 2.

[0095] 140. Based on the initial color information and the masking information of the scene area, set the corresponding color information for the scene area.

[0096] After determining the masking information of the scene region, different colors can be set for different depth levels based on the initial color information corresponding to the scene region and the masking information to distinguish the scene regions. For example, operations such as blending, adjusting, and selecting the initial color information can be performed based on the masking information to output the color information corresponding to the scene region.

[0097] It should be noted that the execution order of steps 120 to 140 can be adjusted according to the actual application. For example, step 120 can be used to perform masking processing on each game scene separately to obtain the masking information corresponding to each scene area; or the game scene can be masked, and the masking information corresponding to each scene area can be obtained from the masking processing result. Then, steps 130 and 140 can be executed on each scene area separately to determine the color information corresponding to each scene area. Alternatively, steps 120 to 140 can be executed sequentially on each scene area according to the depth level. Furthermore, step 120 can be executed before or after step 130.

[0098] Optionally, color information can be set for scene regions sequentially according to the depth level. Specifically, obtaining the initial color information of a scene region according to its depth level can include: obtaining the initial color information of a target scene region according to its depth level, where the target scene region is the scene region determined by the depth level.

[0099] Based on the initial color information and the masking information of the scene area, the corresponding color information of the scene area is set. This can include: based on the initial color information and the masking information of the target scene area, the corresponding color information of the target scene area is set.

[0100] For example, steps 130 to 140 can be executed sequentially for scene regions with depth level 1, scene regions with depth level 2, and scene regions with depth level 3, according to the order of depth level from smallest to largest.

[0101] In some implementations, interpolation can be performed using the masking information corresponding to the scene region to set specific color values ​​for the scene region based on the masking information. This results in color differences between different blocks of the generated game map, increasing the accuracy of the generated game map. Specifically, based on the initial color information corresponding to the scene region and the masking information corresponding to the scene region, corresponding color information is set for the scene region, including:

[0102] Use the masking information corresponding to the scene region as the interpolation weight;

[0103] By using interpolation weights, the initial color information corresponding to the scene area is interpolated to obtain the interpolated color information;

[0104] Based on the interpolated color information, set the corresponding color information for the scene area.

[0105] Interpolated color information refers to the result of interpolation processing, which typically outputs color values.

[0106] For example, by masking the scene area, the color information of the R color channel in the RGB color channel of the scene area can be obtained as the mask information. This color information can be used as the interpolation weight. The original function f(x) can be approximated by using a straight line passing through points A and B through the linear interpolation method, so as to output the corresponding interpolation result and set the interpolation result as the color value of the scene area.

[0107] In some implementations, the interpolated color information of a scene region can be determined by combining two color information corresponding to that region, so that the colors of each block in the generated game map are different, increasing the accuracy of the generated game map. Specifically, the initial color information includes first color information and second color information. Interpolation processing is performed on the initial color information corresponding to the scene region using interpolation weights to obtain the interpolated color information, including:

[0108] Based on the first color information corresponding to the scene area and the second color information corresponding to the scene area, determine the first color value of the first color channel and the second color value of the second color channel respectively;

[0109] Using the masking information corresponding to the scene area as the interpolation weight, the first color value and the second color value are interpolated to obtain the interpolated color information.

[0110] For example, based on the masking information corresponding to any scene region, the first color value and the second color value corresponding to that scene region are mixed to obtain the color value corresponding to that scene region.

[0111] Optionally, the second color information corresponding to the scene region can be the color parameter corresponding to that scene region, which is different from the color parameters corresponding to the first masking region and the second masking region. The color parameters corresponding to scene regions at different depth levels can be the same or different.

[0112] Optionally, the color parameters corresponding to the scene area can be set to differ significantly from the color parameters corresponding to the first masking area and the second masking area, so that multiple colors different from the color parameters can be generated through interpolation. For example, the color parameter corresponding to the scene area can be set to black, and the color parameters corresponding to the first masking area and the second masking area can be set to red, thereby generating colors such as red, green, cyan, yellow, blue, and orange through interpolation.

[0113] Optionally, the method further includes detecting scene regions in the game scene. For example, multiple depth levels can be set in the Scene Custom Stencil in the game engine, with each depth level corresponding to a scene region. The Scene Custom Stencil in the post-processing material can be subtracted by 1; the subtracted portion represents the scene region in the game scene with a custom depth (i.e., depth level) of 1. This subtraction process is essentially the process of detecting scene regions in the game scene. If a scene region is detected, steps 120-140 can be executed, i.e., masking the scene region to determine its initial color. Based on the masking information and the initial color information, the corresponding color information for the scene region can be set. If no scene region is detected, the process ends.

[0114] 150. Generate a game map from the scene area. The game map includes blocks with corresponding color information.

[0115] For example, game scenes can be captured to generate game map images. During the capture process, each scene area with a set color value can be divided into corresponding blocks, thus obtaining an image of a game map including multiple blocks. This game map can be adjusted to a suitable size and displayed as a texture in the corner of the game interface.

[0116] In some implementations, corresponding scene areas can be captured within the game scene to automatically render and generate a game map with blocks of the same color, thereby improving the efficiency of game map generation and avoiding errors. Specifically, generating a game map from scene areas includes:

[0117] Create a render target;

[0118] By rendering targets, the scene area corresponding to color information is captured in the game scene;

[0119] From the captured scene area, blocks with corresponding color information are obtained to generate a game map.

[0120] The scene capture component can be understood as a camera component in a game engine used to acquire two-dimensional images.

[0121] In practical applications, a PostProcessVolume can be placed into the game engine scene, and the color information of the corresponding scene area obtained in step 140 can be placed into this PostProcessVolume as a material instance. A render target can be created and stored as a variable for later use. A render target can refer to an object used to store information such as base color, normals, and ambient occlusion, and it can be written to a texture at runtime. A SceneCapture2D component can be placed into the scene. This component has an option for a TextureTarget, which is used to store the captured image. A TextureTarget is a render target type. Thus, the render target can be placed into the texture target of the SceneCapture component to capture the scene area corresponding to the color information in the game scene through the render target, and the captured image can be stored in the texture target.

[0122] In some implementations, the game scene can be adjusted to an orthogonal perspective to ensure that the captured image assets have no perspective distortion, thus guaranteeing the accuracy of the generated game map. Specifically, the method further includes:

[0123] Adjust the game scene to an orthogonal perspective.

[0124] For example, the game scene can be adjusted to an orthographic view before step 140, or after placing the rendering target into the texture target of the scene capture component, the scene capture component projection (SceneCapture2DProjection) in the game engine can be changed to Orthographic to adjust the game scene to an orthographic view.

[0125] Optionally, to enhance the display effect of the captured image and avoid color distortion caused by the capture process, the capture source of the scene capture component can be set to the color information corresponding to the scene area. For example, in a game engine, the Capture Source can be set to Final Color (LDR) in RGB, which is the color information corresponding to the scene area.

[0126] Optionally, the scale of the game map can be adjusted by changing the orthographic projection width to display different scale game maps for different game interfaces, increasing the adaptability of the game map. After generating the game map from the scene area, the process also includes:

[0127] By adjusting the orthogonal projection width of the orthogonal viewpoint, the scale of the game map is adjusted, resulting in the adjusted game map.

[0128] Orthographic projection width can refer to the width of the orthographic projection frustum. For example, the Ortho Width in a game engine can be adjusted to change the aspect ratio of the projected game map.

[0129] The game display control scheme provided in this application can be applied to various game scenarios. For example, taking an online game as an example, the following steps are taken: First, a game scene is obtained, which includes multiple scene areas corresponding to different depth levels. Then, the scene areas are masked to obtain masking information. Next, based on the depth level of the scene area, the initial color information of the scene area is obtained. Finally, based on the initial color information and the masking information, the corresponding color information is set for the scene area. A game map is generated from the scene area, and the game map includes blocks with corresponding color information.

[0130] Current technology for creating game maps typically involves categorizing and capturing screenshots of 3D game scenes to obtain image resources of different components, such as buildings, bridges, waterways, and grasslands of varying styles. These images are then manually processed and overlaid to generate the game map. This method requires overlaying multiple images, making the workflow relatively cumbersome. The resulting map tends to resemble a realistic map of the scene but lacks the flat, stylized characteristics of traditional maps and the potential to be expanded to other styles.

[0131] However, as can be seen from the above, after obtaining the masking information of the scene area, the embodiments of this application can automatically set different colors for different depth levels according to the initial color information and masking information corresponding to the scene area, so as to generate a flat-painted style game map that marks different scene areas with different colors, solve the problems of long processing time and easy errors caused by manually processing game maps, improve the efficiency of generating game maps, and also avoid errors.

[0132] The method described in the above embodiments will be further described in detail below.

[0133] The method described in this application can be applied to various game engines, such as mainstream engines like Unity3D and Unreal Engine 4 (UE4), and can also be applied to self-developed engines. The following description will use the method described in this application as an example of applying it to UE4. UE4 is short for Unreal Engine, a commercial game engine used for game development.

[0134] like Figure 2a As shown, the method of this application embodiment can be applied to the display control system of a game. The system can be mounted on UE4 and may include a scene model module, a material module, and an image generation module.

[0135] This application embodiment utilizes UE4's Custom Depth and Custom Stencil technologies to process data in the Post Process instead of the main rendering pipeline. This allows each scene area to display different colors, and the scene areas are not limited by any external factors. Furthermore, the layering of each scene area can be customized (theoretically supporting an unlimited number of layers). High-precision source images are obtained by capturing graphics using Render Target technology. These source images are then further processed using Adobe Substance 3D Designer, Adobe Photoshop, or other image processing software to achieve batch production. The specific workflow of this system will be described below with reference to the specific methods.

[0136] like Figure 2b As shown, the specific process of a game display control method is as follows:

[0137] 210. Identify multiple scene model components from the game scene and set different depth levels for the scene areas corresponding to the multiple scene model components.

[0138] By setting multiple depth levels for the scene regions corresponding to scene model components, multiple scene regions with different depth levels can be obtained. For example, in a game scene, there can be scene model component A corresponding to houses, scene model component B corresponding to grassy ground, and scene model component C corresponding to cobblestone paths. Figure 2a As shown, the scene model module can store scene model component A, scene model component B, and scene model component C. Initially, the CustomStencil (custom module) of the scene model components is disabled by default, i.e., CustomStencil = 0. The value of the CustomStencil of a scene model component can be used as its depth level. For example, by setting the value of scene model component A to 1, scene model component B to 2, and scene model component C to 3, the depth levels of these three scene model components can be set to 1 to 3. This means the depth level of the scene area corresponding to these three scene model components will also be 1 to 3.

[0139] Specifically, you can place the game scene's model into the level, open the Render Custom DepthPass, and set the Custom Depth Stencil Value. Automatic region recognition and segmentation of the model within the scene can be performed through this operation. The following will illustrate this with... Figure 2c The game scene shown illustrates step 210.

[0140] For example, such as Figure 2c In the game scene shown, the grassy area and the stone path are adjacent, belonging to different areas at the same height. They can be distinguished by setting different Custom Depth Stencil Values ​​to achieve the desired effect. Figure 2d The game map shown has darker gray areas representing grassy areas and houses, and lighter gray areas representing cobblestone paths.

[0141] For example, if the house section and the cobblestone path section have significantly different heights and belong to different areas, they can be distinguished by setting the same Custom Depth Stencil Value, as shown below. Figure 2e The game map shown has a darker gray area representing the grassy ground and a lighter gray area representing the cobblestone paths and houses.

[0142] In this way, each scene model component can be assigned a corresponding CustomDepth Stencil Value (i.e., depth level) according to the game's needs. After setting the corresponding color information for the scene area, the result will be displayed in the RenderTarget file as follows. Figure 2f The game map shown clearly and accurately displays the location and proportion of each area within the image. For example, the Custom Depth Stencil values ​​can be set for the scene model components corresponding to unwalkable areas, grassy areas, cobblestone paths, shrubbery areas, and house areas, while setting the Custom Depth Stencil value to 0 for empty areas. This allows the generated game map to be divided into sections such as... Figure 2f The six areas shown in the image are, according to their different colors, a non-walkable area, a grassy area, a stone path area, a shrub area, a house area, and an empty area.

[0143] pass Figure 2c As shown in the game scene, apart from the houses, the heights of other areas are very similar or even identical. Therefore, this solution can effectively divide these areas using the aforementioned techniques. Furthermore, the color blocks in each area are very clear and neat, making it ideal for creating stylized flat-painted game maps. And all areas can be divided using only one image, without any additional steps.

[0144] It should be noted that the scene region in this application embodiment refers to the area occupied by the scene model component in the game scene. It can be understood that a scene model component corresponding to one depth level can correspond to a scene region; thus, the scene model component can be used to represent the corresponding scene region. Steps 210 to 270 in this application embodiment can be used to write a shader for UE4's Post Process, where different depth values ​​can be assigned different colors. The shader is used to implement image rendering, replacing editable programs with fixed rendering pipelines.

[0145] 220. Determine the basic color information based on the scene depth of the game scene.

[0146] For example, the material module can obtain the scene custom depth, divide the scene depth by the overall scene depth of UE4 (250,000), and generate masks for the empty parts (background) and the parts that need to be captured. A floor function is used to remove the decimal part, and a Lerp node is used to distinguish between these two parts, excluding the unnecessary empty parts. The remaining part is the area within the scene with a custom depth of 0 (the default value) (CustomStencil in post-processing materials defaults to 0). The output of the Lerp node can also be used as basic color information.

[0147] Lerp nodes are interpolation nodes that can interpolate the input color information according to the Lerp function expression to output the processed color information.

[0148] 230. Perform masking on the first scene area to obtain the masking information corresponding to the first scene area.

[0149] For example, such as Figure 2a As shown, post-processing materials can be created in the Material module. Initially, the Custom Stencil in the post-processing material is 0 by default. You can decrement the Custom Stencil in the material by 1, which will determine the scene model component A with Custom Stencil = 1 in the scene model module based on the calculation result, and you can perform masking processing on scene model component A to generate a Mask for scene model component A.

[0150] Post-processing materials are materials used in conjunction with post-processing to create visually disruptive screen effects, area-type effects, or an overall game look that can only be achieved with post-processing materials. For example, in UE4's rendering capabilities, you can open Post-processing materials, add array elements, select asset references, and add post-processing materials to the array elements to enhance the display effect of adjustment layers.

[0151] 240. Using the masking information corresponding to the first scene region as the interpolation weight, the first color information and the second color information corresponding to the first scene region are interpolated using the interpolation weight to obtain the interpolated color information corresponding to the first scene region.

[0152] For example, basic color information can be used as the first color information corresponding to scene model component A, and the color parameters corresponding to scene model component A can be used as the second color information corresponding to scene model component A. Figure 2aAs shown, the material module can use the mask of scene model component A as the interpolation weight, and use Lerp nodes to distinguish based on the first color information and the second color information corresponding to scene model component A, so as to obtain the specified color A (interpolated color information) corresponding to scene model component A, in order to distinguish the area with a custom depth of 1 (the scene area where scene model component A is located) from other areas (including the background, areas with a custom depth of 0, and areas with a custom depth of 2 / 3 / 4).

[0153] For example, this can be used to assign different colors to three different Scene Custom Stencil shaders, and to assign different colors to three different custom regions (custom depth of 1, custom depth of greater than 1, and background region). During this process, the region with a custom depth of 0 will not be included in the calculation.

[0154] 250. Perform masking on the second scene area to obtain the masking information corresponding to the second scene area.

[0155] For example, such as Figure 2a As shown, after determining the specified color A corresponding to scene model component A, the Custom Stencil in the material can be reduced by 1. Based on the calculation result, scene model component B with Custom Stencil = 2 can be determined in the scene model module, and a masking area can be applied to scene model component B to generate the mask of scene model component B.

[0156] 260. Using the masking information corresponding to the second scene region as the interpolation weight, the first color information and the second color information corresponding to the second scene region are interpolated through the interpolation weight to obtain the interpolated color information corresponding to the second scene region. This process is repeated until the interpolated color information corresponding to the last scene region is obtained.

[0157] For example, the interpolated color information corresponding to scene model component A can be used as the first color information corresponding to scene model component B, and the color parameters corresponding to scene model component B can be used as the second color information corresponding to scene model component B. Figure 2a As shown, the material module can use the mask of scene model component B as the interpolation weight to interpolate the first color information and the second color information corresponding to scene model component B, so as to obtain the specified color B (interpolated color information) corresponding to scene model component B.

[0158] Similarly, subtracting 1 from the Custom Stencil value in the material will determine scene model component C with Custom Stencil = 3 in the scene model module based on the calculation result. A mask can then be applied to scene model component C to generate its mask. The interpolated color information corresponding to scene model component B can be used as the first color information corresponding to scene model component C, and the color parameters corresponding to scene model component C can be used as the second color information corresponding to scene model component C. For example... Figure 2a As shown, the material module can use the mask of scene model component C as the interpolation weight to interpolate the first color information and the second color information corresponding to scene model component B, so as to obtain the specified color C (interpolated color information) corresponding to scene model component C.

[0159] For example, subtracting 1 from the value of the region of an object with a custom depth of 1 yields the region of an object with a custom depth of 2. This can be further differentiated using Lerp nodes, and so on, to obtain the regions of n objects with different custom depth values. Figure 2g The image shows a shader syntax for assigning different colors to multiple different Scene Custom Stencils (i.e., the process of determining the interpolated color information corresponding to multiple scene regions). This process can assign different colors to multiple custom regions (including background and scene regions). Theoretically, this shader syntax can be extended to regions without N, where the value of N depends on the depth range and precision of the game engine.

[0160] 270. Set the corresponding color information for the scene area based on the interpolated color information.

[0161] For example, the above shader can be transformed into something like... Figure 2h The material example shown allows for quicker and easier adjustment of the color of each custom area (scene area), setting different values ​​for each area.

[0162] For example, such as Figure 2a As shown, specified colors A, B, and C can be added to the post-processing material to generate material instances, resulting in the final area color material. The material module can then send the final area color material to the scene model module, allowing the material instance to be applied to the scene model and adjust each scene model component to the corresponding specified color.

[0163] 280. Generate a game map from the scene area. The game map includes blocks with corresponding color information.

[0164] For example, Figure 2aAs shown, the image generation module can place a SceneCapture2D component into the scene. This component has an option for a Texture Target, which is used to store the captured image. A Texture Target is a rendering target type. Therefore, a rendering target can be placed into the Texture Target of the SceneCapture component to capture scene areas corresponding to color information in the game scene. The captured image is then stored in the Texture Target, ultimately outputting a game map image containing the specified colors.

[0165] Specifically, the game map can be generated through the following steps:

[0166] 1. Create a new level, place the PostProcessVolume (post-processing volume) into the level, and place the material instance obtained in the previous step into the PostProcessVolume.

[0167] 2. Create a new Render Target file. Place a SceneCapture2D component in the level and place the newly created Render Target file into the Texture Target of the SceneCapture2D component. Change the SceneCapture2DProjection to Orthographic to ensure that the captured image material has no perspective. Set the Capture Source to Final Color (LDR) in RGB (i.e., the color information in the material instance) to ensure that the captured image material has the colors set in the above steps.

[0168] 3. Open the Render Target file. Since there are no models in the scene at this point, the Render Target will display the following content: Figure 2e Set the BackgroundColor to red.

[0169] After obtaining the game map, the image can be exported and further processed in image editing software such as Adobe Substance 3D Designer and Adobe Photoshop. For example, in a batch processing workflow using Adobe Substance 3D Designer, different colors for each area can be extracted, and then operations such as coloring, blurring, outlining, and adding textures can be performed. The specific operations can be adjusted according to actual needs. Finally, the final result can be obtained by... Figure 2c The game scene shown is obtained as follows Figure 2iThe UI map shown is an example. By organizing the calculation nodes in Adobe Substance 3D Designer, UI maps can be generated in batches.

[0170] However, for example, such as Figure 2j The existing method for generating game maps involves acquiring image resources 1 (the extent of buildings and water areas in the game scene), image resources 2 (details of the game scene), and image resources 3 (coloring the contour lines of the game scene). The map is generated by manually overlaying image resources 1, 2, and 3. The final result is more like a realistic map of the scene, lacks the characteristics of a flat painting style, and does not have the possibility of being extended to other styles.

[0171] As can be seen from the above, compared with the prior art, the embodiments of this application can quickly and stably produce UI maps with a flat painting style; through the shader writing method of the embodiments of this application, the area of ​​the generated map can be completely customized and is not affected by external factors such as height, which is suitable for games with multiple areas in a top-down view. All areas in the generated UI map exist on one map, without the need for secondary processing by overlay, which can improve the efficiency of generating game maps and avoid errors.

[0172] To better implement the above methods, this application also provides a game display control device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer; the server can be a single server or a server cluster composed of multiple servers.

[0173] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the game display control device as specifically integrated into the server.

[0174] For example, such as Figure 3 As shown, the display control device for this game may include a scene acquisition unit 310, a masking processing unit 320, a color acquisition unit 330, a color setting unit 340, and a map generation unit 350, as follows:

[0175] (I) Scene Acquisition Unit 310

[0176] Used to acquire game scenes, which include multiple scene areas corresponding to different depth levels.

[0177] In some implementations, the scene acquisition unit 310 can also be used for:

[0178] Identify multiple scene model components from the game scene;

[0179] Different depth levels are set for the scene regions corresponding to multiple scene model components to obtain multiple scene regions with different depth levels.

[0180] (II) Masking Processing Unit 320

[0181] Used to mask a scene area and obtain the masking information corresponding to the scene area.

[0182] (III) Color Acquisition Unit 330

[0183] Used to obtain the initial color information of a scene region based on the depth level of that scene region.

[0184] In some implementations, the initial color information includes first color information and second color information, and the color acquisition unit 330 may specifically be used to include:

[0185] Obtain the second color information corresponding to the scene area;

[0186] If the depth level of the scene area meets the preset conditions, obtain the basic color information and use the basic color information as the first color information;

[0187] If the depth level corresponding to the scene region does not meet the preset conditions, obtain the interpolated color information corresponding to the previous scene region, and use the interpolated color information corresponding to the previous scene region as the first color information. The previous scene region is the scene region preceding the scene region according to the depth level.

[0188] In some implementations, the preset condition is that the scene area is the first scene area sorted by depth level.

[0189] In some implementations, the color acquisition unit 330 can also be used for:

[0190] Obtain the scene depth of the game scene;

[0191] Based on scene depth, generate virtual masks in the game scene;

[0192] Based on the masking information of the virtual mask, determine the basic color information.

[0193] In some implementations, the virtual mask includes a first masking region and a second masking region. Based on the masking information of the virtual mask, basic color information is determined, including:

[0194] Based on the color parameters corresponding to the first masking area and the color parameters corresponding to the second masking area, the third color value of the first color channel and the fourth color value of the second color channel are determined respectively.

[0195] Using the masking information of the virtual mask as interpolation weights, the third and fourth color values ​​are interpolated to obtain the basic color information.

[0196] (iv) Color setting unit 340

[0197] It is used to set the corresponding color information for the scene area based on the initial color information and the masking information of the scene area.

[0198] In some implementations, the color setting unit 340 may specifically be used for:

[0199] Use the masking information corresponding to the scene region as the interpolation weight;

[0200] By using interpolation weights, the initial color information corresponding to the scene area is interpolated to obtain the interpolated color information;

[0201] Based on the interpolated color information, set the corresponding color information for the scene area.

[0202] In some implementations, the initial color information includes first color information and second color information. Interpolation weights are used to interpolate the initial color information corresponding to the scene region to obtain interpolated color information, including:

[0203] Based on the first color information corresponding to the scene area and the second color information corresponding to the scene area, determine the first color value of the first color channel and the second color value of the second color channel respectively;

[0204] Using the masking information corresponding to the scene region as the interpolation weight, the first color value and the second color value are interpolated to obtain the interpolated color information corresponding to the scene region.

[0205] (V) Map Generation Unit 350

[0206] Used to generate a game map from scene areas, the game map includes blocks with corresponding color information.

[0207] In some implementations, the map generation unit 350 can also be used for:

[0208] Adjust the game scene to an orthogonal perspective.

[0209] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0210] Therefore, in this embodiment of the application, after obtaining the masking information of the scene area, different colors can be automatically set for different depth levels according to the initial color information and masking information corresponding to the scene area, so as to generate a flat-painted style game map that marks different scene areas with different colors. This solves the problems of long processing time and easy errors caused by manually processing game maps, improves the efficiency of generating game maps, and can also avoid errors.

[0211] Accordingly, this application also provides a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer, personal digital assistant (PDA) and other terminal devices.

[0212] like Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 400 includes a processor 410 with one or more processing cores, a memory 420 with one or more computer-readable storage media, and a computer program stored in the memory 420 and executable on the processor. The processor 410 is electrically connected to the memory 420. Those skilled in the art will understand that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0213] The processor 410 is the control center of the computer device 400. It connects various parts of the computer device 400 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 420, and calling data stored in the memory 420, it performs various functions of the computer device 400 and processes data, thereby monitoring the computer device 400 as a whole.

[0214] In this embodiment, the processor 410 in the computer device 400 loads the instructions corresponding to the processes of one or more applications into the memory 420 according to the following steps, and the processor 410 runs the applications stored in the memory 420 to achieve various functions:

[0215] The process involves: acquiring the game scene, which includes multiple scene regions corresponding to different depth levels; performing masking on the scene regions to obtain masking information; obtaining the initial color information of the scene regions based on their depth levels; setting the corresponding color information for the scene regions based on their initial color information and masking information; and generating a game map from the scene regions, which includes blocks with corresponding color information.

[0216] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0217] Optional, such as Figure 4 As shown, the computer device 400 also includes: a touch screen display 430, a radio frequency circuit 440, an audio circuit 450, an input unit 460, and a power supply 470. The processor 410 is electrically connected to the touch screen display 430, the radio frequency circuit 440, the audio circuit 450, the input unit 460, and the power supply 470. Those skilled in the art will understand that... Figure 4 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0218] The touch display screen 430 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 430 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 410. It can also receive and execute commands from the processor 410. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 410 to determine the type of touch event. Subsequently, the processor 410 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and display panel can be integrated into the touch display screen 430 to achieve input and output functions. However, in some embodiments, the touch panel and display panel can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 430 can also be used as part of the input unit 460 to achieve input functions.

[0219] In this embodiment, a game application is executed by processor 410 to generate a graphical user interface (GUI) on touch display screen 430. The virtual scene on the GUI includes at least one skill control area, and the skill control area includes at least one skill control. The touch display screen 430 is used to present the GUI and receive operation commands generated by the user interacting with the GUI.

[0220] The radio frequency circuit 440 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.

[0221] Audio circuitry 450 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 450 can convert received audio data into electrical signals and transmit them to the speaker, where the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 450, converted back into audio data, and then processed by processor 410 before being transmitted via radio frequency circuitry 440 to, for example, another computer device, or output to memory 420 for further processing. Audio circuitry 450 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.

[0222] The input unit 460 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0223] Power supply 470 is used to supply power to various components of computer device 400. Optionally, power supply 470 can be logically connected to processor 410 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 470 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0224] although Figure 4 As not shown in the diagram, computer equipment 400 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0225] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0226] As can be seen from the above, the computer device provided in this embodiment can automatically set different colors for different depth levels based on the initial color information and masking information corresponding to the scene area after obtaining the masking information of the scene area, so as to generate a flat-painted style game map that marks different scene areas with different colors. This solves the problems of long processing time and easy errors caused by manually processing game maps, improves the efficiency of generating game maps, and can also avoid errors.

[0227] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0228] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the game display control methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0229] The process involves: acquiring the game scene, which includes multiple scene regions corresponding to different depth levels; performing masking on the scene regions to obtain masking information; obtaining the initial color information of the scene regions based on their depth levels; setting the corresponding color information for the scene regions based on their initial color information and masking information; and generating a game map from the scene regions, which includes blocks with corresponding color information.

[0230] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0231] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0232] Since the computer program stored in the storage medium can execute the steps in any of the game display control methods provided in the embodiments of this application, the beneficial effects that any of the game display control methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0233] The above provides a detailed description of a game display control method, apparatus, computer device, and medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for displaying and controlling a game, characterized in that, include: Acquire a game scene, which includes multiple scene regions corresponding to different depth levels; The scene area is masked to obtain the masking information corresponding to the scene area; Based on the depth level corresponding to the scene area, obtain the initial color information corresponding to the scene area; Based on the initial color information corresponding to the scene area and the masking information corresponding to the scene area, set the corresponding color information for the scene area; A game map is generated from the scene area, and the game map includes blocks corresponding to the color information; The initial color information includes first color information and second color information. Obtaining the initial color information corresponding to the scene region based on the depth level of the scene region includes: Obtain the second color information corresponding to the scene area; If the depth level corresponding to the scene area meets the preset conditions, the basic color information is obtained and the basic color information is used as the first color information; If the depth level corresponding to the scene region does not meet the preset condition, the interpolated color information corresponding to the previous scene region is obtained, and the interpolated color information corresponding to the previous scene region is used as the first color information. The previous scene region is the scene region preceding the scene region according to the depth level.

2. The game display control method as described in claim 1, characterized in that, The step of setting corresponding color information for the scene region based on the initial color information corresponding to the scene region and the masking information corresponding to the scene region includes: The masking information corresponding to the scene region is used as the interpolation weight; The initial color information corresponding to the scene region is interpolated using the interpolation weights to obtain the interpolated color information. Based on the interpolated color information, set the corresponding color information for the scene area.

3. The game display control method as described in claim 2, characterized in that, The step of interpolating the initial color information corresponding to the scene region using the interpolation weights to obtain interpolated color information includes: Based on the first color information corresponding to the scene area and the second color information corresponding to the scene area, the first color value of the first color channel and the second color value of the second color channel are determined respectively. Using the masking information corresponding to the scene region as interpolation weights, interpolation processing is performed on the first color value and the second color value to obtain the interpolated color information corresponding to the scene region.

4. The game display control method as described in claim 1, characterized in that, The preset condition is that the scene region is the first scene region sorted according to the depth level.

5. The game display control method as described in claim 1, characterized in that, Before obtaining the initial color information corresponding to the scene region based on the depth level corresponding to the scene region, the method further includes: Obtain the scene depth of the game scene; Based on the scene depth, a virtual mask is generated in the game scene; Based on the masking information of the virtual mask, the basic color information is determined.

6. The game display control method as described in claim 5, characterized in that, The virtual mask includes a first masking region and a second masking region. Determining the basic color information based on the masking information of the virtual mask includes: Based on the color parameters corresponding to the first masking area and the color parameters corresponding to the second masking area, the third color value of the first color channel and the fourth color value of the second color channel are determined respectively. Using the masking information of the virtual mask as interpolation weights, interpolation is performed on the third color value and the fourth color value to obtain the basic color information.

7. The game display control method as described in claim 1, characterized in that, Before acquiring the game scene, the process also includes: Multiple scene model components are determined from the game scene; Different depth levels are set for the scene regions corresponding to the multiple scene model components to obtain multiple scene regions corresponding to different depth levels.

8. The game display control method according to any one of claims 1 to 7, characterized in that, The method further includes: Adjust the game scene to an orthogonal perspective.

9. A display control device for a game, characterized in that, include: A scene acquisition unit is used to acquire a game scene, which includes multiple scene regions corresponding to different depth levels; A masking processing unit is used to perform masking processing on the scene area to obtain masking information corresponding to the scene area. The color acquisition unit is used to acquire the initial color information corresponding to the scene area based on the depth level corresponding to the scene area. The color setting unit is used to set the corresponding color information for the scene area according to the initial color information corresponding to the scene area and the masking information corresponding to the scene area. A map generation unit is used to generate a game map from the scene area, the game map including blocks corresponding to the color information; The initial color information includes first color information and second color information. The color acquisition unit is further configured to acquire the second color information corresponding to the scene region. If the depth level corresponding to the scene region meets a preset condition, basic color information is acquired and used as the first color information. If the depth level corresponding to the scene region does not meet the preset condition, interpolated color information corresponding to the previous scene region is acquired and used as the first color information. The previous scene region is the scene region preceding the scene region according to the depth level.

10. A computer device, characterized in that, It includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps in the display control method of the game as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the display control method for the game according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Scene map generation method and device, storage medium and computer equipment

    CN115006842A