Method, device, equipment and medium for determining impact point position in shooting game

By determining the shooting center point coordinates of the shooting equipment in the shooting game, and using randomly selected data values ​​and linear functions to determine the position of the flash point, the problems of complex calculations and high resource occupation in the existing technology are solved, and the shooting is improved Game responsiveness.

CN114100146BActive Publication Date: 2024-12-24SHANGHAI MIHOYO TIANMING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010900481.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2024-12-24
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

The prior art determines the position of the shrapnel bounce point through Gaussian distribution operations in third-person shooting games, resulting in complex calculations and large resource usage, affecting the game's response performance.

Method used

By determining the shooting center point coordinates of the shooting equipment, and randomly selecting data values ​​based on the projectile probability value and angle value, the position of the shrapnel is determined by determining the projectile point probability using the linear function and the two-dimensional coordinate system. Scope, simplify the calculation process.

Benefits of technology

It greatly reduces the computing resource requirements for determining the bounce point position, improves the overall response performance of the shooting game, and realizes a simple and fast shrapnel bounce point distribution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114100146B_ABST
    Figure CN114100146B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for determining the position of the impact point in a shooting game. The method comprises: determining the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process; selecting a set number of impact probability values ​​from the determined impact probability range, and correspondingly selecting the set number of impact angle values ​​from the set angle range; determining the impact point positions of the set number of impact points according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates. Using this method, the impact point position can be simply and accurately determined by only randomly selecting data values ​​and combining the selected data values ​​with the impact point and the shooting center point, which greatly reduces the computing resources required for determining the impact point position and improves the overall response performance of the shooting game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and medium for determining the impact point position in a shooting game. Background Art

[0002] With the rapid development of the information age, the configuration of terminal devices such as computers, tablets, and mobile phones has been improved, and the game industry has also been greatly improved. At present, major game manufacturers have developed different types of game applications, such as third-person shooting games.

[0003] For third-person shooting games, players can choose a shooting game character, and control the game character to shoot. At the same time, players can also choose shooting equipment, one of which is a shotgun. The characteristic of a shotgun is that it can produce multiple shrapnel in one shot, and the impact points of different shrapnel are distributed in different positions. In shooting games, in order to highlight the authenticity of shooting games, after the shotgun fires bullets, the distribution of each impact point will be presented in the game scene.

[0004] In the existing technology, the possible impact point positions of each shrapnel are often determined by Gaussian distribution calculation, and the distribution of the impact points is presented through the determined impact point positions. However, this implementation method has the problems of complex calculation, high computing resource consumption, and affecting the overall response performance of the shooting game. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a method, device, equipment and medium for determining the impact point position in a shooting game, which simply and quickly realizes the determination of the impact point of shrapnel fired by a shooting equipment in the shooting game.

[0006] In a first aspect, an embodiment of the present application provides a method for determining an impact point position in a shooting game, comprising:

[0007] Determine the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process;

[0008] Selecting a set number of impact probability values ​​from the determined impact probability range, and correspondingly selecting a set number of impact angle values ​​from the set angle range;

[0009] The impact point positions of the set number of impact points are determined according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates.

[0010] Furthermore, the determining of the shooting center point coordinates of the shooting equipment according to the current character position information of the game character during the shooting process includes:

[0011] Determine the current position information of the mounting point by combining the current position information of the game character during the shooting process through a function call, wherein the mounting point is set on the game character;

[0012] The shooting center point coordinates of the shooting equipment are determined according to the current point position information and the pre-acquired maximum shooting distance of the shooting equipment.

[0013] Furthermore, the method also includes determining the impact point probability range corresponding to the shooting equipment according to a triangular area enclosed by the constructed target linear function and a set two-dimensional coordinate system.

[0014] Furthermore, determining the impact point probability range corresponding to the shooting equipment according to the triangular area enclosed by the constructed target linear function and the set two-dimensional coordinate system includes:

[0015] Obtaining a predetermined positive value, determining an intercept and a slope value based on the positive value, and constructing a target linear function;

[0016] Determine the area of ​​a triangle region enclosed by the target linear function and a set two-dimensional coordinate system;

[0017] A numerical range greater than 0 and not greater than the area of ​​the region is obtained, and the data range is determined as the impact point probability range corresponding to the shooting device.

[0018] Furthermore, the method further comprises:

[0019] Determine a functional relationship between the impact point probability value within the impact point probability range and the independent variable in the constructed target linear function.

[0020] Further, the determining of the impact point positions of a set number of shrapnel fired by the shooting equipment according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates includes:

[0021] For each hit probability value, determining a target variable value corresponding to the hit probability value in the determined functional relationship;

[0022] Determine the coordinate position whose distance from the shooting center point coordinate is the target variable value along the direction of the impact angle value corresponding to the impact probability value;

[0023] The coordinate position is determined as the impact point position corresponding to the impact probability value under the shooting equipment.

[0024] Furthermore, after determining the positions of the set number of impact points, the method further includes:

[0025] The position of each impact point is highlighted by setting the display form.

[0026] The set number is the total number of shrapnel currently fired by the shooting device;

[0027] The setting angle range is [0, 360°].

[0028] In a second aspect, an embodiment of the present application provides a device for determining a bullet point position in a shooting game, comprising:

[0029] The center point determination module is used to determine the shooting center point coordinates of the shooting equipment according to the current role position information of the game character during the shooting process;

[0030] A data selection module, used to select a set number of impact probability values ​​from the determined impact probability range, and correspondingly select the set number of impact angle values ​​from the set angle range;

[0031] The position determination module is used to determine the bullet point positions of the set number of impact points according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates.

[0032] In a third aspect, an embodiment of the present application further provides a computer device, including:

[0033] memory and one or more processors;

[0034] The memory is used to store one or more programs;

[0035] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the impact point position in a shooting game as described in the first aspect above.

[0036] In a fourth aspect, an embodiment of the present application further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for determining the impact point position in a shooting game as described in the first aspect.

[0037] The above-mentioned method, device, equipment and medium for determining the position of the impact point in a shooting game first determine the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process, then select a set number of impact probability values ​​from the determined impact probability range, and simultaneously select a set number of impact angle values ​​from the set angle range. Finally, according to the impact probability value and the corresponding impact angle value of each impact and the coordinates of the shooting center point, the set number of impact point positions are determined. Compared with the existing method of determining the impact point position by Gaussian distribution, the above-mentioned technical scheme of this embodiment only needs to determine the positions of each impact point whose distribution law satisfies the dense impact points close to the shooting center point and the sparse impact points far from the shooting center point based on the selected impact probability value and the impact angle value after determining the coordinates of the shooting center point. This technical scheme only needs to randomly select data values ​​and combine the selected data values ​​with the impact points and the shooting center point to simply and accurately determine the impact point position, which greatly reduces the computing resources required for determining the impact point position and improves the overall response performance of the shooting game. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0039] Figure 1 A schematic flow chart of a method for determining the impact point position in a shooting game provided in Embodiment 1 of the present application is provided;

[0040] Figure 2 A schematic flow chart of a method for determining the impact point position in a shooting game provided by a second embodiment of the present invention is provided;

[0041] Figure 3 A structural block diagram of a device for determining the impact point position in a shooting game provided in Embodiment 3 of the present application is provided;

[0042] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0044] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0045] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0046] Embodiment 1

[0047] Figure 1 A flow chart of a method for determining the impact point position in a shooting game provided in the first embodiment of the present application is provided. The method is applicable to the case where a game character in a shooting game holds a shooting device and shoots to determine the impact point of a shrapnel. The method can be executed by a computer device loaded with shooting game software. The method for determining the impact point position in a shooting game can be integrated as a plug-in in the installed shooting game software, and the method can be implemented by running the shooting game software. The computer device can be composed of two or more physical entities, or it can be composed of one physical entity. Generally speaking, the computer device can be a notebook, a desktop computer, a smart tablet, etc.

[0048] It should be noted that the method for determining the impact point position in the shooting game provided by this embodiment is mainly for shooting equipment that fires multiple shrapnel. At the same time, by analyzing the impact point positions of the shrapnel fired by the shooting equipment, it can be found that the impact point positions have the characteristics of normal distribution, that is, the farther away from the shooting center point, the fewer the number of distributed impact points, and the closer to the shooting center point, the denser the number of distributed impact points. Based on this distribution characteristic, the existing Gaussian distribution is used to determine the impact point position of the shooting equipment. However, this determination method is complicated and occupies more computing resources.

[0049] like Figure 1 As shown, the method for determining the impact point position in a shooting game provided in the first embodiment specifically includes the following steps:

[0050] S101. Determine the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process.

[0051] In this embodiment, the game character can be considered as a character pre-selected by the user (game player) after entering the shooting game, and the various actions of the game character in the game are controlled by the user through information input. Exemplarily, the user can control the actions of the game character through control information input by input devices such as keyboards, mice, and touch pads; the shooting process can be specifically understood as the user controlling the game character to be in a shooting state. The current character position information can be specifically understood as the posture state of the game character in the current frame according to the control information when the user controls the game character, and the current character position information can include the current moving direction of the game character and the current character coordinate position.

[0052] In this embodiment, the shooting equipment can be specifically understood as the firearm equipment selected by the user before shooting. In this embodiment, it is preferred that the shooting equipment is equipment that can fire multiple shrapnel in one shot, such as a shotgun. The shooting center point coordinates can be specifically regarded as the center position of the impact point distribution of the fired shrapnel, and can specifically be the point coordinates of a fixed distance forward from the firing port of the shooting equipment along the firing direction of the shooting equipment. In this embodiment, in order to determine the impact point position that satisfies the impact point distribution law described above, the shooting center point coordinates that satisfy the impact point distribution are first determined.

[0053] Specifically, this step can first determine the position of the firing port of the shooting equipment through the current character position information and then further determine the coordinates of the shooting center point; it can also first determine the position of a pre-set point through the current character position information and then further determine the coordinates of the shooting center point.

[0054] S102: Select a set number of impact probability values ​​from the determined impact probability range, and correspondingly select a set number of impact angle values ​​from the set angle range.

[0055] Through the above description, we know that the shooting center point is the center point of the impact point distribution. Therefore, it can be seen from the analysis that the position of the impact point to be determined should have a certain correlation with the shooting center point. For example, the coordinate position of the impact point should be a certain distance away from the coordinate position of the shooting center point. For example, multiple impact points may be distributed around the shooting center point, and the distribution of all impact points will not all be on the same straight line. At the same time, assuming that the direction corresponding to the projection of the firing direction of the shooting equipment in the plane coordinate system is the reference direction, then the ray formed by the impact point and the shooting center point should have an angle value with the reference direction.

[0056] Based on the above analysis, it can be known that in order to determine the position of the impact point, it is necessary to consider how to select the distance value between the impact point and the shooting center point, and how to select the angle value with the reference direction, so as to determine the impact point position that satisfies the above impact point distribution law based on the selected numerical information. Specifically, this embodiment selects the above numerical information through this step.

[0057] In this embodiment, the hit probability range includes a group of continuous hit probability values, and each hit probability value included can correspond to a distance value through a certain association relationship. Moreover, the relationship between each hit probability value, its corresponding distance value and the shooting center point can be understood as: the probability value that is less than the corresponding distance value from the shooting center point is the hit probability value.

[0058] In this embodiment, the set angle range includes a group of continuous impact angle values, and each impact angle value included can be regarded as an angle value between a ray formed by an impact point and a shooting center point and a reference direction.

[0059] Through this step, a set number of hit probability values ​​can be directly selected, and a set number of hit angle values ​​can be selected at the same time. Theoretically, each hit probability value can correspond to each hit angle value, and the corresponding relationship formed exists a one-to-one correspondence between the hit probability value and the hit angle value. In order to meet the effect of actual application, this step needs to determine a set of one-to-one corresponding associated information, establish a mapping relationship between the hit probability value and the hit angle value, and use the mapping relationship for subsequent operations.

[0060] It should be noted that in this step, the impact probability value and the impact angle value are selected randomly and with different values. At the same time, the specific value of the selected set number can actually be equal to the total number of shrapnel fired by the shooting equipment, and the set angle range can be directly preferably a range of a circle, that is, [0°, 360°]. In addition, the value of the impact probability range can be specifically determined when a certain correlation relationship satisfied by the impact probability value and the distance value is established.

[0061] S103, determining the impact point positions of the set number of impact points according to the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates.

[0062] In this embodiment, after selecting a set number of impact probability values ​​and impact angle values ​​through the above S102, the bullet point positions of the set number of impact points can be determined in combination with the shooting center point coordinates. Specifically, while determining the shooting center point coordinates through the above S101, the firing direction of the shooting equipment in the current shooting process can also be obtained, and the projection direction of the firing direction projected onto the horizontal plane two-dimensional coordinate system is recorded as the reference direction.

[0063] After the impact angle value is determined as described above, a set number of rays starting from the shooting center point and presenting the impact angle values ​​with the reference direction can be determined, and the coordinate position of the impact point to be determined is located on each ray. Considering that a hit probability value corresponds to a distance value with a certain correlation, after selecting each hit probability value and clarifying what distance value each hit probability value corresponds to, a target point with a corresponding distance value from the shooting center point can be directly determined from the target ray corresponding to the hit probability value (determined based on the corresponding relationship between the hit probability value and the impact angle value), and finally a set number of target points can be obtained, each target point can be regarded as a hit point, and the corresponding coordinate position can be regarded as the bullet point position.

[0064] Exemplarily, in this embodiment, a quadratic function can be constructed to represent the correlation between the impact point probability value and the distance value, and the construction of the quadratic function can be simply set from a triangular area formed by a linear function and two-dimensional coordinates.

[0065] The method for determining the position of the impact point in a shooting game provided by the first embodiment of the present invention, compared with the existing method of determining the position of the impact point by Gaussian distribution, only needs to determine the position of each impact point that satisfies the distribution law that the impact points close to the shooting center point are dense and the impact points far from the shooting center point are sparse based on the selected impact probability value and the impact angle value after the coordinates of the shooting center point are determined. This technical solution only needs to randomly select data values ​​and combine the relationship between the selected data values ​​and the impact points and the shooting center point to simply and accurately determine the position of the impact point, which greatly reduces the computing resources required for determining the position of the impact point and improves the overall response performance of the shooting game.

[0066] As an optional embodiment of the embodiment of the present invention, in this optional embodiment, the method is further optimized to include: determining the impact point probability range corresponding to the shooting equipment according to the triangular area enclosed by the constructed target linear function and the set two-dimensional coordinate system.

[0067] This optional embodiment provides a process for determining the impact point probability range based on the selected impact probability value in the provided impact point position determination method. Preferably, through this optional embodiment, a target linear function can be directly set, and the triangular area enclosed by the target linear function and the horizontal and vertical axes in a two-dimensional coordinate system can be determined. The area of ​​the triangular area can be regarded as the maximum value that can be selected for the impact probability value, and the impact point probability range of the shooting equipment can be determined based on the maximum value.

[0068] Furthermore, this optional embodiment determines the impact point probability range corresponding to the shooting equipment based on the triangular area enclosed by the constructed target linear function and the set two-dimensional coordinate system as follows: obtain a predetermined positive numerical value, determine the intercept and slope values ​​based on the positive numerical value, and construct the target linear function; determine the area of ​​the triangular area enclosed by the target linear function and the set two-dimensional coordinate system; obtain a numerical range greater than 0 and not greater than the area of ​​the region, and determine the data range as the impact point probability range corresponding to the shooting equipment.

[0069] This optional embodiment provides a specific determination of the impact point probability range. For example, the target linear function is first determined. For the target linear function, it is necessary to ensure that the triangular area formed by the target linear function and the two coordinate axes in the two-dimensional coordinate system is located in the first quadrant, and at the same time ensure that the absolute values ​​of the intercept and slope values ​​are equal; then, the area of ​​the above-mentioned locked album triangular area can be determined, and the area of ​​the area is used as the maximum probability value to form a range of impact point probabilities greater than 0 and less than or equal to the area of ​​the area. For example, assuming that the positive value is k, the target linear function can be expressed as: y = -kx + k.

[0070] As another optional embodiment of the embodiment of the present invention, in this optional embodiment, the method further optimizes and includes determining the functional relationship between the impact point probability value within the impact point probability range and the independent variable in the constructed target linear function.

[0071] This optional embodiment provides a process for determining the correlation between the impact probability value and the associated distance value in the impact point location determination method provided in this embodiment. The correlation may preferably be a functional relationship, wherein the functional relationship may be constructed based on the target linear function and the area of ​​the triangle region enclosed by the target linear function and the two coordinate axes.

[0072] Specifically, this optional embodiment assumes that the independent variable in the target linear function can be regarded as the possible distance value from the impact point to be determined to the shooting center point. Correspondingly, the trapezoidal area formed by intercepting the function value obtained after substituting the independent variable into the target linear function in the triangular area can be regarded as the corresponding impact probability value when the distance from the impact point to be determined to the shooting center point is less than the distance value. Therefore, combining the trapezoidal area (i.e., the impact probability value) with the target linear function, a functional relationship between the impact probability value and the independent variable in the target linear function can be determined.

[0073] Exemplarily, taking the above target linear function as y=-kx+k as an example, the functional relationship used to identify the relationship between the impact probability value and the independent variable in the target linear function can be expressed as:

[0074] Among them, x represents the independent variable in the target linear function, k represents the set positive value, and S is the area of ​​the trapezoid (the hit probability value). When the trapezoid area, that is, the hit probability value is known, the corresponding independent variable value (that is, the distance value from the hit point to be determined to the shooting center point) can be determined. At the same time, it can be known that, based on the functional relationship alone, x can be equivalent to the variable value in the functional relationship, and S can be equivalent to the independent variable value in the functional relationship.

[0075] Furthermore, an optional embodiment of the present embodiment, after determining the positions of the set number of impact points, is further optimized to include: highlighting the position of each of the impact points by setting a display format.

[0076] In this optional embodiment, considering the authenticity of the shooting scene in the shooting game, after the impact point positions of each bullet point are determined, each impact point position can be rendered into the shooting scene using a set display form. Exemplarily, the set display form can be used to highlight the visual effect: for example, a bullet crater can be rendered at each impact point position to highlight the visual effect; for example, after the coordinate position of the target being shot, and the impact point position of each shrapnel and the attribute information such as the flight speed of the shrapnel are known, it can be determined which shrapnel will hit the target being shot, thereby determining the hit position of the target being shot, and rendering the hit visual effect for the hit position, etc.

[0077] Embodiment 2

[0078] Figure 2 A flow chart of a method for determining the position of an impact point in a shooting game provided by a second embodiment of the present invention is given. This embodiment is optimized based on the above-mentioned embodiment. In this embodiment, the coordinates of the shooting center point of the shooting equipment are further determined according to the current character position information of the game character during the shooting process as follows: the current point position information of the mounting point is determined by combining the current character position information of the game character during the shooting process through a function call, and the mounting point is set on the game character; the current point moving direction in the current point position information is extracted, and the current projection coordinates corresponding to the mounting point in the current moving direction are determined in combination with the current point coordinate position in the current point position information; the shooting center point coordinates of the shooting equipment are determined according to the current projection coordinates and the pre-acquired maximum shooting distance of the shooting equipment.

[0079] At the same time, this embodiment further determines the impact point position of a set number of shrapnel fired by the shooting equipment according to each of the hit probability values, the corresponding hit angle values ​​and the shooting center point coordinates as follows: for each hit probability value, determine the target variable value corresponding to the hit probability value in the determined functional relationship; along the direction of the hit angle value corresponding to the hit probability value, determine the coordinate position that is the target variable value away from the shooting center point coordinates; and determine the coordinate position as the impact point position corresponding to the hit probability value under the shooting equipment.

[0080] like Figure 2 As shown, a method for determining the impact point position in a shooting game provided by the second embodiment of the present invention specifically includes the following operations:

[0081] In this embodiment, the following S201 and S202 provide operations for determining the shooting center point.

[0082] S201. Determine the current position information of a mounting point by combining the current position information of a game character during shooting through a function call, wherein the mounting point is set on the game character.

[0083] In this embodiment, a method of setting a mounting point and determining the coordinates of the shooting center point based on the mounting point is adopted. The mounting point can be a reference point selected from a certain part of the game character, such as a mounting point can be selected from the hand of the game character. The position information corresponding to the mounting point can be directly determined by combining the current role position information of the game character itself in the form of a function call.

[0084] S202: Determine the shooting center point coordinates of the shooting equipment according to the current point position information and the pre-acquired maximum shooting distance of the shooting equipment.

[0085] In this embodiment, the current point position information may include the current point coordinate position of the mount point and the current point moving direction, wherein the current point coordinate position is equivalent to the coordinate position of the mount point in the world coordinate system, and the current point moving direction can be considered as the launch direction of the shrapnel launched by the shooting equipment. The maximum shooting distance can be considered as the maximum range of the shooting equipment flying in the horizontal launch direction, and the maximum shooting distance can be pre-set as attribute information during the shooting game software development stage.

[0086] This embodiment preferably considers that the shooting center point is located on the ground of the game scene, and the maximum shooting distance can be equivalent to the distance value in the horizontal launch direction. Therefore, this embodiment can first determine the corresponding point projection coordinates of the current point coordinate position on the horizontal plane through this step, and then the point that is the maximum shooting distance away from the point projection coordinates can be determined as the coordinate point of the shooting center point on the horizontal plane, and finally the coordinate information of the shooting center point in the world coordinate system can be determined, thereby obtaining the coordinates of the shooting center point.

[0087] S203: Select a set number of impact probability values ​​from the determined impact probability range, and correspondingly select a set number of impact angle values ​​from the set angle range.

[0088] Exemplarily, this step randomly selects the same number of impact probability values ​​as the total number of shrapnel fired by the shooting equipment from the impact probability range, and at the same time selects the impact angle values ​​of the total number of shrapnel fired from the set angle range value of [0°, 360°], and randomly selects a one-to-one corresponding pair from each impact probability value and each impact angle value, so that each impact probability value has a corresponding impact angle value.

[0089] In this embodiment, the following S204 to S206 provide a process for determining the impact point position.

[0090] S204. For each hit probability value, determine a target variable value corresponding to the hit probability value in the determined functional relationship.

[0091] Through the description of the above embodiment 1, it can be known that the correlation between the impact probability value within the impact point probability range and the distance value between the impact point to be determined and the shooting center point satisfies a functional relationship, and the distance value between the impact point to be determined and the shooting center point can be regarded as the variable value in the functional relationship, and the impact probability value can be regarded as the independent variable value.

[0092] This step and the following S205 and S206 are operations for determining the bullet point position of the impact point corresponding to each impact probability value, that is, for each impact probability value, the bullet point position of the corresponding impact point can be determined through this step and the following S205 and S206 operations.

[0093] Specifically, this step can be based on the determined functional relationship to determine the corresponding target variable value after the impact probability value is known.

[0094] S205. Determine a coordinate position whose distance from the shooting center point coordinates to the target variable value along the direction of the impact angle value corresponding to the impact probability value.

[0095] In this step, the impact angle value corresponding to the impact probability value can be obtained. The impact angle value is equivalent to an angle value, which can be formed by deflecting clockwise based on the projection direction formed by projecting the launch direction on the plane. The impact angle value direction can be considered to take the shooting center point as the starting point, and the angle with the projection direction as the ray direction of the impact angle value.

[0096] Afterwards, this step can determine a coordinate position of the target variable value that is away from the shooting center point coordinate position in the direction of the impact angle value.

[0097] S206: Determine the coordinate position as the impact point position of the shooting equipment corresponding to the impact probability value.

[0098] In this step, the point formed by the coordinate position can be regarded as the impact point corresponding to the impact probability value under the shooting equipment, and the coordinate position can be regarded as the impact point position of the impact point.

[0099] After each impact probability value is operated through the above steps, the impact point positions of the same number as the number of shrapnel fired can be determined.

[0100] The second embodiment of the present invention provides a method for determining the position of the impact point in a shooting game, which specifies the determination operation of the shooting center point and the determination operation of the impact point position. Compared with the existing method of determining the impact point position by Gaussian distribution, the method provided by this embodiment only needs to determine the position of each impact point that satisfies the distribution law that the impact points close to the shooting center point are dense and the impact points far from the shooting center point are sparse based on the selected impact probability value and the impact angle value after determining the coordinates of the shooting center point. This technical solution only needs to randomly select data values ​​and combine the selected data values ​​with the impact points and the shooting center point to simply and accurately determine the impact point position, which greatly reduces the computing resources required for determining the impact point position and improves the overall response performance of the shooting game.

[0101] Embodiment 3

[0102] Figure 3 A structural block diagram of a device for determining the impact point position in a shooting game provided in the third embodiment of the present application is provided. The device is applicable to the situation where a game character in a shooting game holds a shooting device and shoots to determine the impact point of a shrapnel, and can be executed by a computer device loaded with shooting game software. Figure 3 As shown, the device includes: a center point determination module 31, a data selection module 32 and a position determination module 33.

[0103] The center point determination module 31 is used to determine the shooting center point coordinates of the shooting equipment according to the current character position information of the game character during the shooting process;

[0104] A data selection module 32 is used to select a set number of impact probability values ​​from the determined impact probability range, and correspondingly select the set number of impact angle values ​​from the set angle range;

[0105] The position determination module 33 is used to determine the position of the set number of impact points according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates.

[0106] The device for determining the position of the impact point in the shooting game provided in the first embodiment of the present invention only needs to determine the position of each impact point that satisfies the distribution rule that the impact points close to the shooting center point are dense and the impact points far from the shooting center point are sparse based on the selected impact probability value and the impact angle value after determining the coordinates of the shooting center point. This technical solution only needs to randomly select data values ​​and combine the selected data values ​​with the impact points and the shooting center point to simply and accurately determine the impact point position, which greatly reduces the computing resources required for determining the impact point position and improves the overall response performance of the shooting game.

[0107] Furthermore, the center point determination module 31 can be specifically used to determine the current point position information of the mounting point by combining the current character position information of the game character during the shooting process through function calls, and the mounting point is set on the game character; based on the current point position information and the pre-acquired maximum shooting distance of the shooting equipment, determine the shooting center point coordinates of the shooting equipment.

[0108] Furthermore, the device may also include a range determination module, which may be used to determine the impact point probability range corresponding to the shooting equipment based on a triangular area enclosed by the constructed target linear function and a set two-dimensional coordinate system.

[0109] Furthermore, the range determination module can be specifically used to obtain a predetermined positive numerical value, determine the intercept and slope values ​​based on the positive numerical value, and construct a target linear function; determine the area of ​​a triangle enclosed by the target linear function and a set two-dimensional coordinate system; obtain a numerical range greater than 0 and not greater than the area of ​​the region, and determine the data range as the impact point probability range corresponding to the shooting device.

[0110] Furthermore, the device may also include a function determination module, which is used to determine a functional relationship between the impact point probability value within the impact point probability range and the independent variable in the constructed target linear function.

[0111] Based on the above embodiment, the position determination module 33 can be specifically used to determine, for each hit probability value, the target variable value corresponding to the hit probability value in the determined functional relationship; determine the coordinate position of the target variable value at a distance from the shooting center point coordinates along the direction of the hit angle value corresponding to the hit probability value; and determine the coordinate position as the impact point position corresponding to the hit probability value under the shooting equipment.

[0112] Furthermore, the device may also include a position display module, and the position display module is used to highlight the position of each impact point by setting a display form.

[0113] Embodiment 4

[0114] Figure 4 The structure diagram of a computer device provided in the fourth embodiment of the present invention. The computer device includes: a processor 40, a memory 41, a display screen 42, an input device 43 and an output device 44. The number of processors 40 in the computer device can be one or more. Figure 4 In the example, a processor 40 is used. The number of memories 41 in the computer device can be one or more. Figure 4 A memory 41 is taken as an example. The processor 40, memory 41, display screen 42, input device 43 and output device 44 of the computer device can be connected through a bus or other means. Figure 4 In the embodiment, the computer device may be a computer, a notebook or a smart tablet.

[0115] The memory 41, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the computer device described in any embodiment of the present invention (for example, the center point determination module 31, the data selection module 32 and the position determination module 33 in the impact point position determination device in the shooting game). The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.

[0116] The display screen 42 may be a display screen 42 with a touch function, which may be a capacitive screen, an electromagnetic screen, or an infrared screen. Generally speaking, the display screen 42 is used to display data according to the instructions of the processor 40, and is also used to receive a touch operation acting on the display screen 42 and send a corresponding signal to the processor 40 or other devices.

[0117] The input device 43 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the display device. It can also be a camera for acquiring images and a sound pickup device for acquiring audio data. The output device 44 can include audio devices such as speakers. It should be noted that the specific composition of the input device 43 and the output device 44 can be set according to actual conditions.

[0118] The processor 40 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 41, that is, implements the above-mentioned method for determining the impact point position in the shooting game.

[0119] The computer device provided above can be used to execute the method for determining the impact point position in a shooting game provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0120] Embodiment 5

[0121] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a method for determining an impact point position in a shooting game, including:

[0122] Determine the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process;

[0123] Selecting a set number of impact probability values ​​from the determined impact probability range, and correspondingly selecting a set number of impact angle values ​​from the set angle range;

[0124] The impact point positions of the set number of impact points are determined according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates.

[0125] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention is not limited to the operations of the method for determining the impact point position in the shooting game as described above, and can also execute related operations in the method for determining the impact point position in the shooting game provided by any embodiment of the present invention, and has corresponding functions and beneficial effects.

[0126] Through the above description of the implementation mode, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a robot, a personal computer, a server, or a network device, etc.) to execute the method for determining the impact point position in a shooting game described in any embodiment of the present invention.

[0127] It is worth noting that in the above-mentioned device for determining the impact point position in the shooting game, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0128] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0129] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0130] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for determining the impact point position in a shooting game, characterized in that: include: Determine the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process; Selecting a set number of impact probability values ​​from the determined impact probability range, and correspondingly selecting a set number of impact angle values ​​from the set angle range; Determining the positions of the set number of impact points according to the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates; The method further comprises: Determine the range of the probability of impact corresponding to the shooting equipment according to the triangular area enclosed by the constructed target linear function and the set two-dimensional coordinate system; Among them, the independent variable in the target linear function corresponds to the impact probability value within the impact probability range; the independent variable in the target linear function is the distance value from the impact point to be determined to the shooting center point.

2. The method according to claim 1, characterized in that The method of determining the shooting center point coordinates of the shooting equipment according to the current position information of the game character during the shooting process includes: Determine the current position information of the mounting point by combining the current position information of the game character during the shooting process through a function call, wherein the mounting point is set on the game character; The shooting center point coordinates of the shooting equipment are determined according to the current point position information and the pre-acquired maximum shooting distance of the shooting equipment.

3. The method according to claim 1, characterized in that: The step of determining the impact probability range corresponding to the shooting equipment according to the triangular area enclosed by the constructed target linear function and the set two-dimensional coordinate system includes: Obtaining a predetermined positive value, determining an intercept and a slope value based on the positive value, and constructing a target linear function; Determine the area of ​​a triangle region enclosed by the target linear function and a set two-dimensional coordinate system; A numerical range that is greater than 0 and not greater than the area of ​​the region is obtained, and the numerical range is determined as a range of probability of impact corresponding to the shooting equipment.

4. The method according to claim 1, characterized in that Also includes: Determine a functional relationship between the impact probability value within the impact probability range and the independent variable in the constructed target linear function.

5. The method according to claim 1, characterized in that Determining the impact point positions of a set number of shrapnel fired by the shooting equipment according to each of the impact probability values, the corresponding impact angle values ​​and the shooting center point coordinates includes: For each hit probability value, determining a target variable value corresponding to the hit probability value in the determined functional relationship; Determine the coordinate position whose distance from the shooting center point coordinate is the target variable value along the direction of the impact angle value corresponding to the impact probability value; The coordinate position is determined as the impact point position corresponding to the impact probability value under the shooting equipment.

6. The method according to any one of claims 1 to 5, characterized in that: After determining the positions of the set number of impact points, the method further includes: The position of each impact point is highlighted by setting the display form.

7. The method according to any one of claims 1 to 5, characterized in that: The set number is the total number of shrapnel currently fired by the shooting equipment; The setting angle range is [0°, 360°].

8. A device for determining the impact point position in a shooting game, characterized in that: include: The center point determination module is used to determine the shooting center point coordinates of the shooting equipment according to the current role position information of the game character during the shooting process; A data selection module, used to select a set number of impact probability values ​​from the determined impact probability range, and correspondingly select the set number of impact angle values ​​from the set angle range; A position determination module, used to determine the bullet point positions of the set number of bullet points according to each of the bullet impact probability values, the corresponding bullet impact angle values ​​and the shooting center point coordinates; The device also includes: A range determination module, used to determine the impact probability range corresponding to the shooting equipment according to a triangular area enclosed by the constructed target linear function and a set two-dimensional coordinate system; Among them, the independent variable in the target linear function corresponds to the impact probability value within the impact probability range; the independent variable in the target linear function is the distance value from the impact point to be determined to the shooting center point.

9. A computer device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Game device, image generation method, information recording medium and program

    CN101605583A

  • Spatial orientation toy gun and method for calculating shooting effect of toy gun

    CN101726216A