CN114100146A - Method, device, equipment and medium for determining impact point position in shooting game - Google Patents
Method, device, equipment and medium for determining impact point position in shooting game Download PDFInfo
- Publication number
- CN114100146A CN114100146A CN202010900481.7A CN202010900481A CN114100146A CN 114100146 A CN114100146 A CN 114100146A CN 202010900481 A CN202010900481 A CN 202010900481A CN 114100146 A CN114100146 A CN 114100146A
- Authority
- CN
- China
- Prior art keywords
- shooting
- determining
- point
- impact
- probability
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 230000008569 process Effects 0.000 claims abstract description 22
- 238000012886 linear function Methods 0.000 claims description 35
- 230000006870 function Effects 0.000 claims description 14
- 238000010304 firing Methods 0.000 claims description 3
- 230000004044 response Effects 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 4
- 230000000007 visual effect Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012887 quadratic function Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000013075 data extraction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
- A63F13/837—Shooting of targets
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
- A63F13/426—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/30—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
- A63F2300/302—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device specially adapted for receiving control signals not targeted to a display device or game input means, e.g. vibrating driver's seat, scent dispenser
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/80—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
- A63F2300/8076—Shooting
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Aiming, Guidance, Guns With A Light Source, Armor, Camouflage, And Targets (AREA)
Abstract
The application discloses a method, a device, equipment and a medium for determining a landing point position in a shooting game. The method comprises the following steps: determining the shooting center point coordinate of shooting equipment according to the current role position information of the game role in 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; and determining the bullet point positions of the bullet points with the set number according to the bullet impact probability values, the corresponding bullet impact angle values and the shooting center point coordinates. By using the method, the position of the impact point can be simply and accurately determined only by randomly selecting the data value and combining the selected data value with the impact point and the shooting central point, thereby greatly reducing the computing resources required by determining the position of the impact point and improving the overall response performance of the shooting game.
Description
Technical Field
The present application relates to the field of game technologies, and in particular, to a method, an apparatus, a device, and a medium for determining a location of an impact point in a shooting game.
Background
With the rapid development of the information era, the configuration of terminal equipment such as computers, tablets, mobile phones and the like is improved, and the game industry is greatly improved. Currently, various large game manufacturers develop different types of game applications, such as third-person shooter games.
For the third person named shooting game, a player can select a game character for shooting, and the player can control the game character to shoot, and meanwhile, the player can also select shooting equipment for shooting, wherein one shooting device is a shotgun. The shotgun is characterized in that a plurality of shrapnels can be generated by one-time shooting, the impact points of different shrapnels are distributed at different positions, and in a shooting game, in order to highlight the reality of the shooting game, the shotgun can present the distribution of the impact points in a game scene after shooting bullets.
In the prior art, the possible impact point positions of each elastic sheet are often determined through gaussian distribution operation, so that the distribution of the impact points is presented through the determined impact point positions. However, the implementation mode has the problems of complex operation, more occupied computing resources and influence on the overall response performance of the shooting game.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a medium for determining an impact point position in a shooting game, which simply and quickly implement the determination of an impact point of a shrapnel launched by a shooting device in the shooting game.
In a first aspect, an embodiment of the present application provides a method for determining a landing point position in a shooting game, including:
determining the shooting center point coordinate of shooting equipment according to the current role position information of the game role in 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;
and determining the bullet point positions of the bullet points with the set number according to the bullet impact probability values, the corresponding bullet impact angle values and the shooting center point coordinates.
Further, the determining the shooting center point coordinates of the shooting equipment according to the current role position information of the game role in the shooting process includes:
determining the current point position information of a mounting point by combining function call with the current role position information of a game role in a shooting process, wherein the mounting point is arranged on the game role;
and determining the coordinates of the shooting center point of the shooting equipment according to the current point position information and the maximum shooting distance of the shooting equipment acquired in advance.
Further, the method further comprises the step of determining an impact point probability range corresponding to the shooting equipment according to a triangular area formed by the constructed target linear function and a set two-dimensional coordinate system in a surrounding mode.
Further, the determining the impact point probability range corresponding to the shooting equipment according to a triangular area surrounded by the constructed target linear function and a set two-dimensional coordinate system comprises:
acquiring a preset positive value, determining an intercept and a slope value based on the positive value, and constructing a target linear function;
determining the area of a triangular area surrounded by the target linear function and a set two-dimensional coordinate system;
and obtaining a numerical range which is larger than 0 and not larger than the area of the region, and determining the data range as an impact point probability range corresponding to the shooting equipment.
Further, the method further comprises:
and determining a functional relation between the impact point probability value in the impact point probability range and an independent variable in the constructed target linear function.
Further, the determining the impact point positions of the set number of elastic pieces launched by the shooting equipment according to the impact probability values, the corresponding impact angle values and the shooting center point coordinates comprises:
for each landing probability value, determining a corresponding target variable value of the landing probability value in the determined functional relation;
determining a coordinate position which is away from the shooting center point coordinate and is the target variable value along the direction of the landing angle value corresponding to the landing probability value;
and determining the coordinate position as the shot point position of the shot point corresponding to the shot probability value under the shooting equipment.
Further, after determining the positions of the set number of the impact points, the method further comprises:
and highlighting each impact point position through setting a display form.
The set number is the total number of the shrapnels currently transmitted by the shooting equipment;
the set angle range is [0, 360 ° ].
In a second aspect, an embodiment of the present application provides an apparatus for determining a landing point position in a shooting game, including:
the center point determining module is used for determining the shooting center point coordinate of the shooting equipment according to the current role position information of the game role in the shooting process;
the data selection module is used for selecting the landing probability values with the set number from the determined landing probability range and correspondingly selecting the landing angle values with the set number from the set angle range;
and the position determining module is used for determining the bullet point positions of the set number of bullet points according to the bullet probability values, the corresponding bullet angle values and the shooting center point coordinates.
In a third aspect, an embodiment of the present application further provides a computer device, including:
a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method for determining a landing point position in a shooting game as described in the first aspect above.
In a fourth aspect, embodiments of the present application also provide a storage medium containing computer-executable instructions for performing the method for determining a landing point position in a shooting game as described in the first aspect when executed by a computer processor.
According to the method, the device, the equipment and the medium for determining the impact point position in the shooting game, firstly, the shooting center point coordinate of shooting equipment is determined according to the current role position information of a game role in the shooting process, then, the impact probability values of the set number are selected from the determined impact probability range, and meanwhile, the impact angle values of the set number are correspondingly selected from the set angle range. And finally, determining the impact point positions with the set number according to the impact probability value of each impact, the corresponding impact angle value and the shooting center point coordinate. Compared with the prior art of determining the impact point positions through Gaussian distribution, the technical scheme of the embodiment determines the positions of the impact points with the distribution rule meeting the requirement that the impact points close to the shooting center point are dense and the impact points far away from the shooting center point are sparse only by determining the coordinates of the shooting center point and based on the selected impact probability value and the selected impact angle value. According to the technical scheme, the impact point position can be simply and accurately determined only by randomly selecting the data value and combining the selected data value with the impact point and the shooting central point, so that the computing resources required by determining the impact point position are greatly reduced, and the overall response performance of the shooting game is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a schematic flowchart of a method for determining a location of an impact point in a shooting game according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a method for determining a location of an impact point in a shooting game according to a second embodiment of the present invention;
fig. 3 is a block diagram illustrating a configuration of a landing point position determining apparatus in a shooting game according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order, nor should be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Example one
Fig. 1 is a schematic flowchart of a method for determining a position of an impact point in a shooting game according to an embodiment of the present application, where the method is suitable for determining an impact point of a shrapnel when a game character shoots with a shooting device in a handheld manner in the shooting game. The method can be executed by a computer device loaded with shooting game software, the method for determining the impact point position in the shooting game can be integrated in the loaded shooting game software as a plug-in, and the method is realized by running the shooting game software. Generally, the computer device may be a notebook, a desktop computer, a smart tablet, and the like.
It should be noted that the method for determining the impact point position in the shooting game provided by the embodiment mainly faces to the shooting equipment which launches multiple shrapnels. Meanwhile, through analyzing the positions of the impact points of the elastic sheets launched by the shooting equipment, the impact points have the characteristic of normal distribution, namely, the farther away from the shooting central point, the less the number of the distributed impact points, and the closer to the shooting central point, the denser the number of the distributed impact points. Based on this distribution characteristic, a gaussian distribution is currently employed to determine the location of the impact point of the firing equipment. However, the determination method is complex in process and occupies more computing resources.
As shown in fig. 1, a method for determining a landing point position in a shooting game provided in this embodiment specifically includes the following steps:
s101, determining the shooting center point coordinate of shooting equipment according to the current role position information of the game role in the shooting process.
In this embodiment, the game character may be a character that is selected by a user (game player) in advance after entering the shooting game, and various actions of the game character in the game are controlled by the user through input of information. For example, the user may control the action of the game character through control information input by input devices such as a keyboard, a mouse, and a touch panel; the shooting process can be specifically understood as that a user controls a game role to be in a shooting state. The current role position information can be specifically understood as a pose state of the game role under the current frame according to the control information when the user controls the game role, and the current role position information can include the current moving direction and the current role coordinate position of the game role.
In this embodiment, the shooting equipment is specifically understood as firearm equipment selected by a user before shooting, and the shooting equipment is preferably considered as equipment capable of shooting a plurality of shrapnels in one shot, such as a shotgun. The shooting center point coordinate may be regarded as a center position of distribution of impact points of the shot shrapnel, and may be a point coordinate which is from a shooting port of the shooting equipment and is fixed forward in a shooting direction of the shooting equipment. In this embodiment, to determine the impact point positions satisfying the above described impact point distribution rule, the shooting center point coordinates satisfying the impact point distribution are determined first.
Specifically, the position of a launching port of the shooting equipment can be determined firstly through the current role position information, and then the coordinates of the shooting center point are further determined; the position of a preset set point can be determined according to the current role position information, and then the coordinates of the shooting center point are further determined.
S102, selecting the landing probability values of a set number from the determined landing probability range, and correspondingly selecting the landing angle values of the set number from the set angle range.
From the above description, it is known that the shot center point is the center point of the distribution of the impact points, and therefore, it can be analyzed that there is a certain relationship between the positions of the impact points to be determined and the shot center point, for example, the coordinate positions of the impact points and the coordinate position of the shot center point should be separated by a certain distance, and for example, a plurality of impact points may be distributed around the shot center point, and the distribution of all the impact points may not be all located on the same straight line. Meanwhile, assuming that a direction corresponding to the projection of the launching direction of the shooting equipment in a plane coordinate system is taken as a reference direction, a included angle value should exist between a ray formed by the shooting point and the shooting center point and the reference direction.
Based on the analysis, it can be known how to select the distance value between the impact point and the shot center point and how to select the included angle value between the impact point and the reference direction in order to determine the position of the impact point satisfying the distribution rule of the impact points based on the selected numerical information. Specifically, the present embodiment selects the numerical information through this step.
In this embodiment, the range of the impact probability includes a set of consecutive impact probability values, each of the included impact probability values may correspond to a distance value through some association relationship, and the relationship between each impact probability value, its corresponding distance value, and the shooting center point may be understood as: the probability value less than the corresponding distance value from the shot center point is the impact probability value.
In this embodiment, the set angle range includes a set of consecutive landing angle values, and each landing angle value included in the set angle range can be regarded as an included angle value between a ray formed by a landing point and a shooting center point and a reference direction.
The method comprises the following steps of directly selecting the landing probability values with the set number, selecting the landing angle values with the set number, theoretically, each landing probability value can correspond to each landing angle value, and the formed corresponding relation has the condition that the landing probability values correspond to the landing angle values one to one.
It should be noted that, in this step, the ballistic probability value and the ballistic angle value are both selected in a random and different numerical selection manner, and meanwhile, the specific value of the selected set number may be actually equal to the total number of the shrapnels of the shrapnel launched by the shooting equipment, and the set angle range may be directly and preferably a circumferential range, that is, [0 °, 360 ° ]. In addition, the value of the impact probability range may be determined when a certain association relationship is established between the impact probability value and the distance value.
S103, determining the bullet point positions of the set number of bullet points according to the bullet probability values, the corresponding bullet angle values and the shooting center point coordinates.
In this embodiment, after the set number of impact probability values and impact angle values are selected in S102, the shot center point coordinates are combined to determine the shot point positions of the set number of impact points. Specifically, while the coordinates of the shooting center point are determined in S101, the shooting direction of the shooting equipment during the current shooting process may also be obtained, and the projection direction of the shooting direction onto the horizontal plane two-dimensional coordinate system is recorded as the reference direction.
After the landing angle values are determined, the set number of rays which respectively form each landing angle value with the reference direction by taking the shooting center point as a starting point can be determined, and the coordinate positions of the landing points to be determined are respectively positioned on each ray. Considering that a landing probability value corresponds to a distance value with a certain association relationship, after selecting each landing probability value and determining which distance value each landing probability value corresponds to, a target point which is away from a shooting center point and is the corresponding distance value can be directly determined from a target ray (determined based on the corresponding relationship between the landing probability value and the landing angle value) corresponding to the landing probability value, and finally, a set number of target points can be obtained, each target point can be respectively regarded as a landing point, and the corresponding coordinate position can be regarded as a shot point position.
For example, in this embodiment, a quadratic function expression may be constructed to represent the association relationship between the impact point probability value and the distance value, and the construction of the quadratic function expression may be set simply from a linear function and a triangular region formed in two-dimensional coordinates.
Compared with the existing method for determining the impact point position through Gaussian distribution, the method for determining the impact point position in the shooting game provided by the embodiment of the invention only needs to determine the positions of the impact points with the distribution rule satisfying that the impact points close to the shooting center point are dense and the impact points far away 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. According to the technical scheme, the impact point position can be simply and accurately determined only by randomly selecting the data value and combining the selected data value with the impact point and the shooting central point, so that the computing resources required by determining the impact point position are greatly reduced, and the overall response performance of the shooting game is improved.
As an optional embodiment of the present invention, in the optional embodiment, the method further includes: and determining the impact point probability range corresponding to the shooting equipment according to a triangular area surrounded by the constructed target linear function and a set two-dimensional coordinate system.
This alternative embodiment provides a determination process for a range of impact point probabilities upon which a selected impact point probability value is based in the provided method of impact point location determination. Preferably, in this optional embodiment, a target linear function may be directly set, and a triangular region surrounded by the target linear function and the abscissa and ordinate axes in a two-dimensional coordinate system may be determined. The area of the triangular area can be regarded as the maximum value selectable for the impact probability value, and based on the maximum value, the impact probability range of the shooting equipment can be determined.
Further, in this alternative embodiment, the determining, according to a triangular region surrounded by the constructed target linear function and the set two-dimensional coordinate system, the impact point probability range corresponding to the shooting equipment is embodied as: acquiring a preset positive value, determining an intercept and a slope value based on the positive value, and constructing a target linear function; determining the area of a triangular area surrounded by the target linear function and a set two-dimensional coordinate system; and obtaining a numerical range which is larger than 0 and not larger than the area of the region, and determining the data range as an impact point probability range corresponding to the shooting equipment.
The optional embodiment provides specific determination of the impact point probability range, exemplarily, a target linear function is determined firstly, and for the target linear function, it is required to ensure that a triangular area formed by the target linear function and two coordinate axes in a two-dimensional coordinate system is located in a first quadrant, and meanwhile, the intercept is ensured to be equal to the absolute value of a slope value; then, the area of the triangle area of the lock book can be determined, and the area is used as the maximum probability value to form an impact point probability range which is greater than 0 and less than or equal to the area of the area. For example, assuming a positive value of k, the target linear function can be expressed as: y-kx + k.
As another alternative to the embodiment of the present invention, in this alternative, the method further comprises determining a functional relationship between the impact point probability values in the impact point probability range and the arguments in the constructed objective linear function.
This optional embodiment provides a process of determining an association relationship between the impact probability value and the associated distance value in the method for determining an impact point position provided in this embodiment. The association relationship may preferably be a functional relationship, wherein the functional relationship may be constructed according to the target linear function and an area of a triangular region surrounded by the target linear function and two coordinate axes.
Specifically, in this optional embodiment, it is assumed that an argument in the target linear function may be regarded as a distance value from the impact point to be determined to the firing center point, and accordingly, a trapezoidal area obtained by intercepting a function value obtained by substituting the argument into the target linear function in a triangular region may be regarded as a corresponding impact probability value when the impact point to be determined to the firing center point is smaller than the distance value. Thus, by combining the trapezoidal area (i.e., the landing probability value) with the target linear function, a functional relationship between the landing probability value and the argument in the target linear function can be determined.
For example, taking the above target linear function as y ═ -kx + k as an example, the functional relation for identifying the impact probability value and the argument relation in the target linear function can be expressed as:
where x represents the argument in the target linear function, k represents the set positive value, and S is the trapezoidal area (impact probability value). When the trapezoidal area, i.e. the impact probability value, is known, the corresponding argument value (i.e. the distance value of the impact point to be determined from the shot center point) can be determined. Also, it can be understood that, when viewed in the functional relationship alone, x can correspond to the variable value in the functional relationship, and S can correspond to the argument value in the functional relationship.
Further, an optional embodiment of this embodiment further optimizes, after determining the positions of the set number of the impact points, the following steps: and highlighting each impact point position through setting a display form.
In this optional embodiment, in consideration of the reality of the shooting scene in the shooting game, after the impact point position of each impact point is determined, each impact point position may be rendered into the shooting scene in a set display form. For example, the set display form may be highlighted by the following visual effects: for example, a crater may be rendered at each impact location to highlight the visual effect; for another example, after knowing the coordinate position of the target to be shot, and the impact point position of each shrapnel and the attribute information such as the flight speed of the shrapnel, it can be determined which shrapnel will hit the target to be shot, thereby determining the hit position of the target to be shot, and rendering the hit visual effect on the hit position.
Example two
Fig. 2 is a schematic flow chart of a method for determining a location of an impact point in a shooting game according to a second embodiment of the present invention, where this embodiment is optimized based on the above embodiment, and in this embodiment, determining a shooting center coordinate of a shooting device according to current role location information of a game role in a shooting process is further embodied as: determining the current point position information of a mounting point by combining function call with the current role position information of a game role in a shooting process, wherein the mounting point is arranged on the game role; extracting the current point moving direction in the current point position information, and determining the current projection coordinate corresponding to the mounting point in the current moving direction by combining the current point coordinate position in the current point position information; and determining the shooting center point coordinate of the shooting equipment according to the current projection coordinate and the maximum shooting distance of the shooting equipment acquired in advance.
Meanwhile, the embodiment further embodies the step of determining the impact point positions of the elastic pieces with the set number, which are launched by the shooting equipment, according to the impact probability values, the corresponding impact angle values and the shooting center point coordinates as follows: for each landing probability value, determining a corresponding target variable value of the landing probability value in the determined functional relation; determining a coordinate position which is away from the shooting center point coordinate and is the target variable value along the direction of the landing angle value corresponding to the landing probability value; and determining the coordinate position as the shot point position of the shot point corresponding to the shot probability value under the shooting equipment.
As shown in fig. 2, a method for determining a landing point position in a shooting game provided in the second embodiment of the present invention specifically includes the following operations:
the present embodiment below gives operations S201 and S202 of the determination of the shot center point.
S201, determining the current point position information of a mounting point by combining the function call with the current role position information of a game role in the shooting process, wherein the mounting point is arranged on the game role.
In this embodiment, a mode of setting a mount point and determining the coordinates of the shooting center point based on the mount point is adopted, where the mount point may be a base point selected from a certain part of the game character, for example, a mount point selected from a hand of the game character. The position information corresponding to the mount point can be directly determined by combining the current role position information of the game role in a function call mode.
S202, determining the shooting center point coordinate of the shooting equipment according to the current point position information and the maximum shooting distance of the shooting equipment obtained in advance.
In this embodiment, the current point position information may include a current point coordinate position of the mounting point and a current point moving direction, where the current point coordinate position is equivalent to a coordinate position of the mounting point in a world coordinate system, and the current point moving direction may be regarded as a transmitting direction of a transmitting shrapnel of the shooting equipment. The maximum shooting distance may be considered as a maximum range in which the shooting equipment flies in the horizontal launching direction, and the maximum shooting distance may be preset as attribute information at the development stage of the shooting game software.
In this embodiment, it is preferable to consider that the shooting center point is located on the ground of the game scene, and the maximum shooting distance may be equivalent to a distance value in the horizontal launching direction, so that, in this step, the corresponding point projection coordinate of the current point coordinate position on the horizontal plane may be determined first, then, a point which is the maximum shooting distance from the point projection coordinate may 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 may be determined, thereby obtaining the shooting center point coordinate.
S203, selecting the landing probability values with the set number from the determined landing probability range, and correspondingly selecting the landing angle values with the set number from the set angle range.
Illustratively, the landing probability values with the same number as the total number of the shrapnels launched by the shooting equipment are randomly selected from the landing probability range, meanwhile, the landing angle values of the total number of the launched shrapnels are also selected from the set angle range values of [0 degrees and 360 degrees ], and the landing probability values and the landing angle values are randomly selected in a one-to-one corresponding relation pair, so that each landing probability value has a corresponding landing angle value.
The following S204 to S206 of the present embodiment give the determination process of the location of the impact point.
S204, determining a target variable value corresponding to the landing probability value in the determined functional relation according to each landing probability value.
From the description of the first embodiment, it can be seen that the association between the impact probability values in the range of the impact point probabilities and the distance values of the impact points to be determined from the shot center point satisfies a functional relation, and the distance values of the impact points to be determined from the shot center point can be regarded as the variable values in the functional relation, which can be regarded as the argument values.
In this step, the following operations S205 and S206 are performed to determine the impact point positions of the impact points corresponding to the respective impact probability values, that is, for each impact probability value, the determination of the impact point position corresponding to the impact point can be performed by the following operations S205 and S206.
Specifically, the step may determine the corresponding target variable value after the landing probability value is known based on the determined functional relation.
S205, determining a coordinate position which is away from the shooting center point coordinate and is the target variable value along the shooting angle value direction corresponding to the shooting probability value.
The landing angle value corresponding to the landing probability value can be obtained in the step, the landing angle value is equivalent to an included angle value, and the included angle value can be formed by clockwise deflection by taking a projection direction formed by projection of the emission direction on a plane as a reference. The landing angle value direction can be regarded as the ray direction of the landing angle value by taking a shooting central point as a starting point and taking an included angle with the projection direction as the starting point.
This step can then determine a coordinate position of the target variable value from the shot centre point coordinate position in the direction of the landing angle value.
S206, determining the coordinate position as the shot point position of the shot point corresponding to the shot probability value under the shooting equipment.
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.
After the bullet probability values are operated through the steps, the bullet positions of the bullet points with the number equal to that of the shot elastic pieces can be determined.
The method for determining the position of the impact point in the shooting game provided by the embodiment of the invention embodies the operation of determining the shooting center point and also embodies the operation of determining the position of the impact point. Compared with the existing method for determining the impact point positions through Gaussian distribution, the method provided by the embodiment only needs to determine the positions of the impact points with the distribution rule satisfying the conditions that the impact points close to the shooting center point are dense and the impact points far away from the shooting center point are sparse based on the selected impact probability value and the selected impact angle value after the coordinates of the shooting center point are determined. According to the technical scheme, the impact point position can be simply and accurately determined only by randomly selecting the data value and combining the selected data value with the impact point and the shooting central point, so that the computing resources required by determining the impact point position are greatly reduced, and the overall response performance of the shooting game is improved.
EXAMPLE III
Fig. 3 is a block diagram of a device for determining a landing point position in a shooting game according to a third embodiment of the present application, where the device is suitable for determining a landing point of a shrapnel when a game character shoots with a shooting device in a handheld manner in the shooting game and can be executed by a computer device loaded with shooting game software. As shown in fig. 3, the apparatus includes: a center point determination module 31, a data extraction module 32 and a position determination module 33.
The center point determining module 31 is configured to determine a shooting center point coordinate of the shooting device according to current role position information of the game role in the shooting process;
the data selection module 32 is used for selecting the landing probability values with the set number from the determined landing probability range, and correspondingly selecting the landing angle values with the set number from the set angle range;
and the position determining module 33 is configured to determine the bullet point positions of the set number of bullet points according to each bullet probability value, the corresponding bullet angle value, and the shooting center point coordinate.
The device for determining the impact point position in the shooting game provided by the embodiment of the invention only needs to determine the position of each impact point, which has a distribution rule that the impact points close to the shooting center point are dense and the impact points far away 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. According to the technical scheme, the impact point position can be simply and accurately determined only by randomly selecting the data value and combining the selected data value with the impact point and the shooting central point, so that the computing resources required by determining the impact point position are greatly reduced, and the overall response performance of the shooting game is improved.
Further, the central point determining module 31 may be specifically configured to determine current point position information of a mount point by combining function call with current role position information of a game role in a shooting process, where the mount point is set on the game role; and determining the coordinates of the shooting center point of the shooting equipment according to the current point position information and the maximum shooting distance of the shooting equipment acquired in advance.
Further, the device may further include a range determining module, and the range determining module may be configured to determine, according to a triangular area surrounded by the constructed target linear function and the set two-dimensional coordinate system, an impact point probability range corresponding to the shooting equipment.
Further, the range determining module may be specifically configured to obtain a predetermined positive value, determine an intercept and a slope value based on the positive value, and construct a target linear function; determining the area of a triangular area surrounded by the target linear function and a set two-dimensional coordinate system; and obtaining a numerical range which is larger than 0 and not larger than the area of the region, and determining the data range as an impact point probability range corresponding to the shooting equipment.
Further, the device may further include a function determining module, configured to determine a functional relation between the impact point probability value in the impact point probability range and an argument in the constructed target linear function.
On the basis of the foregoing embodiment, the position determining module 33 may be specifically configured to determine, for each landing probability value, a target variable value corresponding to the landing probability value in the determined functional relation; determining a coordinate position which is away from the shooting center point coordinate and is the target variable value along the direction of the landing angle value corresponding to the landing probability value; and determining the coordinate position as the shot point position of the shot point corresponding to the shot probability value under the shooting equipment.
Further, the device can further comprise a position display module, wherein the position display module is used for highlighting each impact point position through a set display form.
Example four
Fig. 4 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. The computer device includes: a processor 40, a memory 41, a display 42, an input device 43, and an output device 44. The number of processors 40 in the computer device may be one or more, and one processor 40 is taken as an example in fig. 4. The number of the memory 41 in the computer device may be one or more, and one memory 41 is taken as an example in fig. 4. The processor 40, the memory 41, the display 42, the input device 43 and the output device 44 of the computer apparatus may be connected by a bus or other means, as exemplified by the bus connection in fig. 4. In an embodiment, the computer device may be a computer, a notebook, or a smart tablet, etc.
The memory 41 serves as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the computer device according to any embodiment of the present invention (for example, the center point determining module 31, the data extracting module 32, and the position determining module 33 in the impact point position determining device in the shooting game). The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the device, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The display screen 42 may be a touch-enabled display screen 42, which may be a capacitive screen, an electromagnetic screen, or an infrared screen. In general, the display screen 42 is used for displaying data according to instructions from the processor 40, and is also used for receiving touch operations applied to the display screen 42 and sending corresponding signals to the processor 40 or other devices.
The input means 43 may be used for receiving input numeric or character information and generating key signal inputs related to user settings and function controls of the presentation apparatus, and may be a camera for acquiring images and a sound pickup apparatus for acquiring audio data. The output device 44 may include an audio device such as a speaker. 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.
The processor 40 executes various functional applications of the device and data processing, i.e., implements the above-described impact point position determination method in the shooting game, by executing software programs, instructions, and modules stored in the memory 41.
The computer device provided by the above can be used for executing the method for determining the impact point position in the shooting game provided by any of the above embodiments, and has corresponding functions and advantages.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for determining a landing point position in a shooting game, including:
determining the shooting center point coordinate of shooting equipment according to the current role position information of the game role in 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;
and determining the bullet point positions of the bullet points with the set number according to the bullet impact probability values, the corresponding bullet impact angle values and the shooting center point coordinates.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method for determining a landing position in a shooting game described above, and may also perform related operations in the method for determining a landing position in a shooting game provided by any embodiment of the present invention, and have corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes instructions for enabling a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the method for determining a position of a landing point in a shooting game according to any embodiment of the present invention.
It should be noted that, in the device for determining the impact point position in the shooting game, the units and modules included in the device are only divided according to the functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (11)
1. A method for determining a location of a landing point in a shooting game, comprising:
determining the shooting center point coordinate of shooting equipment according to the current role position information of the game role in 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;
and determining the bullet point positions of the bullet points with the set number according to the bullet impact probability values, the corresponding bullet impact angle values and the shooting center point coordinates.
2. The method of claim 1, wherein determining the shooting center point coordinates of the shooting equipment according to the current character position information of the game character during shooting comprises:
determining the current point position information of a mounting point by combining function call with the current role position information of a game role in a shooting process, wherein the mounting point is arranged on the game role;
and determining the coordinates of the shooting center point of the shooting equipment according to the current point position information and the maximum shooting distance of the shooting equipment acquired in advance.
3. The method of claim 1, further comprising:
and determining the impact point probability range corresponding to the shooting equipment according to a triangular area surrounded by the constructed target linear function and a set two-dimensional coordinate system.
4. The method of claim 3, wherein the 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 comprises:
acquiring a preset positive value, determining an intercept and a slope value based on the positive value, and constructing a target linear function;
determining the area of a triangular area surrounded by the target linear function and a set two-dimensional coordinate system;
and obtaining a numerical range which is larger than 0 and not larger than the area of the region, and determining the data range as an impact point probability range corresponding to the shooting equipment.
5. The method of claim 1, further comprising:
and determining a functional relation between the impact point probability value in the impact point probability range and an independent variable in the constructed target linear function.
6. The method of claim 1, wherein determining the impact point positions of a set number of elastic pieces fired by the firing equipment according to the impact probability values, the corresponding impact angle values and the shooting center point coordinates comprises:
for each landing probability value, determining a corresponding target variable value of the landing probability value in the determined functional relation;
determining a coordinate position which is away from the shooting center point coordinate and is the target variable value along the direction of the landing angle value corresponding to the landing probability value;
and determining the coordinate position as the shot point position of the shot point corresponding to the shot probability value under the shooting equipment.
7. The method of any of claims 1-6, further comprising, after determining the shot positions for the set number of shots:
and highlighting each impact point position through setting a display form.
8. The method according to any one of claims 1-6, wherein the set number is the total number of shrapnels currently fired by the firing device;
the set angle range is [0 °, 360 ° ].
9. An apparatus for determining a landing point position in a shooting game, comprising:
the center point determining module is used for determining the shooting center point coordinate of the shooting equipment according to the current role position information of the game role in the shooting process;
the data selection module is used for selecting the landing probability values with the set number from the determined landing probability range and correspondingly selecting the landing angle values with the set number from the set angle range;
and the position determining module is used for determining the bullet point positions of the set number of bullet points according to the bullet probability values, the corresponding bullet angle values and the shooting center point coordinates.
10. A computer device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
11. A storage medium containing computer-executable instructions for performing the method of claims 1-8 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010900481.7A CN114100146A (en) | 2020-08-31 | 2020-08-31 | Method, device, equipment and medium for determining impact point position in shooting game |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010900481.7A CN114100146A (en) | 2020-08-31 | 2020-08-31 | Method, device, equipment and medium for determining impact point position in shooting game |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114100146A true CN114100146A (en) | 2022-03-01 |
Family
ID=80360292
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010900481.7A Pending CN114100146A (en) | 2020-08-31 | 2020-08-31 | Method, device, equipment and medium for determining impact point position in shooting game |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114100146A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006318510A (en) * | 2006-08-18 | 2006-11-24 | Sega Corp | Game device, image processing device and image processing method |
CN101605583A (en) * | 2007-11-28 | 2009-12-16 | 科乐美数码娱乐株式会社 | Game device, image generating method, information storage medium and program |
CN101726216A (en) * | 2008-11-03 | 2010-06-09 | 季昱 | Spatial orientation toy gun and method for calculating shooting effect of toy gun |
JP2011036503A (en) * | 2009-08-13 | 2011-02-24 | Konami Digital Entertainment Co Ltd | Game device, image generation method and program |
CN109806594A (en) * | 2019-01-17 | 2019-05-28 | 腾讯科技(深圳)有限公司 | Ballistic display method, device and equipment in virtual environment |
CN111001159A (en) * | 2019-12-06 | 2020-04-14 | 腾讯科技(深圳)有限公司 | Virtual item control method, device, equipment and storage medium in virtual scene |
CN111111171A (en) * | 2019-12-17 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Operation control method, operation control device, storage medium, and electronic device |
-
2020
- 2020-08-31 CN CN202010900481.7A patent/CN114100146A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006318510A (en) * | 2006-08-18 | 2006-11-24 | Sega Corp | Game device, image processing device and image processing method |
CN101605583A (en) * | 2007-11-28 | 2009-12-16 | 科乐美数码娱乐株式会社 | Game device, image generating method, information storage medium and program |
CN101726216A (en) * | 2008-11-03 | 2010-06-09 | 季昱 | Spatial orientation toy gun and method for calculating shooting effect of toy gun |
JP2011036503A (en) * | 2009-08-13 | 2011-02-24 | Konami Digital Entertainment Co Ltd | Game device, image generation method and program |
CN109806594A (en) * | 2019-01-17 | 2019-05-28 | 腾讯科技(深圳)有限公司 | Ballistic display method, device and equipment in virtual environment |
CN111001159A (en) * | 2019-12-06 | 2020-04-14 | 腾讯科技(深圳)有限公司 | Virtual item control method, device, equipment and storage medium in virtual scene |
CN111111171A (en) * | 2019-12-17 | 2020-05-08 | 腾讯科技(深圳)有限公司 | Operation control method, operation control device, storage medium, and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102625233B1 (en) | Method for controlling virtual objects, and related devices | |
WO2021208614A1 (en) | Virtual object control method and apparatus, device, and storage medium | |
US11003261B2 (en) | Information processing method, terminal, and computer storage medium | |
CN110339562B (en) | Virtual object control method, device, terminal and storage medium | |
WO2020238592A1 (en) | Method and apparatus for generating mark information in virtual environment, electronic device, and storage medium | |
JP6529659B2 (en) | Information processing method, terminal and computer storage medium | |
KR102092451B1 (en) | Information processing method, terminal, and computer storage medium | |
CN105148517A (en) | Information processing method, terminal and computer storage medium | |
AU2016336604A1 (en) | Information processing method and terminal, and computer storage medium | |
JP7137719B2 (en) | Virtual object selection method, device, terminal and program | |
JP2022529853A (en) | Game object control method and device | |
JP2022533920A (en) | Virtual object selection method, apparatus, equipment and computer program | |
JP2024001280A (en) | Method, device, terminal, and storage medium, for selecting virtual objects | |
CN113457157A (en) | Method and device for switching virtual props in game and touch terminal | |
US20230082928A1 (en) | Virtual aiming control | |
JP7423137B2 (en) | Operation presentation method, device, terminal and computer program | |
CN114307129A (en) | Game interaction control method, device, equipment and medium | |
CN114100146A (en) | Method, device, equipment and medium for determining impact point position in shooting game | |
CN112843718B (en) | Equipment switching method, device, medium and electronic equipment | |
CN114307130A (en) | Game interaction control method, device, equipment and medium | |
CN114011051B (en) | Control method, medium and equipment for virtual sight in shooting game | |
CN114522419A (en) | Method, device, equipment and medium for presenting scattering scene in shooting game | |
CN117672037B (en) | Modeling training method and platform based on large space positioning | |
CN109117076B (en) | Game unit selection method, storage medium and computer equipment | |
CN115671748A (en) | Weapon hit processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |