CN113440855A - Attack control method and device for multiplayer online game and storage medium - Google Patents

Attack control method and device for multiplayer online game and storage medium Download PDF

Info

Publication number
CN113440855A
CN113440855A CN202110739871.5A CN202110739871A CN113440855A CN 113440855 A CN113440855 A CN 113440855A CN 202110739871 A CN202110739871 A CN 202110739871A CN 113440855 A CN113440855 A CN 113440855A
Authority
CN
China
Prior art keywords
attack
prop
output direction
game
target
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
Application number
CN202110739871.5A
Other languages
Chinese (zh)
Inventor
刘韦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202110739871.5A priority Critical patent/CN113440855A/en
Publication of CN113440855A publication Critical patent/CN113440855A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets

Abstract

The application discloses an attack control method and device for a multiplayer online game, a storage medium and computer equipment, wherein the method comprises the following steps: responding to an attack instruction in a game, and acquiring an attack pointing position corresponding to the attack instruction; taking the position of the virtual camera as a starting point, transmitting an aiming ray to the attack pointing position to perform attack on an assaultable object, determining a collision point of the aiming ray and the assaultable object as a target attack position, and sending an attack result request instruction to a game server according to the target attack position and the attack prop position; determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element to the first element output direction; and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.

Description

Attack control method and device for multiplayer online game and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an attack control method and apparatus for a multiplayer online game, a storage medium, and a computer device.
Background
In the field of games, attacks are common game forms, wherein some forms need to calculate the motion track of an attack element and attack with a specific track, such as shooting a bullet from a gun in a gun battle type game, calculating the flight track of the bullet, and using a legal treasure carried by a game character to release skills in a swordman type game, and some specific skill types need to calculate the release direction of the skills in advance.
In the prior art, a player designates a certain point in a game as a sight bead, and when calculating a motion trajectory of an attack element, the player generally directly uses a direction of a virtual camera in the game, and uses a direction from the virtual camera to the sight bead as an attack direction to further determine the motion trajectory of the attack element. In some scenarios, for example, when the mirror is moved in a third person's perspective, since the player generally designates the perspective of the virtual character in the simulated game when designating the position of the sight bead, the calculation of the attack direction may cause the actual attack direction to deviate from the player's desired direction.
How to improve the accuracy of the calculation of the attack direction and make the motion trail of the attack element closer to the expectation of the player so as to improve the game experience of the player is a long-term exploration and research direction for technicians in the game field.
Disclosure of Invention
In view of this, the present application provides an attack control method and apparatus for a multiplayer online game, a storage medium, and a computer device, which solve the problem of a large calculation error of an output direction of an attack element, improve accuracy of an attack direction, contribute to improving attack hit rate, improve attack feel, and bring better game experience to players.
According to an aspect of the present application, there is provided an attack control method of a multiplayer online game, including:
responding to an attack instruction in a game, and acquiring an attack pointing position corresponding to the attack instruction;
taking the position of a virtual camera as a starting point, transmitting an aiming ray to the attack pointing position to perform attack on an assaultable object, determining the collision point of the aiming ray and the assaultable object as a target attack position, sending an attack result request instruction to a game server according to the target attack position and the attack prop position so that the game server calculates the attack direction and the attack result corresponding to the attack prop according to the attack result request instruction, synchronizing the attack direction and the attack result to a related client side, and feeding back the attack result to the game client side;
determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element to the first element output direction;
and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
Optionally, when the attack prop includes a plurality of attack props, determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element in the first element output direction, specifically including:
and respectively determining the element output direction corresponding to each attack prop according to the connection line of each attack prop position and the target attack position, and controlling each attack prop to output the attack elements to the respective corresponding element output direction.
Optionally, before the starting from the position of the virtual camera and before the emitting of the aiming ray to the attack pointing position for the collision of the offensive object, the method further includes:
acquiring a current mirror-moving visual angle in a game;
when the current mirror moving visual angle is a third person called visual angle, the position of the virtual camera is taken as a starting point, and aiming rays are emitted to the attack pointing position to perform attack-capable object collision;
and when the current mirror-moving visual angle is a first-person visual angle, determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position, and controlling the attack prop to output an attack element to the second element output direction.
Optionally, before determining the output direction of the second element of the attack prop according to a connection line between the position of the attack role and the attack pointing position, the method further includes:
acquiring the distance between the attack prop and the attack role;
when the distance is larger than or equal to a preset distance threshold value, the position of the virtual camera is used as a starting point, and aiming rays are emitted to the attack pointing position to perform attack on an attacked object;
and when the distance is smaller than the preset distance threshold, executing a connection line between the position of the attack role and the attack pointing position, and determining a second element output direction of the attack prop.
Optionally, before determining the output direction of the second element of the attack prop according to a connection line between the position of the attack role and the attack pointing position, the method further includes:
acquiring the current moving speed of the attack role;
when the current moving speed is greater than or equal to a preset moving speed threshold value, the position where the virtual camera is located is used as a starting point, aiming rays are emitted to the attack pointing position to perform attack on an assaultable object;
and when the current moving speed is smaller than the preset moving speed threshold value, executing a connection line between the position of the attack role and the attack pointing position, and determining a second element output direction of the attack prop.
Optionally, before the starting from the position of the virtual camera and before the emitting of the aiming ray to the attack pointing position for the collision of the offensive object, the method further includes:
inquiring whether an attack object exists in a preset fault-tolerant range corresponding to the attack pointing position;
if the virtual camera does not exist in the target object, the virtual camera is executed to be located at the position as a starting point, and aiming rays are emitted to the attack pointing position to perform attack on the assaultable object;
if the attack element exists, acquiring a target attack object in the preset fault-tolerant range, determining a third element output direction of the attack prop according to a connection line between the position of the attack prop and the position of the target attack object, and controlling the attack prop to output the attack element to the third element output direction.
Optionally, the attack instruction includes an attack element identifier and/or an attack prop identifier; before determining the first element output direction of the attack prop according to the connection line between the attack prop position and the target attack position, the method further comprises:
and selecting attack props to be used from the attack props with the authority of the attack roles according to the attack element identifications and/or the attack prop identifications, and determining the positions of the attack props corresponding to the attack props to be used.
Optionally, the controlling the attack prop to output an attack element to the first element output direction specifically includes:
and under the condition that the current moving speed of the attack role is greater than a preset element drift threshold value, generating an element flight picture of the attack prop output attack element according to the first element output direction, wherein the attack element in the element flight picture has a drift effect of moving along with the attack role. According to another aspect of the present application, there is provided an attack control apparatus of a multiplayer online game, including:
the instruction response module is used for responding to an attack instruction in a game and acquiring an attack pointing position corresponding to the attack instruction;
an attack position determining module, configured to launch an aiming ray to the attack pointing position to perform an attack on an assaultable object with a position of a virtual camera as a starting point, determine a collision point between the aiming ray and the assaultable object as a target attack position, and send an attack result request instruction to a game server according to the target attack position and the attack prop position, so that the game server calculates an attack direction and an attack result corresponding to the attack prop according to the attack result request instruction, synchronizes the attack direction and the attack result to a related client, and feeds back the attack result to the game client;
the first attack module is used for determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position and controlling the attack prop to output an attack element to the first element output direction; and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
Optionally, the attack instruction includes an attack element identifier and/or an attack prop identifier; the device further comprises:
and the attack prop selection module is used for selecting an attack prop to be used from the attack props with the authority according to the attack element identification and/or the attack prop identification before determining the first element output direction of the attack prop according to the connection line between the attack prop position and the target attack position, and determining the attack prop position corresponding to the attack prop to be used.
Optionally, when the attack prop includes a plurality of attack props, the first attack module is specifically configured to: and respectively determining the element output direction corresponding to each attack prop according to the connection line of each attack prop position and the target attack position, and controlling each attack prop to output the attack elements to the respective corresponding element output direction.
Optionally, the apparatus further comprises:
the visual angle acquisition module is used for acquiring the current mirror moving visual angle in the game;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the current mirror moving angle is a third person called angle;
and the second attack module is used for determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position when the current mirror-moving visual angle is the first-person visual angle, and controlling the attack prop to output an attack element to the second element output direction.
Optionally, the apparatus further comprises:
the distance acquisition module is used for acquiring the distance between the attack prop and the attack role;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the distance is greater than or equal to a preset distance threshold;
the second attack module is further configured to execute the connection line between the position where the attack role is located and the attack pointing position when the distance is smaller than the preset distance threshold, and determine a second element output direction of the attack prop.
Optionally, the apparatus further comprises:
the moving speed acquisition module is used for acquiring the current moving speed of the attack role;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the current moving speed is greater than or equal to a preset moving speed threshold;
the second attack module is further configured to, when the current movement speed is smaller than the preset movement speed threshold, execute a connection line between the position where the attack role is located and the attack pointing position, and determine a second element output direction of the attack prop.
Optionally, the apparatus further comprises:
the attack object query module is used for querying whether an attack object exists in a preset fault-tolerant range corresponding to the attack pointing position;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, if not;
and the third attack module is used for acquiring the target attack object in the preset fault-tolerant range if the attack object exists, determining a third element output direction of the attack prop according to a connecting line between the position of the attack prop and the position of the target attack object, and controlling the attack prop to output an attack element to the third element output direction.
Optionally, the first attack module is further configured to generate an element flight image of the attack prop outputting an attack element according to the first element output direction when the current moving speed of the attack role is greater than a preset element drift threshold, where the attack element in the element flight image presents a drift effect moving along with the attack role.
According to still another aspect of the present application, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the attack control method of the above-described multiplayer online game.
According to still another aspect of the present application, there is provided a computer device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, the processor implementing the attack control method for a multiplayer online game described above when executing the program.
By means of the technical scheme, the attack control method and device, the storage medium and the computer device of the multiplayer online game, provided by the application, respond to a specific type of attack instruction in the game, obtain an attack pointing position appointed by a player, emit aiming rays to the attack pointing position by taking a virtual camera position as a starting point to perform attack on an assaultable object, take the collision point of the aiming rays and the assaultable object as a target attack position, take the direction in which the position of the attack prop looks at the target attack position as an attack element output direction to control the attack prop to output the attack element according to the direction, calculate the attack direction and the attack result by using a game server, generate an attack picture at a game client according to the attack result, and synchronize the attack direction and the attack result to a related client through the game server. Compared with the mode that the connecting direction of the virtual camera and the attack pointing position serves as the output direction of the attack element in the prior art, the method and the device solve the problem that the calculation error of the output direction of the attack element is large, improve the accuracy of the attack direction, improve the response speed of attack instructions, contribute to improving the attack hit rate, improve the attack hand feeling and bring better game experience for players.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of an attack control method for a multiplayer online game according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating an output direction of a first attack element according to an embodiment of the present application;
fig. 3 is a schematic structural diagram illustrating an attack control apparatus for a multiplayer online game according to an embodiment of the present application.
Detailed Description
The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
In this embodiment, an attack control method for a multiplayer online game is provided, as shown in fig. 1, the method includes:
step 101, responding to an attack instruction in a game, and acquiring an attack pointing position corresponding to the attack instruction;
102, taking the position of a virtual camera as a starting point, transmitting an aiming ray to the attack pointing position to perform attack on an assaultable object, determining the collision point of the aiming ray and the assaultable object as a target attack position, sending an attack result request instruction to a game server according to the target attack position and the attack prop position, so that the game server calculates the attack direction and the attack result corresponding to the attack prop according to the attack result request instruction, synchronizes the attack direction and the attack result to a related client, and feeds back the attack result to the game client;
103, determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element to the first element output direction;
and 104, receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
The attack control method provided by the embodiment of the application is mainly applied to releasing specific types of skills, shooting bullets by guns and other game scenes needing to calculate attack directions, the attack elements are output in certain attack directions in the game scenes, for example, flames are sprayed in specific directions from 'law treasures' carried by game virtual characters, and for some skills of specified hit positions, for example, a group of flames is released in a specified ground position, the calculation of the attack directions is not needed, and the skill release can be directly carried out. In a specific application scenario, a user can play a game by operating a game client, and the game client responds to an attack instruction to control an attack role to attack by using an attack prop. In response to an attack instruction in the game, whether the attack type indicated by the attack instruction is the type requiring calculation of the attack direction or not may be determined, and if so, an attack role corresponding to the attack instruction and an attack pointing position specified by the player may be acquired, where the attack role may be a game virtual role played by the player, and the attack pointing position may be a coordinate position of a point in the game world calculated based on the point selected by the player in the game display interface.
Further, the position of the virtual camera is obtained, the view angle direction of the virtual camera position looking at the attack pointing position is taken as a ray emission direction, the virtual camera position is taken as an origin to emit a targeting ray, the attacking object in the ray direction is collided by the targeting ray, and when the attacking object is collided, the intersection point of the targeting ray and the attacking object is determined as a target attack position, wherein the target attack position is taken as a position expected to be attacked by the player, specifically, the position expected to be attacked by the bullet by the player, and the position expected to be attacked by the skill. After the target attack position is determined, the connecting line direction of the attack prop position and the target attack position is used as the output direction of an attack element corresponding to the attack prop, namely the first element output direction, such as the ballistic direction of a bullet, the release direction of skill and the like, so that the first element output direction is more in line with the output direction expectation of a user on the attack element, the aiming error is reduced, and the accuracy and the authenticity of the output direction of the attack element are improved. Meanwhile, after determining the target attack position or controlling the attack prop to output the attack element in the first element output direction, the game client can also generate an attack result request instruction according to the target attack position and the attack prop position, and send the attack result request instruction to the game server so as to request a corresponding attack result from the game server. For the game server, after receiving the attack result request instruction, determining an attack direction according to the attack prop position and the target attack position, wherein the attack direction can be a connection direction of the attack prop position and the target attack position, further calculating which objects can be hit by the attack element output to the attack direction from the attack prop position, and taking the data of the objects which can be hit, the damage of the attack element to the objects and the like as an attack result. After the game server calculates the attack direction and the attack result, the game server synchronizes the relevant game clients so that the relevant game clients can present corresponding attack effects according to the attack direction and the attack result, and the data of the game clients are ensured to be consistent. The related clients include, but are not limited to, clients corresponding to other game characters playing the same game together with the attack character. Through the mode, after receiving the attack direction synchronized by the server, each associated client can synchronously display the attack elements output from the attack prop positions of the attack roles and synchronously display the attack result pictures corresponding to the attack operation of the attack roles according to the attack results synchronized by the server, so that the output of the attack elements can be displayed on all associated clients according to the real output direction of the attack elements in a multi-player online game, the authenticity of the display effect in the associated clients is improved, and the user experience is optimized. And for the server, the attack prop position and the target attack position can be calculated and determined by the client, so that the calculation amount of the server is reduced, and the performance overhead of the server is reduced.
And finally, controlling the attack prop to output the attack elements to the direction to realize bullet launching and skill release, ensuring that the attack elements can be accurately output according to the expected direction of the player, improving attack hit rate and improving game experience of the player, and the output direction of the first element can be calculated in the client side without depending on the calculation result of the server, so that the response speed to an attack instruction is higher, and the hand feeling of the player is better. Further, an attack picture is generated according to the attack result fed back by the game server, and what the object hit by the attack element is, how much the damage amount is, and the like are determined based on the attack result fed back by the game server.
In a specific application scenario, an environment or an object in a game scenario may affect an attack element, and an output display effect, a flight state display effect, a collision display effect with an attacked object, and the like of the attack element may be adjusted according to an environment in which an attack character attacks using an attack prop and/or characteristics of the material, the attribute, and the like of the attacked object indicated in an attack result by combining an effect of the attack element and the environment or the object in the game scenario.
By applying the technical scheme of the embodiment, the attack directing position appointed by the player is obtained in response to the attack instruction of a specific type in the game, aiming rays are emitted to the attack directing position by taking the position of the virtual camera as a starting point to collide the attacking object, the collision point of the aiming rays and the attacking object is taken as the target attack position, the direction of the position of the attack prop looking at the target attack position is taken as the output direction of the attack element to control the attack prop to output the attack element according to the direction, the attack direction and the attack result are calculated by using the game server, an attack picture is generated at the game client according to the attack result, and the attack direction and the attack result are synchronized to the associated client through the game server. Compared with the mode that the connecting direction of the virtual camera and the attack pointing position serves as the output direction of the attack element in the prior art, the method and the device solve the problem that the calculation error of the output direction of the attack element is large, improve the accuracy of the attack direction, improve the response speed of attack instructions, contribute to improving the attack hit rate, improve the attack hand feeling and bring better game experience for players.
In this embodiment of the application, optionally, when the attack prop includes a plurality of attacks, step 103 may specifically include: and respectively determining the element output direction corresponding to each attack prop according to the connection line of each attack prop position and the target attack position, and controlling each attack prop to output the attack elements to the respective corresponding element output direction.
In the above embodiment, if the attack instruction indicates that a plurality of attack props need to be used for attack, that is, a plurality of attack props need to be used, in order to ensure that each attack prop can accurately attack, the first element output direction corresponding to each attack prop may be respectively calculated, as shown in fig. 2, taking 2 attack props as an example, the connection direction between the attack prop 1 and the target attack position is determined as the first element output direction corresponding to the attack prop 1, the connection direction between the attack prop 2 and the target attack position is determined as the first element output direction corresponding to the attack prop 2, and the two attack props are respectively controlled to output attack elements according to the respective corresponding first element output directions, so as to ensure that the attack elements output by each attack prop can hit the target attack position.
In this embodiment of the application, optionally, before performing step 102, the method may further include: acquiring a current mirror-moving visual angle in a game; when the current mirror moving visual angle is a third person called visual angle, executing step 102; and when the current mirror-moving visual angle is a first-person visual angle, determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position, and controlling the attack prop to output an attack element to the second element output direction.
In the above embodiment, when the current mirror-moving view angle in the game is the first-person view angle, that is, when the position and direction of the game virtual camera and the position and direction of the attack character are synchronous, the connection direction of the position of the attack character and the attack pointing position can be directly used as the attack element output direction, that is, the second element output direction, so that the attack prop is controlled to perform element output, the system calculation amount is reduced, and the game response speed is increased. When the current mirror-moving visual angle in the game is the third person named visual angle, the position and the direction of the attacking role have certain deviation with the position and the direction of the game virtual camera, the target attacking position can be determined in a mode that the emitted aiming rays collide with the attacking object, the element output direction is further determined, the calculating accuracy of the attacking direction is improved, and the attacking hit rate is improved.
In this embodiment of the application, optionally, when the current mirror moving viewing angle is a first-person viewing angle, the method may further include: acquiring the distance between the attack prop and the attack role; when the distance is greater than or equal to a preset distance threshold, executing step 102; and when the distance is smaller than the preset distance threshold, determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position, and controlling the attack prop to output an attack element to the second element output direction.
In the above embodiment, when the viewing angle of the moving mirror is the first-person viewing angle and the attack prop is far away from the attack character, for example, when the attack prop is a 'legal treasure' suspended behind a game character, the output direction of the attack element can be determined by emitting aiming rays, so that the phenomenon of large deviation of the attack direction caused by the far position of the attack prop and the attack character is avoided, and the accuracy of the output direction of the attack element is improved. When the attack prop is closer to the attack role, the attack prop and the attack role can be regarded as being at the same position, and the connecting line direction of the position of the attack role and the position of the attack pointing position is taken as the output direction of the attack element, namely the output direction of the second element, so that the system calculation amount is reduced, and the response speed of the game is improved.
In this embodiment of the application, optionally, when the current mirror moving viewing angle is a first-person viewing angle, the method may further include: acquiring the current moving speed of the attack role; when the current moving speed is greater than or equal to a preset moving speed threshold value, executing step 102; and when the current moving speed is smaller than the preset moving speed threshold value, determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position, and controlling the attack prop to output an attack element to the second element output direction.
In the above embodiment, in the first-person perspective, if the current moving speed of the attacking character is fast, for the network game, due to the existence of the network delay, the position where the character is seen by the player may have a certain deviation from the actual position of the character in the server, and at this time, the output position of the attacking element may also be determined by emitting the aiming ray, so as to reduce the aiming error caused by the above situation and improve the attack hit rate. And for the condition that the attack angle color shift speed is slow, the deviation between the seen position and the actual position can be ignored, and the connecting line of the attack role position and the attack pointing position is directly used as the element output direction, so that the system calculation amount is reduced.
It should be noted that, in this embodiment of the application, when any one of the conditions that the current mirror-moving view angle is the third person named view angle, the distance between the attack prop position and the attack role is greater than or equal to the preset distance threshold, and the current moving speed of the attack role is greater than or equal to the preset moving speed threshold is met, step 102 may be executed.
In this embodiment of the application, optionally, before performing step 102, the method may further include: inquiring whether an attack object exists in a preset fault-tolerant range corresponding to the attack pointing position; if not, go to step 102; if the attack element exists, acquiring a target attack object in the preset fault-tolerant range, determining a third element output direction of the attack prop according to a connection line between the position of the attack prop and the position of the target attack object, and controlling the attack prop to output the attack element to the third element output direction.
In the above embodiment, a certain preset fault-tolerant range may be set for the attack pointing position designated by the player, and after the attack pointing position is designated by the player, whether an attacker exists or not is searched within the fault-tolerant range of the position. If the attack target exists, the found attack object can be regarded as an object expected to be attacked by the player, and a point on the attack object, which is closest to the attack pointing position, can be regarded as a target attack position, so that the connecting line direction of the attack prop position and the position is regarded as a third element output direction, and element output is carried out according to the third element output direction. If an attack object does not exist in the fault tolerance range, the output position of the element can be determined by emitting aiming rays, which is not described herein again.
In this embodiment of the present application, optionally, the attack instruction includes an attack element identifier and/or an attack prop identifier; step 103 may be preceded by: and selecting attack props to be used from the attack props with the authority of the attack roles according to the attack element identifications and/or the attack prop identifications, and determining the positions of the attack props corresponding to the attack props to be used.
In the above embodiment, in some application scenarios, a player may have a plurality of attack props, and the player may further instruct an attack character to use any of the attack props by inputting an attack instruction, and specifically may directly instruct an attack prop identifier or instruct an attack element identifier, so as to determine a corresponding attack prop in a game through the attack element identifier, for example, the attack element identifier is a flame identifier, and the corresponding attack prop is a legal instrument that releases flames.
In this embodiment of the application, optionally, the step 104 of "controlling the attack prop to output the attack element in the first element output direction" specifically includes: and under the condition that the current moving speed of the attack role is greater than a preset element drift threshold value, generating an element flight picture of the attack prop output attack element according to the first element output direction, wherein the attack element in the element flight picture has a drift effect of moving along with the attack role.
In the above embodiment, the game client displays the picture output by the attack element, when the attack character moves at a relatively high speed, the attack prop also moves together with the attack character, and because the output direction of the attack element is determined based on the connection direction between the position of the attack prop and the target attack position, the output direction of the attack element also changes continuously with the rapid movement of the attack character, and the attack element exhibits a drift effect. For example, in a game client, when an attack character uses an attack prop to attack while moving at a fast speed, the effect of an attack element flying along a curve between an attack prop position and a target attack position is displayed in the game client.
Further, as a specific implementation of the method in fig. 1, an embodiment of the present application provides an attack control apparatus for a multiplayer online game, as shown in fig. 3, the apparatus includes:
the instruction response module is used for responding to an attack instruction in a game and acquiring an attack pointing position corresponding to the attack instruction;
an attack position determining module, configured to launch an aiming ray to the attack pointing position to perform an attack on an assaultable object with a position of a virtual camera as a starting point, determine a collision point between the aiming ray and the assaultable object as a target attack position, and send an attack result request instruction to a game server according to the target attack position and the attack prop position, so that the game server calculates an attack direction and an attack result corresponding to the attack prop according to the attack result request instruction, synchronizes the attack direction and the attack result to a related client, and feeds back the attack result to the game client;
the first attack module is used for determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position and controlling the attack prop to output an attack element to the first element output direction; and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
Optionally, the attack instruction includes an attack element identifier and/or an attack prop identifier; the device further comprises:
and the attack prop selection module is used for selecting an attack prop to be used from the attack props with the authority according to the attack element identification and/or the attack prop identification before determining the first element output direction of the attack prop according to the connection line between the attack prop position and the target attack position, and determining the attack prop position corresponding to the attack prop to be used.
Optionally, when the attack prop includes a plurality of attack props, the first attack module is specifically configured to: and respectively determining the element output direction corresponding to each attack prop according to the connection line of each attack prop position and the target attack position, and controlling each attack prop to output the attack elements to the respective corresponding element output direction.
Optionally, the apparatus further comprises:
the visual angle acquisition module is used for acquiring the current mirror moving visual angle in the game;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the current mirror moving angle is a third person called angle;
and the second attack module is used for determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position when the current mirror-moving visual angle is the first-person visual angle, and controlling the attack prop to output an attack element to the second element output direction.
Optionally, the apparatus further comprises:
the distance acquisition module is used for acquiring the distance between the attack prop and the attack role;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the distance is greater than or equal to a preset distance threshold;
the second attack module is further configured to execute the connection line between the position where the attack role is located and the attack pointing position when the distance is smaller than the preset distance threshold, and determine a second element output direction of the attack prop.
Optionally, the apparatus further comprises:
the moving speed acquisition module is used for acquiring the current moving speed of the attack role;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, when the current moving speed is greater than or equal to a preset moving speed threshold;
the second attack module is further configured to, when the current movement speed is smaller than the preset movement speed threshold, execute a connection line between the position where the attack role is located and the attack pointing position, and determine a second element output direction of the attack prop.
Optionally, the apparatus further comprises:
the attack object query module is used for querying whether an attack object exists in a preset fault-tolerant range corresponding to the attack pointing position;
the attack position determining module is further configured to execute the emitting of the aiming ray to the attack pointing position for the collision of the assaultable object, with the position of the virtual camera as a starting point, if not;
and the third attack module is used for acquiring the target attack object in the preset fault-tolerant range if the attack object exists, determining a third element output direction of the attack prop according to a connecting line between the position of the attack prop and the position of the target attack object, and controlling the attack prop to output an attack element to the third element output direction.
Optionally, the first attack module is further configured to generate an element flight image of the attack prop outputting an attack element according to the first element output direction when the current moving speed of the attack role is greater than a preset element drift threshold, where the attack element in the element flight image presents a drift effect moving along with the attack role.
It should be noted that other corresponding descriptions of the functional units related to the attack control device for the multiplayer online game provided in the embodiment of the present application may refer to the corresponding descriptions in the methods in fig. 1 to fig. 2, and are not described herein again.
Based on the above methods shown in fig. 1 to 2, correspondingly, the present application further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the attack control method of the multiplayer online game shown in fig. 1 to 2.
Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Based on the above methods shown in fig. 1 to fig. 2 and the virtual device embodiment shown in fig. 3, in order to achieve the above object, an embodiment of the present application further provides a computer device, which may specifically be a personal computer, a server, a network device, and the like, where the computer device includes a storage medium and a processor; a storage medium for storing a computer program; a processor for executing a computer program to implement the attack control method of the multiplayer online game as described above with reference to fig. 1 to 2.
Optionally, the computer device may also include a user interface, a network interface, a camera, Radio Frequency (RF) circuitry, sensors, audio circuitry, a WI-FI module, and so forth. The user interface may include a Display screen (Display), an input unit such as a keypad (Keyboard), etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (e.g., a bluetooth interface, WI-FI interface), etc.
It will be appreciated by those skilled in the art that the present embodiment provides a computer device architecture that is not limiting of the computer device, and that may include more or fewer components, or some components in combination, or a different arrangement of components.
The storage medium may further include an operating system and a network communication module. An operating system is a program that manages and maintains the hardware and software resources of a computer device, supporting the operation of information handling programs, as well as other software and/or programs. The network communication module is used for realizing communication among components in the storage medium and other hardware and software in the entity device.
Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platform, and can also be implemented by hardware to respond to a specific type of attack instruction in a game, obtain a player-specified attack pointing position, emitting aiming rays to the attack pointing position by taking the position of the virtual camera as a starting point to collide with the assaultable object, taking the collision point of the aiming rays and the assaultable object as a target attack position, so that the direction of the position of the attack prop looking at the target attack position is taken as the output direction of the attack element, and controlling the attack prop to output an attack element according to the direction, calculating the attack direction and the attack result by using the game server, generating an attack picture at the game client according to the attack result, and synchronizing the attack direction and the attack result to the associated client through the game server. Compared with the mode that the connecting direction of the virtual camera and the attack pointing position is used as the output direction of the attack element in the prior art, the method and the device solve the problem that the calculation error of the output direction of the attack element is large, improve the accuracy of the attack direction, contribute to improving the attack hit rate, improve the attack hand feeling and bring better game experience for players.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (11)

1. An attack control method of a multiplayer online game is applied to a game client, and is characterized by comprising the following steps:
responding to an attack instruction in a game, and acquiring an attack pointing position corresponding to the attack instruction;
taking the position of a virtual camera as a starting point, transmitting an aiming ray to the attack pointing position to perform attack on an assaultable object, determining the collision point of the aiming ray and the assaultable object as a target attack position, sending an attack result request instruction to a game server according to the target attack position and the attack prop position so that the game server calculates the attack direction and the attack result corresponding to the attack prop according to the attack result request instruction, synchronizing the attack direction and the attack result to a related client side, and feeding back the attack result to the game client side;
determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element to the first element output direction;
and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
2. The method according to claim 1, wherein when the attack prop includes a plurality of attack props, determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position, and controlling the attack prop to output an attack element in the first element output direction, specifically includes:
and respectively determining the element output direction corresponding to each attack prop according to the connection line of each attack prop position and the target attack position, and controlling each attack prop to output the attack elements to the respective corresponding element output direction.
3. The method according to claim 1, wherein before the attacking target position is shot by aiming rays from the position of the virtual camera as a starting point, the method further comprises:
acquiring a current mirror-moving visual angle in a game;
when the current mirror moving visual angle is a third person called visual angle, the position of the virtual camera is taken as a starting point, and aiming rays are emitted to the attack pointing position to perform attack-capable object collision;
and when the current mirror-moving visual angle is a first-person visual angle, determining a second element output direction of the attack prop according to a connection line between the position of the attack role and the attack pointing position, and controlling the attack prop to output an attack element to the second element output direction.
4. The method according to claim 3, wherein before determining the second element output direction of the attack prop according to the connection line between the position of the attack character and the attack pointing position, the method further comprises:
acquiring the distance between the attack prop and the attack role;
when the distance is larger than or equal to a preset distance threshold value, the position of the virtual camera is used as a starting point, and aiming rays are emitted to the attack pointing position to perform attack on an attacked object;
and when the distance is smaller than the preset distance threshold, executing a connection line between the position of the attack role and the attack pointing position, and determining a second element output direction of the attack prop.
5. The method according to claim 3, wherein before determining the second element output direction of the attack prop according to the connection line between the position of the attack character and the attack pointing position, the method further comprises:
acquiring the current moving speed of the attack role;
when the current moving speed is greater than or equal to a preset moving speed threshold value, the position where the virtual camera is located is used as a starting point, aiming rays are emitted to the attack pointing position to perform attack on an assaultable object;
and when the current moving speed is smaller than the preset moving speed threshold value, executing a connection line between the position of the attack role and the attack pointing position, and determining a second element output direction of the attack prop.
6. The method according to claim 1, wherein before the attacking target position is shot by aiming rays from the position of the virtual camera as a starting point, the method further comprises:
inquiring whether an attack object exists in a preset fault-tolerant range corresponding to the attack pointing position;
if the virtual camera does not exist in the target object, the virtual camera is executed to be located at the position as a starting point, and aiming rays are emitted to the attack pointing position to perform attack on the assaultable object;
if the attack element exists, acquiring a target attack object in the preset fault-tolerant range, determining a third element output direction of the attack prop according to a connection line between the position of the attack prop and the position of the target attack object, and controlling the attack prop to output the attack element to the third element output direction.
7. The method according to claim 1, wherein the attack instruction comprises an attack element identification and/or an attack prop identification; before determining the first element output direction of the attack prop according to the connection line between the attack prop position and the target attack position, the method further comprises:
and selecting attack props to be used from the attack props with the authority of the attack roles according to the attack element identifications and/or the attack prop identifications, and determining the positions of the attack props corresponding to the attack props to be used.
8. The method according to claim 1, wherein the controlling the attack prop to output an attack element in the first element output direction specifically comprises:
and under the condition that the current moving speed of the attack role is greater than a preset element drift threshold value, generating an element flight picture of the attack prop output attack element according to the first element output direction, wherein the attack element in the element flight picture has a drift effect of moving along with the attack role.
9. An attack control apparatus for a multiplayer online game, comprising:
the instruction response module is used for responding to an attack instruction in a game and acquiring an attack pointing position corresponding to the attack instruction;
an attack position determining module, configured to launch an aiming ray to the attack pointing position to perform an attack on an assaultable object with a position of a virtual camera as a starting point, determine a collision point between the aiming ray and the assaultable object as a target attack position, and send an attack result request instruction to a game server according to the target attack position and the attack prop position, so that the game server calculates an attack direction and an attack result corresponding to the attack prop according to the attack result request instruction, synchronizes the attack direction and the attack result to a related client, and feeds back the attack result to the game client;
the first attack module is used for determining a first element output direction of the attack prop according to a connection line between the attack prop position and the target attack position and controlling the attack prop to output an attack element to the first element output direction; and receiving the attack result fed back by the game server, and generating an attack picture corresponding to the attack instruction based on the attack result.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 8.
11. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 8 when executing the computer program.
CN202110739871.5A 2021-06-30 2021-06-30 Attack control method and device for multiplayer online game and storage medium Pending CN113440855A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110739871.5A CN113440855A (en) 2021-06-30 2021-06-30 Attack control method and device for multiplayer online game and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110739871.5A CN113440855A (en) 2021-06-30 2021-06-30 Attack control method and device for multiplayer online game and storage medium

Publications (1)

Publication Number Publication Date
CN113440855A true CN113440855A (en) 2021-09-28

Family

ID=77814481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110739871.5A Pending CN113440855A (en) 2021-06-30 2021-06-30 Attack control method and device for multiplayer online game and storage medium

Country Status (1)

Country Link
CN (1) CN113440855A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100267451A1 (en) * 2009-04-20 2010-10-21 Capcom Co., Ltd. Game machine, program for realizing game machine, and method of displaying objects in game
CN108310765A (en) * 2017-12-14 2018-07-24 腾讯科技(深圳)有限公司 The display methods and device of image, storage medium, electronic device
CN108635858A (en) * 2018-05-18 2018-10-12 腾讯科技(深圳)有限公司 Interface display method, device, electronic device and computer readable storage medium
CN110585710A (en) * 2019-09-30 2019-12-20 腾讯科技(深圳)有限公司 Interactive property control method, device, terminal and storage medium
CN110975283A (en) * 2019-11-28 2020-04-10 腾讯科技(深圳)有限公司 Processing method and device of virtual shooting prop, storage medium and electronic device
CN111346379A (en) * 2020-03-12 2020-06-30 竞技世界(北京)网络技术有限公司 Method and device for realizing collision processing
CN111467804A (en) * 2020-04-30 2020-07-31 网易(杭州)网络有限公司 Hit processing method and device in game
CN112090070A (en) * 2020-09-18 2020-12-18 腾讯科技(深圳)有限公司 Interaction method and device of virtual props and electronic equipment
CN112107858A (en) * 2020-09-17 2020-12-22 腾讯科技(深圳)有限公司 Prop control method and device, storage medium and electronic equipment
CN112190931A (en) * 2020-07-27 2021-01-08 腾讯科技(深圳)有限公司 Control method and device of virtual traffic prop and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100267451A1 (en) * 2009-04-20 2010-10-21 Capcom Co., Ltd. Game machine, program for realizing game machine, and method of displaying objects in game
CN108310765A (en) * 2017-12-14 2018-07-24 腾讯科技(深圳)有限公司 The display methods and device of image, storage medium, electronic device
CN108635858A (en) * 2018-05-18 2018-10-12 腾讯科技(深圳)有限公司 Interface display method, device, electronic device and computer readable storage medium
CN110585710A (en) * 2019-09-30 2019-12-20 腾讯科技(深圳)有限公司 Interactive property control method, device, terminal and storage medium
CN110975283A (en) * 2019-11-28 2020-04-10 腾讯科技(深圳)有限公司 Processing method and device of virtual shooting prop, storage medium and electronic device
CN111346379A (en) * 2020-03-12 2020-06-30 竞技世界(北京)网络技术有限公司 Method and device for realizing collision processing
CN111467804A (en) * 2020-04-30 2020-07-31 网易(杭州)网络有限公司 Hit processing method and device in game
CN112190931A (en) * 2020-07-27 2021-01-08 腾讯科技(深圳)有限公司 Control method and device of virtual traffic prop and storage medium
CN112107858A (en) * 2020-09-17 2020-12-22 腾讯科技(深圳)有限公司 Prop control method and device, storage medium and electronic equipment
CN112090070A (en) * 2020-09-18 2020-12-18 腾讯科技(深圳)有限公司 Interaction method and device of virtual props and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
祝你万事顺利: "第三人称射击游戏-子弹方向问题", pages 1 - 2, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/1437680> *

Similar Documents

Publication Publication Date Title
US11712634B2 (en) Method and apparatus for providing online shooting game
US11826662B2 (en) Ballistic trajectory display in a virtual environment
US8052527B2 (en) Calculation control method, storage medium, and game device
CN108310765B (en) Image display method and device, storage medium and electronic device
CN110548288B (en) Virtual object hit prompting method and device, terminal and storage medium
CN107998654B (en) Acceleration adjusting method and device, storage medium and electronic device
JP4790761B2 (en) Online game method and online game system
JP2012210243A (en) Program, information storage medium, terminal, and server
WO2022007569A1 (en) Prop control method and apparatus, and storage medium and electronic device
CN113398601A (en) Information transmission method, information transmission device, computer-readable medium, and apparatus
CN111729309B (en) Method and device for controlling virtual attack in game, electronic equipment and storage medium
JP2008228943A (en) Program, information storage medium, and game machine
WO2023045375A1 (en) Method and apparatus for spectating game after character is killed, and electronic device and storage medium
CN112604286B (en) Game skill synchronous execution method and device
JP4363595B2 (en) Image generating apparatus and information storage medium
WO2023065962A1 (en) Information determining method and apparatus, and device and storage medium
CN113440855A (en) Attack control method and device for multiplayer online game and storage medium
CN113599822B (en) Virtual prop control method and device, storage medium and electronic equipment
JP4114825B2 (en) Image generating apparatus and information storage medium
CN112156472B (en) Control method, device and equipment of virtual prop and computer readable storage medium
CN112717394B (en) Aiming mark display method, device, equipment and storage medium
CN114130031A (en) Using method, device, equipment, medium and program product of virtual prop
JP2011255114A (en) Program, information storage medium, and image generation system
US10272334B2 (en) Program and system
CN116899231A (en) Information processing method and device, electronic equipment and readable 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