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

By setting effect grids and diffusing virtual fluid materials based on valid grids, the method and device enhance the realism of virtual projectile effects in shooting games, improving user experience.

JP2025535754AActive Publication Date: 2025-10-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2025520948
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-12-07
Filing Date
2023-09-20
Publication Date
2025-10-28
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

Existing shooting games simulate virtual throwing objects with fixed special effects, resulting in unrealistic smoke scenes.

Method used

A method and device for controlling virtual projectiles that set an effect grid within a first range centered on the explosion point, traverse and determine valid diffusion grids, and diffuse virtual fluid material based on these grids when encountering obstacles, simulating realistic diffusion effects.

Benefits of technology

Simulates a more realistic diffusion effect of virtual fluid materials by changing direction when encountering obstacles, enhancing user experience in virtual environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025535754000001_ABST
    Figure 2025535754000001_ABST
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 priority to a Chinese patent application filed on December 7, 2022, bearing application number 202211567170.9 and entitled "Method, device, equipment, medium, and program product for controlling virtual projectiles," the entire contents of which are incorporated herein by reference.

[0002] TECHNICAL FIELD Embodiments of the present application relate to the field of human-computer interaction, and in particular to a method, apparatus, device, medium, and program product for controlling a virtual projectile. [Background technology]

[0003] Nowadays, the variety and ways to play shooting games are becoming increasingly diverse.

[0004] In the related technology, after starting a shooting game, a user can control a virtual object to use a virtual throwing object in a virtual environment, and then rely on the special effects generated by the virtual throwing object to perform the next action, for example, controlling a virtual object to throw a "virtual smoke grenade" in a virtual environment, and after the "virtual smoke grenade" generates smoke, the user can rely on the smoke to attack or escape.

[0005] However, in the above-mentioned related art, the special effect is displayed within a certain radius around the virtual throwing object, and the special effect remains unchanged, making the smoke scene simulated in this way unrealistic. Summary of the Invention [Problem to be solved by the invention]

[0006] The present application provides a method, device, equipment, medium, and program product for controlling a virtual throwing object. [Means for solving the problem]

[0007] According to one aspect of the present application, there is provided a method for controlling a virtual throwable object, the method being performed by a computing device, the method comprising: In response to the thrown virtual projectile causing an explosion and releasing a virtual fluid material in the virtual environment screen, setting an effect grid within a first range centered on the explosion point of the virtual projectile, the effect grid being used to determine the direction of diffusion of the virtual fluid material, 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; traversing the effect grids within the first range and determining effect grids within the first range that meet a valid diffusion condition as valid effect grids; and diffusing the virtual fluid material based on the legitimate effect grid on the surface of the virtual obstacle under a condition where the virtual fluid material encounters the virtual obstacle during the diffusion process; Here, the valid diffusion conditions include at least one of the effect grid being within the second range, the effect grid not overlapping with the virtual obstacle, and the effect grid not being traversed.

[0008] In some embodiments, an effect grid is set within a first range centered on an explosion point of the virtual projectile; traversing the effect grid within the first range and determining an effect grid within the first range that meets a valid diffusion condition as a valid effect grid; Based on the diffusion range of the virtual fluid material at the i-th time point, determine the quantity of the valid effect grid corresponding to the diffusion range at the i-th time point and a first position occupied by a dynamic virtual obstacle; determining an amount of the legal 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 point; Based on the number of the valid effect grids corresponding to the diffusion range of the virtual fluid material at the (i+1)th time point and the number of the valid effect grids occupied by the dynamic virtual obstacle at the second position, replenish the valid effect grids at the first position at the same rate, and diffuse the virtual fluid material based on the newly replenished valid effect grids; Here, the quantity of the corresponding valid effect grids within the diffusion range of the virtual fluid material varies with time in a normal distribution, and i is a positive integer.

[0009] According to one aspect of the present application, there is provided a control device for a virtual throwable object, the device comprising: a grid setting module configured to set an effect grid within a first range centered on an explosion point of the virtual projectile in response to the thrown virtual projectile causing an explosion and releasing a virtual fluid material in the virtual environment screen, the effect grid being configured to determine a direction of diffusion of the virtual fluid material, the first range being larger than a second range, and the second range being configured to indicate a diffusion range of the virtual fluid material; a traversal module used for traversing the effect grids within the first range and determining effect grids within the first range that meet a valid diffusion condition as valid effect grids; a diffusion module, which is used to diffuse the virtual fluid material according to the legitimate effect grid on the surface of the virtual obstacle when the virtual fluid material encounters the virtual obstacle during the diffusion process; Here, the valid diffusion conditions include at least one of the effect grid being within the second range, the effect grid not overlapping with the virtual obstacle, and the effect grid not being traversed.

[0010] According to another aspect of the present application, there is provided a computer device including 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 described in the above aspect.

[0011] According to another aspect of the present application, there is provided a computer-readable storage medium having stored therein at least one computer program, the at least one computer program being loaded and executed by a processor to realize the method for controlling a virtual projectile described in the above aspect.

[0012] According to another aspect of the present application, there is provided a computer program product, the computer program product including a computer program stored in a computer-readable storage medium, the computer program being read from the computer-readable storage medium and executed by a processor of a computing device, causing the computing device to perform the method for controlling a virtual projectile described in the aspect. [Effects of the Invention]

[0013] The beneficial effects of the technical solution provided by this application include at least the following: In response to a thrown virtual object causing an explosion and releasing a virtual fluid material in the virtual environment screen, the computer device sets an effect grid within a first range centered on the explosion point of the virtual object, traverses the effect grid within the first range, and determines an effect grid within the first range that meets a legal diffusion condition as a legal effect grid. When the virtual fluid material encounters a virtual obstacle during diffusion, the computer device diffuses the virtual fluid material based on the legal effect grid on the surface of the virtual obstacle. This application simulates a scene in which a real virtual fluid material changes direction when it encounters an obstacle by detecting a legal effect grid around the virtual obstacle and diffusing the virtual fluid material based on the legal effect grid around the virtual obstacle, thereby simulating a more realistic diffusion effect of the virtual fluid material using this method. [Brief explanation of the drawings]

[0014] [Figure 1] 1 is a schematic diagram of a method for controlling a virtual throwable object provided by one exemplary embodiment of the present application. [Figure 2] FIG. 2 is a schematic diagram of an application mode of a method for controlling a virtual projectile in a virtual scene provided by an exemplary embodiment of the present application; [Figure 3] FIG. 2 is a schematic diagram of an application mode of a method for controlling a virtual projectile in a virtual scene provided by an exemplary embodiment of the present application; [Figure 4] 1 is a structural block diagram of a computer system provided by one exemplary embodiment of the present application. [Figure 5] 1 is a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 6] 1 is a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 7] 1 is a schematic diagram of a throwing trajectory of a virtual throwing object provided by one exemplary embodiment of the present application; [Figure 8] FIG. 1 is a schematic diagram of setting an effect grid around a burst point provided by one exemplary embodiment of the present application; [Figure 9] FIG. 1 is a schematic diagram of traversing an effect grid provided by one exemplary embodiment of the present application. [Figure 10] FIG. 1 is a schematic diagram of traversing an effect grid provided by one exemplary embodiment of the present application. [Figure 11] FIG. 1 is a schematic diagram of a step-by-step traversal of an effect grid provided by one exemplary embodiment of the present application. [Figure 12] 1 is a schematic diagram of a virtual fluid material changing direction during a diffusion process provided by one exemplary embodiment of the present application. [Figure 13] FIG. 1 is a schematic diagram of determining a starting effect grid provided by one exemplary embodiment of the present application; [Figure 14] FIG. 1 is a schematic diagram of a rendering of a virtual fluid material provided by one exemplary embodiment of the present application. [Figure 15] FIG. 1 is a schematic diagram of a rendering of a virtual fluid material provided by one exemplary embodiment of the present application. [Figure 16] FIG. 1 is a schematic diagram of a rendering of a virtual fluid material provided by one exemplary embodiment of the present application. [Figure 17] 1 is a schematic diagram of a rendering result of a three-dimensional legal effect grid provided by one exemplary embodiment of the present application; [Figure 18] 1 is a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 19] 1 is a flowchart of a method for controlling a virtual projectile provided by one exemplary embodiment of the present application. [Figure 20] 1 is a structural schematic diagram of a control device for a virtual throwing object provided by an exemplary embodiment of the present application; [Figure 21] 1 is a structural block diagram of a computer device provided by one exemplary embodiment of the present application; DETAILED DESCRIPTION OF THE INVENTION

[0015] In order to make the objectives, technical solutions and advantages of the present application clearer, the following describes the embodiments of the present application in more detail in combination with the drawings.

[0016] First, relevant nouns and terms in the embodiments of the present application will be briefly introduced.

[0017] Virtual environment: A virtual environment displayed (or provided) when an application program runs on a terminal. The virtual environment may be a simulation of the real world, a semi-simulated, semi-fictional three-dimensional world, or even a purely fictional three-dimensional world. The virtual environment may be any one of a two-dimensional virtual environment, a two-and-a-half-dimensional virtual environment, and a three-dimensional virtual environment. Optionally, the virtual environment may further be used for a virtual environment battle between at least two virtual objects, and may have virtual resources available to the at least two virtual objects in the virtual environment. Optionally, the virtual environment includes symmetrical lower left and upper right corner regions, and virtual objects belonging to two opposing camps occupy one of the 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 character. Optionally, when the virtual environment is a three-dimensional virtual environment, the virtual object may be a three-dimensional virtual model, and each virtual object has its own shape and volume in the three-dimensional virtual environment and occupies a certain space in the three-dimensional virtual environment. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology, and the virtual object realizes different external images by wearing different skins. In some implementations, the virtual object may be realized using a 2.5D or 2D model, and the embodiments of the present application are not limited thereto.

[0019] Multiplayer online battle arena: A virtual environment in which at least two opposing virtual teams occupy different map areas and compete to achieve certain victory conditions. The victory conditions include, but are not limited to, capturing a base or destroying the opposing team's base, destroying the opposing team's virtual objects, ensuring one's own survival within a specified scene or time, capturing certain resources, and surpassing the opponent's score within a specified time. Battle arenas can be conducted in rounds, and the battle arena maps for each round can be the same or different. Each virtual team can contain one or more virtual objects, for example, one, two, three, or five.

[0020] In response to: Used to represent a condition or state on which an operation to be performed depends, and when the dependent condition or state is met, the operation or operations to be performed may be in real time or may have a set delay, and unless otherwise specified, there is no restriction on the order in which the operations to be performed are executed.

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

[0022] It is worth noting that the present application may display a prompt interface or pop-up window or output voice prompt information before and during the process of collecting user-related data. The prompt interface, pop-up window, or voice prompt information is used to prompt the user that relevant data is currently being collected. Therefore, the present application starts the relevant step of collecting user-related data only after the user issues a confirmation operation on the prompt interface or pop-up window. Otherwise (i.e., when the user does not issue a confirmation operation on the prompt interface or pop-up window), the relevant step of collecting user-related data is terminated, i.e., the user-related data is not collected. In other words, all user data collected in 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 relevant countries and regions. An embodiment of the present application provides a method for controlling a virtual projectile. FIG. 1 shows a schematic diagram of a method for controlling a virtual projectile provided by an exemplary embodiment of the present application. The method can be performed by a computing device, which may be a terminal or a server.

[0023] As shown in FIG. 1(a), a virtual environment screen 10 is displayed on the user interface, and the computer device displays a diffusing virtual fluid material 40 emitted from the virtual projectile 20 in response to the thrown virtual projectile 20 causing an explosion on the virtual environment screen 10. In response to the virtual fluid material 40 encountering a virtual obstacle 30 during the diffusion process, the computer device changes the diffusion direction of the virtual fluid material 40 based on the virtual obstacle 30.

[0024] Optionally, the virtual projectile 20 includes at least one of a virtual smoke bomb, a virtual burning bottle, and a virtual gas bottle, but is not limited thereto, and embodiments of the present application are not limited thereto.

[0025] For example, the throwing method of the virtual projectile 20 includes at least one of throwing the virtual projectile 20 upward, throwing it downward, and bouncing it off after hitting an obstacle, but the present application is not limited thereto, i.e., the virtual projectile 20 can be thrown by at least one of throwing it upward, throwing it downward, and bouncing it off an impact.

[0026] Optionally, throwing the virtual object 20 in an upward throwing manner refers to throwing the virtual object 20 upward, i.e., the initial throwing direction of the virtual object 20 is upward; throwing the virtual object 20 in a downward throwing manner refers to throwing the virtual object 20 downward, i.e., the initial throwing direction of the virtual object 20 is downward; and throwing the virtual object 20 in a rebound manner after hitting an obstacle refers to throwing the virtual object 20 toward an obstacle, i.e., the initial throwing direction of the virtual object 20 is toward the virtual object 20, and after hitting an obstacle, the virtual object 20 rebounds and changes direction.

[0027] The virtual fluid substance 40 refers to a virtual substance of fluid nature emitted from the virtual projectile 20. For example, in the case of a virtual smoke bomb, the virtual fluid substance 40 refers to the smoke emitted from the virtual smoke bomb.

[0028] Illustratively, under the circumstance that the virtual fluid material 40 encounters the virtual obstacle 30 in the diffusion process, the virtual fluid material 40 diffuses along the surface of the virtual obstacle 30 .

[0029] Illustratively, the computing device controls the attribute value of the virtual object in response to the virtual object entering the diffusion range of the virtual fluid substance 40 .

[0030] Optionally, the attribute value includes a life value and / or a skill value.

[0031] In response to the virtual object entering the diffusion range of the virtual fluid substance 40, the computing device reduces the life value and / or skill value of the virtual object.

[0032] For example, if the virtual fluid material 40 is a virtual methane bomb, after the virtual methane bomb explodes, it will release methane gas. If a virtual object enters the methane gas diffusion range, the life value and skill value of the virtual object will both decrease. If the life value of the virtual object is less than the life threshold, the virtual object will enter an unhealthy state. If the skill value of the virtual object is less than the skill threshold, the virtual object will be restricted from using the skill.

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

[0034] The computer device traverses the effect grids within the first range and determines the effect grids within the first range that meet the valid diffusion conditions as valid effect grids, and the computer device determines the diffusion direction of the virtual fluid substance 40 based on the valid effect grids.

[0035] The 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 30, and the effect grid is not traversed. Optionally, the valid diffusion conditions refer to simultaneously satisfying 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.

[0036] Illustratively, the computer device determines 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 meeting the valid diffusion conditions as the valid effect grid, and determines it as the next starting effect grid, and repeats the previous step until all the effect grids within the first range have been traversed.

[0037] Optionally, the effect grid on which the explosion point is located is set as the starting effect grid under the condition that the effect grid on which the explosion point is located is a valid effect grid.

[0038] Optionally, in a situation where the effect grid where the burst point is located is not a valid effect grid, an effect grid that meets the line detection condition within the first range is determined as the starting effect grid.

[0039] Here, the line detection conditions include 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 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 application, a computer device displays a virtual environment screen, in response to a thrown virtual object causing an explosion in the virtual environment screen, displays a diffusive virtual fluid material released from the virtual object, and in response to the virtual fluid material encountering a virtual obstacle during the diffusion process, changes the diffusion direction of the virtual fluid material based on the virtual obstacle. The present application simulates a scene in which a real virtual fluid material changes direction when encountering an obstacle by using the virtual obstacle to change the diffusion direction of the virtual fluid material, thereby simulating a more realistic diffusion effect of the virtual fluid material through the above method and improving the user experience.

[0041] The embodiments of the present application provide a method, device, equipment, medium, and program product for controlling a virtual object, which can realize the control of a virtual object in a virtual scene in a flexible and simple manner, and improve the efficiency of human-computer interaction and the user experience. To facilitate understanding of the method for controlling a virtual object in a virtual scene provided by the embodiments of the present application, an exemplary implementation scenario of the method for controlling a virtual object in a virtual scene provided by the embodiments of the present application will first be described. The virtual scene in the method for controlling a virtual object in a virtual scene provided by the embodiments of the present application may be output entirely based on a terminal device, or may be output in cooperation with a terminal device and a server.

[0042] In some embodiments, the virtual scene may be an environment in which virtual objects (e.g., a target virtual object) interact, for example, game characters may compete in the virtual scene, and both can interact in the virtual scene by controlling the actions of the game characters, thereby allowing the user to reduce stress in their life during the course of the game.

[0043] In one implementation scenario, FIG. 2 shows a schematic diagram of the application mode of the method for controlling a virtual projectile in a virtual scene provided by one exemplary embodiment of the present application, which applies to several application modes that can fully rely on the computing capabilities of the graphics processing hardware of the terminal device 400 to complete the calculation of related data for the virtual scene 100. For example, in a standalone / offline mode game, the output of the virtual scene is completed by various different types of terminal devices 400, such as smartphones, tablet PCs, and virtual reality / augmented reality devices.

[0044] By way of 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 required for display using graphics calculation hardware, and completes loading, analyzing, 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, presenting two-dimensional video frames on the display screen of a smartphone, or projecting video frames to achieve a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses. In addition, to enrich the sensory effects, the terminal device 400 can also form one or more of auditory perception, tactile perception, motion perception, and taste perception through different hardware.

[0046] For example, a client terminal 410 (e.g., a standalone game application) is running on the terminal device 400, and during the operation of the client terminal 410, a virtual scene including role-playing is output. The virtual scene may be an environment in which game characters interact, such as a plain, a street, or a mountain or valley where game characters compete against each other. For example, when displaying a virtual scene 100 from a third-person perspective, a master virtual object 101 is displayed in the virtual scene 100, and the master virtual object 101 is a game character controlled by a 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 (e.g., a touch-controlled screen, a voice-controlled switch, a keyboard, a mouse, a joystick, etc.), for example, when the real user moves the joystick (including a virtual joystick and a real joystick) to the right, the master virtual object 101 moves to the right in the virtual scene 100, and can further be held stationary, jump, and controlled to cause the master virtual object 101 to perform a shooting operation.

[0047] For example, a master virtual object 101 is displayed in a virtual scene 100. In response to a thrown virtual projectile 20 causing an explosion on the virtual environment screen 100, a diffusing virtual fluid material 40 is displayed from the virtual projectile 20. In response to the virtual fluid material 40 encountering a virtual obstacle 30 during the diffusion process, the diffusion direction of the virtual fluid material 40 is changed based on the virtual obstacle 30. The manner in which the virtual obstacle 30 changes the diffusion direction of the virtual fluid material 40 simulates a scene in which the real virtual fluid material 40 changes direction when encountering the virtual obstacle 30, thereby simulating a more realistic diffusion effect of the virtual fluid material 40 and improving the user experience.

[0048] In another implementation scenario, FIG. 3 shows a schematic diagram of an application mode of a method for controlling a virtual projectile in a virtual scene provided by an exemplary embodiment of the present application, which is applied to a terminal device 400 and a server 200, relies on the computing power of the server 200 to complete the calculation of the virtual scene, and outputs the virtual scene to the terminal device 400.

[0049] Taking the example of forming a visual perception of a virtual scene 100, 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 relies on graphics calculation hardware to complete the calculation, loading, analyzing, and rendering of the display data, and relies on graphics output hardware to output the virtual scene to form the visual perception, for example, presenting a two-dimensional video frame on the display screen of a smartphone, or projecting a video frame to achieve a three-dimensional display effect on the lenses of augmented reality / virtual reality glasses. As for perception in the form of a virtual scene, as can be understood, it can be output through the corresponding hardware of the terminal device 400, for example, forming an auditory perception using a microphone, forming a tactile perception using an oscillator, etc.

[0050] As an example, a client terminal 410 (e.g., a network version of a game application) is running on a terminal device 400, and game interactions with other users are performed by connecting to a server 200 (e.g., a game server). The terminal device 400 outputs a virtual scene 100 of the client terminal 410 and displays the virtual scene 100 from a third-person perspective. In this example, a master virtual object 101 is displayed in the virtual scene 100, and the master virtual object 101 may be a game character controlled by a 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 (e.g., a touch-controlled screen, a voice-controlled switch, a keyboard, a mouse, a joystick, etc.). For example, when the real user moves the joystick to the right, the master virtual object 101 moves to the right in the virtual scene 100, and can further be held still in place, jump, and controlled so that the master virtual object 101 performs shooting operations.

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

[0052] In some embodiments, the terminal device 400 can implement the method for controlling a partner object in a virtual scene provided by the embodiments of the present application by running a computer program. For example, the computer program may be a native program or software module in an operating system, a local (native) application program, i.e., a program that must be installed in an operating system to operate, such as a shooting game APP (i.e., the above-mentioned client terminal 410), or an applet, i.e., a program that can be downloaded to a browser environment and operated, or even a game applet that can be embedded in any APP. In summary, the computer program may be any type of application program, module, or plug-in component.

[0053] For example, assuming that the computer program is an application program, in actual implementation, an application program supporting a virtual scene is installed and running on the terminal device 400. The application program may be any one of a first-person shooter game (FPS), a third-person shooter game (TPS), a battle royale shooter game, a virtual reality (VR) application program, an augmented reality (AR) program, a 3D map program, a multiplayer online battle arena game (MOBA), and a simulation game (SLG). A user uses the terminal device 400 to manipulate virtual objects in the virtual scene to perform activities, including, but not limited to, at least one of body posture adjustment, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, throwing, and building a virtual building. Illustratively, the virtual object may be a virtual person, such as a simulated human character or an animated human character.

[0054] In some other embodiments, the embodiments of the present application may further be realized through 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 realize data calculation, storage, processing, and sharing.

[0055] Cloud technology is a collective term for network technology, information technology, integration technology, management platform technology, and application technology based on the application of cloud computing business models, forming a resource pool that can be used flexibly and conveniently according to needs. Cloud computing technology has become an important support. The background services of technical network systems require a large amount of computing and storage resources.

[0056] 3 may be an independent physical server, a server cluster or a distributed system configured with multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, 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, laptop, desktop computer, smart speaker, smart watch, etc. The terminal device 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, but this is not limited to the embodiments of the present application.

[0057] 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] A client terminal 111 supporting a virtual environment is installed and operated on the first terminal 110, and the client terminal 111 may be a multiplayer online battle program. When the first terminal 110 operates the client terminal 111, a 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 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 111 is used as an example for describing a shooting game.

[0059] The first terminal 110 is a terminal used by the first user 112. The first user 112 uses the first terminal 110 to control the activity of a first virtual object in a virtual environment or to manipulate a virtual item possessed by the first virtual object. The first virtual object may also be referred to as a virtual object of the first user 112. The first user 112 may perform operations such as assembling, removing, and uninstalling the virtual item possessed by the first virtual object, and the present application is not limited thereto. Typically, the first virtual object is a first virtual object, such as a simulated human character or an animated human character.

[0060] A client terminal 131 supporting a virtual environment is installed and operated on the second terminal 130, and the client terminal 131 may be a multiplayer online battle program. When the second terminal 130 operates the client terminal 131, a 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 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.

[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 a second virtual object in the virtual environment or to manipulate a virtual item held by the second virtual object, which may be referred to as a virtual object of the second user 113. Schematically, the second virtual object is a second virtual object, for example, a simulated human character or an animated human character.

[0062] The first virtual object and the second virtual object may optionally be in the same virtual environment, may optionally belong to the same camp, team, or organization, may have a friendship relationship, or may have temporary communication permissions, or may optionally belong to different camps, teams, or organizations, or may have an adversarial relationship.

[0063] Alternatively, 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 terminals on different operating system platforms (Android or IOS). The first terminal 110 may refer to one of multiple terminals, and the second terminal 130 may refer to another of the multiple terminals. This embodiment will be described using only the first terminal 110 and the second terminal 130 as an example. The first terminal 110 and the second terminal 130 may be the same or different device types, including at least one of a smartphone, a tablet PC, an e-reader, an MP3 player, an MP4 player, a laptop, and a desktop computer.

[0064] 4 shows only two terminals, 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 developers, and a client development and editing platform that supports a virtual environment may be installed on the other terminals 140. The developers may edit and update the client terminals on the other terminals 140, and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 may download the client installation package from the server 120 to update the client terminals.

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

[0066] The server 120 may include at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 may provide background services for client terminals supporting a 3D virtual environment. Alternatively, the server 120 may perform the main computational tasks, and the terminals may perform the secondary computational tasks. Alternatively, the server 120 and the terminals may perform the main computational tasks. Alternatively, a distributed computing architecture may be adopted to perform collaborative computing between the server 120 and the terminals.

[0067] In one exemplary example, the server 120 includes a processor 122, a user account database 123, a match 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 process data in the user account database 123 and the battle service module 124. The user account database 123 is used to store data of user accounts 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 battle, 3V3 battle, and 5V5 battle, etc. The user I / O interface 125 is used to establish communication and exchange data with the first terminal 110 and / or the second terminal 130 via a wireless network or a wired network.

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

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

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

[0071] The virtual environment is a virtual activity space provided by an application program running on a terminal, in which virtual objects perform various activities.

[0072] For example, the virtual environment is a two-dimensional screen displayed on a terminal, which is obtained by performing a screen capture of the three-dimensional virtual environment. For example, the shape of the virtual environment is determined based on the shape of the display screen of the terminal or the shape of the user interface of the terminal. For example, if the display screen of the terminal is rectangular, the virtual environment screen is also displayed as a rectangular screen.

[0073] The virtual object is a game character controlled by the terminal, which controls the virtual object to act in the virtual environment based on received user operations.

[0074] By way of example, the actions of a virtual object in a virtual environment include, but are not limited to, walking, running, jumping, climbing, crawling, attacking, using skills, picking up tools, and sending messages, and the embodiments of the present application are not limited thereto.

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

[0076] Optionally, the virtual throwable object may include at least one of a virtual smoke bomb, a virtual flaming bottle, and a virtual gas bottle, but is not limited thereto, and embodiments of the present application are not limited thereto.

[0077] The virtual fluid material refers to a virtual material with fluid properties emitted from a virtual projectile, and the virtual fluid material has diffusibility. For example, in the case of a virtual smoke bomb, the virtual fluid material refers to the smoke emitted from the virtual smoke bomb.

[0078] For example, the computer device sets an effect grid within a first range centered on the explosion point of the virtual projectile, 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.

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

[0080] For example, the throwing method of the virtual projectile includes at least one of throwing the virtual projectile upward, throwing it downward, and bouncing it off after hitting an obstacle, but the present application is not limited thereto, i.e., the virtual projectile can be thrown by at least one of throwing it upward, throwing it downward, and bouncing it off an impact.

[0081] Optionally, throwing the virtual object in an upward throwing manner refers to throwing the virtual object upward, i.e., the initial throwing direction of the virtual object is upward; throwing the virtual object in a downward throwing manner refers to throwing the virtual object downward, i.e., the initial throwing direction of the virtual object is downward; and throwing the virtual object in a rebound manner after hitting an obstacle refers to throwing the virtual object toward the obstacle, i.e., the initial throwing direction of the virtual object is toward the virtual object, and after hitting an obstacle, the virtual object rebounds and changes direction.

[0082] Illustratively, the computing device traverses the effect grids within the first range and determines the effect grids within the first range that meet the legal diffusion conditions as legal effect grids.

[0083] The 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 a virtual obstacle, and the effect grid is not traversed. Optionally, the valid diffusion conditions refer to simultaneously satisfying 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.

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

[0085] Illustratively, the computer device changes the diffusion direction of the virtual fluid material based on the virtual obstacle in response to the virtual fluid material encountering a virtual obstacle during the diffusion process.

[0086] For example, taking a virtual smoke grenade as an example, after the virtual smoke grenade releases smoke, the smoke spreads around, and if it encounters a wall while spreading, the wall will change the direction of the smoke spreading, and the smoke will spread along the direction of the wall.

[0087] Illustratively, in a situation where the virtual fluid material encounters a virtual obstacle during the diffusion process, the computer device diffuses the virtual fluid material based on a legitimate effect grid on the surface of the virtual obstacle.

[0088] As described above, in a method provided by an embodiment of the present application, a computer device responds to a thrown virtual object causing an explosion and releasing a virtual fluid material in a virtual environment screen by setting an effect grid within a first range centered on the explosion point of the virtual object, traversing the effect grid within the first range, and determining an effect grid within the first range that meets a legal diffusion condition as a legal effect grid. When the virtual fluid material encounters a virtual obstacle during diffusion, the virtual fluid material is diffused based on the legal effect grid on the surface of the virtual obstacle. By detecting the legal effect grid around the virtual obstacle and diffusing the virtual fluid material based on the legal effect grid around the virtual obstacle, the present application simulates a scene in which a real virtual fluid material changes direction when encountering an obstacle, thereby simulating a more realistic diffusion effect of the virtual fluid material using the above method.

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

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

[0091] The virtual environment is a virtual activity space provided by an application program running on a terminal, in which virtual objects perform various activities.

[0092] Illustratively, the location at which the virtual object is placed in the virtual environment may correspond to a center location in the map display control component or may be another location in the map display control component, i.e., the location at which the virtual object is placed in the virtual environment may correspond to a center of the map display control component or may correspond to another location in the map display control component.

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

[0094] Optionally, the virtual throwable object may include at least one of a virtual smoke bomb, a virtual flaming bottle, and a virtual gas bottle, but is not limited thereto, and embodiments of the present application are not limited thereto.

[0095] The virtual fluid material refers to a virtual material with fluid properties emitted from a virtual projectile, and the virtual fluid material has diffusibility. For example, in the case of a virtual smoke bomb, the virtual fluid material refers to the smoke emitted from the virtual smoke bomb.

[0096] For example, the throwing method of the virtual projectile includes at least one of throwing the virtual projectile upward, throwing it downward, and bouncing it off after hitting an obstacle, but the present application is not limited thereto, i.e., the virtual projectile can be thrown by at least one of throwing it upward, throwing it downward, and bouncing it off an impact.

[0097] 7, the initial position information of the virtual object is P0, the throwing speed is V0, and the computer device calculates the throwing trajectory of the virtual object using a parabolic algorithm, and obtains the recoil point and the final explosion point based on the throwing trajectory. Here, n sample points can be selected from the throwing trajectory, where n is an integer greater than 1, and the position information of the sample points can be calculated and obtained using the following formula:

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

number

[0099] Step 604: The effect grid where the explosion point is located is set as the starting effect grid, and the effect grids within the first range are traversed to determine the effect grids within the first range that meet the valid diffusion conditions as valid effect grids.

[0100] Illustratively, the computer device determines 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 meeting the valid diffusion conditions as the valid effect grid, and determines it as the next starting effect grid, and repeats the previous step until all the effect grids within the first range have been traversed.

[0101] 8, for example, a virtual environment screen 801 is displayed on the user interface, and in response to a thrown virtual projectile 802 causing an explosion on the virtual environment screen 801, the computer device sets an effect grid centered on the explosion point of the virtual projectile 802 and within a first range centered on the explosion point. The first range is a preset range centered on the explosion point of the virtual projectile.

[0102] Optionally, the shape of the first region may be at least one of a rectangular parallelepiped, a cubic, a ring, a sphere, and a cylinder, but is not limited thereto, and the examples of the present application do not specifically limit this.

[0103] For example, as shown in the schematic diagram of traversing an effect grid in FIG. 9, taking a 6*6 two-dimensional effect grid as an example, the first effect grid in the upper left corner in FIG. 9 is set as the start effect grid 901, and the effect grids adjacent to the start effect grid 901 are traversed starting from the start effect grid 901. Specifically, this includes traversing the effect grid 902 adjacent to the start effect grid 901 in the horizontal direction and traversing the effect grid 904 adjacent to the start effect grid 901 in the vertical direction. Assuming that the effect grid 902 meets the valid diffusion conditions, the effect grid 902 that meets the valid diffusion conditions among the effect grids adjacent to the start effect grid 901 is determined as the valid effect grid, and the effect grid 902 adjacent to the start effect grid 901 is determined as the valid effect grid. The adjacent and already determined valid effect grid 902 is also taken as the new start effect grid 902, and the effect grids adjacent to the new start effect grid 902 are continued to be traversed, specifically including traversing the effect grid 905 adjacent to the new start effect grid 902 in the horizontal direction (the effect grid 901 adjacent to the new start effect grid 902 has already been traversed, so there is no need to traverse it again), and traversing the effect grid 906 adjacent to the new start effect grid 902 in the vertical direction, and repeating the above steps until there are no more valid effect grids, or until the edge effect grid 903 has been traversed, or until all effect grids have been traversed.

[0104] In some embodiments, as shown in FIG. 10 , a 9*7 two-dimensional effect grid is used as the effect grid 1001 within the first range, and the box in FIG. 10 is used to represent the virtual obstacle 1002. The effect grid in the fourth row and fifth column is used as the center grid, i.e., the explosion point of the virtual projectile is used as the center grid. Initially, the distance values ​​of the intermediate grids are set to 0, and the distances between the other effect grids and the center grid are set to 1000 by default. The effect grid 1001 within the first range is traversed, starting from the center grid, and the Manhattan distances between the center grid and adjacent effect grids 1001 are calculated. That is, the effect grid 1001 adjacent to the center grid is traversed. If the effect grid 1001 is within the second range, does not overlap with the virtual obstacle 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 previously determined legal effect grid adjacent to the center grid is taken as the new center grid, and the effect grids 1001 adjacent to the new center grid are traversed, and the above steps are repeated until no legal effect grids remain. As shown in Figure 10, for the first shaded effect grid 1003 in the upper right corner, if the first shaded effect grid 1003 is blocked by a virtual obstacle 1002, causing the first shaded effect grid 1003 to be unable to be traversed, the first shaded effect grid 1003 is determined to be an illegal effect grid, and its distance is still 1000 by default.As shown in FIG. 10, for the second shading effect grid 1004 in the lower left corner, since the effect grid 1001 is not within the second range, the second shading 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 distance corresponding to the second shading effect grid 1004 is 7 and 8, therefore, the second shading effect grid 1004 in the lower left corner is an invalid effect grid.

[0105] To understand the process of traversing the effect grid in more detail, Figure 11 shows a schematic diagram of traversing the effect grid step by step. A 5*5 two-dimensional effect grid is defined as the effect grid 1101 within the first range, and the shaded effect grid in Figure 11 is used to represent the invalid effect grid 1102. The effect grid 1101 in the third row and third column is defined as the center grid, and this center grid is the explosion point of the virtual projectile. In the initial situation, as shown in Figure 11 (a), the distance value of the intermediate grid is set to 0, and the distance between the 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 (b) of Figure 11, the center grid is used as the starting point and the Manhattan distance between the center grid and the effect grid 1101 adjacent to it is calculated. That is, the effect grids 1101 adjacent to the center grid in four directions are traversed, and since the effect grids 1101 adjacent to the center grid in four directions are within the second range, do not overlap with virtual obstacles, and have not been traversed, the effect grid 1101 is determined to be a valid effect grid, and its distance value is incremented by 1.

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

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

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

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

[0110] The above steps are repeated until there are no new valid effect grids or until all effect grids within the first range have been traversed.

[0111] It should be noted that in the above grid traversal process, a valid effect grid is identified by marking the distance between the effect grid and the center grid, and the effect grid is determined as valid when the distance value is less than 1000. In one possible implementation, a "empty mark" method can be adopted to mark valid effect grids, that is, valid effect grids are marked as "empty" and invalid effect grids are marked as "solid", and whether the effect grid is valid is determined by recognizing the mark of the effect grid.

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

[0113] Illustratively, the computer device changes the diffusion direction of the virtual fluid material based on the virtual obstacle in response to the virtual fluid material encountering a virtual obstacle during the diffusion process.

[0114] For example, taking a virtual smoke grenade as an example, after the virtual smoke grenade releases smoke, the smoke spreads around, and if it encounters a wall while spreading, the wall will change the direction of the smoke spreading, and the smoke will spread along the direction of the wall.

[0115] For example, the computer device sets an effect grid within a first range centered on the explosion point of the virtual projectile, 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 computer device traverses the effect grid within the first range and determines an effect grid within the first range that meets the valid diffusion conditions as a valid effect grid, and when the virtual fluid material encounters a virtual obstacle during the diffusion process, the virtual fluid material is diffused based on the valid effect grid on the surface of the virtual obstacle.

[0116] The 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 a virtual obstacle, and the effect grid is not traversed. Optionally, the valid diffusion conditions refer to simultaneously satisfying 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.

[0117] For example, Fig. 12 shows a schematic diagram of a virtual fluid material changing direction during diffusion. Fig. 12 shows an effect diagram of a virtual fluid material 1202 diffusing through a virtual obstacle 1203. The dashed box in Fig. 12 represents a valid effect grid 1201, and the solid box represents the virtual obstacle 1203. As shown in Fig. 12, if the virtual fluid material 1202 is smoke, for example, the smoke will diffuse along the virtual obstacle 1203 to another side of the virtual obstacle 1203, rather than diffusing directly through the wall. This diffusion method is more suitable for representing the real world.

[0118] In one possible implementation, the effect grid on which the burst point is located is the starting effect grid, provided that the effect grid on which the burst point is located is a valid effect grid.

[0119] The start effect grid refers to an effect grid that starts from the effect grid and traverses other effect grids, i.e., the start effect grid is used as the start point for traversing other effect grids.

[0120] In one possible implementation, under the circumstance that the effect grid where the explosion point is located is not a valid effect grid, an effect grid that meets the straight line detection condition within the first range is determined as the starting effect grid.

[0121] The line detection conditions include 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 the effect grid to be detected does not overlap with a virtual obstacle.

[0122] For example, FIG. 13 shows a schematic diagram for determining a starting effect grid. If the effect grid where the explosion point is located is not a valid effect grid, the effect grid cannot be selected as the starting effect grid, and another effect grid must be selected as the starting effect grid. The box in FIG. 13 represents 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 (a) of FIG. 13, the virtual obstacle 1301 and the effect grid where the explosion point is located overlap, and therefore the effect grid cannot be selected as the starting effect grid. Using the shaded effect grid as the center, a straight line is connected 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 selected as the starting effect grid. Because effect grid No. 3 is blocked by virtual obstacle 1301, a straight line cannot be established between effect grid No. 3 and the shaded effect grid, and therefore effect grid No. 3 cannot be used as the starting effect grid. However, a straight line can be established between effect grid No. 4 and the shaded effect grid, and effect grid No. 4 does not overlap with virtual obstacle 1301, and therefore effect grid No. 4 is determined to be the new starting effect grid.

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

[0124] In a method provided by an embodiment of the present application, an effect grid is set within a first range centered on the explosion point of the virtual projectile, and an effect grid within the first range that meets the valid diffusion conditions is determined as the valid effect grid by traversing the effect grid within the first range. When a virtual obstacle is encountered during the diffusion process of the virtual fluid material, the virtual fluid material is diffused based on the valid effect grid on the surface of the virtual obstacle. The present application achieves the validity of the effect grid traversal by calculating the distance between the effect grids, thereby determining the diffusion direction of the virtual fluid material, reducing the amount of calculation, reducing the requirements for hardware devices, and improving the efficiency of human-computer interaction.

[0125] In one possible implementation, the computing device controls an attribute value of the virtual object in response to the virtual object entering a diffusion range of the virtual fluid substance.

[0126] Optionally, the attribute value includes a life value and / or a skill value.

[0127] Illustratively, the computing device may reduce a life value and / or a skill value of the virtual object in response to the virtual object entering a range of the virtual fluid substance spread.

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

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

[0130] For example, if the virtual fluid substance is a virtual methane bomb, after the virtual methane bomb explodes, it will release methane gas. If a virtual object is within the methane gas diffusion range, the life value and skill value of the virtual object will both decrease. If the life value of the virtual object is less than the life threshold, the virtual object will enter an unhealthy state. If the skill value of the virtual object is less than the skill threshold, the virtual object will be restricted from using the skill.

[0131] Illustratively, the computing device may, in response to the virtual object accelerating and moving within the diffusion range of the virtual fluid substance at a first acceleration, reduce a life value and / or a skill value of the virtual object at a first reduction rate; Here, the first decrease rate has a positive correlation with the speed of the virtual object.

[0132] For example, if the virtual fluid substance is a virtual methane bomb, after the virtual methane bomb explodes, it will release methane gas. When a virtual object enters the methane gas diffusion range, the life value and skill value of the virtual object will both decrease, and the faster the virtual object's movement speed, the faster the life value and skill value of the virtual object will decrease. When the life value of the virtual object is lower than the life threshold, the virtual object will enter an unhealthy state. When the skill value of the virtual object is lower than the skill threshold, the virtual object will be restricted from using the skill.

[0133] In a method provided by an embodiment of the present application, when a virtual object enters the diffusion range of a virtual fluid material, the life value and / or skill value of the virtual object is reduced, and whether the virtual object is affected by the virtual fluid material is determined based on the distance between the effect grid on which the virtual object is located and the effect grid on which the explosion point is located. When the virtual object is affected by the virtual fluid material, the life value and / or skill value of the virtual object is dynamically affected according to changes in the movement speed of the virtual object. By calculating the distance between the effect grid on which the virtual object is located and the effect grid on which the explosion point is located, the present application quickly determines whether the virtual object is affected and the manner of the impact, providing a new determination method, reducing the amount of calculation, reducing the requirements for hardware devices, and improving the efficiency of human-computer interaction.

[0134] In one possible implementation, the computing device displays the gradiently varying virtual fluid material with different transparencies in response to the virtual fluid material diffusing within the second range.

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

[0136] Here, the distance between the effect grid where the virtual fluid material is currently 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 virtual fluid material is currently located. For example, in the diffusion range of the virtual fluid material, the farther 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] In the method provided by the embodiment of the present application, when the virtual fluid material diffuses within the second range, the virtual fluid material is displayed with different gradient-changing transparency levels. The present application calculates the distance between the effect grid where the current position is located and the effect grid where the explosion point is located to quickly determine the transparency level corresponding to the effect grid where the current position is located. This provides a new calculation method that can quickly calculate and obtain the transparency levels corresponding to different positions, reducing the amount of calculation, reducing the requirements for hardware devices, and improving the efficiency of human-computer interaction.

[0138] In one possible implementation, the computer device changes the diffusion direction of the virtual fluid material based on the dynamic virtual obstacle in response to the virtual fluid material encountering the dynamic virtual obstacle during the diffusion process.

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

[0140] Here, the quantity of the corresponding valid effect grids within the diffusion range of the virtual fluid substance varies with time in a normal distribution.

[0141] For example, at a first time point, the computer device determines that the number of corresponding legal effect grids in the diffusion range of the virtual fluid material is 100 and the first position occupied by the virtual automobile; if at the first time point, the number of corresponding legal effect grids in the diffusion range of the virtual fluid material is 80, and in response to the virtual automobile moving to the second position at a second time point, the virtual automobile occupies 20 legal effect grids at the second position, the computer device replenishes 16 legal effect grids at the first position and diffuses the virtual fluid material based on the newly replenished legal effect grids, thereby obtaining a more realistic diffusion effect of the virtual fluid material and improving the user experience.

[0142] In one possible implementation, the computer device sets an effect grid within a first range centered on the explosion point of the virtual projectile, traverses the effect grid within the first range according to a preset frequency, refreshes the legal effect grid that meets the legal diffusion conditions within the first range, and determines the diffusion direction of the virtual fluid material based on the refreshed legal effect grid under circumstances where the virtual fluid material encounters a dynamic virtual obstacle during the diffusion process.

[0143] In a method provided by an embodiment of the present application, a computer device changes the diffusion direction of the virtual fluid material based on the dynamic virtual obstacle in response to the virtual fluid material encountering the dynamic virtual obstacle during the diffusion process. The present application calculates the number of corresponding legal effect grids at time i and the first position occupied by the dynamic virtual obstacle, as well as the number of legal effect grids corresponding to the diffusion range at time i+1 and the number of legal effect grids occupied by the dynamic virtual obstacle at the second position, thereby replenishing the legal effect grids at the same rate behind the dynamic virtual obstacle during the movement of the dynamic virtual obstacle, thereby simulating a more realistic diffusion effect of the virtual fluid material through the above method and improving the user experience.

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

[0145] For example, the obtained valid effect grid can be used not only to determine the diffusion direction of the virtual fluid material but also to render the virtual fluid material, as shown in the schematic diagram of rendering the virtual fluid material in Figure 14. As shown in Figure 14(a), 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 set as the starting effect grid, the effect grid adjacent to the starting effect grid is traversed, and the effect grid adjacent to the starting effect grid that meets the valid diffusion conditions is determined as the valid effect grid and the next starting effect grid is determined, and the previous step is repeated until all effect grids within the first range have been traversed, and the virtual fluid material is diffused based on the valid effect grid.

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

[0147] As shown in (a) of Figure 15, after rendering the correct grid, the texture format in the rendering is set by adopting a linear interpolation sampling method to obtain smoother edges. Since transparency becomes more transparent as the distance increases, after calculating the color value, the original color value is subtracted from 1 to obtain the opposite color, i.e., transparency, as shown in (b) of Figure 15.

[0148] For example, a computer device can generate sampling UV coordinates using the center position, length, and width of the virtual fluid material's world coordinates. Then, the UV coordinates can be used to perform texture sampling to obtain transparency, which can then be multiplied by the transparency corresponding to the valid effect grid to achieve the final rendering effect. However, because the rendering range of the virtual fluid material is larger than the second range, overflow at the edges of the virtual fluid material can easily cause inaccurate results. Therefore, a black edge is added based on the existing mask image (i.e., based on the valid effect grid), thereby achieving a relatively good softening effect, as shown in Figure 16(a). When the virtual fluid material encounters a virtual obstacle, an unnecessary black area is added to the right side, as shown in the right area of ​​Figure 16(b). To save internal memory, the minimum and maximum values ​​of the area coordinates can be additionally recorded when generating the effect grid. Finally, their average value is the new center grid, and their difference is the size of the new virtual fluid material area. Finally, based on the new center grid and the size of the new virtual fluid material region, the right region is cropped, thereby obtaining a new rendering image.

[0149] For example, the above embodiments all render virtual fluid material based on two dimensions, and the method can also be applied to rendering a valid effect grid in three dimensions. The rendering result of the valid effect grid in three dimensions is shown in Figure 17. As shown in Figure 17(a), the virtual fluid material 1701 is obstructed at the corners formed by virtual obstacles during the diffusion process. As shown in Figure 17(b), the virtual fluid material 1701 is obstructed at the left wall during the diffusion process.

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

[0151] Step 1801: Emit a virtual fluid substance.

[0152] Illustratively, the computing device displays a virtual fluid substance ejected from the virtual projectile in response to the thrown virtual projectile causing an explosion in the virtual environment screen.

[0153] Optionally, the virtual throwable object may include at least one of a virtual smoke bomb, a virtual flaming bottle, and a virtual gas bottle, but is not limited thereto, and embodiments of the present application are not limited thereto.

[0154] The virtual fluid material refers to a virtual material with fluid properties emitted from a virtual projectile, and the virtual fluid material has diffusibility. For example, in the case of a virtual smoke bomb, the virtual fluid material refers to the smoke emitted from the virtual smoke bomb.

[0155] Step 1802: Set the effect grid.

[0156] For example, the computer device sets an effect grid within a first range centered on the explosion point of the virtual projectile, 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 the computer device traverses the effect grid within the first range and determines the effect grid within the first range that meets the valid diffusion conditions as the valid effect grid.

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

[0158] Illustratively, the computer device 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 to affect the virtual object based on the distance information.

[0160] Illustratively, the computing device determines whether the virtual object is affected based on a distance value between an effect grid where the virtual object is located and an effect grid where the explosion point is located.

[0161] Step 1805: A mask image is generated based on the distance information.

[0162] Illustratively, the computer device determines a valid effect grid based on distance information between the effect grid and the effect grid at the position where the explosion point is located, and generates a mask image based on the valid effect grid.

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

[0164] Illustratively, the computer device performs rendering based on the mask image, thereby obtaining an effect image of the diffusion of the virtual fluid substance.

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

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

[0167] Illustratively, the computing device displays a virtual fluid substance ejected from the virtual projectile in response to the thrown virtual projectile causing an explosion in the virtual environment screen.

[0168] Optionally, the virtual fluid material is at least one of a gas, a liquid, and a non-Newtonian fluid, but is not limited thereto, and the embodiments of the present application are not specifically limited thereto.

[0169] For example, the computer device sets an effect grid within a first range centered on the explosion point of the virtual projectile, 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 the computer device traverses the effect grid within the first range and determines the effect grid within the first range that meets the valid diffusion conditions as the valid effect grid.

[0170] Step 1902: Based on the current effect grid, the surrounding grid is determined.

[0171] Illustratively, the computer device sets the effect grid where the explosion point is located as a starting effect grid, and traverses the effect grids adjacent to the starting effect grid.

[0172] Step 1903: Whether it is in the second range.

[0173] Illustratively, the computing device determines whether the effect grid is within a second range of the virtual projectile, and executes step 1904 when the effect grid is within the second range of the virtual projectile, and executes step 1906 when the effect grid is not within the second range of the virtual projectile.

[0174] Step 1904: Whether or not it overlaps with a virtual obstacle.

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

[0176] Step 1905: Traversed or not.

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

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

[0179] Step 1907: Mark as traversed and calculate distance.

[0180] Illustratively, when the effect grid is within the second range of the virtual projectile, the virtual projectile does not overlap with the virtual obstacle, and the virtual projectile has not been traversed, the effect grid is marked as traversed, and the distance between the effect grid and the center grid is calculated.

[0181] Step 1908: A new starting effect grid is determined.

[0182] Illustratively, the effect grid is determined to be a valid effect grid based on the distance between the effect grid and the center grid, and is determined as a new starting effect grid, and the above steps are repeated until there are no new valid effect grids within the first range or all effect grids within the first range have been traversed.

[0183] Next, a virtual throwing object control device provided by the embodiment of the present application will be described.

[0184] 20 shows a structural diagram of a virtual throwing object control device provided by one exemplary embodiment of the present application. The device can be realized as a whole or part of a computer device by software, hardware, or a combination of both, and the device can: a grid setting module 2001, which is used to set 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 a virtual fluid material in the virtual environment screen, the effect grid being used to determine the diffusion direction of the virtual fluid material, 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; a traversal module 2002 used for traversing the effect grids within the first range and determining the effect grids within the first range that meet a valid diffusion condition as valid effect grids; a diffusion module 2003, which is used to diffuse the virtual fluid material based on the legitimate effect grid on the surface of the virtual obstacle when the virtual fluid material encounters the virtual obstacle during the diffusion process.

[0185] Here, the 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 traversal module 2002 is used to determine the effect grid where the explosion point is located as a starting effect grid, and the starting effect grid is used as a starting point for traversing other effect grids; traverse the effect grids adjacent to the starting effect grid, and determine the effect grid adjacent to the starting effect grid and meeting the valid diffusion conditions as a valid effect grid and as the next starting effect grid; and repeat the previous step until all the effect grids in the first range have been traversed.

[0187] In one possible implementation, the traverse module 2002 is used to set the effect grid on which the burst point is located as the starting effect grid when the effect grid on which the burst point is located is the valid effect grid.

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

[0189] Here, the line detection conditions include that the effect grid to be detected and the effect grid where the explosion point is located are connected by a straight line, and 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 distance between the effect grid on which the virtual object is located and the effect grid on which the explosion point is located being smaller than the maximum distance value of the second range.

[0192] In one possible implementation, the attribute value includes a life value and / or a skill value, and the calculation module 2004 is used to reduce the life value and / or the skill value of the virtual object in response to a distance between an effect grid on which the virtual object is located and an effect grid on which the explosion point is located being smaller than a 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 calculation module 2004 is used to determine the transparency of the virtual fluid material corresponding to the effect grid where the explosion point is currently located based on the distance between the effect grid where the explosion point is currently located and the effect grid where the explosion point is located.

[0195] Here, the distance between the effect grid where the currently positioned effect point 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 currently positioned effect point 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 form, the traverse module 2002 is used to traverse the effect grid within the first range, determine the effect grid within the first range that meets the valid diffusion conditions as the valid effect grid, determine the number of valid effect grids corresponding to the diffusion range at the i-th time point based on the diffusion range of the virtual fluid material at the i-th time point, and a first position occupied by the dynamic virtual obstacle, 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 the i+1-th time point.

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

[0199] Here, the quantity of the corresponding valid effect grids within the diffusion range of the virtual fluid material varies with time in a normal distribution, and i is a positive integer.

[0200] 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, a tablet PC, an MP3 player (Moving Picture Experts Group Audio Layer III), and an MP4 (Moving Picture Experts Group Audio Layer IV) player. The computer device 2100 may also be called a user device, a portable terminal, or other names.

[0201] Typically, the computing device 2100 includes a processor 2101 and a memory 2102 .

[0202] The processor 2101 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 2101 may be implemented using at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 2101 may include a main processor and a coprocessor. The main processor is a processor used to process data in a wake state and is also called a CPU (Central Processing Unit). The coprocessor is a low-power processor used to process data in a standby state. In some embodiments, the processor 2101 may be integrated with a GPU (Graphics Processing Unit), which 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, which is 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 and non-transitory. 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-transitory computer-readable storage media in the memory 2102 may be used to store at least one instruction that, when executed by the processor 2101, may implement the method for controlling a virtual projectile provided in the embodiments of the present application.

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

[0205] The peripheral interface 2103 can be used to connect at least one peripheral associated with I / O (Input / Output) to the processor 2101 and the memory 2102. In some embodiments, the processor 2101, the memory 2102, and the peripheral interface 2103 are integrated on the same chip or circuit board, and in some other embodiments, any one or two of the processor 2101, the memory 2102, and the peripheral 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 via electromagnetic signals. The radio frequency circuit 2104 converts electrical signals into electromagnetic signals for transmission, 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, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like. The radio frequency circuit 2104 can communicate with other terminals via at least one wireless communication protocol, including, but not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or wireless fidelity (WiFi) networks. In some embodiments, the radio frequency circuitry 2104 may further include circuitry related to Near Field Communication (NFC), although the present application is not limited in this regard.

[0207] The touch display screen 2105 is used to display a user interface (UI). The UI may include graphics, text, icons, video, and any combination thereof. The touch display screen 2105 is also capable of collecting touch signals on or above the surface of the touch display screen 2105. The touch signals may be input to the processor 2101 as control signals for processing. The touch display screen 2105 may be used to provide software buttons and / or virtual buttons, also called a software keyboard, and / or a virtual keyboard. In some embodiments, there may be one touch display screen 2105 located on the front panel of the computing device 2100. In other embodiments, there may be at least two touch display screens 2105 located on different surfaces of the computing device 2100 or designed to be foldable. In some embodiments, the touch display screen 2105 may be a flexible display screen located on a curved or foldable surface of the computing device 2100. Furthermore, the touch display screen 2105 may also 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 of which is a main camera, a depth-of-field camera, and a wide-angle camera. The main camera and the depth-of-field camera are combined to realize a background blur function, and the main camera and the wide-angle camera are combined to realize panoramic photography and virtual reality (VR) photography functions. In some embodiments, the camera component 2106 may further include a flash lamp. The flash lamp may be a single-color temperature flash lamp or a dual-color temperature flash lamp. A dual-color temperature flash lamp refers to a combination of a warm-light flash lamp and a cool-light flash lamp, and can be used to compensate for light beams under different color temperatures.

[0209] The audio circuit 2107 is used to provide an audio interface between the user and the computer device 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 and convert the sound waves into electrical signals that are input to the processor 2101 for processing or to the radio frequency circuit 2104 for voice communication. For the purpose of stereophonic collection or noise reduction, multiple microphones may be installed at different locations on the computer device 2100. The microphone may also be an array microphone or an omnidirectional collecting 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 humans can hear, but also convert electrical signals into sound waves that humans cannot hear for purposes such as distance measurement. In some embodiments, the audio circuitry 2107 may further include a headphone jack.

[0210] The power source 2108 is used to power each component in the computing device 2100. The power source 2108 may be AC, DC, a disposable battery, or a rechargeable battery. When the power source 2108 includes a rechargeable battery, the rechargeable battery may be a wired or wirelessly rechargeable battery. A wired rechargeable battery is a battery that is recharged via a wired line, and a wirelessly rechargeable battery is a battery that is recharged via a wireless coil. The rechargeable battery may also be used to support fast charging technology.

[0211] In some embodiments, the computing device 2100 further includes one or more sensors 2109, including, but not limited to, an acceleration sensor 2110, a gyro sensor 2111, a pressure sensor 2112, an optical sensor 2113, and a proximity sensor 2114.

[0212] As will be appreciated by those skilled in the art, the structure shown in FIG. 21 is not intended to limit the computing device 2100, which may include more or fewer components than those shown, or may combine certain components, or may employ different components in different configurations.

[0213] The embodiments of the present application further provide a computer device, which includes a processor and a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by the processor to realize the virtual projectile control method provided by the embodiments of the above methods.

[0214] The embodiments of the present application further provide a computer-readable storage medium having at least one computer program stored therein, which is loaded and executed by a processor to realize the virtual projectile control method provided by the embodiments of the above methods.

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

[0216] As should be understood, "plurality" as referred to herein refers to two or more than two. "And / or" describes a relationship between related objects and indicates that three types of relationships can exist, for example, A and / or B can indicate three situations: A exists alone, A and B exist together, and B exists alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship.

[0217] As can be understood by those skilled in the art, the realization of all or part of the steps in the above embodiments may be completed by hardware, or may be completed by issuing instructions to related hardware by a program, and the above program may be stored in a kind of computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.

[0218] The above are merely selectable examples of the present application and are not used to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included within the scope of protection of the present application.

Claims

1. 1. A method for controlling a virtual projectile, the method being performed by a computing device, the method comprising: In response to the thrown virtual projectile causing an explosion and releasing a virtual fluid material in the virtual environment screen, setting an effect grid within a first range centered on the explosion point of the virtual projectile, the effect grid being used to determine the direction of diffusion of the virtual fluid material, 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; traversing the effect grids within the first range and determining effect grids within the first range that meet a valid diffusion condition as valid effect grids; and diffusing the virtual fluid material based on the legitimate effect grid on the surface of the virtual obstacle under a condition where the virtual fluid material encounters the virtual obstacle during the diffusion process; The method for controlling a virtual projectile, wherein the valid diffusion condition includes at least one of the effect grid being within the second range, the effect grid not overlapping with the virtual obstacle, and the effect grid not being traversed.

2. The step of traversing the effect grids within the first range and determining the effect grids within the first range that meet a valid diffusion condition as valid effect grids includes: a step of setting the effect grid where the burst point is located as a starting effect grid, the starting effect grid being used as a starting point for traversing other effect grids; a step of traversing the effect grids adjacent to the starting effect grid, and determining an effect grid adjacent to the starting effect grid and satisfying the valid diffusion condition as the valid effect grid, and determining the effect grid as a next starting effect grid; and c) repeatedly performing the previous step until all of the effect grids within the first range have been traversed.

3. The step of setting the effect grid where the explosion point is located as the starting effect grid includes:

3. The method of claim 2, further comprising the step of: under the circumstance that the effect grid on which the explosion point is located is the valid effect grid, setting the effect grid on which the explosion point is located as the starting effect grid.

4. The step of setting the effect grid where the explosion point is located as the starting effect grid includes: determining an effect grid that satisfies a line detection condition within the first range as the starting effect grid when the effect grid where the burst point is located is not the valid effect grid; The method according to claim 2 , wherein the line detection condition includes that the effect grid to be detected and the effect grid on which the explosion point is located are connected by a straight line, and the effect grid to be detected does not overlap with the virtual obstacle.

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

6. the attribute value includes a life value and / or a skill value; the step of reducing the attribute value of the virtual object in response to a distance between an effect grid on which the virtual object is located and an effect grid on which the explosion point is located being smaller than a maximum distance value of the second range, 6. The method of claim 5, comprising reducing the life value and / or the skill value of the virtual object in response to a distance between an effect grid on which the virtual object is located and an effect grid on which the explosion point is located being less than a maximum distance value of the second range.

7. The method comprises: setting an effect grid within a first range centered on an explosion point of the virtual projectile; determining a transparency of the virtual fluid material corresponding to the currently located effect grid based on a distance between the currently located effect grid and an effect grid on which the explosion point is located; 5. The method according to claim 1, wherein the distance between the effect grid where the explosion point is located and the effect grid where the explosion point is located is positively correlated with the transparency of the virtual fluid material corresponding to the effect grid where the explosion point is located.

8. The method comprises: setting an effect grid within a first range centered on an explosion point of the virtual projectile; traversing the effect grids within the first range and determining an effect grid within the first range that meets the valid diffusion condition as a valid effect grid; determining a quantity of the valid effect grid corresponding to the diffusion range at the i-th time point and a first position occupied by a dynamic virtual obstacle based on the diffusion range of the virtual fluid material at the i-th time point; determining an amount of the legal effect grid occupied by the dynamic virtual obstacle in response to the dynamic virtual obstacle moving to a second position at time i+1; and refilling the valid effect grids at the first position at the same rate based on the number of valid effect grids corresponding to the diffusion range of the virtual fluid material at the (i+1)th time point and the number of valid effect grids occupied by the dynamic virtual obstacle at the second position, and diffusing the virtual fluid material based on the newly refilled valid effect grids; The method according to any one of claims 1 to 4, wherein the quantity of the corresponding legitimate effect grids within the diffusion range of the virtual fluid substance varies with time in a normal distribution, and i is a positive integer.

9. The method comprises: setting an effect grid within a first range centered on an explosion point of the virtual projectile; traversing the effect grid within the first range according to a preset frequency and refreshing valid effect grids within the first range that meet the valid diffusion conditions; The method according to any one of claims 1 to 4, further comprising: determining a diffusion direction of the virtual fluid material based on a refreshed valid effect grid under a situation where the virtual fluid material encounters a dynamic virtual obstacle during the diffusion process.

10. 1. A device for controlling a virtual projectile, the device comprising: a grid setting module configured to set an effect grid within a first range centered on an explosion point of the virtual projectile in response to the thrown virtual projectile causing an explosion and releasing a virtual fluid material in the virtual environment screen, the effect grid being configured to determine a diffusion direction of the virtual fluid material, the first range being larger than a second range, and the second range being configured to indicate a diffusion range of the virtual fluid material; a traversal module used for traversing the effect grids within the first range and determining an effect grid within the first range that meets a valid diffusion condition as a valid effect grid; a diffusion module, which is used to diffuse the virtual fluid material according to the legitimate effect grid on the surface of the virtual obstacle when the virtual fluid material encounters the virtual obstacle during the diffusion process; The valid diffusion conditions include the effect grid being within the second range, the effect grid not overlapping with the virtual obstacle, and the effect grid not being traversed.

11. 11. The device of claim 10, wherein the traversal module is used to: determine an effect grid where the explosion point is located as a starting effect grid, and use the starting effect grid as a starting point for traversing other effect grids; traverse the effect grids adjacent to the starting effect grid, and determine an effect grid adjacent to the starting effect grid and meeting the legal diffusion condition as the legal effect grid and as a next starting effect grid; and repeatedly perform the previous steps until all the effect grids within the first range have been traversed.

12. The device according to claim 11, wherein the traverse module is used to set the effect grid on which the explosion point is located as the starting effect grid under the condition that the effect grid on which the explosion point is located is the valid effect grid.

13. the traverse module is used to determine an effect grid that meets a line detection condition within the first range as the starting effect grid when the effect grid where the burst point is located is not the valid effect grid; The device according to claim 11 , wherein the straight line detection condition includes that the effect grid to be detected and the effect grid on which the explosion point is located are connected by a straight line, and the effect grid to be detected does not overlap with the virtual obstacle.

14. a virtual object in the virtual environment; the grid setting module is used to set an effect grid within a first range centered on an explosion point of the virtual projectile, the first range being larger than a second range, and the second range being used to indicate a diffusion range of the virtual fluid material; The apparatus further includes a computing module; The device according to any one of claims 10 to 13, wherein the calculation module is adapted to reduce an attribute value of the virtual object in response to a distance between an effect grid on which the virtual object is located and an effect grid on which the explosion point is located being smaller than a maximum distance value of the second range.

15. the attribute value includes a life value and / or a skill value; 15. The device of claim 14, wherein the calculation module is adapted to reduce the life value and / or the skill value of the virtual object in response to a distance between an effect grid on which the virtual object is located and an effect grid on which the explosion point is located being smaller than a maximum distance value of the second range.

16. The grid setting module is used to set an effect grid within a first range centered on an explosion point of the virtual projectile; The calculation module is used to determine the transparency of the virtual fluid material corresponding to the effect grid currently located based on a distance between the effect grid currently located and an effect grid where the explosion point is located; The apparatus according to any one of claims 10 to 13, wherein the distance between the effect grid where the explosion point is located and the effect grid where the explosion point is located is positively correlated with the transparency of the virtual fluid material corresponding to the effect grid where the explosion point is located.

17. The grid setting module is used to set an effect grid within a first range centered on an explosion point of the virtual projectile; the traverse module is used for: traversing the effect grids within the first range, and determining effect grids within the first range that meet the legal diffusion conditions as legal effect grids; determining, based on a diffusion range of the virtual fluid material at the i-th time point, the number of legal effect grids corresponding to the diffusion range at the i-th time point and a first position occupied by a dynamic virtual obstacle; and determining, in response to the dynamic virtual obstacle moving to a second position at the i+1-th time point, the number of legal effect grids occupied by the dynamic virtual obstacle; The calculation module is used to replenish the legitimate effect grids at the first position at the same rate according to the number of the legitimate effect grids corresponding to the diffusion range of the virtual fluid material at the (i+1)th time point and the number of the legitimate effect grids occupied by the dynamic virtual obstacle at the second position, and diffuse the virtual fluid material based on the newly replenished legitimate effect grids; The apparatus according to any one of claims 10 to 13, wherein the quantity of the corresponding legitimate effect grids within the diffusion range of the virtual fluid substance varies with time in a normal distribution, and i is a positive integer.

18. The grid setting module is used to set an effect grid within a first range centered on an explosion point of the virtual projectile; the traversal module is used for traversing the effect grid within the first range according to a preset frequency, and refreshing the valid effect grid within the first range that meets the valid diffusion condition; The device according to any one of claims 10 to 13, wherein the diffusion module is used to determine the diffusion direction of the virtual fluid material based on the valid effect grid after refreshing under the situation where the virtual fluid material encounters a dynamic virtual obstacle during the diffusion process.

19. A computer device including 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 described in any one of claims 1 to 9.

20. A computer-readable storage medium having at least one computer program stored therein, the at least one computer program being loaded and executed by a processor to realize the method for controlling a virtual throwable object according to any one of claims 1 to 9.

21. A computer program product, the computer program product including a computer program, the computer program being stored in a computer-readable storage medium, the computer program being read from the computer-readable storage medium and executed by a processor of a computing device, causing the computing device to perform the method for controlling a virtual projectile according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Map region generation method in virtual environment, display method and device

    CN110478900A

  • Numerical simulation method for adaptively expanding computational domain of large-scale parallel computing

    CN110852005A

  • Virtual prop control method and device, storage medium and electronic device

    CN111111217A

  • Physical special effect simulation method and device, electronic equipment and storage medium

    CN112862942A

  • Picture processor and game device using the processor

    JP1996320949A