Method, apparatus, device, and computer program for controlling virtual projectiles

The effect grid system in virtual projectile control simulates realistic fluid diffusion by determining valid grids and adjusting diffusion paths based on obstacles, addressing the lack of realism in existing shooting game technologies.

JP7871494B2Active Publication Date: 2026-06-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2023-09-20
Publication Date
2026-06-08

AI Technical Summary

Technical Problem

Existing shooting game technologies lack realistic simulation of virtual projectile effects, particularly the diffusion of virtual fluid materials, which remain unchanged within a certain radius and fail to mimic real-world interactions with obstacles.

Method used

Implementing an effect grid system to determine the diffusion direction of virtual fluid materials by setting up a first range centered on the explosion point, traversing and identifying valid effect grids within this range, and diffusing the fluid material based on these grids when encountering virtual obstacles, ensuring the grids do not overlap and are within specified ranges.

Benefits of technology

Simulates a more realistic diffusion effect of virtual fluid materials by altering their direction when encountering obstacles, enhancing user experience and interaction realism in virtual environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007871494000002
    Figure 0007871494000002
  • Figure 0007871494000003
    Figure 0007871494000003
  • Figure 0007871494000004
    Figure 0007871494000004
Patent Text Reader

Abstract

The present application discloses a method, apparatus, device, medium, and program product for controlling a virtual projectile, which belongs to the field of human-computer interaction. The method is executed by a computer device and includes the steps of: in response to a thrown virtual projectile causing an explosion and releasing a virtual fluid material in a virtual environment screen, setting an effect grid within a first range centered on the explosion point of the virtual projectile (502); traversing the effect grid within the first range and determining an effect grid within the first range that satisfies a legal diffusion condition as a legal effect grid (504); and, in a situation where the virtual fluid material encounters a virtual obstacle during the diffusion process, diffusing the virtual fluid material based on the legal effect grid on the surface of the virtual obstacle (506).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application claims the priority of a Chinese patent application filed on December 07, 2022, with the application number 202211567170.9 and the invention title "Method, Apparatus, Device, Medium, and Program Product for Controlling Virtual Projectiles", and all of its content is incorporated herein by reference.

[0002] Embodiments of this application relate to the field of human-computer interaction, and particularly to a method, apparatus, device, medium, and program product for controlling virtual projectiles.

Background Art

[0003] Currently, the types and ways of playing in shooting games are becoming increasingly rich.

[0004] In related technologies, after starting a game in a shooting game, a user can control a virtual object to use a virtual projectile in a virtual environment, and further rely on the special effects generated by the virtual projectile to perform the next action. For example, the user can control a virtual object to throw a "virtual smoke bomb" in a virtual environment, and after the "virtual smoke bomb" generates smoke, rely on the smoke to attack or escape.

[0005] However, in the above related technologies, the special effects are centered around the virtual projectile, display the effect within a certain radius, and the special effects remain unchanged, and the simulated smoke scene in this way is not realistic.

Summary of the Invention

Problems to be Solved by the Invention

[0006] This application provides a method, apparatus, device, medium, and program product for controlling virtual projectiles. The above technical solutions are as follows.

Means for Solving the Problems

[0007] According to one aspect of the present invention, a method for controlling a virtual projectile is provided, the method being performed by a computer device, and the method is Steps include: setting up an effect grid within a first range centered on the explosion point of a thrown virtual projectile in response to the projectile exploding and releasing virtual fluid material in a virtual environment screen, wherein the effect grid is used to determine the diffusion direction of the virtual fluid material, the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid material; The steps include traversing the effect grid within the first range and determining the effect grid that conforms to the correct diffusion conditions within the first range as the correct effect grid, The steps include: diffusing the virtual fluid material based on the valid effect grid on the surface of the virtual obstacle, under the circumstances that the virtual fluid material encounters the virtual obstacle during the diffusion process; Here, the valid diffusion condition includes at least one of the following: the effect grid is within the second range; the effect grid does not overlap with the virtual obstacle; and the effect grid is not traversed.

[0008] In some embodiments, an effect grid is set within a first range centered on the explosion point of the virtual projectile. The effect grid within the first range is traversed, and the effect grid that conforms to the correct diffusion conditions within the first range is determined to be the correct effect grid. Based on the diffusion range of the virtual fluid material at time i, the number of valid effect grids corresponding to the diffusion range at time i, and the first position occupied by the dynamic virtual obstacle are determined. In response to the dynamic virtual obstacle moving to the second position at time i+1, the quantity of the valid effect grid occupied by the dynamic virtual obstacle is determined. Based on the number of legitimate effect grids corresponding to the diffusion range of the virtual fluid material at time (i+1), and the number of legitimate effect grids occupied by the dynamic virtual obstacle at the second position, the legitimate effect grids are replenished at the first position in the same proportion, and the virtual fluid material is diffused based on the newly replenished legitimate effect grids. Here, the quantity of the corresponding valid effect grid within the diffusion range of the virtual fluid substance changes over time in a normal distribution, where i is a positive integer.

[0009] According to one aspect of the present application, a control device for a virtual projectile is provided, and the device is A grid setting module used to set an effect grid within a first range centered on the explosion point of a thrown virtual projectile in response to the virtual projectile exploding and releasing virtual fluid material on a virtual environment screen, wherein the effect grid is used to determine the diffusion direction of the virtual fluid material, the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid material, and A traverse module used to traverse the effect grid within the first range and determine an effect grid that conforms to the correct diffusion conditions within the first range as a correct effect grid, A diffusion module is used to diffuse the virtual fluid material based on the valid effect grid on the surface of the virtual obstacle, in a situation where the virtual fluid material encounters the virtual obstacle during the diffusion process. Here, the valid diffusion condition includes at least one of the following: the effect grid is within the second range; the effect grid does not overlap with the virtual obstacle; and the effect grid is not traversed.

[0010] According to another aspect of the present application, a computer device is provided, the computer device comprising a processor and memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to realize the method for controlling a virtual projectile described in the above aspect.

[0011] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor to realize the virtual projectile control method described in the above aspect.

[0012] According to another aspect of the present application, a computer program product is provided, the computer program product includes a computer program, the computer program is stored in a computer-readable storage medium, the computer program is read from the computer-readable storage medium and executed by a processor of a computer device, causing the computer device to execute the virtual projectile control method described in the above aspect. [Effects of the Invention]

[0013] The beneficial effects of the technical solution provided by this application include at least the following: The computer equipment responds to a thrown virtual projectile causing an explosion and releasing virtual fluid matter in a virtual environment screen by setting an effect grid within a first range centered on the explosion point of the virtual projectile, traversing the effect grid within the first range, determining the effect grid that fits the legitimate diffusion conditions within the first range as the legitimate effect grid, and, in situations where the virtual fluid matter encounters a virtual obstacle during the diffusion process, diffusing the virtual fluid matter based on the legitimate effect grid on the surface of the virtual obstacle. This invention simulates a scene in which real virtual fluid matter changes direction when it encounters an obstacle by detecting the legitimate effect grid around the virtual obstacle and diffusing based on the legitimate effect grid around the virtual obstacle, thereby simulating a more realistic diffusion effect of virtual fluid matter by the above method. [Brief explanation of the drawing]

[0014] [Figure 1] This is a schematic diagram of a method for controlling a virtual projectile provided in one exemplary embodiment of the present invention. [Figure 2] This is a schematic diagram of an application mode of a method for controlling virtual projectiles in a virtual scene, provided by one exemplary embodiment of the present invention. [Figure 3] This is a schematic diagram of an application mode of a method for controlling virtual projectiles in a virtual scene, provided by one exemplary embodiment of the present invention. [Figure 4] This is a structural block diagram of a computer system provided by one exemplary embodiment of the present application. [Figure 5] This is a flowchart of a method for controlling a virtual projectile provided in one exemplary embodiment of the present invention. [Figure 6] This is a flowchart of a method for controlling a virtual projectile provided in one exemplary embodiment of the present invention. [Figure 7] This is a schematic diagram of the throwing trajectory of a virtual projectile provided in one exemplary embodiment of the present invention. [Figure 8] This is a schematic diagram illustrating the setting of an effect grid centered on the point of explosion, as provided by one exemplary embodiment of the present invention. [Figure 9] A schematic diagram traversing an effect grid provided by one exemplary embodiment of the present application. [Figure 10] A schematic diagram traversing an effect grid provided by one exemplary embodiment of the present application. [Figure 11] A schematic diagram step - by - step traversing an effect grid provided by one exemplary embodiment of the present application. [Figure 12] A schematic diagram in which a virtual fluid substance provided by one exemplary embodiment of the present application changes direction during the diffusion process. [Figure 13] A schematic diagram for determining a starting - point effect grid provided by one exemplary embodiment of the present application. [Figure 14] A schematic diagram for rendering a virtual fluid substance provided by one exemplary embodiment of the present application. [Figure 15] A schematic diagram for rendering a virtual fluid substance provided by one exemplary embodiment of the present application. [Figure 16] A schematic diagram for rendering a virtual fluid substance provided by one exemplary embodiment of the present application. [Figure 17] A schematic diagram of the rendering result of a three - dimensional valid effect grid provided by one exemplary embodiment of the present application. [Figure 18] A flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 19] A flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 20] A structural schematic diagram of a control device for a virtual projectile provided by one exemplary embodiment of the present application. [Figure 21] A structural block diagram of a computer device provided by one exemplary embodiment of the present application.

Embodiments for Carrying out the Invention

[0015] To further clarify the purpose, technical solution, and advantages of this application, embodiments of this application will be described in more detail below, with the help of the drawings.

[0016] First, we will briefly introduce the relevant nouns and terms used in the embodiments of this application.

[0017] Virtual Environment: A virtual environment displayed (or provided) when an application program runs on a terminal. The virtual environment may be a simulated world relative to the real world, a semi-simulated, semi-fictional 3D world, or a purely fictional 3D world. The virtual environment may be any one of a 2D virtual environment, a 2.5D virtual environment, or a 3D virtual environment. Optionally, the virtual environment may also be used for virtual environment battles between at least two virtual objects, and may have virtual resources available to at least two virtual objects. Optionally, the virtual environment may include symmetrical lower-left and upper-right corner regions, with virtual objects belonging to two opposing factions each occupying one of these regions.

[0018] Virtual object: Refers to a movable object in a virtual environment. The movable object may be at least one of a virtual person, a virtual animal, and an animated person. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual object may be a three-dimensional virtual model, each virtual object having its own shape and volume in the three-dimensional virtual environment and occupying a portion of the space in the three-dimensional virtual environment. Optionally, the virtual object may be a three-dimensional character constructed based on three-dimensional human skeleton technology, and the virtual object may achieve different external images by wearing different skins. In some implementations, the virtual object may be implemented using a 2.5-dimensional or two-dimensional model, and the embodiments of this application are not limited thereto.

[0019] Multiplayer Online Battle Arena: In a virtual environment, different virtual teams belonging to at least two opposing factions compete by occupying their respective map areas and aiming to achieve certain victory conditions. These victory conditions include, but are not limited to, at least one of the following: capturing a base or destroying an opposing faction's base, destroying an opposing faction's virtual object, ensuring one's own survival within a specified scene or time, capturing a resource, and exceeding the opponent's score within a specified time. Battle Arena can be conducted in rounds, and the Battle Arena map for each round may be the same or different. Each virtual team includes one or more virtual objects, for example, one, two, three, or five.

[0020] ~in response to: Used to describe a condition or state on which an operation to be performed depends, and when the dependent condition or state is met, one or more operations to be performed may be in real time or have a set delay, and under circumstances not otherwise specified, there is no restriction on the order in which the operations to be performed may occur.

[0021] Virtual projectiles: Virtual objects in a virtual environment are virtual items that can be used and thrown.

[0022] It is important to explain that the present application may display a prompt interface or pop-up window, or output audio prompt information, both before and during the collection of user-related data. This prompt interface, pop-up window, or audio prompt information is used to prompt the user that relevant data is currently being collected. Thus, the application will only begin executing the relevant steps for acquiring user-related data after receiving confirmation from the user via the prompt interface or pop-up window. Otherwise (i.e., when confirmation from the user has not been received), the relevant steps for acquiring user-related data will be terminated, meaning no user-related data will be acquired. In other words, all user data collected by the present application is collected with the user's consent and permission, and the collection, use, and processing of relevant user data must comply with the relevant laws, regulations, and standards of the relevant country and region. An embodiment of the present application provides a method for controlling a virtual projectile. Figure 1 shows a schematic diagram of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. This method can be performed using computer equipment, which may be a terminal or a server.

[0023] As shown in Figure 1(a), the user interface displays a virtual environment screen 10, and the computer equipment responds to the thrown virtual projectile 20 causing an explosion on the virtual environment screen 10 by displaying diffusible virtual fluid material 40 released from the virtual projectile 20. The computer equipment responds to the virtual fluid material 40 encountering a virtual obstacle 30 during the diffusion process by changing the diffusion direction of the virtual fluid material 40 based on the virtual obstacle 30.

[0024] The virtual projectile 20 may optionally include, but is not limited to, at least one of a virtual smoke grenade, a virtual incinerator, and a virtual gas bottle, and the embodiments of the present application are not limited thereto.

[0025] For example, the throwing methods of the virtual projectile 20 include upward throwing, downward throwing, and rebounding after hitting an obstacle. (Bounce) The present invention includes, but does not limit, at least one of the following methods: an upward throw, a downward throw, and an impact rebound.

[0026] Selectively, throwing the virtual projectile 20 in an upward throwing manner means throwing the virtual projectile 20 upwards, i.e., the initial throwing direction of the virtual projectile 20 is upwards; throwing the virtual projectile 20 in a downward throwing manner means throwing the virtual projectile 20 downwards, i.e., the initial throwing direction of the virtual projectile 20 is downwards; throwing the virtual projectile 20 in a rebound manner after hitting an obstacle means throwing the virtual projectile 20 toward the obstacle, i.e., the initial throwing direction of the virtual projectile 20 is toward the obstacle, and after hitting the obstacle, the virtual projectile 20 rebounds and changes direction.

[0027] The virtual fluid substance 40 refers to a virtual substance with fluid properties released from the virtual projectile 20. Taking a virtual smoke grenade as an example, the virtual fluid substance 40 refers to the smoke released from the virtual smoke grenade.

[0028] For example, in a situation where a virtual fluid substance 40 encounters a virtual obstacle 30 during the diffusion process, the virtual fluid substance 40 diffuses along the surface of the virtual obstacle 30.

[0029] For example, a computer device controls the attribute values ​​of a virtual object in response to the virtual object entering the diffusion range of a virtual fluid substance 40.

[0030] Selectable attribute values ​​include life values ​​and / or skill values.

[0031] The computer equipment responds to a virtual object entering the diffusion range of the virtual fluid substance 40 by reducing the virtual object's life value and / or skill value.

[0032] For example, if we consider the virtual fluid substance 40 to be a virtual methane gas bomb, then after the virtual methane gas bomb explodes, it releases methane gas, and if a virtual object enters the methane gas diffusion range, both the virtual object's life value and skill value will decrease. If the virtual object's life value is below the life threshold, the virtual object enters an unhealthy state, and if the virtual object's skill value is below the skill threshold, the virtual object's use of that skill will be restricted.

[0033] In some embodiments, a computer device sets up an effect grid within a first range centered on the explosion point of the virtual projectile 20, and the effect grid is used to determine the diffusion direction of the virtual fluid substance 40. The first range is larger than the second range, and the second range is used to indicate the diffusion range of the virtual fluid substance 40.

[0034] The computer equipment traverses the effect grid within the first range, determines the effect grid that fits the legitimate diffusion conditions within the first range as the legitimate effect grid, and determines the diffusion direction of the virtual fluid substance 40 based on the legitimate effect grid.

[0035] A valid diffusion condition includes at least one of the following: the effect grid is within the second range, the effect grid does not overlap with the virtual obstacle 30, and the effect grid is not traversed. Selectively, a valid diffusion condition means that the effect grid is within the second range, the effect grid does not overlap with the virtual obstacle 30, and the effect grid is not traversed simultaneously.

[0036] For example, the computer equipment designates the effect grid where the explosion point is located as the starting effect grid, traverses the effect grids adjacent to the starting effect grid, determines the effect grid adjacent to the starting effect grid and that meets the correct diffusion conditions as the correct effect grid, and determines it as the next starting effect grid, repeating the previous step until all effect grids within the first range have been traversed.

[0037] Selectable: Under the condition that the effect grid where the explosion point is located is a valid effect grid, the effect grid where the explosion point is located will be used as the starting effect grid.

[0038] In the case where the effect grid where the explosion point is located is not a valid effect grid, an effect grid that meets the straight line detection conditions within the first range is determined as the starting effect grid.

[0039] Here, the linear detection condition includes the fact that the effect grid to be detected and the effect grid where the explosion point is located can be connected in a straight line, and that the effect grid to be detected does not overlap with a virtual obstacle.

[0040] As described above, in the method provided by the embodiment of the present invention, the computer equipment displays a virtual environment screen, and in response to a thrown virtual projectile causing an explosion on the virtual environment screen, displays a diffusible virtual fluid material released from the virtual projectile. In response to the virtual fluid material encountering a virtual obstacle during its diffusion process, it changes the diffusion direction of the virtual fluid material based on the virtual obstacle. The present invention simulates a scene in which a real virtual fluid material changes direction when it encounters an obstacle by using a method in which a virtual obstacle changes the diffusion direction of the virtual fluid material, thereby simulating a more realistic diffusion effect of the virtual fluid material using the above method and improving the user experience.

[0041] Embodiments of the present application provide a method, apparatus, device, medium, and program product for controlling virtual projectiles, enabling flexible and concise control of virtual projectiles in virtual scenes, thereby improving the efficiency of human-computer interaction and the user experience. To facilitate understanding of the method for controlling virtual projectiles in virtual scenes provided by the embodiments of the present application, an exemplary implementation scene of the method for controlling virtual projectiles in virtual scenes provided by the embodiments of the present application will first be described, and the virtual scene in the method for controlling virtual projectiles in virtual scenes provided by the embodiments of the present application may be output entirely based on terminal equipment, or it may be output in cooperation with terminal equipment and a server.

[0042] In some embodiments, the virtual scene may be an environment in which virtual objects (e.g., target virtual objects) interact, or it may be a battle between game characters in the virtual scene. Both interactions can be performed in the virtual scene by controlling the actions of the game characters, thereby allowing the user to reduce the stress of real life during the game.

[0043] In one implementation scenario, Figure 2 shows a schematic diagram of an application mode of the method for controlling virtual projectiles in a virtual scene provided by one exemplary embodiment of the present invention, which can be applied to several application modes in which the calculation of the relevant data of the virtual scene 100 can be completed entirely by the computing power of the graphics processing hardware of the terminal device 400, for example, a standalone / offline game, which completes the output of the virtual scene by various different types of terminal devices 400 such as smartphones, tablet PCs, and virtual reality / augmented reality devices.

[0044] For example, types of graphics processing hardware include a Central Processing Unit (CPU) and a Graphics Processing Unit (GPU).

[0045] When forming a visual perception of the virtual scene 100, the terminal device 400 calculates the data necessary for display using graphics computing hardware, and completes the loading, analysis, and rendering of the display data. The graphics output hardware outputs video frames that can form a visual perception of the virtual scene, for example, by presenting a two-dimensional video frame on the display screen of a smartphone, or by projecting a video frame that realizes a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses. Furthermore, to enrich the perception effect, the terminal device 400 can further form one or more types of auditory perception, tactile perception, motion perception, and gustatory perception through different hardware.

[0046] For example, a client terminal 410 (for example, a standalone game application) is running on terminal device 400, and during the operation of client terminal 410, a virtual scene containing role-playing is output, and the virtual scene may be an environment in which game characters interact, for example, a plain, a street, and mountains or valleys used for game characters to fight, and as an example, displaying the virtual scene 100 from a third-person perspective, a master virtual object 101 is displayed in the virtual scene 100, and here the master virtual object 101 is a game character controlled by the user. In other words, the master virtual object 101 is controlled by a real user and moves in the virtual scene 100 in response to the real user's operation on a controller (e.g., a touch-controlled screen, voice-controlled switch, keyboard, mouse, and joystick). For example, when a real user moves a joystick (including both a virtual and a real joystick) to the right, the master virtual object 101 moves to the right in the virtual scene 100. Furthermore, it can be controlled to remain stationary, jump, or perform shooting actions.

[0047] For example, in a virtual scene 100, a master virtual object 101 is displayed. In response to a thrown virtual projectile 20 causing an explosion in the virtual environment screen 100, a diffusible virtual fluid substance 40 released from the virtual projectile 20 is displayed. In response to the virtual fluid substance 40 encountering a virtual obstacle 30 during its diffusion process, the diffusion direction of the virtual fluid substance 40 is changed based on the virtual obstacle 30. This method, in which the virtual obstacle 30 changes the diffusion direction of the virtual fluid substance 40, simulates a scene where the virtual fluid substance 40 changes direction when it encounters a virtual obstacle 30. This thereby simulates the diffusion effect of the virtual fluid substance 40 more realistically and improves the user experience.

[0048] In another implementation scenario, Figure 3 shows a schematic diagram of an application mode of a method for controlling virtual projectiles in a virtual scene provided by one exemplary embodiment of the present invention, which is applied to a terminal device 400 and a server 200, and is applied to an application mode in which the calculation of the virtual scene is completed depending on the computing power of the server 200 and the virtual scene is output to the terminal device 400.

[0049] Taking the formation of visual perception of a virtual scene 100 as an example, the server 200 calculates the relevant display data (e.g., scene data) of the virtual scene and transmits it to the terminal device 400 via the network 300. The terminal device 400 completes the calculation, loading, analysis, and rendering of the display data depending on the graphics computing hardware, and forms visual perception by outputting the virtual scene depending on the graphics output hardware. For example, it can present a two-dimensional video frame on the display screen of a smartphone, or project a video frame that realizes a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses. For perception of the form of the virtual scene, it can be output via the corresponding hardware of the terminal device 400 in a way that is understandable, for example, by forming auditory perception using a microphone, or tactile perception using an oscillator, etc.

[0050] For example, suppose a client terminal 410 (for example, a network version of a game application) is running on terminal device 400 and interacts with other users by connecting to server 200 (for example, a game server). Terminal device 400 outputs a virtual scene 100 of client terminal 410 and displays the virtual scene 100 from a third-person perspective. In the virtual scene 100, a master virtual object 101 is displayed. Here, the master virtual object 101 may be a game character controlled by the user. That is, the master virtual object 101 is controlled by a real user and moves in the virtual scene 100 in response to the real user's operation on a controller (for example, a touch control screen, voice control switch, keyboard, mouse, and joystick). For example, when a real user moves the joystick to the right, the master virtual object 101 moves to the right in the virtual scene 100. Furthermore, it can be controlled to remain stationary, jump, or perform shooting operations.

[0051] For example, in a virtual scene 100, a master virtual object 101 is displayed. In response to a thrown virtual projectile 20 causing an explosion in the virtual environment screen 100, a diffusible virtual fluid substance 40 released from the virtual projectile 20 is displayed. In response to the virtual fluid substance 40 encountering a virtual obstacle 30 during its diffusion process, the diffusion direction of the virtual fluid substance 40 is changed based on the virtual obstacle 30. This method, in which the virtual obstacle 30 changes the diffusion direction of the virtual fluid substance 40, simulates a scene where the virtual fluid substance 40 changes direction when it encounters an obstacle, thereby simulating the diffusion effect of the virtual fluid substance more realistically and improving the user experience.

[0052] In some embodiments, the terminal device 400 can implement the method for controlling partner objects in the virtual scene provided by the embodiments of the present invention by running a computer program. For example, the computer program may be a native program or software module in the operating system, or a local (native) application program, that is, a program that cannot run unless it is installed in the operating system. For example, it may be a shooting game app (i.e., the client terminal 410), or an applet, that is, a program that can run after being downloaded in a browser environment, or a game applet that can be embedded in any app. In summary, the computer program may be an application program, module, or plug-in component of any form.

[0053] Taking the computer program as an application program as an example, when actually implemented, the terminal device 400 has an application program installed and running that supports the virtual scene. The application program may be any one of the following: First-Person Shooting game (FPS), Third-Person Shooting Game (TPS), Battle Royale Shooting game, Virtual Reality (VR) application program, Augmented Reality (AR) program, 3D map program, Multiplayer Online Battle Arena Games (MOBA), and Simulation Game (SLG). The user uses the terminal device 400 to manipulate virtual objects in the virtual scene to make them active, and such activity includes, but is not limited to, at least one of the following: adjusting body posture, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, throwing, and constructing virtual buildings. Schematically, the virtual object may be a virtual person, such as a simulated character or an animated character.

[0054] In some other embodiments, embodiments of the present invention may further be implemented via cloud technology, which refers to a type of hosting technology that aggregates a set of resources such as hardware, software, and networks within a wide area network or a local area network to perform data computation, storage, processing, and sharing.

[0055] Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology based on the business mode application of cloud computing. It forms a resource pool that can be used according to needs, offering flexibility and convenience. Cloud computing technology provides crucial support. Background services in technical network systems require significant computing and memory resources.

[0056] For example, the server 200 in Figure 3 may be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. Furthermore, it may be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, or big data and artificial intelligence platforms. The terminal device 400 may be, but is not limited to, a smartphone, tablet PC, notebook computer, desktop computer, smart speaker, and smartwatch. The terminal device 400 and the server 200 can be connected directly or indirectly by wired or wireless communication methods, but are not limited to the embodiments of this application.

[0057] Figure 4 shows a structural block diagram of a computer system 100 provided by one exemplary embodiment of the present application. The computer system 100 includes a first terminal 110, a server 120, and a second terminal 130.

[0058] The first terminal 110 has a client terminal 111 installed and running that supports a virtual environment, and the client terminal 111 may be a multiplayer online battle program. When the first terminal 110 runs the client terminal 111, the user interface of the client terminal 111 is displayed on the screen of the first terminal 110. The client terminal 111 may be any one of the following: a battle royale shooting game, a virtual reality application program, an augmented reality program, a 3D map program, a virtual reality game, an augmented reality game, a first-person shooting game, a third-person shooting game, a multiplayer online battle arena game, and a simulation game. In this embodiment, the client terminal 111 will be described as a shooting game as an example.

[0059] The first terminal 110 is a terminal used by the first user 112, and the first user 112 uses the first terminal 110 to control the activity of the first virtual object in the virtual environment, or to manipulate the virtual items possessed by the first virtual object, and the first virtual object may also be called the first user 112's virtual object. The first user 112 can perform operations such as assembly, disassembly, and uninstallation on the virtual items possessed by the first virtual object, and this application is not limited thereto. Schematically, the first virtual object is a first virtual object, for example, a simulated human character or an animated human character.

[0060] The second terminal 130 has a client terminal 131 installed and running that supports a virtual environment, and the client terminal 131 may be a multiplayer online battle program. When the second terminal 130 runs the client terminal 131, the user interface of the client terminal 131 is displayed on the screen of the second terminal 130. The client terminal may be any one of the following: a battle royale shooting game, a virtual reality application program, an augmented reality program, a 3D map program, a virtual reality game, an augmented reality game, a first-person shooter game, a third-person shooter game, a multiplayer online battle arena game, and a simulation game. In this embodiment, the client terminal 131 is described as a multiplayer online battle arena game as an example.

[0061] The second terminal 130 is a terminal used by the second user 113, and the second user 113 uses the second terminal 130 to control the activity of the second virtual object in the virtual environment, or to manipulate the virtual items that the second virtual object possesses. The second virtual object may also be called the second user 113's virtual object. Schematically, the second virtual object is a second virtual object, for example, a simulated human character or an animated human character.

[0062] Optionally, the first virtual object and the second virtual object may reside in the same virtual environment. Optionally, the first virtual object and the second virtual object may belong to the same faction, the same team, or the same organization, be friends, or have temporary communication rights with each other. Optionally, the first virtual object and the second virtual object may belong to different factions, different teams, and different organizations, or be adversaries.

[0063] Selectively, the client terminals installed on the first terminal 110 and the second terminal 130 may be the same, or the client terminals installed on the two terminals may be the same type of client terminal on different operating system platforms (Android or iOS). The first terminal 110 may comprehensively refer to one of a plurality of terminals, and the second terminal 130 may comprehensively refer to another of a plurality of terminals; this embodiment will describe only the first terminal 110 and the second terminal 130 as examples. The first terminal 110 and the second terminal 130 may be the same or different device types, and such device types include at least one of smartphones, tablet PCs, e-readers, MP3 players, MP4 players, laptop portable computers, and desktop computers.

[0064] Although only two terminals are shown in Figure 4, in different embodiments, there may be multiple other terminals 140 that can access the server 120.Optionally, there may be one or more other terminals 140 that correspond to the developer, and the development and editing platform for client terminals that support the virtual environment may be installed on the other terminals 140, and the developer may edit and update the client terminal on the other terminals 140 and transmit the updated client terminal installation package to the server 120 via a wired or wireless network, and the first terminal 110 and the second terminal 130 may download the client terminal installation package from the server 120 and perform the update on the client terminal.

[0065] The first terminal 110, the second terminal 130, and the other terminals 140 are connected to the server 120 via a wireless network or a wired network.

[0066] Server 120 includes at least one of the following: a single server, multiple servers, a cloud computing platform, and a virtualization center. Server 120 is used to provide background services for client terminals that support a 3D virtual environment. Selectively, Server 120 handles the primary computing tasks and the terminals handle secondary computing tasks, or Server 120 handles secondary computing tasks and the terminals handle primary computing tasks, or cooperative computing is performed between Server 120 and the terminals using a distributed computing architecture.

[0067] In one schematic example, the server 120 includes a processor 122, a user account database 123, a multiplayer service module 124, and an input / output interface (I / O interface) 125 for users. Here, the processor 122 is used to load instructions stored in the server 121 and to process data in the user account database 123 and the battle service module 124. The user account database 123 is used to store user account data used by the first terminal 110, the second terminal 130, and other terminals 140, such as the user account avatar, the user account nickname, the user account combat power index, and the service area where the user account is located. The battle service module 124 is used to provide multiple battle rooms for users to battle, such as 1v1 battles, 3v3 battles, and 5v5 battles. The user-facing I / O interface 125 is used to establish communication with the first terminal 110 and / or the second terminal 130 via a wireless or wired network and exchange data.

[0068] Next, a method for controlling a virtual projectile provided by the embodiment of the present application will be described.

[0069] Figure 5 shows a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present invention. The method can be performed by a computer, which may be a terminal or server as shown in Figure 4. The method includes the following steps:

[0070] Step 502: In response to the thrown virtual projectile causing an explosion and releasing virtual fluid matter in the virtual environment screen, set up an effect grid within a first range centered on the explosion point of the virtual projectile.

[0071] A virtual environment is a virtual activity space provided during the operation of an application program on a terminal, where virtual objects perform various activities.

[0072] For example, a virtual environment is a two-dimensional screen displayed on a terminal, obtained by taking a screen capture of a three-dimensional virtual environment. For example, the shape of the virtual environment is determined based on the shape of the terminal's display screen or the shape of the terminal's user interface. If the terminal's display screen is rectangular, the virtual environment screen will also be displayed as a rectangular screen.

[0073] A virtual object is a game character controlled by a terminal. The terminal controls the virtual object to act within the virtual environment based on the user input it receives.

[0074] Exemplary activities of a virtual object in a virtual environment include, but are not limited to, walking, running, jumping, climbing, crawling, attacking, skill release, tool acquisition, and message sending. The embodiments of this application are not limited to these activities.

[0075] A virtual throwable item refers to a virtual item that a virtual object can throw within a virtual environment.

[0076] The virtual projectiles may optionally include, but are not limited to, at least one of a virtual smoke grenade, a virtual incinerator, and a virtual gas bottle, and the embodiments of this application are not limited thereto.

[0077] A virtual fluid substance refers to a virtual substance with fluid properties released from a virtual projectile. This virtual fluid substance is diffusive, and, taking a virtual smoke grenade as an example, the virtual fluid substance refers to the smoke released from the virtual smoke grenade.

[0078] For example, a computer device sets up an effect grid within a first range centered on the explosion point of a virtual projectile, and the effect grid is used to determine the diffusion direction of a virtual fluid. The first range is larger than the second range, and the second range is used to indicate the diffusion range of the virtual fluid.

[0079] Step 504: Traverse the effect grids within the first range and determine the effect grid that meets the valid diffusion conditions within the first range as the valid effect grid.

[0080] Exemplary, the methods of throwing a virtual projectile include at least one of upward throwing, downward throwing, and rebounding after hitting an obstacle; however, the present invention is not limited thereto, meaning that a virtual projectile can be thrown by at least one of upward throwing, downward throwing, and impact rebound.

[0081] Selectively, throwing a virtual projectile in an upward throwing manner means throwing the virtual projectile upwards, i.e., the initial throwing direction of the virtual projectile is upwards; throwing a virtual projectile in a downward throwing manner means throwing the virtual projectile downwards, i.e., the initial throwing direction of the virtual projectile is downwards; throwing a virtual projectile in a rebound manner after hitting an obstacle means throwing the virtual projectile towards the obstacle, i.e., the initial throwing direction of the virtual projectile is towards the virtual projectile, and after hitting the obstacle, the virtual projectile rebounds and changes direction.

[0082] For example, a computer device traverses an effect grid within a first range and determines an effect grid that meets the valid diffusion conditions within the first range as a valid effect grid.

[0083] A valid diffusion condition includes at least one of the following: the effect grid is within the second range, the effect grid does not overlap with a virtual obstacle, and the effect grid is not traversed. Selectively, a valid diffusion condition means that the effect grid is within the second range, the effect grid does not overlap with a virtual obstacle, and the effect grid is not traversed simultaneously.

[0084] Step 506: Under conditions where the virtual fluid material encounters a virtual obstacle during the diffusion process, the virtual fluid material is diffused based on the valid effect grid of the surface of the virtual obstacle.

[0085] For example, a computer device responds to a virtual fluid encountering a virtual obstacle during its diffusion process by changing the diffusion direction of the virtual fluid based on the virtual obstacle.

[0086] For example, if we consider a virtual smoke grenade, after the virtual smoke grenade releases smoke, the smoke will spread outwards. If it encounters a wall during this spread, the wall will change the direction of the smoke's spread, causing it to spread along the wall.

[0087] For example, a computer device diffuses a virtual fluid based on a valid effect grid on the surface of a virtual obstacle, in a situation where the virtual fluid encounters a virtual obstacle during its diffusion process.

[0088] As described above, in the method provided by the embodiment of the present invention, the computer equipment responds to a thrown virtual projectile causing an explosion and releasing virtual fluid matter in a virtual environment screen by setting an effect grid within a first range centered on the explosion point of the virtual projectile, traversing the effect grid within the first range, determining an effect grid that conforms to the legitimate diffusion conditions within the first range as a legitimate effect grid, and, in a situation where the virtual fluid matter encounters a virtual obstacle during the diffusion process, diffusing the virtual fluid matter based on the legitimate effect grid on the surface of the virtual obstacle. The present invention simulates a scene in which real virtual fluid matter changes direction when it encounters an obstacle by detecting a legitimate effect grid around the virtual obstacle and diffusing based on the legitimate effect grid around the virtual obstacle, thereby simulating a more realistic diffusion effect of virtual fluid matter by the above method.

[0089] Figure 6 shows a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present invention. The method can be performed by a computer, which may be a terminal or server as shown in Figure 4. The method includes the following steps:

[0090] Step 602: In response to the thrown virtual projectile causing an explosion and releasing virtual fluid matter in the virtual environment screen, set up an effect grid within a first range centered on the explosion point of the virtual projectile.

[0091] A virtual environment is a virtual activity space provided during the operation of an application program on a terminal, where virtual objects perform various activities.

[0092] For example, the position in which a virtual object is placed in the virtual environment may correspond to the center position of the map display control component, or to any other position in the map display control component; that is, the position in which a virtual object is placed in the virtual environment may correspond to the center of the map display control component, or to any other position in the map display control component.

[0093] A virtual throwable item refers to a virtual item that a virtual object can throw within a virtual environment.

[0094] The virtual projectiles may optionally include, but are not limited to, at least one of a virtual smoke grenade, a virtual incinerator, and a virtual gas bottle, and the embodiments of this application are not limited thereto.

[0095] A virtual fluid substance refers to a virtual substance with fluid properties released from a virtual projectile. This virtual fluid substance is diffusive, and, taking a virtual smoke grenade as an example, the virtual fluid substance refers to the smoke released from the virtual smoke grenade.

[0096] Exemplary, the methods of throwing a virtual projectile include at least one of upward throwing, downward throwing, and rebounding after hitting an obstacle; however, the present invention is not limited thereto, meaning that a virtual projectile can be thrown by at least one of upward throwing, downward throwing, and impact rebound.

[0097] As shown in the schematic diagram of the trajectory of a virtual projectile in Figure 7, the initial position information of the virtual projectile is P0, the projectile velocity is V0, and the computer equipment calculates the trajectory of the virtual projectile using a parabolic algorithm, and obtains the rebound point and the final explosion point based on the trajectory. Here, n sample points can be selected from the trajectory, where n is an integer greater than 1, and the position information of the sample points can be obtained by calculating the following formula.

[0098] Position information of the first sample point P1: P1 = P0 + V0 * t, Position information for the second sample point P2: P2 = P1 + V1*t, A sample point P located between the second and first sample points. t The location information is as follows:

number

[0099] Step 604: The effect grid where the explosion point is located is designated as the starting effect grid. The effect grids within the first range are traversed, and the effect grid that meets the correct diffusion conditions within the first range is determined as the correct effect grid.

[0100] For example, the computer equipment designates the effect grid where the explosion point is located as the starting effect grid, traverses the effect grids adjacent to the starting effect grid, determines the effect grid adjacent to the starting effect grid and that meets the correct diffusion conditions as the correct effect grid, and determines it as the next starting effect grid, repeating the previous step until all effect grids within the first range have been traversed.

[0101] For example, as shown in the schematic diagram in Figure 8, where an effect grid is set with the explosion point as the center, a virtual environment screen 801 is displayed in the user interface, and the computer equipment responds to the thrown virtual projectile 802 causing an explosion on the virtual environment screen 801 by setting an effect grid with the explosion point of the virtual projectile 802 as the center, within a first range centered on the explosion point. The first range is a pre-set range centered on the explosion point of the virtual projectile.

[0102] The shapes in the first range are, but are not limited to, at least one of the following: cuboid, cubic, annular, spherical, and cylindrical. The embodiments of this application do not specifically limit them.

[0103] As an example, taking a 6x6 two-dimensional effect grid as shown in the schematic diagram of traversing the effect grid in Figure 9, the first effect grid in the upper left corner of Figure 9 is designated as the starting effect grid 901. Starting from the starting effect grid 901, we traverse the effect grids adjacent to the starting effect grid 901, specifically traversing the effect grid 902 adjacent to the starting effect grid 901 horizontally and traversing the effect grid 904 adjacent to the starting effect grid 901 vertically. Assuming that effect grid 902 meets the correct diffusion conditions, we determine that the effect grid 902 that meets the correct diffusion conditions among the effect grids adjacent to the starting effect grid 901 is a correct effect grid, and the effect grid adjacent to the starting effect grid 901 Any adjacent and already determined valid effect grid 902 is also designated as a new starting effect grid 902, and the process continues to traverse the effect grids adjacent to the new starting effect grid 902, specifically by traversing the effect grid 905 adjacent to the new starting effect grid 902 in the horizontal direction (since the effect grid 901 adjacent to the new starting effect grid 902 has already been traversed, there is no need to traverse it again), and by traversing the effect grid 906 adjacent to the new starting effect grid 902 in the vertical direction. The above steps are repeated until the traverse ends when there are no more new valid effect grids, or when the traverse reaches the edge effect grid 903, or when all effect grids have been traversed.

[0104] In some embodiments, a 9*7 two-dimensional effect grid is defined as the effect grid 1001 within the first range, as shown in the schematic diagram of traversing the effect grid in Figure 10, and the boxes in Figure 10 are used to represent virtual obstacles 1002. The effect grid in the 4th row and 5th column is defined as the central grid, i.e., the explosion point of the virtual projectile is defined as the central grid. Under initial conditions, the distance value of this intermediate grid is set to 0, and the distance between other effect grids and the central grid is set to 1000 by default. The effect grid 1001 within the first range is traversed, the Manhattan distance between the central grid and adjacent effect grids 1001 is calculated starting from the central grid, i.e., the effect grid 1001 is traversed between the central grid and adjacent effect grids 1001, and under conditions where the effect grid 1001 is within the second range, does not overlap with virtual obstacles 1002, and has not been traversed, the effect grid 1001 is determined to be a valid effect grid, and its distance value is incremented by 1. The first shaded effect grid 1003 in the upper right corner is determined to be an invalid effect grid if it is obscured by a virtual obstacle 1002, and its distance remains 1000.As shown in Figure 10, for the second shaded effect grid 1004 in the lower left corner, since the effect grid 1001 is not within the second range, the second shaded effect grid 1004 is determined to be an invalid effect grid, and its distance is still 1000 by default. For example, the distance value corresponding to the second range is 6, but the Manhattan distances corresponding to the second shaded effect grid 1004 are 7 and 8. Therefore, the second shaded effect grid 1004 in the lower left corner is an invalid effect grid in both cases.

[0105] To understand the process of traversing the effect grid in more detail, Figure 11 shows a schematic diagram of step-by-step traversal of the effect grid. A 5x5 two-dimensional effect grid is defined as effect grid 1101 within the first range, and the shaded effect grid in Figure 11 is used to represent invalid effect grids 1102. Effect grid 1101 in the 3rd row and 3rd column is defined as the center grid, and this center grid is defined as the explosion point of the virtual projectile. In the initial state, as shown in Figure 11(a), the distance value of this intermediate grid is set to 0, and the distance between other effect grids and the center grid is set to 1000 by default. The effect grid 1101 within the first range is traversed, and as shown in Figure 11(b), the Manhattan distance between the central grid and the adjacent effect grid 1101 is calculated, starting from the central grid. That is, the effect grid 1101 in the four directions adjacent to the central grid is traversed, and the effect grid 1101 in the four directions adjacent to the central grid is within the second range, the effect grid 1101 does not overlap with a virtual obstacle, and the effect grid 1101 has not been traversed. Therefore, the effect grid 1101 is determined to be a valid effect grid, and its distance value is incremented by 1.

[0106] As shown in Figure (c) of Figure 11, a valid effect grid with a distance value of 1 from the central grid is designated as the new central grid. The effect grids adjacent to the new central grid are traversed, and the effect grids adjacent to the new central grid are determined to be valid effect grids, and their distance value is changed from 1 to 2.

[0107] As shown in Figure (d) of Figure 11, a valid effect grid with a distance value of 2 from the central grid is designated as the new central grid. The effect grids adjacent to the new central grid are traversed, and the effect grids adjacent to the new central grid are determined to be valid effect grids, and their distance value is changed from 2 to 3.

[0108] As shown in Figure (e) of Figure 11, a valid effect grid with a distance value of 3 from the central grid is designated as the new central grid. The effect grids adjacent to the new central grid are traversed, and the effect grids adjacent to the new central grid are determined to be valid effect grids, and their distance value is changed from 3 to 4.

[0109] As shown in Figure (f) of Figure 11, a valid effect grid with a distance value of 4 from the central grid is designated as the new central grid. The effect grids adjacent to the new central grid are traversed, and the effect grids adjacent to the new central grid are determined to be valid effect grids, and their distance value is changed from 4 to 5.

[0110] Repeat the above steps until there are no more valid effect grids, or until all effect grids within the first range have been traversed.

[0111] One point to note is that, during the traversal process of the grid described above, legitimate effect grids are identified by marking the distance between the effect grid and the center grid, and when the distance value is less than 1000, the effect grid is determined to be a legitimate effect grid. In one possible implementation, a "blank mark" method can be adopted to mark legitimate effect grids; that is, legitimate effect grids are marked as "blank" and invalid effect grids are marked as "real," and whether an effect grid is legitimate or not is determined by recognizing the marks on the effect grids.

[0112] Step 606: Under conditions where the virtual fluid material encounters a virtual obstacle during the diffusion process, the virtual fluid material is diffused based on the valid effect grid of the surface of the virtual obstacle.

[0113] For example, a computer device responds to a virtual fluid encountering a virtual obstacle during its diffusion process by changing the diffusion direction of the virtual fluid based on the virtual obstacle.

[0114] For example, if we consider a virtual smoke grenade, after the virtual smoke grenade releases smoke, the smoke will spread outwards. If it encounters a wall during this spread, the wall will change the direction of the smoke's spread, causing it to spread along the wall.

[0115] For example, a computer system sets up an effect grid within a first range centered on the explosion point of a virtual projectile, and the effect grid is used to determine the diffusion direction of a virtual fluid. The first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid. The computer system traverses the effect grid within the first range and determines the effect grid that fits the legitimate diffusion conditions within the first range as the legitimate effect grid. In situations where the virtual fluid encounters a virtual obstacle during the diffusion process, the virtual fluid is diffused based on the legitimate effect grid on the surface of the virtual obstacle.

[0116] A valid diffusion condition includes at least one of the following: the effect grid is within the second range, the effect grid does not overlap with a virtual obstacle, and the effect grid is not traversed. Selectively, a valid diffusion condition means that the effect grid is within the second range, the effect grid does not overlap with a virtual obstacle, and the effect grid is not traversed simultaneously.

[0117] As an example, Figure 12 shows a schematic diagram illustrating how a virtual fluid changes direction during the diffusion process. Figure 12 shows the effect of the diffusion of the virtual fluid 1202 through a virtual obstacle 1203. In Figure 12, the dashed box is used to represent a real effect grid 1201, and the solid frame is used to represent the virtual obstacle 1203. As shown in Figure 12, if we take smoke as an example of the virtual fluid 1202, the smoke diffuses along the virtual obstacle 1203 to the other side of the virtual obstacle 1203, rather than diffusing directly through the wall. This diffusion method is more in line with a real-world representation.

[0118] In one possible implementation, under the condition that the effect grid where the explosion point is located is a valid effect grid, the effect grid where the explosion point is located is used as the starting effect grid.

[0119] A starting effect grid refers to an effect grid that serves as the starting point for traversing other effect grids. In other words, a starting effect grid is used as the starting point for traversing other effect grids.

[0120] In one possible implementation, under circumstances where the effect grid on which the explosion point is located is not a valid effect grid, an effect grid that meets the linear detection conditions within a first range is determined as the starting effect grid.

[0121] The linear detection conditions include the ability to connect the effect grid to be detected and the effect grid where the explosion point is located in a straight line, and the ability to connect the effect grid to be detected not overlapping with any virtual obstacles.

[0122] As an example, Figure 13 shows a schematic diagram for determining the starting effect grid. In situations where the effect grid where the explosion point is located is not a valid effect grid, that effect grid cannot be the starting effect grid, and another effect grid must be selected as the starting effect grid. In Figure 13, the box is a virtual obstacle 1301, and the shaded effect grid is the effect grid where the explosion point is located in the initial state. As shown in Figure 13(a), the virtual obstacle 1301 and the effect grid where the explosion point is located overlap, and therefore this effect grid cannot be the starting effect grid. Centering on the shaded effect grid, linear connections are made between the shaded effect grid and effect grids 1, 2, 3, and 4. Since effect grids 1 and 2 overlap with the virtual obstacle 1301, effect grids 1 and 2 cannot be the starting effect grid. Since effect grid 3 is obstructed by virtual obstacle 1301, a straight line connection cannot be achieved between effect grid 3 and the shaded effect grid, and therefore, effect grid 3 cannot be the starting effect grid. A straight line connection can be achieved between effect grid 4 and the shaded effect grid, and effect grid 4 does not overlap with virtual obstacle 1301, and therefore, effect grid 4 is determined to be the new starting effect grid.

[0123] As shown in Figure 13(b), the virtual obstacle 1301 and the effect grid where the explosion point is located overlap, so the effect grid cannot be the starting effect grid. Centering on the shaded effect grid, linear connections are made between the shaded effect grid and effect grids 1, 2, 3, and 4. Effect grids 1 and 2 overlap with the virtual obstacle 1301, so effect grids 1 and 2 cannot be the starting effect grids. Effect grids 3 and 4 are blocked by the virtual obstacle 1301, so linear connections cannot be made between effect grids 3 and 4 and the shaded effect grid, and therefore effect grids 3 and 4 cannot be the starting effect grids. In summary, none of effect grids 1, 2, 3, and 4 can be the starting effect grids. Therefore, effect grids 1 and 2, which can achieve a straight line connection with the shaded effect grid, are selected as jump points. For example, effect grid 1 is selected as the jump point, and with effect grid 1 as the center, effect grid 5 and effect grid 1 can be connected in a straight line, and effect grid 5 does not overlap with virtual obstacle 1301, so effect grid 5 is determined to be the new starting point effect grid.

[0124] In the embodiment of the present invention, an effect grid is set within a first range centered on the explosion point of a virtual projectile, and by traversing the effect grid within the first range, an effect grid that conforms to the valid diffusion conditions within the first range is determined as a valid effect grid, and in situations where the virtual fluid material encounters a virtual obstacle during the diffusion process, diffusion is performed based on the valid effect grid on the surface of the virtual obstacle. The present invention achieves traversing the validity of the effect grid by calculating the distance between effect grids, thereby determining the diffusion direction of the virtual fluid material, reducing computational load, lowering the demands on hardware equipment, and improving the efficiency of human-computer interaction.

[0125] In one possible implementation, a computer device controls the attribute values ​​of a virtual object in response to the virtual object entering the diffusion range of a virtual fluid.

[0126] Selectable attribute values ​​include life values ​​and / or skill values.

[0127] For example, a computer device may, in response to a virtual object entering the diffusion range of a virtual fluid, reduce the virtual object's life value and / or skill value.

[0128] For example, the computer equipment sets up an effect grid within a first range centered on the explosion point of a virtual projectile, the first range being larger than a second range, the second range being used to indicate the diffusion range of a virtual fluid, and the computer equipment reduces the attribute value of the virtual object in response to the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located being smaller than the maximum distance value of the second range.

[0129] For example, a computer device sets up an effect grid within a first range centered on the explosion point of a virtual projectile, the first range being larger than a second range, the second range being used to indicate the diffusion range of a virtual fluid, and the computer device reduces the life and / or skill values ​​of the virtual object in response to the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located being smaller than the maximum distance value of the second range.

[0130] For example, if we consider a virtual fluid substance to be a virtual methane gas bomb, after the virtual methane gas bomb explodes, it releases methane gas, and if a virtual object enters the methane gas diffusion range, both the virtual object's life value and skill value will decrease. If the virtual object's life value is below the life threshold, the virtual object enters an unhealthy state, and if the virtual object's skill value is below the skill threshold, the virtual object's use of that skill will be restricted.

[0131] For example, a computer device, in response to a virtual object accelerating and moving within the diffusion range of a virtual fluid at a first acceleration, reduces the virtual object's life value and / or skill value at a first reduction rate. Here, the first rate of decrease has a positive correlation with the velocity of the virtual object.

[0132] For example, if we consider a virtual fluid substance to be a virtual methane gas bomb, after the virtual methane gas bomb explodes, it releases methane gas, and if a virtual object enters the methane gas diffusion range, both the virtual object's life value and skill value will decrease. The faster the virtual object moves, the faster its life value and skill value will decrease. If the virtual object's life value is below the life threshold, the virtual object enters an unhealthy state, and if the virtual object's skill value is below the skill threshold, the virtual object's use of that skill will be restricted.

[0133] The method provided by the embodiment of the present invention reduces the life value and / or skill value of a virtual object when it enters the diffusion range of a virtual fluid, and determines whether the virtual object is affected by the virtual fluid based on the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located. In situations where the virtual object is affected by the virtual fluid, the life value and / or skill value of the virtual object are dynamically affected in accordance with changes in the motion velocity of the virtual object. The present invention provides a novel method for quickly determining whether a virtual object is affected and the manner of the effect by calculating the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located, thereby reducing computational load, reducing the demands on hardware equipment, and improving the efficiency of human-computer interaction.

[0134] In one possible implementation, a computer device displays virtual fluid matter that changes in a tilted manner with different levels of transparency in response to the virtual fluid matter diffusing within a second range.

[0135] For example, the computer equipment sets up an effect grid within a first range centered on the explosion point of a virtual projectile, and the computer equipment determines the transparency of the virtual fluid material corresponding to the effect grid where it is currently located, based on the distance between the effect grid where it is currently located and the effect grid where the explosion point is located.

[0136] Here, the distance between the currently located effect grid and the effect grid where the explosion point is located is positively correlated with the transparency of the virtual fluid material corresponding to the currently located effect grid. For example, within the diffusion range of the virtual fluid material, the further an effect grid is from the effect grid where the explosion point is located, the higher the transparency of the corresponding virtual fluid material.

[0137] The method provided by the embodiments of the present invention displays virtual fluid material that changes in gradient with different transparency as it diffuses within a second range. The present invention provides a novel calculation method that allows for the rapid determination of the transparency corresponding to the currently located effect grid by calculating the distance between the currently located effect grid and the effect grid where the explosion point is located, thereby enabling the rapid calculation and acquisition of transparency corresponding to different locations, reducing computational load, lowering the demands on hardware equipment, and improving the efficiency of human-computer interaction.

[0138] In one possible implementation, a computer device responds to a virtual fluid encountering a dynamic virtual obstacle during its diffusion process by changing the diffusion direction of the virtual fluid based on the dynamic virtual obstacle.

[0139] For example, the computer equipment sets up an effect grid within a first range centered on the explosion point of a virtual projectile, traverses the effect grid within the first range, and determines the effect grids that meet the legitimate diffusion conditions within the first range as legitimate effect grids, the computer equipment determines the number of legitimate effect grids corresponding to the diffusion range at time i, and the first position occupied by the dynamic virtual obstacle, based on the diffusion range of the virtual fluid at time i, the computer equipment responds to the dynamic virtual obstacle moving to a second position at time i+1 by determining the number of legitimate effect grids occupied by the dynamic virtual obstacle, the computer equipment replenishes the legitimate effect grids at the first position at the same rate based on the number of legitimate effect grids corresponding to the diffusion range of the virtual fluid at time i+1, and the number of legitimate effect grids occupied by the dynamic virtual obstacle at the second position, and diffuses the virtual fluid based on the newly replenished legitimate effect grids.

[0140] Here, the number of corresponding legitimate effect grids within the diffusion range of the virtual fluid substance changes to a normal distribution over time.

[0141] For example, at time point 1, the computer determines that the number of corresponding legitimate effect grids within the diffusion range of the virtual fluid is 100, and determines the first position occupied by the virtual car. If, at time point 1, the number of corresponding legitimate effect grids within the diffusion range of the virtual fluid is 80, and the virtual car moves to a second position at time point 2, and the virtual car occupies 20 legitimate effect grids at the second position, then 16 legitimate effect grids are added to the first position, and the virtual fluid is diffused based on the newly added legitimate effect grids, thereby obtaining a more realistic diffusion effect of the virtual fluid and improving the user experience.

[0142] In one possible implementation, a computer device sets up an effect grid within a first range centered on the explosion point of a virtual projectile, the computer device traverses the effect grid within the first range at a preset frequency, refreshes the effect grid to match the legitimate diffusion conditions within the first range, and determines the diffusion direction of the virtual fluid based on the refreshed legitimate effect grid, in a situation where the virtual fluid encounters dynamic virtual obstacles during the diffusion process.

[0143] In the embodiment provided by the present invention, a computer device responds to the virtual fluid encountering a dynamic virtual obstacle during the diffusion process by changing the diffusion direction of the virtual fluid based on the dynamic virtual obstacle. The present invention replenishes the legitimate effect grids behind the dynamic virtual obstacle at the same rate as the dynamic virtual obstacle moves by calculating the number of corresponding legitimate effect grids at time i, the first position occupied by the dynamic virtual obstacle, and the diffusion range at time i+1, and the number of legitimate effect grids occupied by the dynamic virtual obstacle at the second position, thereby simulating a more realistic diffusion effect of the virtual fluid by the above method and improving the user experience.

[0144] As described above, in the method provided by the embodiment of the present invention, the computer equipment displays a virtual environment screen, and in response to a thrown virtual projectile causing an explosion on the virtual environment screen, displays a diffusible virtual fluid material released from the virtual projectile. In response to the virtual fluid material encountering a virtual obstacle during its diffusion process, it changes the diffusion direction of the virtual fluid material based on the virtual obstacle. The present invention simulates a scene in which a real virtual fluid material changes direction when it encounters an obstacle by using a method in which a virtual obstacle changes the diffusion direction of the virtual fluid material, thereby simulating a more realistic diffusion effect of the virtual fluid material using the above method and improving the user experience.

[0145] Exemplary, the acquired valid effect grid can be used not only to determine the diffusion direction of the virtual fluid, but also to render the virtual fluid, as shown in the schematic diagram of rendering the virtual fluid shown in Figure 14. As shown in Figure (a) of Figure 14, an effect grid is set within a first range centered on the explosion point of the virtual projectile, the effect grid where the explosion point is located is designated as the starting effect grid, the effect grids adjacent to the starting effect grid are traversed, and effect grids adjacent to the starting effect grid that meet the valid diffusion conditions are determined as valid effect grids and determined as the next starting effect grid, and the previous step is repeated until all effect grids within the first range have been traversed, thereby diffusing the virtual fluid based on the valid effect grids.

[0146] The computer generates a mask image based on a valid effect grid, and then applies the mask image as transparency to the final transparency of the virtual fluid material. The computer determines the color value corresponding to each valid effect grid based on Manhattan distance information between each valid effect grid and the effect grid where the explosion point is located. For example, the color value of each valid effect grid is set to linear color information, i.e., the color value corresponding to one valid effect grid is between 0 and 1, so that the calculation of the color value for each valid effect grid can be obtained by the distance value of the valid effect grid and the maximum diffusion distance of the virtual fluid material. For example, if the current distance of the valid effect grid is 4 and the maximum diffusion distance of the virtual fluid material is 10, then the color value corresponding to that effect grid is 0.4. The rendering obtained after the valid grid in Figure 14(a) is rendered is shown in Figure 14(b).

[0147] As shown in Figure 15(a), after rendering a proper grid and obtaining a rendering image, the texture format in the rendering image is set by employing a linear interpolation sampling method to obtain smoother edges, thereby obtaining relatively smooth edges. Transparency is calculated by subtracting the original color value from 1 after calculating the color value, as transparency increases with distance, and this is shown in Figure 15(b).

[0148] For example, a computer can generate sampling UV coordinates using the world coordinate center position, length, and width of a virtual fluid material, then use the UV coordinates to perform texture sampling to obtain transparency, and multiply this by the transparency corresponding to a valid effect grid to obtain the final rendering effect. However, because the rendering range of the virtual fluid material is larger than that of the second range, it is prone to inaccurate results due to overflow at the edges of the virtual fluid material. Therefore, a black edge is added around the virtual fluid material based on an existing mask image (i.e., based on a valid effect grid), thereby obtaining a relatively good softening effect, as shown in Figure 16(a). In situations where the virtual fluid material encounters a virtual obstacle, a black unwanted area is added to the right-hand region, as shown in the right-hand region of Figure 16(b). To save internal memory, the minimum and maximum values ​​of the region coordinates may be additionally recorded when generating the effect grid, and finally, their average value is the new center grid, and their difference is the size of the new virtual fluid material region. Finally, based on the size of the new central grid and the new virtual fluid material region, the right-hand region is cropped to obtain a new rendered image.

[0149] As an example, the above embodiments all render virtual fluid matter based on two dimensions, and similarly, the method can also be applied to rendering a legitimate effect grid in three dimensions. The rendering results of a legitimate effect grid in three dimensions are shown in Figure 17. As shown in Figure 17(a), the virtual fluid matter 1701 is obstructed in the diffusion process at the corners composed of virtual obstacles. As shown in Figure 17(b), the virtual fluid matter 1701 is obstructed in the diffusion process at the left wall.

[0150] Figure 18 shows a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. The method can be performed by a computer, which may be a terminal or server as shown in Figure 4. The method includes the following steps:

[0151] Step 1801: Release the virtual fluid matter.

[0152] For example, a computer device responds to a thrown virtual projectile causing an explosion on a virtual environment screen by displaying virtual fluid matter released from the virtual projectile.

[0153] The virtual projectiles may optionally include, but are not limited to, at least one of a virtual smoke grenade, a virtual incinerator, and a virtual gas bottle, and the embodiments of this application are not limited thereto.

[0154] A virtual fluid substance refers to a virtual substance with fluid properties released from a virtual projectile. This virtual fluid substance is diffusive, and, taking a virtual smoke grenade as an example, the virtual fluid substance refers to the smoke released from the virtual smoke grenade.

[0155] Step 1802: Set up the effect grid.

[0156] For example, a computer device sets up an effect grid within a first range centered on the explosion point of a virtual projectile, and the effect grid is used to determine the diffusion direction of a virtual fluid. The first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid. The computer device traverses the effect grid within the first range and determines the effect grid that fits the valid diffusion conditions within the first range as the valid effect grid.

[0157] Step 1803: Generate distance information based on the effect grid.

[0158] For example, the computer equipment generates distance information corresponding to the effect grid at the current location, based on the effect grid at the current location and the effect grid at the location where the explosion point is located.

[0159] Step 1804: Determine whether or not to affect the virtual object based on distance information.

[0160] For example, a computer device determines whether a virtual object is affected based on the distance between the effect grid at the location of the virtual object and the effect grid at the location of the explosion point.

[0161] Step 1805: Generate a mask image based on distance information.

[0162] For example, a computer device determines a valid effect grid based on distance information between the effect grid and the location of the explosion point, and generates a mask image based on the valid effect grid.

[0163] Step 1806: Render based on the mask image.

[0164] For example, a computer device renders based on a mask image, thereby obtaining an effect diagram of a virtual fluid substance diffusing.

[0165] Figure 19 shows a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. The method can be performed by a computer, which may be a terminal or server as shown in Figure 4. The method includes the following steps:

[0166] Step 1901: Traverse the effect grid within the first range.

[0167] For example, a computer device responds to a thrown virtual projectile causing an explosion on a virtual environment screen by displaying virtual fluid matter released from the virtual projectile.

[0168] The virtual fluid substance is, but is not limited to, at least one of gases, liquids, and non-Newtonian fluids, and the embodiments of this application do not specifically limit it.

[0169] For example, a computer device sets up an effect grid within a first range centered on the explosion point of a virtual projectile, and the effect grid is used to determine the diffusion direction of a virtual fluid. The first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid. The computer device traverses the effect grid within the first range and determines the effect grid that fits the valid diffusion conditions within the first range as the valid effect grid.

[0170] Step 1902: Determine the surrounding grids based on the current effect grid.

[0171] For example, the computer equipment uses the effect grid where the explosion point is located as the starting effect grid, and traverses the starting effect grid and adjacent effect grids.

[0172] Step 1903: Is it in the second range or not?

[0173] For example, the computer device determines whether the effect grid is within the second range of the virtual projectile, and if the effect grid is within the second range of the virtual projectile, it performs step 1904, and if the effect grid is not within the second range of the virtual projectile, it performs step 1906.

[0174] Step 1904: Does it overlap with a virtual obstacle?

[0175] For example, under the condition that the effect grid is within the second range of the virtual projectile, it is determined whether the virtual projectile overlaps with the virtual obstacle. If the virtual projectile overlaps with the virtual obstacle, step 1906 is executed, and if the virtual projectile does not overlap with the virtual obstacle, step 1905 is executed.

[0176] Step 1905: Was the traverse completed or not?

[0177] For example, under the condition that the effect grid is within the second range of the virtual projectile and the virtual projectile does not overlap with a virtual obstacle, it is determined whether or not the virtual projectile has traversed. If the virtual projectile has traversed, step 1906 is executed, and if the virtual projectile has not traversed, step 1907 is executed.

[0178] Step 1906: The effect grid is an invalid effect grid.

[0179] Step 1907: Mark the traverse and calculate the distance.

[0180] For example, under the condition that the effect grid is within the second range of the virtual projectile, the virtual projectile does not overlap with a virtual obstacle, and the virtual projectile has not traversed, the effect grid is marked as traversed, and the distance between the effect grid and the center grid is calculated.

[0181] Step 1908: Determine the new starting point as the effect grid.

[0182] For example, the distance between the effect grid and the center grid determines that the effect grid is a valid effect grid, and it is determined to be a new starting point for the effect, and the above step is repeated until there are no more valid effect grids in the first range, or all effect grids in the first range have been traversed.

[0183] Next, the control device for a virtual projectile provided in the embodiment of the present application will be described.

[0184] Figure 20 shows a schematic diagram of the structure of a virtual projectile control device provided by one exemplary embodiment of the present application. The device can be implemented as all or part of a computer system by software, hardware, or a combination of both, and the device is A grid setting module 2001 used to set an effect grid within a first range centered on the explosion point of a thrown virtual projectile in response to the virtual projectile exploding and releasing virtual fluid material in the virtual environment screen, wherein the effect grid is used to determine the diffusion direction of the virtual fluid material, the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid material, and A traverse module 2002 is used to traverse the effect grid within the above-mentioned first range and to determine the effect grid that conforms to the valid diffusion conditions within the above-mentioned first range as the valid effect grid, The system includes a diffusion module 2003 used to diffuse the virtual fluid material based on the valid effect grid on the surface of the virtual obstacle, in a situation where the virtual fluid material encounters the virtual obstacle during the diffusion process.

[0185] Here, the above-mentioned valid diffusion conditions include at least one of the following: the effect grid is within the second range; the effect grid does not overlap with the virtual obstacle; and the effect grid is not traversed.

[0186] In one possible implementation, the traverse module 2002 is used to set the effect grid on which the explosion point is located as the starting effect grid, and to use the starting effect grid as the starting point for traversing other effect grids; to traverse the effect grids adjacent to the starting effect grid, to determine an effect grid adjacent to the starting effect grid and that meets the valid diffusion conditions as a valid effect grid, and to determine it as the next starting effect grid; and to repeat the previous step until all of the effect grids in the first range have been traversed.

[0187] In one possible implementation, the traverse module 2002 is used to make the effect grid on which the explosion point is located the starting effect grid, given that the effect grid on which the explosion point is located is the valid effect grid.

[0188] In one possible implementation, the traverse module 2002 is used to determine the starting effect grid as an effect grid that meets the straight line detection conditions within the first range, when the effect grid on which the explosion point is located is not the valid effect grid.

[0189] Here, the linear detection condition includes that the effect grid to be detected and the effect grid on which the explosion point is located are linearly connected, and that the effect grid to be detected does not overlap with the virtual obstacle.

[0190] In one possible implementation, the grid setting module 2001 is used to set an effect grid within a first range centered on the explosion point of the virtual projectile, the first range being larger than a second range, and the second range being used to indicate the diffusion range of the virtual fluid material.

[0191] The calculation module 2004 is used to reduce the attribute value of the virtual object in response to the fact that the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located is smaller than the maximum distance value of the second range.

[0192] In one possible implementation, the attribute values ​​include a life value and / or a skill value, and the calculation module 2004 is used to reduce the life value and / or skill value of the virtual object in response to the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located being less than the maximum distance value of the second range.

[0193] In one possible implementation, the grid setting module 2001 is used to set an effect grid within a first range centered on the explosion point of the virtual projectile.

[0194] In one possible implementation, the computation module 2004 is used to determine the transparency of the virtual fluid material corresponding to the currently located effect grid, based on the distance between the currently located effect grid and the effect grid where the explosion point is located.

[0195] Here, the distance between the effect grid where the current position is located and the effect grid where the explosion point is located has a positive correlation with the transparency of the virtual fluid material corresponding to the effect grid where the current position is located.

[0196] In one possible implementation, the grid setting module 2001 is used to set an effect grid within a first range centered on the explosion point of the virtual projectile.

[0197] In one possible implementation, the traverse module 2002 is used to traverse the effect grid within the first range, determine the effect grids that meet the valid diffusion conditions within the first range as valid effect grids, determine the number of valid effect grids corresponding to the diffusion range at time i, and the first position occupied by the dynamic virtual obstacle, based on the diffusion range of the virtual fluid material at time i, and determine the number of valid effect grids occupied by the dynamic virtual obstacle in response to the dynamic virtual obstacle moving to a second position at time i+1.

[0198] In one possible implementation, the computation module 2004 is used to replenish the legitimate effect grids at the first position by the same proportion, based on the number of legitimate effect grids corresponding to the diffusion range of the virtual fluid at time (i+1) and the number of legitimate effect grids occupied by the dynamic virtual obstacle at the second position, and to diffuse the virtual fluid based on the newly replenished legitimate effect grids.

[0199] Here, the quantity of the corresponding valid effect grid within the diffusion range of the virtual fluid substance changes over time in a normal distribution, where i is a positive integer.

[0200] Figure 21 shows a structural block diagram of a computer device 2100 provided by one exemplary embodiment of the present application. The computer device 2100 may be a portable mobile terminal, such as a smartphone, tablet PC, MP3 player (Moving Picture Experts Group Audio Layer III), and MP4 player (Moving Picture Experts Group Audio Layer IV). The computer device 2100 may also be called a user device, portable terminal, or other names.

[0201] Typically, the computer equipment 2100 includes a processor 2101 and memory 2102.

[0202] The processor 2101 may include one or more processing cores, for example, a 4-core processor, an 8-core processor, etc. The processor 2101 is a DSP (Digital Signal Processor). Processor, digital signal processor) It can be implemented by employing at least one hardware format from FPGA (Field Programmable Gate Array) and PLA (Programmable Logic Array). The processor 2101 may include a main processor and a coprocessor, the main processor being a processor used to process data in a wake state and also called a CPU (Central Processing Unit), and the coprocessor being a low-power processor used to process data in a standby state. In some embodiments, a GPU (Graphics Processing Unit) may be integrated into the processor 2101, and the GPU is used to render and draw content that needs to be displayed on a display screen. In some embodiments, the processor 2101 may further include an AI (Artificial Intelligence) processor, the AI ​​processor being used to process computational operations related to machine learning.

[0203] The memory 2102 may include one or more computer-readable storage media, which may be tangible or non-temporary. The memory 2102 may further include high-speed random-access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-temporary computer-readable storage media in the memory 2102 are used to store at least one instruction, which is executed by the processor 2101 to implement the virtual projectile control method provided in the embodiments of the present application.

[0204] In some embodiments, the computer device 2100 further optionally includes a peripheral device interface 2103 and at least one peripheral device. Specifically, the peripheral device includes at least one of a radio frequency circuit 2104, a touch display screen 2105, a camera component 2106, an audio circuit 2107, and a power supply 2108.

[0205] The peripheral device interface 2103 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 2101 and the memory 2102. In some embodiments, the processor 2101, memory 2102, and peripheral device interface 2103 are integrated on the same chip or circuit board, and in some other embodiments, any one or two of the processor 2101, memory 2102, and peripheral device interface 2103 may be implemented on a single chip or circuit board, and this embodiment is not limited thereto.

[0206] The radio frequency circuit 2104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 2104 communicates with communication networks and other communication devices using electromagnetic signals. The radio frequency circuit 2104 converts electrical signals into electromagnetic signals and transmits them, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 2104 includes an antenna system, an RF transceiver, one or more amplifiers, tuners, oscillators, a digital signal processor, a codec chipset, and a subscriber identification module card, etc. The radio frequency circuit 2104 can communicate with other terminals by at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless LANs, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 2104 may further include a circuit related to NFC (Near Field Communication), and the present invention is not limited thereto.

[0207] The touch display screen 2105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. The touch display screen 2105 further has the ability to collect touch signals on or above the surface of the touch display screen 2105. These touch signals can be input to the processor 2101 for processing as control signals. The touch display screen 2105 is used to provide virtual buttons, also called software buttons and / or software keyboards, and / or virtual keyboards. In some embodiments, there may be one touch display screen 2105, mounted on the front panel of the computer equipment 2100; in some other embodiments, there may be at least two touch display screens 2105, each mounted on a different surface of the computer equipment 2100 or designed to fold; and in some embodiments, the touch display screen 2105 may be a flexible display screen, mounted on a curved surface or a folding surface of the computer equipment 2100. Furthermore, the touch display screen 2105 may be configured as a non-rectangular, irregular shape, i.e., an irregularly shaped screen. The touch display screen 2105 can be manufactured using materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0208] The camera component 2106 is used to collect images or videos. Optionally, the camera component 2106 includes a front camera and a rear camera. Typically, the front camera is used for video calls or selfies, and the rear camera is used for taking photos or videos. In some embodiments, there are at least two rear cameras, each being any one of the main camera, depth-of-field camera, and wide-angle camera, thereby enabling background blur by fusing the main camera and depth-of-field camera, and panoramic and VR (Virtual Reality) shooting by fusing the main camera and wide-angle camera. In some embodiments, the camera component 2106 may further include a flash lamp. The flash lamp may be a monochromatic temperature flash lamp or a dichromatic temperature flash lamp. A dichromatic temperature flash lamp refers to a combination of a warm-light flash lamp and a cool-light flash lamp, which can be used for light ray compensation under different color temperatures.

[0209] The audio circuit 2107 is used to provide an audio interface between the user and the computer equipment 2100. The audio circuit 2107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, convert the sound waves into electrical signals, and input them to the processor 2101 for processing, or to the radio frequency circuit 2104 to realize voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, each installed in a different part of the computer equipment 2100. The microphone may further be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 2101 or the radio frequency circuit 2104 into sound waves. The speaker may be a conventional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves that are audible to humans, but also convert electrical signals into sound waves that are inaudible to humans for applications such as distance measurement. In some embodiments, the audio circuit 2107 may further include a headphone jack.

[0210] The power supply 2108 is used to supply power to each component of the computer equipment 2100. The power supply 2108 may be an AC current, a DC current, a disposable battery, or a rechargeable battery. When the power supply 2108 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged by a wired line, and a wireless rechargeable battery is a battery that is charged by a wireless coil. The rechargeable battery may also be used to support fast charging technology.

[0211] In some embodiments, the computer device 2100 further includes one or more sensors 2109. These one or more sensors 2109 include, but are not limited to, an accelerometer 2110, a gyroscope 2111, a pressure sensor 2112, an optical sensor 2113, and a proximity sensor 2114.

[0212] As a person skilled in the art will understand, the structure shown in Figure 21 is not limited to the computer equipment 2100 and may include more or fewer components than those shown, or may be a combination of some components, or may employ and arrange different components.

[0213] Embodiments of the present invention further provide a computer device comprising a processor and memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to realize a method for controlling a virtual projectile provided by the embodiments of each of the above methods.

[0214] Embodiments of the present invention further provide a computer-readable storage medium in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor, thereby realizing the virtual projectile control method provided by the embodiments of the above methods.

[0215] Embodiments of the present invention further provide a computer program product which includes a computer program stored in a computer-readable storage medium, and the computer program is read from the computer-readable storage medium and executed by the processor of a computer device, thereby causing the computer device to execute a virtual projectile control method provided by the embodiments of each of the above methods.

[0216] It should be understood that, as used herein, “plural” refers to two or more things. “And / or” describes the relationship between related objects and indicates that three types of relationships are possible; for example, A, and / or, B can represent three situations: A existing alone, A and B existing together, and B existing alone. The letter “ / ” generally indicates that the preceding and succeeding related objects have a single type of “or” relationship.

[0217] As a person skilled in the art will understand, the implementation of all or some of the steps of the above embodiment may be completed by hardware, or by a program issuing instructions to the relevant hardware, and the program may be stored in a computer-readable storage medium, the storage medium referred to above may be read-only memory, a magnetic disk, or an optical disk, etc.

[0218] The foregoing are merely optional embodiments of the Application and are not intended to limit it. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the Application should all be included within the scope of protection.

Claims

1. A method for controlling a virtual projectile, wherein the method is performed by a computer device, and the method is Steps include: setting up an effect grid within a first range centered on the explosion point of the virtual projectile in response to the thrown virtual projectile causing an explosion and releasing virtual fluid material on a virtual environment screen displaying a virtual environment, wherein the effect grid is used to determine the diffusion direction of the virtual fluid material, the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid material; The steps include scanning the effect grid within the first range and determining the effect grid that conforms to the correct diffusion conditions within the first range as the correct effect grid, The steps include: diffusing the virtual fluid material based on the valid effect grid on the surface of the virtual obstacle, under the circumstances that the virtual fluid material encounters a virtual obstacle during the diffusion process; A method for controlling a virtual projectile, wherein the legitimate diffusion condition includes at least one of the following: the effect grid is within the second range; the effect grid does not overlap with the virtual obstacle; and the effect grid is not being scanned.

2. The step of scanning the effect grid within the first range and determining the effect grid that conforms to the correct diffusion conditions within the first range as the correct effect grid is: A step of setting the effect grid on which the explosion point is located as the starting effect grid, wherein the starting effect grid is used as the starting point for scanning other effect grids. The steps include scanning the effect grids adjacent to the starting effect grid, determining an effect grid adjacent to the starting effect grid and conforming to the valid diffusion conditions as the valid effect grid, and determining it as the next starting effect grid, The method according to claim 1, comprising the step of repeating the previous step until all of the effect grids within the first range have been scanned.

3. The step of setting the effect grid on which the explosion point is located as the starting effect grid is as follows: The method according to claim 2, further comprising the step of making the effect grid on which the explosion point is located the starting effect grid, given that the effect grid on which the explosion point is located is the valid effect grid.

4. The step of setting the effect grid on which the explosion point is located as the starting effect grid is as follows: The step includes determining an effect grid that meets the linear detection conditions within the first range as the starting effect grid, given that the effect grid on which the explosion point is located is not the valid effect grid. The method according to claim 2, wherein the linear detection condition includes that the effect grid to be detected and the effect grid on which the explosion point is located are linearly connected, and the effect grid to be detected does not overlap with the virtual obstacle.

5. The aforementioned virtual environment includes virtual objects, The aforementioned method, A step of setting an effect grid within a first range centered on the explosion point of the virtual projectile, wherein the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid substance. The method according to claim 1, further comprising the step of reducing the attribute value of the virtual object in response to the distance between the effect grid on which the virtual object is located and the effect grid on which the explosion point is located being less than the maximum distance value of the second range.

6. The aforementioned attribute values ​​include life values ​​and / or skill values. The step of reducing the attribute value of the virtual object in response to the distance between the effect grid where the virtual object is located and the effect grid where the explosion point is located being less than the maximum distance value of the second range is, The method according to claim 5, comprising the step of reducing the life value and / or skill value of the virtual object in response to the distance between the effect grid on which the virtual object is located and the effect grid on which the explosion point is located being less than the maximum distance value of the second range.

7. The aforementioned method, The steps include setting an effect grid within a first range centered on the explosion point of the virtual projectile, The method further includes the step of determining the transparency of the virtual fluid material corresponding to the currently located effect grid, based on the distance between the currently located effect grid and the effect grid where the explosion point is located. The method according to claim 1, wherein the distance between the currently located effect grid and the effect grid where the explosion point is located has a positive correlation with the transparency of the virtual fluid material corresponding to the currently located effect grid.

8. The aforementioned method, The steps include setting an effect grid within a first range centered on the explosion point of the virtual projectile, The steps include scanning the effect grid within the first range and determining the effect grid that conforms to the valid diffusion conditions within the first range as the valid effect grid, A step of determining, based on the diffusion range of the virtual fluid material at time i, the number of valid effect grids corresponding to the diffusion range at time i, and the first position occupied by the dynamic virtual obstacle, The steps include determining the quantity of the valid effect grid occupied by the dynamic virtual obstacle in response to the dynamic virtual obstacle moving to a second position at the (i+1)th time, The method further includes the steps of replenishing the legitimate effect grids at the first position by the same proportion based on the number of legitimate effect grids corresponding to the diffusion range of the virtual fluid material at the (i+1)th time point, and the number of legitimate effect grids occupied by the dynamic virtual obstacle at the second position, and diffusing the virtual fluid material based on the newly replenished legitimate effect grids, The method according to claim 1, wherein the number of corresponding legitimate effect grids within the diffusion range of the virtual fluid substance changes over time in a normally distributed manner, where i is a positive integer.

9. The aforementioned method, The steps include setting an effect grid within a first range centered on the explosion point of the virtual projectile, The steps include scanning the effect grid within the first range at a preset frequency and refreshing the valid effect grid that conforms to the valid diffusion conditions within the first range, The method according to claim 1, further comprising the step of determining the diffusion direction of the virtual fluid substance based on a refreshed valid effect grid, in a situation in which the virtual fluid substance encounters a dynamic virtual obstacle during the diffusion process.

10. A control device for virtual projectiles, wherein the device is A grid setting module used to set an effect grid within a first range centered on the explosion point of a thrown virtual projectile in response to the virtual projectile causing an explosion and releasing virtual fluid material in a virtual environment screen, wherein the effect grid is used to determine the diffusion direction of the virtual fluid material, the first range is larger than a second range, and the second range is used to indicate the diffusion range of the virtual fluid material, and A scanning module used to scan the effect grid within the first range and determine an effect grid that conforms to the correct diffusion conditions within the first range as a correct effect grid, A diffusion module is used to diffuse the virtual fluid material based on the valid effect grid on the surface of the virtual obstacle, in a situation where the virtual fluid material encounters a virtual obstacle during the diffusion process. A control device for a virtual projectile, wherein the legitimate diffusion condition includes at least one of the following: the effect grid is within the second range; the effect grid does not overlap with the virtual obstacle; and the effect grid is not being scanned.

11. A computer device comprising a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to realize the method for controlling a virtual projectile according to any one of claims 1 to 9.

12. A computer program executed by the processor of a computer device, which causes the computer device to execute the virtual projectile control method described in any one of claims 1 to 9.