Game scene display method and device, storage medium and electronic device
By displaying pigments in the game scene according to the spraying order and pigment height, and simulating fluid motion properties, the problem of low simulation level of pigment spraying in the existing technology is solved, and the display effect of the game scene and the player experience are improved.
Patent Information
- Application Number
- CN202011324107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-11-23
AI Technical Summary
In the existing technology, the degree of simulation of paint spraying in game scenes is low, resulting in poor game experience.
By displaying the target spray object in the target game scene on the target client, obtaining and responding to the target spray operation, simultaneously displaying spray paint belonging to different participants on the target area according to the spray order and paint height, and controlling the moving speed of the spray props. Direction and strength, simulate fluid motion properties to achieve a more realistic spraying effect.
It improves the fidelity of paint spraying, enhances the display effect of game scenes, and improves player experience.
Smart Images

Figure CN112402974B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method and device for displaying a game scene, a storage medium, and an electronic device. Background Art
[0002] For multiplayer online games with paint and graffiti as the theme (e.g., shooting games), players can operate virtual characters to control spray props (e.g., prop guns, mounts, etc.) to spray paint everywhere. For example, the virtual character can go wherever the paint is sprayed; however, when stepping on the paint sprayed by the enemy, it will be difficult to move. The victory standard is the amount of sprayed area of each party at the end of the game.
[0003] In the related art, after a virtual character in a fighting game launches spray paint, the spray paint will directly cover the enemy paint that has been sprayed in the sprayed area, and the adhesion between the paints is poor, resulting in a low degree of realism in the paint spraying.
[0004] Therefore, the display method of the game scene in the related art has the problem of low degree of realism of paint spraying. Summary of the invention
[0005] The present application provides a method and device for displaying a game scene, a storage medium and an electronic device, so as to at least solve the problem of low degree of simulation of paint spraying in the display method of the game scene in the related art.
[0006] According to one aspect of an embodiment of the present application, a method for displaying a game scene is provided, comprising: displaying a target spray object in a target game scene on a target client, wherein a first area of the target spray object is displayed with spray paint belonging to a first participant of a target game; acquiring a target spray operation performed on the target spray object, wherein the target spray operation is used to spray spray paint belonging to a second participant to a second area of the target spray object; in response to the target spray operation, the spray paint belonging to the first participant and the spray paint belonging to the second participant are simultaneously displayed on a target area according to a spraying order and a paint height, wherein the target area is an overlapping area of the first area and the second area.
[0007] Optionally, after obtaining the target spraying operation performed on the target spraying object, the method further includes: controlling a target spraying prop to spray a first spray paint onto the target spraying object, wherein the target spraying prop is a spray prop used by a target virtual character belonging to the second participant, and the first spray paint is the spray paint accumulated in the target spraying prop.
[0008] Optionally, controlling the target spraying prop to spray the first spray paint onto the target spraying object includes: controlling the first spray paint to be sprayed onto the target spraying object according to the moving speed of the target spraying prop, the prop position, the spraying direction, the spraying force, and the volume of the first spray paint.
[0009] Optionally, the method further includes: after the first spray paint collides with the target spray object, taking the collision position of the collision as an anchor point, controlling the first spray paint to splash around the collision position according to the motion properties of the fluid, wherein the second area where the first spray paint is sprayed after splashing includes multiple discrete areas with different areas.
[0010] Optionally, the simultaneously displaying the spray paint belonging to the first participant and the spray paint belonging to the second participant on the target area according to the spraying order and the paint height includes: displaying the spray paint belonging to the second participant on a target sub-area of the target area, wherein the target sub-area is an area where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold; displaying the spray paint belonging to the first participant on other sub-areas of the target area except the target sub-area; wherein the target sub-area includes multiple discrete areas with different area areas, and the other sub-areas include multiple discrete areas with different area areas.
[0011] Optionally, before displaying the spray paint belonging to the second participant on the target sub-area of the target area, the method further includes: determining the target sub-area from the target area, wherein the height value of the spray paint belonging to the second participant at each position of the target sub-area is greater than or equal to the height value of the corresponding position on the target noise map.
[0012] Optionally, after simultaneously displaying the spray paint belonging to the first participant and the spray paint belonging to the second participant on the target area according to the spraying order and paint height, the method further includes: displaying the diffuse shadows and reflective spots of the second spray paint on the second spray paint displayed on the target area.
[0013] According to another aspect of an embodiment of the present application, a display device for a game scene is also provided, including: a first display unit, used to display a target spray object in a target game scene on a target client, wherein a first area of the target spray object is displayed with spray paint belonging to a first participant of a target game; an acquisition unit, used to acquire a target spray operation performed on the target spray object, wherein the target spray operation is used to spray spray paint belonging to a second participant to a second area of the target spray object; a second display unit, used to respond to the target spray operation, and display the spray paint belonging to the first participant and the spray paint belonging to the second participant on a target area at the same time according to a spraying order and a paint height, wherein the target area is an overlapping area of the first area and the second area.
[0014] Optionally, the device also includes: a first control unit, used to control a target spraying prop to spray a first spray paint onto the target spraying object after acquiring the target spraying operation performed on the target spraying object, wherein the target spraying prop is a spraying prop used by a target virtual character belonging to the second participant, and the first spray paint is the spray paint accumulated in the target spraying prop.
[0015] Optionally, the first control unit includes: a control module for controlling the first spray paint to be sprayed onto the target spray object according to the moving speed of the target spray prop, the prop position, the spray direction, the spray force, and the volume of the first spray paint.
[0016] Optionally, the device also includes: a second control unit, which is used to control the first spray paint to splash around the collision position according to the movement properties of the fluid after the first spray paint collides with the target spray object, with the collision position of the collision as an anchor point, wherein the second area where the first spray paint is sprayed after splashing includes multiple discrete areas with different areas.
[0017] Optionally, the second display unit includes: a first display module, used to display the spray paint belonging to the second participant on a target sub-area of the target area, wherein the target sub-area is an area where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold; a second display module, used to display the spray paint belonging to the first participant on other sub-areas of the target area except the target sub-area; wherein the target sub-area includes multiple discrete areas with different areas, and the other sub-areas include multiple discrete areas with different areas.
[0018] Optionally, the device also includes: a determination unit, used to determine the target sub-area from the target area before displaying the spray paint belonging to the second participant on the target sub-area of the target area, wherein the height value of the spray paint belonging to the second participant at each position of the target sub-area is greater than or equal to the height value of the corresponding position on the target noise map.
[0019] Optionally, the device also includes: a third display unit, which is used to display the diffuse shadows and reflective spots of the second sprayed paint on the second sprayed paint displayed on the target area, after the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and paint height.
[0020] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.
[0022] In an embodiment of the present application, a method of controlling the display of spray paint according to the spraying order and the paint height is adopted, by displaying the target spray object in the target game scene on the target client, wherein the spray paint belonging to the first participant of the target game is displayed on the first area of the target spray object; obtaining a target spray operation performed on the target spray object, wherein the target spray operation is used to spray the spray paint belonging to the second participant to the second area of the target spray object; in response to the target spray operation, according to the spraying order and the paint height, the spray paint belonging to the first participant and the spray paint belonging to the second participant are simultaneously displayed on the target area, wherein the target area is the overlapping area of the first area and the second area. Since the display of the spray paint is controlled according to the spraying order and the paint height, the effect of the two paint ring-like display will appear in the overlapping area of the two paints, which can achieve the purpose of increasing the adhesion between the paints, and the rendering quality does not change, and the technical effect of improving the realism of the paint spraying can be achieved, thereby solving the problem of low realism of the paint spraying in the display method of the game scene in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0025] Figure 1 is a schematic diagram of a hardware environment of an optional method for displaying a game scene according to an embodiment of the present application;
[0026] Figure 2 is a flowchart of an optional method for displaying a game scene according to an embodiment of the present application;
[0027] Figure 3 is a schematic diagram of another optional method for displaying a game scene according to an embodiment of the present application;
[0028] Figure 4 is a schematic diagram of another optional method for displaying a game scene according to an embodiment of the present application;
[0029] Figure 5 is a schematic diagram of another optional method for displaying a game scene according to an embodiment of the present application;
[0030] Figure 6 is a flowchart of another optional method for displaying a game scene according to an embodiment of the present application;
[0031] Figure 7 is a structural block diagram of a display device for an optional game scene according to an embodiment of the present application;
[0032] Figure 8 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] According to one aspect of an embodiment of the present application, a method for displaying a game scene is provided. Optionally, in this embodiment, the method for displaying a game scene can be applied to Figure 1 In the hardware environment composed of the terminal 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal 102 via a network, and can be used to provide services (such as game services, application services, etc.) for the terminal or the client (for example, the game client) installed on the terminal, and a database can be set on the server or independently of the server to provide data storage services for the server 104, and can also be used to process cloud services. The above network includes but is not limited to: a wide area network, a metropolitan area network or a local area network, and the terminal 102 is not limited to a PC (Personal Computer, personal computer), a mobile phone, a tablet computer, etc. The display method of the game scene of the embodiment of the present application can be executed by the server 104, or by the terminal 102, or by the server 104 and the terminal 102. Among them, the terminal 102 executes the display method of the game scene of the embodiment of the present application, and it can also be executed by the client (for example, the client of the target game) installed thereon.
[0036] Taking the method for displaying the game scene in this embodiment executed by the terminal 102 as an example, Figure 2 is a flowchart of an optional method for displaying a game scene according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0037] Step S202: displaying a target spraying object in a target game scene on a target client, wherein a spraying paint belonging to a first participant of the target game is displayed on a first area of the target spraying object.
[0038] The display method of the game scene in this embodiment can be applied to the scene of spraying paint on the spraying object in the game scene. The game scene can be a game scene of the target game (for example, a three-dimensional game scene). The target game can be a single-player game or a multiplayer game; it can be a battle game (for example, a multiplayer online battle game with paint and graffiti as the theme), or it can be a non-battle game (for example, a business game); it can be a terminal game or a mobile game. For example, the target game can be an MMO (Massive Multiplayer Online) game, an AR (Augmented Reality) game, a VR (Virtual Reality) game, or other types of games. The game type is not limited in this embodiment.
[0039] Taking a multiplayer competitive game as an example, the target game may be a multiplayer battle game of NVN (e.g., 1V1, 4V4, 5V5, etc.), and the multiplayer battle may have at least two opponents (i.e., participants). In this embodiment, two opponents are used as an example for explanation. The target game may have one or more modes, and different game modes may correspond to one or more battle difficulties (e.g., simple, standard, difficult, etc.), and the number of players allowed in each mode may be the same or different.
[0040] The target game may have one or more game scenes, each of which may correspond to one or more game modes and one or more battle difficulties. In one game scene, there may be multiple battle routes, which may be crisscrossed, making it convenient for players to control virtual characters in the game scene to fight flexibly.
[0041] It should be noted that, in this embodiment, the example is used to illustrate that the server executes operations such as data calculation in the target game, and the client uses the data calculated by the server for performance. The method of displaying the game scene in this embodiment is also applicable to the server and the client jointly executing, or the client independently executing data calculation in the target game.
[0042] The terminal device of the user (player, corresponding to an object) can run a client of the battle game application, and the client can communicate with the server, which is the background server of the battle game. The user can log in to the client running on his terminal device by using an account and password, a dynamic password, or an associated application (third-party application) to log in, and enter a battle game by operating the client.
[0043] In a battle game, different players can control different virtual characters to perform game operations in the game scene through the client of the battle game running on their terminal devices, thereby engaging in multiplayer battles. Players can control the virtual characters in the battle game to use spray props to spray spray paint onto the spray object. The spray paint can be paint or other paint that can distinguish different participants, the spray props can be instrument props, virtual object props (for example, mounts), etc., and the spray object can be a spray surface, for example, the surface of an object, the ground, the wall, etc. in the game scene, which is not limited in this embodiment.
[0044] During the battle game, the virtual character controlled by the player enters the paint sprayed by himself or his side. The virtual character can have the blessing of movement acceleration and ammunition recovery. At the same time, it can be in a hidden state and can perform rock climbing operations, etc., so as to increase the playability of the game.
[0045] For the target object (corresponding to the target player), the target object can use the target account to log in to the target client of the target game (target battle game) running on the target terminal device. In a battle game, the virtual character corresponding to the target account is the target virtual character. The display method of the game scene in this embodiment can be executed by the target terminal device or the target client.
[0046] The target client can display the target game scene of the current game, and there is a target spray object in the target game scene, and the first area of the target spray object can display the spray paint belonging to the first participant of the target game. The current game has at least two participants, and the first participant and the participant to which the target virtual character belongs are different participants.
[0047] Step S204, obtaining a target spraying operation performed on the target spraying object, wherein the target spraying operation is used to spray the spray paint belonging to the second participant to the second area of the target spraying object.
[0048] During the running of this game, the target object can operate the target client and control the target virtual character to perform a target spraying operation on the target spraying object through control operations such as clicking and sliding. The target spraying operation is to spray the spray paint belonging to the second participant to the second area of the target spraying object. The second participant is the participant to which the target virtual character belongs.
[0049] The target client can obtain the target spraying operation performed on the target spraying object, and control the target virtual character to perform, or the server controls the target virtual character to perform, an operation of spraying the spray paint belonging to the second participant to the second area of the target spraying object.
[0050] Step S206, in response to the target spraying operation, the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and the paint height, wherein the target area is the overlapping area of the first area and the second area.
[0051] In response to the target spraying operation, the target spraying object after spraying the spray paint belonging to the second participant to the second area can be displayed on the target client. The overlapping area of the first area and the second area is the target area, and the areas other than the target area in the first area display the spray paint belonging to the first participant, and the areas other than the target area in the second area display the spray paint belonging to the second participant.
[0052] On the target area, the spray paint belonging to the first participant and the spray paint belonging to the second participant can be displayed simultaneously on the target area according to the spraying order and the paint height. For example, according to the spraying order, the spray paint sprayed later (for example, the spray paint of the second participant) is displayed preferentially under the same height condition. For another example, according to the paint height, the spray paint with a higher paint height can be displayed preferentially.
[0053] Optionally, in this embodiment, the heights of the spray paint of different participants can be represented by a height map, and the height map can be an RG map, in which the R channel and the G channel correspond to different participants respectively, and are used to represent the height values of the spray paint of different participants.
[0054] If the two height values of a position (which can correspond to different channels of the height map, for example, the R channel and the G channel) are both less than a threshold, it means that the position is not covered by the spray paint of any participant, and the original color of the target spray object at that position is displayed at that position; if only one of the two height values of a position (pixel point) is higher than a threshold, it means that the position is covered by the spray paint of a participant, and the corresponding color will be displayed at that position.
[0055] Optionally, whether two height values at a certain position meet the height condition (higher than a threshold) can be determined in order of priority. For example, the R channel is judged first. If both the R channel and the G channel meet the height condition, the color of the R channel will be displayed because the R channel is judged first.
[0056] In order to ensure that the sprayed paint can be displayed in the order of spraying, for positions where the heights of the sprayed paints of multiple participants are higher than a threshold, the height of the sprayed paint of the participant who sprayed the most recently (for example, the second participant) can be kept unchanged, while the heights of the sprayed paints of other participants (for example, the first participant) can be adjusted to be less than the threshold.
[0057] It should be noted that, whether the first area, the second area or the target area, it can have an irregular shape, and the shape can conform to certain properties of fluid motion, such as uneven thickness, splashing, etc., so that the paint after spraying has a higher degree of realism.
[0058] Through the above steps S202 to S206, the target spray object in the target game scene is displayed on the target client, wherein the spray paint belonging to the first participant of the target game is displayed on the first area of the target spray object; the target spray operation performed on the target spray object is obtained, wherein the target spray operation is used to spray the spray paint belonging to the second participant to the second area of the target spray object; in response to the target spray operation, the spray paint belonging to the first participant and the spray paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and the paint height, wherein the target area is the overlapping area of the first area and the second area, which solves the problem of low realism of paint spraying in the display method of the game scene in the related art and improves the realism of paint spraying.
[0059] As an optional embodiment, after acquiring the target spraying operation performed on the target spraying object, the method further includes:
[0060] S11, controlling the target spraying prop to spray a first spraying paint onto the target spraying object, wherein the target spraying prop is a spraying prop used by a target virtual character belonging to the second participant, and the first spraying paint is the spraying paint accumulated in the target spraying prop.
[0061] In this game, the spray prop used by the target virtual character is the target spray prop, which can be a prop gun, a mount, etc., which is not limited in this embodiment. In response to the target spray operation, the target spray prop can be controlled to spray the first spray paint onto the target spray object, and the target client displays a picture of the first spray paint being sprayed onto the target spray object by the target spray prop.
[0062] The first spray paint is the spray paint accumulated in the target spray prop, which may be all the spray paint accumulated in the target spray prop, or a certain volume (for example, the amount of paint sprayed each time) of spray paint accumulated in the target spray prop.
[0063] The first spray paint can be carried in the spray ammunition, similar to fireworks, and the spray ammunition explodes after colliding with the target spray object, and the first spray paint splashes around, thereby achieving spraying. The first spray paint can also be directly sprayed onto the target spray object by a target spray prop, similar to a squirt gun, and the target spray prop can push the first spray paint toward the target spray object at a certain speed and spray it onto the target spray object.
[0064] Through this embodiment, the target spraying prop sprays the accumulated spray paint onto the target spraying object, so as to simulate the process from replenishing the spray paint to using it, thereby improving the realism of the paint spraying.
[0065] As an optional embodiment, controlling the target spraying prop to spray the first spraying paint onto the target spraying object includes:
[0066] S21, controlling the first spraying paint to be sprayed onto the target spraying object according to the moving speed of the target spraying prop, the prop position, the spraying direction, the spraying force, and the volume of the first spraying paint.
[0067] When spraying the first spray paint onto the target spray object, the target virtual character can be in a standing or other non-moving state or in a moving state in the target game scene. According to the law of motion, the moving speed of the target spray prop can affect the spraying of the first spray paint.
[0068] The prop position of the target spraying prop can be used to determine the relative position of the target spraying prop and the target spraying object. The first spraying paint is affected differently by gravity, air resistance, etc. due to different relative positions. Therefore, the prop position of the target spraying prop can affect the spraying of the first spraying paint (for example, the moving trajectory).
[0069] In addition, the spraying direction and spraying force of the target spraying prop can affect the moving direction and moving speed of the first spraying paint, and the volume of the first spraying paint is different, the spraying force required to spray the first spraying paint (for example, it can be represented by the time of the power storage operation) is different, the speed at which the same spraying force can be sprayed is different, and the air resistance of the first spraying paint, the range of splashing after hitting the target spraying object, etc. are also different. Therefore, the volume of the first spraying paint can affect the spraying of the first spraying paint.
[0070] In order to ensure that the paint spraying conforms to the laws of nature, the first spray paint can be controlled to be sprayed onto the target spray object according to the moving speed of the target spray prop, the prop position, the spraying direction, the spraying force, and the volume of the first spray paint, that is, the spraying trajectory of the first spray paint is controlled, and the process of spraying the first spray paint onto the target spray object can be displayed on the target client.
[0071] Through this embodiment, paint spraying is controlled according to the moving speed of the spraying prop, the prop position, the spraying direction, the spraying force, and the volume of the sprayed paint, which can ensure that the paint spraying conforms to the laws of nature and improve the realism of the paint spraying.
[0072] As an optional embodiment, the above method further includes:
[0073] S31, after the first spray paint collides with the target spray object, the collision position of the collision is used as an anchor point, and the first spray paint is controlled to splash around the collision position according to the motion properties of the fluid, wherein the second area where the first spray paint is sprayed after splashing includes multiple discrete areas with different area sizes.
[0074] The spray paint has a certain fluidity, and the spraying process of the spray paint can be controlled according to the motion properties of the fluid. After the first spray paint is controlled to be sprayed onto the target spray object, the diffusion process of the first spray paint can be displayed on the target client.
[0075] After the first spray paint collides with the target spray object, the collision position can be used as an anchor point, and the first spray paint can be controlled to splash around the collision position according to the movement properties of the fluid. For example, the splashing process of the first spray paint can be controlled in a parabolic manner, and different parts of the first spray paint can have different splashing directions, splashing speeds, etc., thereby forming an effect of splashing around with the collision position as the anchor point, and the target client can display the collision and splashing picture.
[0076] The area where the first spray paint is sprayed after splashing is the second area, and the second area includes a plurality of discrete areas with different area sizes (for example, Figure 3 As shown), at different positions in the second area, the height of the sprayed paint may be different, and the height of the sprayed paint at each position may be determined according to the movement properties of the fluid, etc., which is not limited in this embodiment.
[0077] Through this embodiment, the collision position is used as an anchor point, and the spray paint is controlled to splash around the collision position according to the motion properties of the fluid, so that the spraying process of the fluid can be simulated and the realism of the paint spraying can be improved.
[0078] As an optional embodiment, according to the spraying order and the paint height, simultaneously displaying the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on the target area includes:
[0079] S41, displaying the spray paint belonging to the second participant on a target sub-region of the target region, wherein the target sub-region is a region where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold;
[0080] S42, displaying the spray paint belonging to the first participant on other sub-areas except the target sub-area in the target area;
[0081] The target sub-region includes a plurality of discrete regions with different area sizes, and the other sub-regions include a plurality of discrete regions with different area sizes.
[0082] When displaying spray paint, for a target sub-area of the target area, the target sub-area is an area in the target area where the height value of the spray paint belonging to the second party is greater than or equal to the target height threshold. The spray paint belonging to the second party can be displayed on the target sub-area, and the target sub-area includes multiple discrete areas with different areas, and other sub-areas include multiple discrete areas with different areas.
[0083] For each position in the target game scene, it can be covered by only one participant's spray paint, or it can be covered by multiple participants' spray paint. The spray paint of the same participant can have a superposition effect (height superposition). When performing height superposition, the spray paint can be controlled to diffuse around according to the properties of the fluid, thereby updating the height of the spray paint at each position of the spray object.
[0084] Optionally, in this embodiment, the spray paints of different participants can have a canceling effect (the new spray paint can offset a certain height value of the spray paints of other participants), and can also have a coexistence effect (the same position can be sprayed by the spray paints of different participants at the same time).
[0085] In order to ensure the accuracy of the display, it can be set that only the height value of the sprayed material of one participant is allowed to be greater than or equal to the target height threshold at one position. Therefore, in the target area, if the height value of the sprayed paint belonging to the second participant at one position is greater than or equal to the target height threshold, there are two situations: the height value of the sprayed paint belonging to the first participant is greater than or equal to the target height threshold, or the height value of the sprayed paint belonging to the first participant is less than the target height threshold. For the first situation, the height value of the sprayed paint of the first participant can be controlled to be adjusted to be less than the target height threshold to facilitate the display of the sprayed paint.
[0086] For example, Figure 4 As shown, the display area where the color A height value is greater than or equal to the threshold overlaps with the display area where the color B height value is greater than or equal to the threshold. Color B is the color of the latest sprayed paint. In order to improve the playability of the game, the new color (color B) needs to cover the old color (color) during the battle. If the displayed judgment logic is to prioritize whether the height value of color A is greater than the threshold, then the overlapping area will display color A. In order to adjust the height value of color A in the overlapping area to be less than the threshold, the height value of color B can be reversed with the threshold as the axis to obtain B', and min(A, B') is used as the height value of color A, as shown below. Figure 4The display effect is shown on the right.
[0087] It should be noted that no matter whether the height value of the spray paint belonging to the first participant at a position in the target area is greater than or equal to the target height threshold, as long as the height value of the spray paint belonging to the second participant is greater than or equal to the target height threshold, the spray paint belonging to the second participant will be displayed at that position.
[0088] Since the spray paint belonging to the first participant is displayed on the target area before the first spray paint is sprayed on the target area, that is, the height of the spray paint belonging to the first participant at each position of the target area is greater than or equal to the target height threshold, therefore, for other sub-areas in the target area except the target sub-area, the spray paint belonging to the first participant can be displayed.
[0089] Through this embodiment, the spray paint is displayed according to whether the height value of the spray paint belonging to the first participant meets the threshold requirement, which can improve the rationality of the spray paint display and ensure the playability of the game while complying with the fluid properties.
[0090] As an optional embodiment, before displaying the spray paint belonging to the second participant on the target sub-area of the target area, the method further includes:
[0091] S51, determining a target sub-region from the target region, wherein a height value of the spray paint belonging to the second participant at each position of the target sub-region is greater than or equal to a height value of a corresponding position on the target noise map.
[0092] In order to reflect the flow properties of the pigment, the height map can be adjusted by superimposing (mixing) the noise map on the height map. The mixing method can be: the value at each position in the noise map is used as the height threshold at the corresponding position of the spray object.
[0093] For example, Figure 5 As shown, if the height value of the paint belonging to a participant at a location point is greater than the noise threshold, the spray paint is displayed, otherwise, the building body color is displayed.
[0094] Optionally, in this embodiment, the value at each position in the target noise map can be used as the target height threshold at the corresponding position of the target spray object. For the target area, each position point can be traversed to obtain each position where the height value of the spray paint belonging to the second participant is greater than or equal to the height value of the corresponding position on the target noise map, thereby obtaining the target sub-area.
[0095] Through this embodiment, the display of spray paint is performed in combination with a noise map, so that the realism of the spray paint display can be improved and the user's visual experience can be enhanced.
[0096] As an optional embodiment, after simultaneously displaying the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on the target area according to the spraying order and the paint height, the method further includes:
[0097] S61, displaying diffuse reflection shadows and reflective spots of the second sprayed paint on the second sprayed paint displayed on the target area.
[0098] The second spray paint displayed on the target area includes both the spray paint belonging to the first participant and the spray paint belonging to the second participant. In order to improve the realism of the spray paint display (experience the properties of the fluid), the diffuse reflection shadow and reflective spots of the second spray paint can be displayed on the second spray paint.
[0099] The diffuse shadow may be generated by: dynamically generating a first normal map corresponding to the spray paint on the target spray object according to the target height map; and using the first normal map to generate a diffuse shadow for the spray paint on the target spray object. The target height map is used to represent the height values of the spray paint at various positions of the target spray object after the first spray paint is sprayed. The diffuse shadow of the spray paint on the target spray object includes the diffuse shadow of the second spray paint.
[0100] The method of generating the reflective spots may be: using the target bright spot map to generate reflective bright spots for the spray paint on the target spray object. The reflective bright spots of the spray paint on the target spray object include the reflective bright spots of the second spray paint.
[0101] Through this embodiment, by displaying the diffuse shadows and reflective spots of the spray paint, the realism of the spray paint display can be improved and the user's visual experience can be enhanced.
[0102] The following is an explanation of the display method of the game scene in the embodiment of the present application in conjunction with an optional example. In this example, the spray paint is paint, the target spray object is the ground, the participants in this game are the first participant and the second participant, and the virtual character controlled by the target player (target object) through the target client running on his terminal device is the target virtual character, and the target virtual character belongs to the second participant.
[0103] like Figure 6 As shown, the process of the method for displaying the game scene in this optional example may include the following steps:
[0104] Step S602: obtaining the control operation performed by the target object on the target client.
[0105] A target game scene may be displayed on the screen of the terminal device of the target player, in which a ground is displayed, and paint sprayed by an enemy player may be present in an area (ie, a first area) of the ground.
[0106] The target player can operate his terminal device to control the target virtual character to perform game operations in the target game scene. The target client or the target terminal device running the target client can obtain the control operation performed by the target user on the target client through a touch screen or other input device, and the above control operation is used to control the target virtual character to spray paint on the ground.
[0107] Step S604, responding to the control operation, controlling the target virtual character to spray paint onto the ground.
[0108] The target client or the target terminal device running the target client can control the target virtual character to spray paint on the ground. The paint can be sprayed on the ground by spraying ammunition or directly spraying. The spraying game can cover a certain area of the ground, that is, the second area.
[0109] Step S606, displaying the paint of each participant after the above spraying operation on the ground according to the spraying order and paint height.
[0110] The second area and the first area may overlap, and the overlapping area is a target area. The target area may be smaller than or equal to the first area, and smaller than or equal to the second area.
[0111] In the overlapping area, the spraying order and paint height can be used to determine which participant's paint is displayed at each position in the overlapping area. For example, when both meet the height condition (the paint height is greater than the target height threshold), the second participant's paint is displayed first. For another example, if the height of one participant's paint meets the height condition and the height of the other participant's paint does not meet the height condition, the paint of the participant that meets the height condition is displayed. The target height threshold corresponding to a certain position on the target area is: the value at the corresponding position on the target noise map.
[0112] Through this example, the display of paint is controlled according to the spraying order and paint height, which can improve the realism of the paint spraying display and enhance the user's visual experience.
[0113] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0115] According to another aspect of an embodiment of the present application, a device for displaying a game scene is provided for implementing the above-mentioned method for displaying a game scene. Figure 7 is a structural block diagram of a display device for an optional game scene according to an embodiment of the present application, such as Figure 7 As shown, the device may include:
[0116] (1) a first display unit 702, configured to display a target spray object in a target game scene on a target client, wherein a spray paint belonging to a first participant of the target game is displayed on a first area of the target spray object;
[0117] (2) an acquisition unit 704, connected to the first display unit 702, for acquiring a target spraying operation performed on the target spraying object, wherein the target spraying operation is for spraying a spray paint belonging to the second participant to a second area of the target spraying object;
[0118] (3) A second display unit 706, connected to the acquisition unit 704, is used to respond to the target spraying operation and display the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on the target area at the same time according to the spraying order and the paint height, wherein the target area is the overlapping area of the first area and the second area.
[0119] It should be noted that the first display unit 702 in this embodiment can be used to execute the above step S202, the acquisition unit 704 in this embodiment can be used to execute the above step S204, and the second display unit 706 in this embodiment can be used to execute the above step S206.
[0120] Through the above-mentioned module, a target spray object in a target game scene is displayed on a target client, wherein a first area of the target spray object is displayed with spray paint belonging to a first participant in the target game; a target spray operation performed on the target spray object is obtained, wherein the target spray operation is used to spray spray paint belonging to a second participant to a second area of the target spray object; in response to the target spray operation, the spray paint belonging to the first participant and the spray paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and the paint height, wherein the target area is an overlapping area of the first area and the second area, thereby solving the problem of low realism of paint spraying in the display method of game scenes in related technologies and improving the realism of paint spraying.
[0121] As an optional embodiment, the above device also includes:
[0122] The first control unit is used to control the target spraying prop to spray the first spray paint onto the target spraying object after acquiring the target spraying operation performed on the target spraying object, wherein the target spraying prop is a spraying prop used by a target virtual character belonging to the second participant, and the first spray paint is the spray paint accumulated in the target spraying prop.
[0123] As an optional embodiment, the first control unit includes:
[0124] The control module is used to control the first spraying paint to be sprayed onto the target spraying object according to the moving speed of the target spraying prop, the prop position, the spraying direction, the spraying force, and the volume of the first spraying paint.
[0125] As an optional embodiment, the above device also includes:
[0126] The second control unit is used to control the first spray paint to splash around the collision position according to the movement properties of the fluid after the first spray paint collides with the target spray object, with the collision position as an anchor point, wherein the second area where the first spray paint is sprayed after splashing includes multiple discrete areas with different areas.
[0127] As an optional embodiment, the second display unit 706 includes:
[0128] A first display module is used to display the spray paint belonging to the second participant on a target sub-area of the target area, wherein the target sub-area is an area where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold;
[0129] A second display module, used for displaying the spray paint belonging to the first participant on other sub-areas in the target area except the target sub-area;
[0130] The target sub-region includes a plurality of discrete regions with different area sizes, and the other sub-regions include a plurality of discrete regions with different area sizes.
[0131] As an optional embodiment, the above device also includes:
[0132] A determination unit is used to determine a target sub-area from the target area before displaying the spray paint belonging to the second participant on the target sub-area of the target area, wherein the height value of the spray paint belonging to the second participant at each position of the target sub-area is greater than or equal to the height value of the corresponding position on the target noise map.
[0133] As an optional embodiment, the above device also includes:
[0134] The third display unit is used to display the diffuse shadows and reflective spots of the second sprayed paint on the second sprayed paint displayed on the target area, after simultaneously displaying the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on the target area according to the spraying order and the paint height.
[0135] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0136] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned method for displaying a game scene is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0137] Figure 8 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 8 As shown, it includes a processor 802, a communication interface 804, a memory 806 and a communication bus 808, wherein the processor 802, the communication interface 804 and the memory 806 communicate with each other through the communication bus 808, wherein,
[0138] Memory 806, used for storing computer programs;
[0139] The processor 802 is used to implement the following steps when executing the computer program stored in the memory 806:
[0140] S1, displaying a target spraying object in a target game scene on a target client, wherein a spraying paint belonging to a first participant of the target game is displayed on a first area of the target spraying object;
[0141] S2, obtaining a target spraying operation performed on the target spraying object, wherein the target spraying operation is used to spray a spray paint belonging to the second participant to a second area of the target spraying object;
[0142] S3, in response to the target spraying operation, the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and the paint height, wherein the target area is the overlapping area of the first area and the second area.
[0143] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0144] The communication interface is used for communication between the above electronic device and other devices.
[0145] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0146] As an example, the memory 802 may include, but is not limited to, the first display unit 702, the acquisition unit 704, and the second display unit 706 in the display device of the game scene. In addition, other modules in the display device of the game scene may also be included but are not limited to, which will not be repeated in this example.
[0147] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0148] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0149] It can be understood by those skilled in the art that Figure 8 The structure shown is for illustration only. The device for implementing the above-mentioned game scene display method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 8 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 8 Different configurations shown.
[0150] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0151] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of any of the above-mentioned game scene display methods in the embodiment of the present application.
[0152] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0153] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0154] S1, displaying a target spraying object in a target game scene on a target client, wherein a spraying paint belonging to a first participant of the target game is displayed on a first area of the target spraying object;
[0155] S2, obtaining a target spraying operation performed on the target spraying object, wherein the target spraying operation is used to spray a spray paint belonging to the second participant to a second area of the target spraying object;
[0156] S3, in response to the target spraying operation, the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant are simultaneously displayed on the target area according to the spraying order and the paint height, wherein the target area is the overlapping area of the first area and the second area.
[0157] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0158] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0159] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0160] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
[0161] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0162] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only 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 interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0163] 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 provided in this embodiment.
[0164] 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0165] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for displaying a game scene, characterized in that: include: Displaying a target spraying object in a target game scene on a target client, wherein a spraying paint belonging to a first participant of the target game is displayed on a first area of the target spraying object; Acquire a target spraying operation performed on the target spraying object, wherein the target spraying operation is used to spray a spray paint belonging to a second participant to a second area of the target spraying object; In response to the target spraying operation, the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant are simultaneously displayed on a target area according to the spraying order and the paint height, wherein the target area is an overlapping area of the first area and the second area; The method of simultaneously displaying the spray paint belonging to the first participant and the spray paint belonging to the second participant on the target area according to the spraying order and the paint height comprises: displaying the spray paint belonging to the second participant on a target sub-area of the target area, wherein the target sub-area is an area where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold; displaying the spray paint belonging to the first participant on other sub-areas of the target area except the target sub-area, wherein the target sub-area includes a plurality of discrete areas with different area areas, and the other sub-areas include a plurality of discrete areas with different area areas; Before displaying the spray paint belonging to the second participant on the target sub-area of the target area, the method also includes: determining the target sub-area from the target area, wherein the height value of the spray paint belonging to the second participant at each position of the target sub-area is greater than or equal to the height value of the corresponding position on the target noise map.
2. The method according to claim 1, characterized in that After acquiring the target spraying operation performed on the target spraying object, the method further includes: Control the target spray prop to spray a first spray paint onto the target spray object, wherein the target spray prop is a spray prop used by a target virtual character belonging to the second participant, and the first spray paint is the spray paint accumulated in the target spray prop.
3. The method according to claim 2, characterized in that The controlling the target spraying tool to spray the first spraying paint onto the target spraying object comprises: According to the moving speed of the target spraying prop, the prop position, the spraying direction, the spraying force, and the volume of the first spraying paint, the first spraying paint is controlled to be sprayed onto the target spraying object.
4. The method according to claim 3, characterized in that The method further comprises: After the first spray paint collides with the target spray object, the collision position of the collision is used as an anchor point, and the first spray paint is controlled to splash around the collision position according to the motion properties of the fluid, wherein the second area where the first spray paint is sprayed after splashing includes multiple discrete areas with different areas.
5. The method according to any one of claims 1 to 4, characterized in that After simultaneously displaying the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on the target area according to the spraying order and the paint height, the method further includes: On the second spray paint displayed on the target area, diffuse reflection shadows and reflective spots of the second spray paint are displayed.
6. A display device for a game scene, characterized in that: include: A first display unit is used to display a target spraying object in a target game scene on a target client, wherein a spraying paint belonging to a first participant of the target game is displayed on a first area of the target spraying object; an acquisition unit, configured to acquire a target spraying operation performed on the target spraying object, wherein the target spraying operation is used to spray a spray paint belonging to a second participant to a second area of the target spraying object; a second display unit, for responding to the target spraying operation, and displaying the sprayed paint belonging to the first participant and the sprayed paint belonging to the second participant on a target area simultaneously according to the spraying order and the paint height, wherein the target area is an overlapping area of the first area and the second area; The second display unit comprises: A first display module is used to display the spray paint belonging to the second participant on a target sub-area of the target area, wherein the target sub-area is an area where the height value of the spray paint belonging to the second participant is greater than or equal to a target height threshold; A second display module is used to display the spray paint belonging to the first participant in other sub-areas of the target area except the target sub-area, wherein the target sub-area includes a plurality of discrete areas with different area sizes, and the other sub-areas include a plurality of discrete areas with different area sizes; A determination unit is used to determine the target sub-area from the target area before displaying the spray paint belonging to the second participant on the target sub-area of the target area, wherein the height value of the spray paint belonging to the second participant at each position of the target sub-area is greater than or equal to the height value of the corresponding position on the target noise map.
7. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein: The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 5 by running the computer program stored in the memory.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 5 when executed.
