Display control method and device in game, electronic equipment and storage medium
By identifying and adjusting the vertices of the marching line in a large-scale multiplayer online strategy game to match the position relationship of the virtual camera, the jagged and fracture problems of the marching line display are solved, and an efficient display effect with low computing consumption is achieved.
Patent Information
- Application Number
- CN202411686185.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Previous technology In large-scale multiplayer online strategy games, the display of marching lines has problems with jagged and broken, and anti-aliasing technology has high calculation consumption, resulting in blurred screens and blurred motions.
The terminal device provides a graphical user interface to identify target line-like elements within the visual range, determine feature adjustment values based on the positional relationship between each vertex and the virtual camera, and draw game images based on these adjustment values.
It effectively reduces calculation consumption, solves the jagged and fracture problems of marching lines at long distances, and does not affect other models.
Smart Images

Figure CN119633373A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer application technology, and in particular to a display control method, device, electronic device and storage medium in a game. Background Art
[0002] In massively multiplayer online strategy games, a large number of players perform game actions on the same sandbox map, such as going out to fight, marching, fighting, etc. Sometimes a line of marches will be displayed in the game scene, which points from the starting point to the destination and is used to guide the marching direction and / or the marching path. One or more marching lines can be displayed within the player's visual range, including the marching lines of one's own side and / or the enemy. By viewing the marching lines, the player can know the starting point and destination, and can also determine whether the marching line is hostile to him or make strategic deployments.
[0003] Currently, marching lines are usually displayed in game scenes in the form of lines, and the displayed marching lines may be jagged or even broken into segments of straight lines.
[0004] In the related technologies, the anti-aliasing technology solutions adopted include MSAA (multi-sampling anti-aliasing), FXAA (fast approximate anti-aliasing), TAA (temporal anti-aliasing), etc. However, the above solutions consume a lot of calculation and may cause the overall blur of the screen, and even produce motion blur and ghosting. Summary of the invention
[0005] In view of this, the embodiments of the present application provide at least a display control method, device, electronic device and storage medium in a game to overcome at least one of the above-mentioned defects.
[0006] In a first aspect, an exemplary embodiment of the present application provides a display control method in a game, providing a graphical user interface through a terminal device, and displaying at least a portion of a virtual scene of the game on the graphical user interface. The method comprises: in response to a game image drawing instruction, identifying a target linear element within a visible range; determining a feature adjustment value of each vertex on the target linear element according to a positional relationship between each vertex on the target linear element and a virtual camera; and drawing the game image based on the feature adjustment value of each vertex on the target linear element.
[0007] In a second aspect, an embodiment of the present application further provides a display control device in a game, which provides a graphical user interface through a terminal device, and displays at least part of the virtual scene of the game on the graphical user interface. The device includes: an element recognition module, which responds to a game image drawing instruction and identifies a target linear element within a visible range; a vertex adjustment module, which determines a feature adjustment value of each vertex on the target linear element according to a positional relationship between each vertex on the target linear element and the virtual camera; and an image drawing module, which draws a game image based on the feature adjustment value of each vertex on the target linear element.
[0008] In a third aspect, an embodiment of the present application also provides an electronic device, a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the above-mentioned display control method.
[0009] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned display control method are executed.
[0010] The display control method, device, electronic device and storage medium in the game provided by the embodiments of the present application can effectively reduce computing consumption.
[0011] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1A and Figure 1B A schematic diagram showing the multi-sampling principle of MSAA;
[0014] Figure 2A and Figure 2B A schematic diagram of anti-aliasing processing of MSAA is shown;
[0015] Figure 3 A flowchart showing a display control method in a game provided by an exemplary embodiment of the present application;
[0016] Figure 4A and Figure 4B Schematic diagrams respectively showing a ground travel route and an air flight route provided by an exemplary embodiment of the present application;
[0017] FIG. 5A to FIG. 5C Schematic diagrams of constructing an aerial flight route provided by exemplary embodiments of the present application are respectively shown;
[0018] Figure 6 A schematic diagram showing the structure of a display control device in a game provided by an exemplary embodiment of the present application;
[0019] Figure 7 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0020] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0021] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.
[0022] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" is merely a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.
[0023] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.
[0024] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0025] With the development of computer technology, more and more types of games can be played. In large-scale multiplayer online strategy games, a large number of players perform game behaviors on the same sandbox map, such as going out to fight, marching, fighting, etc. Sometimes a line of marches will be displayed in the game scene, which points from the starting point to the destination and is used to guide the marching direction and / or the marching path. One or more marching lines can be displayed within the player's visual range, including the marching lines of one's own side and / or the enemy. By checking the marching lines, the player can know its starting point and destination, and can also judge whether the marching line is hostile to the player, or to make strategic deployment.
[0026] At present, the marching line is usually displayed in the game scene in the form of a line. In this application, it is considered that the marching line can be displayed in a variety of presentation modes, such as a straight line, a broken line, an arc line, etc. Furthermore, the display effect of the Z axis (virtual elevation value) can be introduced for the marching line to reflect the 3D (Three Dimensions, three-dimensional graphics) texture.
[0027] Marching lines are usually generated in the game scene, which causes the marching lines to appear larger when near and smaller when far according to the change of the virtual camera's lens height. When the distance between them is very far, the pixels of the lines are shrunk too small, causing them to appear jagged. When the distance between them is even farther, especially for arc-shaped lines, they will break into segments of straight lines and no longer be continuous arcs.
[0028] In the related technology, the anti-aliasing technology solutions adopted include MSAA (multi-sampling anti-aliasing), FXAA (fast approximate anti-aliasing), TAA (temporal anti-aliasing) and the like.
[0029] Taking the MSAA anti-aliasing scheme as an example, MSAA performs multiple sampling around each pixel, for example Figure 1B As shown, four sampling points are used instead of Figure 1A The color weighted average of the four sampling points is calculated, and finally all pixels are processed in the same way to obtain the anti-aliasing result, such as Figure 2B Shown for Figure 2A The anti-aliasing effect of the image.
[0030] In the MSAA anti-aliasing scheme, each pixel needs to be sampled multiple times, and pixels in low-frequency areas within the image that do not require anti-aliasing will also be sampled multiple times, resulting in unnecessary performance waste. In addition, the sampling itself has a large overhead for low-performance machines, so MSAA calculations are very expensive.
[0031] FXAA is a screen post-processing technology. Its computational overhead is lower than that of MSAA, but it will cause the overall blur of the screen. In addition, these two solutions cannot solve the problem of broken curved continuous arcs when the marching line is far away from the virtual camera.
[0032] TAA is a technical solution based on time series, which can deal with the problem of broken curved continuous arcs to a certain extent. However, this technology is also a screen post-processing technology, which will produce motion blur and ghosting, and the calculation overhead of TAA is also relatively large.
[0033] In other words, traditional anti-aliasing solutions (such as MSAA, FXAA) cannot solve the problem of pixel breakage when the curved arc is far away from the virtual camera, and post-processing technology (such as FXAA, TAA) will have unnecessary effects on other models on the screen (such as blur, ghosting, etc.).
[0034] In response to at least one of the above problems, the present application proposes an adaptive display control solution based on viewing distance, which has extremely low computational overhead. In addition, it can effectively solve the jagged display problem at long distances, especially the problem of the breakage of the slender and curved marching line in the game, and it can also effectively solve it without affecting other models.
[0035] First, the names involved in the embodiments of the present application are introduced.
[0036] Terminal equipment:
[0037] The terminal device involved in the embodiments of the present application mainly refers to an electronic device that can provide a user interface (User Interface) to realize human-computer interaction. In an exemplary application scenario, the terminal device can be used to provide a game screen (such as an interface that presents a game scene) and an intelligent device that can control and operate a virtual object. The terminal device may include but is not limited to any of the following devices: a smart phone, a tablet computer, a portable computer, a desktop computer, a game console, a personal digital assistant (PDA), an e-book reader, an MP4 (Moving Picture Experts Group AudioLayer IV, dynamic image expert compression standard audio layer 4) player, etc. The terminal device is installed and running with an application that supports game scenes, such as an application that supports three-dimensional game scenes. The application may include but is not limited to any of virtual reality applications, three-dimensional map programs, military simulation programs, MOBA games (Multiplayer Online BattleArena, multiplayer online tactical competitive games), multiplayer gun battle survival games, and third-person shooting games (TPS, Third-Personal Shooting Game). Optionally, the application can be a stand-alone application, such as a stand-alone 3D game program, or a network-connected application.
[0038] In one case, the terminal device has a display, a game console body independent of the display, and an input unit independent of the game console body, such as a mouse, a keyboard, and a handle, and a plurality of input buttons are arranged on the input unit. In another case, a portable terminal device has a game console body, a liquid crystal display arranged in the approximate center of the game console body, and an input unit arranged on both sides of the liquid crystal display, such as a plurality of input buttons, or it can be a portable terminal device with a touch screen, and the touch screen is used as the input unit. In the above terminal device, by operating the input unit, various commands can be instructed to the game character displayed on the display.
[0039] Graphical User Interface:
[0040] It is an interface display format for communication between people and computers, allowing users to manipulate icons, logos or menu options on the screen using input devices such as a mouse, keyboard and / or game controller, and also allowing users to manipulate icons or menu options on the screen by performing touch operations on the touch screen of a touch terminal to select commands, start programs or perform other tasks. In the game scene, the graphical user interface can display the game scene interface and the game configuration interface.
[0041] Virtual scene:
[0042] It is a virtual environment displayed (or provided) when the application is running on a terminal device or server. Optionally, the virtual scene is a simulation environment of the real world, or a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment and a three-dimensional virtual environment, and the virtual environment can be the sky, land, sea, etc. Among them, the virtual scene is a scene where the user controls the virtual object to complete the game logic. Optionally, the virtual scene is also used for a virtual environment battle between at least two virtual objects, and there are virtual resources in the virtual scene that can be used by at least two virtual objects.
[0043] Virtual Objects:
[0044] It can be a virtual object controlled by a player in a virtual environment, including but not limited to at least one of a virtual character, a virtual animal, an anime character, a virtual battleship, a virtual vehicle, a virtual aircraft, and a virtual ship, and can also be a virtual object (NPC) controlled by a non-player. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual object can be a three-dimensional virtual model, and each virtual object has its own shape and volume in the three-dimensional virtual environment, occupying a part of the space in the three-dimensional virtual environment. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology, or a three-dimensional object constructed based on three-dimensional technology, and the virtual object realizes different external images by being given different skins. In some implementations, the virtual object can also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.
[0045] There may be multiple virtual objects in a virtual scene, which are virtual objects controlled by players (i.e., objects controlled by players through input devices and touch screens), or artificial intelligence (AI) trained to fight in a virtual environment. Optionally, the virtual object is an object that fights in a game scene. Optionally, the number of virtual objects in the virtual scene battle is preset, or dynamically determined according to the number of terminal devices joining the virtual battle, which is not limited in the embodiments of the present application. In one possible implementation, the user can control the virtual object to move in the virtual scene, and can also control the virtual object to fight with other virtual objects using skills, virtual props, etc. provided by the application.
[0046] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed and run by a conventional electronic device. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal device, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game scene screen and a game configuration interface, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0047] The application scenarios to which the present application is applicable are introduced. The present application can be applied to the field of game technology, in which multiple players participating in the game join the same virtual game.
[0048] Before entering the virtual battle, the player can select different role attributes for his virtual character in the virtual battle, such as identity attributes, and by assigning different role attributes to determine different camps, the player can win the game by performing the tasks assigned by the game in different stages of the virtual battle. For example, multiple virtual characters with role attribute A can "eliminate" virtual characters with role attribute B in the game stage to win the game. Here, the role attributes can also be randomly assigned to each virtual character participating in the virtual battle when entering the virtual battle.
[0049] An implementation environment provided by an embodiment of the present application may include: a first terminal device, a server, and a second terminal device, wherein the first terminal device and the second terminal device communicate with the server respectively to realize data communication. In this embodiment, the first terminal device and the second terminal device are respectively installed with an application program for executing the display control method provided by the present application, and the server is a server end for executing the display control method provided by the present application. Through the application program, the first terminal device and the second terminal device can communicate with the server respectively.
[0050] Taking the first terminal device as an example, the first terminal device establishes communication with the server by running an application. In an optional embodiment, the server establishes a virtual battle according to the game request of the application. Among them, the parameters of the virtual battle can be determined according to the parameters in the received game request. For example, the parameters of the virtual battle may include the number of people participating in the virtual battle, the level of the characters participating in the virtual battle, etc. When the first terminal device receives the response of the game server, the game scene corresponding to the virtual battle is displayed through the graphical user interface of the first terminal device. The first terminal device is a device controlled by the first user. The virtual character displayed in the graphical user interface of the first terminal device is the player character controlled by the first user (i.e., the first virtual character). The first user enters the role operation instruction through the graphical user interface to control the player character to perform the corresponding operation in the game scene.
[0051] Taking the second terminal device as an example, the second terminal device establishes communication with the server by running an application. In an optional embodiment, the server establishes a virtual battle according to the game request of the application. Among them, the parameters of the virtual battle can be determined according to the parameters in the received game request. For example, the parameters of the virtual battle may include the number of people participating in the virtual battle, the level of the characters participating in the virtual battle, etc. When the second terminal device receives the response from the server, the game scene corresponding to the virtual battle is displayed through the graphical user interface of the second terminal device. The second terminal device is a device controlled by the second user, and the virtual character displayed in the graphical user interface of the second terminal device is the player character (i.e., the second virtual character) controlled by the second user. The second user enters the role operation instruction through the graphical user interface to control the player character to perform the corresponding operation in the virtual scene.
[0052] The server performs data calculation based on the game data reported by the first terminal device and the second terminal device, and synchronizes the calculated game data to the first terminal device and the second terminal device, so that the first terminal device and the second terminal device control the graphical user interface to render the corresponding game scene and / or virtual character according to the synchronization data sent by the game server.
[0053] In this embodiment, the first virtual character controlled by the first terminal device and the second virtual character controlled by the second terminal device are virtual characters in the same virtual battle. The first virtual character controlled by the first terminal device and the second virtual character controlled by the second terminal device may have the same character attributes or different character attributes, and the first virtual character controlled by the first terminal device and the second virtual character controlled by the second terminal device may belong to the same camp or different camps.
[0054] It should be noted that a virtual battle may include two or more virtual characters, and different virtual characters may correspond to different terminal devices. That is to say, in a virtual battle, there are more than two terminal devices that send and synchronize game data with the game server respectively.
[0055] The display control method in one embodiment of the present application can be run on a local terminal device or a server. When the method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0056] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game method based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the information display method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0057] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0058] In a possible implementation, an embodiment of the present application provides a display control method in a game, providing a graphical user interface through a terminal device, wherein the terminal device can be the local terminal device mentioned above, or can be a client device in the cloud interaction system mentioned above.
[0059] To facilitate understanding of the present application, the display control method, device, electronic device and storage medium in the game provided by the embodiments of the present application are introduced in detail below.
[0060] See also Figure 3 , which is a flowchart of a display control method in a game provided in an exemplary embodiment of the present application, which is generally applied to a game server, such as the cloud game server described above, but the present application is not limited thereto.
[0061] Graphics processing typically involves the coordination of two processors, namely a central processing unit (CPU) and a graphics processing unit (GPU), where a GPU is a dedicated electronic circuit designed to accelerate the creation of images in a frame buffer intended for output to a display. GPUs can be used in embedded systems, mobile phones, personal computers, tablet computers, portable gaming devices, workstations, and game consoles.
[0062] Exemplarily, the CPU may send a command to the GPU to implement a specific graphics processing task, such as rendering a frame of an image. In order to render the texture of a specific program, the GPU may perform a series of processing tasks in the "graphics pipeline" to convert the visual elements in the virtual scene into an image that can be presented to the display. A typical graphics pipeline may include: performing certain rendering or shading operations on virtual objects in the virtual space, performing conversion and rasterization on virtual objects in the virtual scene to generate pixel data in a form suitable for output to the display, and performing additional rendering tasks on pixels (or fragments) before outputting the rendered image on the display.
[0063] In virtual space, virtual objects of images are often described according to shapes known as prototypes, and the shapes and prototypes together constitute the shape of the objects in the virtual scene. For example, the objects to be rendered in a three-dimensional virtual world can be reduced to a series of different triangular prototypes with vertices defined according to their coordinates in three-dimensional space, whereby these polygons constitute the surface of the object. Each polygon may have an associated index that can be used by the graphics processing system to distinguish a given polygon from other polygons. Similarly, each vertex may have an associated index that can be used to distinguish a given vertex from other vertices. The graphics pipeline may perform certain operations on these prototypes in order to generate visual elements of the virtual scene and convert this data into a two-dimensional format suitable for being reproduced by the pixels of the display.
[0064] The display control method provided in the embodiment of the present application can be executed in the GPU to output a frame of game image.
[0065] like Figure 3 As shown, in step S101, in response to a game image drawing instruction, a target linear element within a visible range is identified.
[0066] In an embodiment of the present application, the virtual scene of the game may be a two-dimensional virtual environment and / or a three-dimensional virtual environment. For example, in the case where the virtual scene of the game is displayed in the form of an electronic map, the virtual scene may also correspond to a two-dimensional scene map and / or a three-dimensional scene map, including but not limited to virtual reality maps, military simulation maps, and maps in games.
[0067] The above-mentioned visible range may refer to the range area of the virtual scene that can be seen through the screen of the terminal device. Here, the size of the range area of the virtual scene displayed on the screen of the terminal device can be changed. For example, when the scene map of the virtual scene is scaled, the scene map of the virtual scene can be enlarged or reduced, and the range area of the virtual scene displayed on the screen of the terminal device will also change accordingly, that is, the map zoom ratio is negatively correlated with the range area of the virtual scene displayed in the graphical user interface. For example, the larger the map zoom ratio, the smaller the range area of the virtual scene displayed in the visible range, and the smaller the map zoom ratio, the larger the range area of the virtual scene displayed in the visible range.
[0068] In an embodiment of the present application, the game image displayed on the graphical user interface may be a picture obtained by observing the virtual scene with a virtual camera at a preset height and with a preset observation angle. For example, the picture may be obtained by observing the virtual scene with a preset virtual object or a preset coordinate position in the virtual scene as the observation center and with an observation angle of a preset lens height.
[0069] At this time, as the viewing angle changes, or as the viewing center changes, or as the lens height changes, the display content of the game screen displayed on the screen of the terminal device will also change. In addition, when a user's sliding operation (such as panning the map) on the scene map of the virtual scene is received, the scene map of the virtual scene can be controlled to move on the screen of the terminal device, which is equivalent to keeping the lens height of the virtual camera unchanged and controlling the scene map of the virtual scene to move, so that the display content displayed on the screen of the terminal device changes synchronously.
[0070] In the embodiment of the present application, the game image is calculated and presented for each frame mainly based on the change in the positional relationship between the vertices and the virtual camera in each frame. When the game image of each frame needs to be loaded, a game image drawing instruction is generated.
[0071] In a preferred embodiment, the display control scheme of the present application can process virtual elements presented in the form of lines in the virtual scene of the game to improve their display effect, for example, identifying objects to be drawn in the form of lines within the visible range from the virtual scene. In particular, for linear elements that are at least partially presented in the form of arcs, the display problems such as jaggedness and fracture can be effectively solved through the processing method of the present application.
[0072] In an optional embodiment, the target line-shaped element may refer to a route mark generated in a virtual scene and used to represent the movement path of a virtual unit in the virtual scene, for example, a marching line generated in the virtual scene.
[0073] Exemplarily, the virtual unit may include an expedition unit in the game, which is usually composed of one or more virtual objects, and the virtual object may be a dynamic object controlled by the player in the virtual environment. Optionally, the virtual unit in the game may adopt different movement modes, for example, a ground movement mode and a flying movement mode, and the ground movement mode may include but is not limited to at least one of the following items: walking (such as ordinary movement skills), sprinting (such as accelerated movement skills), or moving with the help of props (such as ground moving vehicles, that is, various vehicles and ships provided in the virtual scene). Among them, for the ground movement mode, the expedition unit may refer to a ground force, and at this time, the target line state element may be a ground route used to characterize the ground force moving in the virtual scene in a ground movement mode.
[0074] Figure 4A A schematic diagram of a ground travel route provided in an embodiment of the present application is shown.
[0075] like Figure 4A As shown, a virtual scene of a game is displayed in a graphical user interface 20 provided by the terminal device 10 , and the virtual scene includes a plurality of virtual plots, such as a virtual plot 201 , a virtual plot 202 , and a virtual plot 203 .
[0076] For example, a player can occupy a virtual plot of land by manipulating a virtual object in the game to determine the ownership status of the virtual plot of land. For example, when a virtual plot of land is occupied by a virtual object controlled by a player in a virtual scene, the ownership status of the occupied virtual plot of land is changed. Here, the ownership status is used to represent the owner of the virtual plot of land. Figure 4A In the example, virtual plot 201, virtual plot 202, and virtual plot 203 are represented by different filling methods to indicate their different affiliations.
[0077] In this example, K11 is a route identifier used to characterize the ground travel route. If the ground travel route K11 belongs to the same party as the virtual plot 202, the ground travel route K11 is allowed to pass through the virtual plot 202. As shown in the figure, the route can pass through the area where the virtual plot is located.
[0078] Optionally, the ground travel route of the virtual unit may be presented in a straight line form, and / or in a broken line form (eg Figure 4A For a ground route, each moving track point on the ground route is usually expressed in a two-dimensional coordinate form, that is, when moving in a ground moving manner, the change of ground elevation can be ignored, and only the movement on the ground plane can be considered.
[0079] Here, the ground route K11 is displayed in the virtual scene. When at least one of the viewing angle, viewing center, and lens height of the virtual camera changes, since the position of the ground route K11 in the virtual scene remains unchanged, the positional relationship between the virtual camera and the vertices on the ground route K11 changes.
[0080] As the positional relationship between the virtual camera and the vertices on the ground route K11 changes, for example, as the distance between the virtual camera and the vertices on the ground route K11 continues to increase, the pixels on the ground route are reduced. In particular, for ground routes containing arcs, the lines presented in the game image may appear jagged or broken. For this reason, the display control solution of the present application can be used to solve this display problem.
[0081] In a preferred embodiment, for the ground route, each moving track point on the ground route can also be expressed in the form of three-dimensional coordinates, that is, the display effect of the Z axis is introduced for the marching line, which is used to reflect the terrain changes such as hillsides and depressions of the ground troops during the march. In this case, the lines presented in the game image may also appear jagged and / or broken, so this problem can be solved by the display control solution of the present application.
[0082] For example, the flight movement mode may include but is not limited to at least one of the following items: flying (e.g., flight movement skills), or moving with the aid of props (e.g., aerial mobile vehicles, i.e., various spaceships and airplanes provided in the virtual scene). For the flight movement mode, the expedition unit may refer to a flight unit, and in this case, the target line state element may be an aerial flight route used to characterize the flight unit moving in the virtual scene in the flight movement mode.
[0083] Figure 4B A schematic diagram showing aerial flight paths.
[0084] In a preferred embodiment, for the aerial flight route, a non-turning vector line between the departure point and the destination can be used in the virtual scene. Optionally, each moving trajectory point on the flight moving path can be expressed in the form of two-dimensional coordinates. In this case, the route mark of the ground moving route and the route mark of the flight moving path can be displayed separately in the virtual scene, and different display modes can be used to represent different moving modes.
[0085] Preferably, each moving track point on the flight moving path can also be expressed in the form of three-dimensional coordinates, such as Figure 4B The aerial flight route K22 is used to reflect the changes in flight altitude of the flying troops during their march.
[0086] The game screen displayed in the graphical user interface 10 may only display part of the virtual scene of the game due to the large range of the virtual scene in the game. At the same time, the marching distance of the expeditionary unit in the virtual scene may also be relatively far, so the marching line distance corresponding to the expeditionary unit is also relatively long. It may be difficult to display the complete marching line in most game screens. Figure 4A and Figure 4B As shown, only parts of the ground route and the air flight route are shown.
[0087] Here, when the player selects a destination and controls the expeditionary units to advance (expedition, mopping up, etc.), the marching line will be displayed on the graphical user interface. The marching line points from the departure point to the destination and is used as a guide line to guide the marching direction and distance of the expeditionary units. The marching line can distinguish different player camps according to different colors, such as your own troops, friendly troops, enemy troops, etc.
[0088] Optionally, the marching line represents the movement route of the expeditionary unit in the game scene. The expeditionary unit can advance to the destination along the path indicated by the marching line. For example, the color corresponding to the route traveled by the expeditionary unit along the marching line becomes lighter, and when the expeditionary unit reaches the destination, the marching line can disappear.
[0089] Combine the following FIG. 5A to FIG. 5C It should be understood that the methods of constructing an aerial flight route in a virtual scene listed in the following diagrams are only examples, and the present application is not limited thereto, and an aerial flight route can also be generated in other ways.
[0090] exist Figure 5AIn the example, assuming that the departure place is Q and the destination is Z, when constructing the air flight route from the departure place Q to the destination Z, a ray with a preset angle can be drawn from the departure place Q and the destination Z respectively, so that a triangle is formed by the two rays and the line between the departure place Q and the destination Z, and an arc tangent to the two hypotenuses of the triangle and passing through the departure place Q and the destination Z is selected as the air flight route D1 from the departure place Q to the destination Z. Exemplarily, the preset angle can be selected as 20 degrees, or other angle values can be selected, and this application does not limit this.
[0091] Figure 5B In the example shown, the distance from the departure point Q to the destination Z is greater than Figure 5A When the height value of the center point of the arc (e.g., the vertical height value from the center point to the ground) is less than the limit height threshold, the above Figure 5A An aerial flight route is constructed in the manner shown in , such as the aerial flight route D2 shown in the figure.
[0092] exist Figure 5C In the example, if the height value of the center point of the arc from the departure point Q to the destination Z constructed according to the above method is greater than or equal to the restricted height threshold MAX, at this time, an arc that is tangent to the restricted height threshold MAX and passes through the departure point Q and the destination Z can be selected as the aerial flight route D3 from the departure point Q to the destination Z.
[0093] Returning to FIG. 1 , in step S102 , the feature adjustment value of each vertex on the target linear element is determined according to the positional relationship between each vertex and the virtual camera.
[0094] Here, the GPU can perform the rendering tasks of the graphics pipeline by implementing programs commonly referred to as shaders. A typical graphics pipeline may include: a vertex shader, which can manipulate certain properties on a per-vertex basis, a pixel shader (also known as a "fragment shader"), which operates downstream of the vertex shader in the graphics pipeline and can manipulate certain values on a per-pixel basis before transmitting pixel data to a display. In addition, the above-mentioned graphics pipeline may also include other shaders at various stages in the pipeline, such as a geometry shader that uses the output of the vertex shader to generate a set of new prototypes, and a compute shader (CS) that can be implemented by the GPU to perform certain other general computing tasks.
[0095] Exemplarily, each time the game application needs to generate a frame of game image, the game application may issue a drawing instruction for drawing the game image.
[0096] Taking the application as a game application as an example, in an optional implementation, when the game application is started, the game application can send a drawing instruction to the graphics library, so as to call the drawing function in the graphics library through the drawing instruction to draw the image and generate the corresponding game image. Usually, the drawing instruction may include vertex information, texture information, shader information, etc. of the corresponding image to be drawn. Among them, the vertex information is used to describe the number and position of the vertices constituting the corresponding object, the texture information is used to describe the color or specific pattern that needs to be filled on the surface of the corresponding object, and the shader information generally includes the identification, storage address and other information of the shader. Based on this, the corresponding shader can be called according to the shader information, so as to draw the image to be drawn according to the vertex information and texture information. Exemplarily, taking the shader including the vertex shader and the pixel shader as an example, the vertex shader can draw the outline of the image to be drawn according to the vertex information, and the pixel shader can fill the color for the image to be drawn according to the texture information.
[0097] Preferably, the above step of determining the feature adjustment value of each vertex can be performed in a vertex shader. In the present application, a sampling process is performed once for each vertex on the target linear element to effectively reduce the computational cost.
[0098] It can be understood that the vertex shader (also known as the vertex shading engine, vertex shader) is mainly responsible for the calculation and processing of the geometric relationship of vertices, for example, it is a processing unit used to add various special effects in a three-dimensional scene. The programmable nature of the vertex shader allows developers to adjust various special effects by loading new software instructions. Each vertex can be clearly defined by various data parameters, which can include but are not limited to the x, y, and z coordinates of each vertex. In addition, each vertex can also include at least one of the data of color, initial path, material, and light characteristics.
[0099] In a preferred embodiment of the present application, the distance value from the virtual camera to each vertex on the target linear element is calculated through a vertex shader, and the determined distance value is transmitted to the next level of processing as a kind of vertex data.
[0100] The pixel shader is mainly responsible for the operation and processing of the fragment color, etc. For example, after the vertex shader calculates the relevant data corresponding to each vertex, the relevant data is passed from the vertex shader to the pixel shader. In addition, the vertex shader may also transmit data to the geometry shader, which receives the vertex as input and treats it as a complete pixel. The geometry shader can be further configured to execute various algorithms, such as tessellation, shadow volume generation, etc. The geometry shader then outputs the information to a raster processor, which is responsible for clipping, pixel setting, and deciding when and / or how to activate the pixel shader. The pixel shader is activated for each pixel covered by the pixel output by the raster processor. This application does not impose any restrictions on this.
[0101] In a preferred embodiment of the present application, after the distance value from the virtual camera to each vertex on the target linear element is calculated by the vertex shader, the feature adjustment value of each vertex is determined according to the distance value corresponding to each vertex by the pixel shader. Preferably, the feature adjustment value is used to adjust the feature value of the specified display attribute of the vertex.
[0102] That is, the feature adjustment value of each vertex is determined in the pixel shader based on the calculated distance value corresponding to each vertex. It can be understood that for the target linear element in the three-dimensional game scene, for example, the vertex set on the marching line, the vertex coordinates can be the coordinates corresponding to each vertex in the three-dimensional game scene. Optionally, the coordinates corresponding to each vertex in the three-dimensional game scene include not only three-dimensional world space coordinates, but also two-dimensional texture coordinates.
[0103] For example, the vertex coordinates in the virtual map may be texture coordinates corresponding to each vertex in the virtual map, specifically UV coordinates or UVW coordinates. Similar to the X, Y, and Z axes of the spatial model, U may represent the coordinates of the image in the horizontal direction, V may represent the coordinates of the image in the vertical direction, and the direction of W is perpendicular to the display surface, which is generally used for procedural mapping or some three-dimensional scene mapping technologies.
[0104] In a preferred embodiment, the feature adjustment value for each vertex on the target linear element in the present application may refer to a coefficient for characterizing the change in the U direction. For example, the feature adjustment value may represent a magnification factor for the pixel in the width direction in the pixel shader. In the embodiment of the present application, it may be determined how to magnify the march line based on the positional relationship between the virtual camera and each vertex. Preferably, the magnification is performed in the width direction of the pixel.
[0105] Optionally, the distance value between the virtual camera and each vertex on the target linear element includes the length value of the line between the virtual camera and a vertex, wherein the feature adjustment value of each vertex is positively correlated with the distance value corresponding to the vertex. That is, for each vertex, the farther the distance value between the vertex and the virtual camera, the greater the feature adjustment value of the vertex, that is, the greater the magnification factor of the pixel corresponding to the vertex in the width direction (equivalent to more thickening of the line width), and accordingly, for each vertex, the closer the distance value between the vertex and the virtual camera, the smaller the feature adjustment value of the vertex, that is, the smaller the magnification factor of the pixel corresponding to the vertex in the width direction (equivalent to slightly less thickening of the line width).
[0106] In a preferred embodiment of the present application, a truncation interval is introduced to constrain the change of the feature adjustment value for each vertex within a certain range to avoid generating additional calculation processing.
[0107] For example, based on the truncation interval and the distance value corresponding to each vertex, the truncation distance value corresponding to each vertex is determined respectively, so as to determine the characteristic adjustment value of each vertex according to the determined truncation distance value. Exemplarily, the above-mentioned truncation interval is used to characterize the distance limit boundary from the virtual camera to the vertex on the target linear element. Based on the display effect of the lines at different distances on the game image, the upper limit value (maximum magnification system) and lower limit value (minimum magnification system) of the magnification factor of the pixel in the width direction can be determined, and based on the upper limit value and lower limit value of the determined magnification factor, the distance limit value between the virtual camera and the vertex is calculated, thereby forming the truncation interval.
[0108] In an optional embodiment, the feature adjustment value corresponding to each vertex may be calculated in the following manner: comparing the distance value corresponding to the vertex with the truncation interval.
[0109] In one case, the distance value corresponding to the vertex is not greater than (less than or equal to) the minimum distance limit. In this case, the minimum distance limit is determined as the cutoff distance value corresponding to the vertex, and the minimum distance limit is the lower limit of the cutoff interval.
[0110] In this case, the minimum magnification coefficient corresponding to the minimum distance limit is determined as the characteristic adjustment value of the vertex. For example, the minimum magnification coefficient can be selected as 1, that is, when the distance between the virtual camera and the vertex is close (distance value ≤ minimum distance limit), there is no need to adjust the line width of the vertex in the width direction.
[0111] In another case, the distance value corresponding to the vertex is not less than (greater than or equal to) the maximum distance limit. At this time, the maximum distance limit is determined as the cutoff distance value corresponding to the vertex. The maximum distance value is greater than the minimum distance value, and the maximum distance limit is the upper limit value of the cutoff interval.
[0112] In this case, the maximum magnification factor corresponding to the maximum distance limit is determined as the characteristic adjustment value of the vertex. That is, when the distance between the virtual camera and the vertex is far and reaches a certain level (distance value ≥ maximum distance limit), the line width of the vertex in the width direction can be adjusted with a fixed magnification factor.
[0113] In another case, the distance value corresponding to the vertex is greater than the minimum distance limit or less than the maximum distance limit. In this case, the distance value is determined as the cutoff distance value corresponding to the vertex, that is, the cutoff distance value changes with the change of the distance value between the virtual camera and the vertex.
[0114] In this case, the feature adjustment value of the vertex is positively correlated with the truncation distance value corresponding to the vertex, that is, the farther the distance value between the vertex and the virtual camera, the larger the feature adjustment value of the vertex, and the closer the distance value between the vertex and the virtual camera, the smaller the feature adjustment value of the vertex.
[0115] In an optional example, the feature adjustment value corresponding to each vertex may be calculated in the following manner:
[0116]
[0117] In the above formula, k represents the feature adjustment value corresponding to a vertex, k max Indicates the maximum amplification factor, k min represents the minimum magnification factor, preferably, k min =1,D min Indicates the minimum distance limit, D max Represents the maximum distance limit, and D represents the distance between the virtual camera and the vertex.
[0118] In step S103, the game image is drawn based on the feature adjustment value of each vertex on the target linear element.
[0119] For example, a pixel shader can be used to magnify the line width of a pixel in a width direction based on a feature adjustment value of each vertex, so as to achieve the drawing of a target linear element in a frame of a game image.
[0120] The above processing method not only ensures that the basic performance of the game will not be consumed too high, but also can calculate the anti-aliasing effect in real time for the march line when scaling the scene map of the virtual scene of the game and when the player freely drags the scene map, thereby achieving overall harmony of the picture.
[0121] In addition, it can also solve the problem of increased computing consumption due to multiple sampling for each pixel, and reduce the computing load and resource consumption of the terminal device or server. Moreover, the above processing method can also avoid problems such as blurring and ghosting of lines in game images.
[0122] Based on the same application concept, a display control device corresponding to the method provided in the above embodiment is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the display control method in the above embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0123] Figure 6 The structure diagram of the display control device in the game provided by the exemplary embodiment of the present application is as follows. Figure 6 As shown, the display control device 200 includes:
[0124] The element recognition module 210 recognizes the target linear element within the visible range in response to the game image drawing instruction;
[0125] A vertex adjustment module 220 determines a feature adjustment value of each vertex on the target linear element according to a positional relationship between each vertex and the virtual camera;
[0126] The image drawing module 230 draws a game image based on the feature adjustment value of each vertex on the target linear element.
[0127] In a possible implementation manner of the present application, the target linear element is an object to be drawn within the visible range, and at least a portion of the target linear element is presented in an arc form.
[0128] In one possible implementation of the present application, the target line-shaped element is a route marker generated in the virtual scene for representing the movement path of the virtual unit in the virtual scene, wherein the movement path includes a ground travel route representing the movement of the virtual unit in the virtual scene in a first movement mode, and / or an aerial flight route representing the movement of the virtual unit in the virtual scene in a second movement mode, and each movement trajectory point on the movement path is expressed in the form of three-dimensional coordinates.
[0129] In a possible implementation of the present application, the vertex adjustment module 220 includes a vertex shader and a pixel shader, wherein the vertex shader is used to calculate the distance value from the virtual camera to the vertex; and the pixel shader is used to determine the feature adjustment value of the vertex according to the distance value, and the feature adjustment value is used to adjust the feature value of the specified display attribute of the vertex.
[0130] In one possible implementation of the present application, the distance value includes the length value of the line between the virtual camera and the vertex, and the feature adjustment value includes a magnification coefficient for the pixel in the width direction in the pixel shader, wherein the feature adjustment value of each vertex is positively correlated with the distance value corresponding to the vertex.
[0131] In a possible implementation of the present application, the vertex adjustment module 220 is further used to: determine the truncation distance value corresponding to each vertex based on the truncation interval and the distance value corresponding to each vertex, so as to determine the feature adjustment value of each vertex according to the determined truncation distance value, and the truncation interval is used to characterize the distance limit boundary from the virtual camera to the vertex on the target linear element.
[0132] In a possible implementation of the present application, the vertex adjustment module 220 calculates the cutoff distance value corresponding to each vertex in the following manner: compare the distance value corresponding to the vertex with the cutoff interval; if the distance value is not greater than the minimum distance limit, determine the minimum distance limit as the cutoff distance value corresponding to the vertex, and the minimum distance limit is the lower limit of the cutoff interval; if the distance value is not less than the maximum distance limit, determine the maximum distance limit as the cutoff distance value corresponding to the vertex, the maximum distance value is greater than the minimum distance value, and the maximum distance limit is the upper limit of the cutoff interval; if the distance value is greater than the minimum distance limit or less than the maximum distance limit, determine the distance value as the cutoff distance value corresponding to the vertex.
[0133] In a possible implementation of the present application, the vertex adjustment module 220 determines the feature adjustment value of each vertex in the following manner: if the cutoff distance value corresponding to the vertex is the minimum distance limit, the minimum magnification coefficient corresponding to the minimum distance limit is determined as the feature adjustment value of the vertex; if the cutoff distance value corresponding to the vertex is the maximum distance limit, the maximum magnification coefficient corresponding to the maximum distance limit is determined as the feature adjustment value of the vertex; if the cutoff distance value corresponding to the vertex is the distance value from the virtual camera to the vertex, the feature adjustment value of the vertex is positively correlated with the cutoff distance value corresponding to the vertex.
[0134] Based on the above device, the computing consumption can be effectively reduced.
[0135] See also Figure 7 , Figure 7 The schematic diagram of the structure of the electronic device provided by the exemplary embodiment of the present application. Figure 7 As shown, the electronic device 300 includes a processor 310 , a memory 320 and a bus 330 .
[0136] The memory 320 stores machine-readable instructions executable by the processor 310. When the electronic device 300 is running, the processor 310 communicates with the memory 320 via the bus 330. When the machine-readable instructions are executed by the processor 310, the steps of the display control method in any of the above embodiments can be performed, which are as follows:
[0137] In response to a game image drawing instruction, a target linear element within a visible range is identified; a feature adjustment value of each vertex on the target linear element is determined based on a positional relationship between each vertex on the target linear element and a virtual camera; and a game image is drawn based on the feature adjustment value of each vertex on the target linear element.
[0138] Based on the above electronic devices, computing consumption can be effectively reduced.
[0139] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the display control method in any of the above embodiments can be executed, which are as follows:
[0140] In response to a game image drawing instruction, a target linear element within a visible range is identified; a feature adjustment value of each vertex on the target linear element is determined based on a positional relationship between each vertex on the target linear element and a virtual camera; and a game image is drawn based on the feature adjustment value of each vertex on the target linear element.
[0141] Based on the above computer-readable storage medium, computing consumption can be effectively reduced.
[0142] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0143] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0145] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0146] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A display control method in a game, characterized in that: Providing a graphical user interface through a terminal device, wherein at least a portion of a virtual scene of the game is displayed on the graphical user interface, and the method includes: In response to a game image drawing instruction, identifying a target line-shaped element within a visible range; Determining a feature adjustment value of each vertex on the target linear element according to a positional relationship between each vertex and the virtual camera; The game image is drawn based on the feature adjustment value of each vertex on the target linear element.
2. The method according to claim 1, characterized in that The target line-shaped element is an object to be drawn within the visible range, and at least a portion of the target line-shaped element is presented in an arc form.
3. The method according to claim 1 or 2, characterized in that: The target line element is a route mark generated in the virtual scene and used to represent the moving path of the virtual unit in the virtual scene. The moving path includes a ground route representing the movement of the virtual unit in the virtual scene in a first moving mode, and / or an aerial flight route representing the movement of the virtual unit in the virtual scene in a second moving mode, and each moving trajectory point on the moving path is expressed in the form of three-dimensional coordinates.
4. The method according to claim 1, characterized in that: The feature adjustment value for each vertex is determined as follows: Calculate the distance value from the virtual camera to the vertex through the vertex shader; A feature adjustment value of the vertex is determined according to the distance value through a pixel shader, and the feature adjustment value is used to adjust the feature value of a specified display attribute of the vertex.
5. The method according to claim 4, characterized in that The distance value includes the length of the line between the virtual camera and the vertex, and the feature adjustment value includes a magnification factor for the pixel in the width direction in the pixel shader. Among them, the feature adjustment value of each vertex is positively correlated with the distance value corresponding to the vertex.
6. The method according to claim 1 or 4, characterized in that: Also includes: Based on the truncation interval and the distance value corresponding to each vertex, the truncation distance value corresponding to each vertex is determined respectively, so as to determine the feature adjustment value of each vertex according to the determined truncation distance value, and the truncation interval is used to characterize the distance limit boundary from the virtual camera to the vertex on the target linear element.
7. The method according to claim 6, characterized in that The cutoff distance value corresponding to each vertex is calculated as follows: Compare the distance value corresponding to the vertex with the cutoff interval; If the distance value is not greater than the minimum distance limit, the minimum distance limit is determined as the cutoff distance value corresponding to the vertex, and the minimum distance limit is the lower limit of the cutoff interval; If the distance value is not less than the maximum distance limit, the maximum distance limit is determined as the cutoff distance value corresponding to the vertex, the maximum distance value is greater than the minimum distance value, and the maximum distance limit is the upper limit value of the cutoff interval; If the distance value is greater than the minimum distance limit or less than the maximum distance limit, the distance value is determined as the cutoff distance value corresponding to the vertex.
8. The method according to claim 7, characterized in that The feature adjustment value for each vertex is determined as follows: If the cutoff distance value corresponding to the vertex is the minimum distance limit value, the minimum magnification coefficient corresponding to the minimum distance limit value is determined as the feature adjustment value of the vertex; If the cutoff distance value corresponding to the vertex is the maximum distance limit, the maximum magnification factor corresponding to the maximum distance limit is determined as the feature adjustment value of the vertex; If the cutoff distance value corresponding to the vertex is the distance value from the virtual camera to the vertex, the feature adjustment value of the vertex is positively correlated with the cutoff distance value corresponding to the vertex.
9. A display control device in a game, characterized in that: A graphical user interface is provided through a terminal device, and at least a part of a virtual scene of the game is displayed on the graphical user interface. The apparatus comprises: An element recognition module, in response to a game image drawing instruction, recognizes a target line-shaped element within a visible range; A vertex adjustment module, which determines a feature adjustment value of each vertex according to a positional relationship between each vertex on the target linear element and the virtual camera; The image drawing module draws the game image based on the feature adjustment value of each vertex on the target linear element.
10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of any method as claimed in claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are executed.
Citation Information
Patent Citations
Display control method and device in game, storage medium and computer equipment
CN113426124A
Game display control method and device, storage medium and electronic equipment
CN113440846A
Game processing method and device, electronic equipment and storage medium
CN117899451A
Game program, information processing system, information processing device, and game processing method
JP2023098606A
Game system, computer readable storage medium storing game program and image displaying method
US20010024972A1