Game special effects playback method, device, storage medium and equipment
By determining the skill hit point in the game client and accurately playing the hit effects, the problem of inaccurate game effect playback position is solved, improving the gaming experience and reducing the server burden.
Patent Information
- Application Number
- CN202111424951.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-26
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-11-26
AI Technical Summary
In the prior art, the playback position of game special effects is inaccurate, resulting in a poor gaming experience for users.
After the game client receives the broadcast message of a skill hit, it determines the skill hit point by obtaining the capsule center coordinates of the casting object and the hit object, and plays the hit effect that matches the target skill at that point.
This improves the accuracy of special effects playback positions, enhances the visual realism and user experience of the game, and reduces the computing pressure on the server.
Smart Images

Figure CN114028811B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of online game technology, and in particular to a method, device, storage medium, and equipment for playing game special effects. Background Art
[0002] In some games, such as role-playing games, characters of different professions are often featured, including warriors, archers, mages, and supports. Their common characteristic is that they can all attack targets by unleashing skills. During this attack, game developers can add special effects when skills hit, giving different attacks striking, visually appealing, and distinct animation effects.
[0003] Currently, when generating skill hit effects, the server often performs a crude hit determination and sends the result to the client. The client is unaware of the impact point and simply plays the hit effect at a fixed bone location on the target to indicate the "bullet" has hit. However, this implementation method is visually simplistic and the skill hit effect playback position is fixed, which can easily lead to inaccurate playback positions, thus failing to provide a good gaming experience for users. Summary of the Invention
[0004] In view of this, the present application provides a method, device, storage medium and equipment for playing game special effects, which can solve the technical problem of inaccurate special effects playback position and thus failure to provide users with a good gaming experience.
[0005] According to one aspect of the present application, a method for playing game special effects is provided, the method comprising:
[0006] The client where the current game object is located receives a broadcast message of a skill hit, wherein the broadcast message includes the target of the target skill and the target hit by the target skill;
[0007] Obtaining the center coordinates of a first capsule of the casting object and the center coordinates of a second capsule of the struck object;
[0008] Determining a skill hit point of the hit object according to the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is a hit position of the hit object in the perspective of the game screen where the current game object is located;
[0009] A hit special effect that matches the target skill is played at the skill hit point.
[0010] Optionally, the method further includes:
[0011] Determining the skill attack type of the target skill according to the skill configuration information corresponding to the casting object;
[0012] If the skill attack type is an attack with an attack distance less than a preset distance, the first capsule center coordinates of the casting object and the second capsule center coordinates of the attacked object are obtained, and the skill hit point of the attacked object is determined based on the first capsule center coordinates and the second capsule center coordinates, and a hit special effect matching the casting object is played at the skill hit point.
[0013] Optionally, obtaining the coordinates of the center of the first capsule of the casting object and the coordinates of the center of the second capsule of the struck object includes:
[0014] Receive spatial position information about surrounding game objects broadcast by the game server;
[0015] The first capsule center coordinates of the casting object and the second capsule center coordinates of the struck object are extracted according to the spatial position information.
[0016] Optionally, determining the skill hit point of the hit object according to the first capsule center coordinates and the second capsule center coordinates includes:
[0017] Acquire the action posture of the struck object at the current moment, and generate a spatial bounding box of the struck object according to the action posture;
[0018] An attack ray is generated from the center coordinate of the first capsule body to the center coordinate of the second capsule body, and a collision point between the attack ray and the spatial bounding box is detected, and a skill hit point of the attacked object is determined according to the collision point.
[0019] Optionally, detecting a collision point between the attack ray and the spatial bounding box, and determining a skill hit point of the attacked object according to the collision point, includes:
[0020] A first collision point between the attack ray and the space bounding box is detected, and the first collision point is determined as a skill hit point of the attacked object.
[0021] Optionally, playing a hit special effect matching the target skill at the skill hit point includes:
[0022] Determining a hit special effect that matches the target skill, the hit special effect including a hit animation special effect and a first sound special effect;
[0023] The animation special effect and the first sound special effect are played at the skill hit point.
[0024] Optionally, the method further includes:
[0025] Determining time information associated with the hit special effect, the time information including the duration of the hit special effect and the duration of the skill effect of the target skill on the hit object;
[0026] The animation special effect and the first sound special effect are played at the skill hit point according to the special effect performance duration, and the hit state of the hit object is updated according to the skill effect duration.
[0027] Optionally, the method further includes:
[0028] If the skill attack type is an attack with an attack distance greater than a preset distance, a hit special effect that matches the casting object is played at a fixed position corresponding to the hit special effect playback slot of the attacked object.
[0029] Optionally, the method further includes:
[0030] Determine the skill attributes of the target skill, including the special effect display range, skill attack type, and skill attack duration;
[0031] If it is determined that the casting object is within the display range corresponding to the current game object, the skill release special effect of the target skill is played according to the skill attribute.
[0032] According to another aspect of the present application, a game special effects playback device is provided, comprising:
[0033] A receiving module, configured to receive a broadcast message of a skill hit on the client where the current game object is located, wherein the broadcast message includes the target object of the target skill and the target object hit by the target skill;
[0034] An acquisition module, configured to acquire the center coordinates of a first capsule of the casting object and the center coordinates of a second capsule of the struck object;
[0035] a first determining module, configured to determine a skill hit point of the hit object based on the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is a hit position of the hit object in the perspective of the game screen where the current game object is located;
[0036] The playing module is used to play the hit special effect matching the target skill at the skill hit point.
[0037] Optionally, the device further comprises:
[0038] A second determining module is used to determine the skill attack type of the target skill according to the skill configuration information corresponding to the casting object;
[0039] If the skill attack type is an attack with an attack distance less than a preset distance, the acquisition module is used to obtain the first capsule center coordinates of the casting object and the second capsule center coordinates of the attacked object, and the first determination module is used to determine the skill hit point of the attacked object based on the first capsule center coordinates and the second capsule center coordinates, and the playback module is used to play a hit special effect that matches the casting object at the skill hit point.
[0040] Optionally, the acquisition module is specifically used to receive spatial position information about surrounding game objects broadcast by a game server; and extract the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit object based on the spatial position information.
[0041] Optionally, the first determination module is specifically used to obtain the action posture of the attacked object at the current moment, and generate a spatial bounding box of the attacked object based on the action posture; generate an attack ray from the center coordinate of the first capsule body to the center coordinate of the second capsule body, and detect the collision point between the attack ray and the spatial bounding box, and determine the skill hit point of the attacked object based on the collision point.
[0042] Optionally, when detecting the collision point between the attack ray and the spatial bounding box and determining the skill hit point of the hit object based on the collision point, the first determination module is specifically used to: detect the first collision point between the attack ray and the spatial bounding box, and determine the first collision point as the skill hit point of the hit object.
[0043] Optionally, the playback module is specifically used to determine a hit effect that matches the target skill, the hit effect including a hit animation effect and a first sound effect; and play the animation effect and the first sound effect at the skill hit point.
[0044] Optionally, the device further comprises:
[0045] A third determining module is configured to determine time information associated with the hit special effect, wherein the time information includes a duration of the hit special effect and a duration of the skill effect of the target skill on the hit object;
[0046] The playback module is specifically used to play the animation special effect and the first sound special effect at the skill hit point according to the special effect performance duration, and update the hit status of the hit object according to the skill effect duration.
[0047] Optionally, the playback module is further used to play a hit effect that matches the casting object at a fixed position corresponding to the hit effect playback slot of the hit object if the skill attack type is an attack with an attack distance greater than a preset distance.
[0048] Optionally, the device further comprises:
[0049] A fourth determination module is used to determine the skill attributes of the target skill, wherein the skill attributes include special effect display range, skill attack type, and skill attack duration;
[0050] The playback module is further configured to play the skill release effects of the target skill according to the skill attributes if it is determined that the casting object is within the display range corresponding to the current game object.
[0051] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned game special effects playback method is implemented.
[0052] According to another aspect of the present application, a game account control device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor. When the processor executes the program, the above-mentioned game special effects playback method is implemented.
[0053] By means of the above technical solution, the present application provides a method, device, storage medium and equipment for playing game special effects. After the client where the current game object is located receives a broadcast message of a skill hit, the method determines the target skill's casting object and the target skill's hit target according to the broadcast message, and obtains the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit target; further determines the hit target's skill hit point according to the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is the hit position of the hit target in the perspective of the game screen where the current game object is located; and further plays a hit special effect that matches the target skill at the skill hit point. Through the technical solution in this application, each local client can independently determine the target skill's skill hit point based on the relative visual position of the casting object and the hit target, and accurately play the hit special effect at the skill hit point. This ensures that the play position of the hit special effect in the game screen is on the model surface, improves the accuracy of the special effect play position, and makes the hit special effect play position more consistent with the visual hit point, thereby creating a good gaming experience for game users. In addition, in this solution, the local client is used to determine the skill hit point, and the server does not need to calculate the skill hit point, which can reduce the computing pressure of the server and reduce performance loss.
[0054] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0056] Figure 1 A flowchart of a method for playing game special effects provided by an embodiment of the present application is shown;
[0057] Figure 2 A flowchart of another method for playing game special effects provided by an embodiment of the present application is shown;
[0058] Figure 3 A schematic diagram of the structure of a game special effects playback device provided in an embodiment of the present application is shown;
[0059] Figure 4 A structural diagram of another game special effects playback device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0060] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0061] In order to solve the technical problem that the special effects playback position is inaccurate and thus cannot provide users with a good gaming experience, this application provides a game special effects playback method, such as Figure 1 As shown, the method includes:
[0062] 101. The client where the current game object is located receives a broadcast message of a skill hit, wherein the broadcast message includes the target object of the target skill and the target object hit by the target skill.
[0063] Among them, the embodiment of the present application is mainly used in the game client running the game program. The game client can receive the skill hit broadcast message from the game server. Among them, the game object can be a player character in the game world, the casting object is the attacking player character that releases the target skill, and the hit object is the hit player character attacked by the target skill. For different types of attacking objects, the target skills released are different, resulting in different attack strengths on the hit object's health and different hit effects played at the skill hit point. It should be noted that the current game object can be a casting object, a hit object, or one of the other game objects (or surrounding game objects) that play the game together with the casting object and the hit object; when the current object is a casting object, or is another game object that plays the game together with the casting object and the hit object, the hit object is located within the display range corresponding to the current game object.
[0064] In a specific virtual game scene, when any player triggers a skill, the game server determines the skill's hit result. If it is determined that the skill hits one or more game objects, it further obtains data about a certain area surrounding each of the other unhit game objects in the game scene. Based on this data, the server then filters the surrounding game objects of the skill hit event, broadcasting the skill attack's hit message to the surrounding game objects. The area surrounding the game object is referred to as the Area of Interest (AOI), which is generally a circular area centered on the game object. The radius of this area is called the AOI radius. In games, players typically focus on the portion of the game scene centered on themselves (the virtual game object). Therefore, an AOI is set to allow for more detailed analysis and presentation of the game scene content corresponding to this area.
[0065] For this embodiment, the current game object can be a casting object, a hit object, or any of the above-mentioned surrounding game objects. If the skill-releasing object of this skill hit event is the current game object, that is, the current game object is the casting object by default, the client where the current game object is located will receive the skill hit result broadcast from the game server. The skill hit result may include whether the target skill released by the current game object hits any game object, and the identifier and coordinates of the hit object. If the current game object is not a casting object, and this skill hit event occurs in a circular area with the current game object as the center, the game server will determine the current game object as a surrounding game object of this skill hit event, and the client where the current game object is located will receive the skill hit message broadcast from the game server. The broadcast skill hit message may include the casting object of the target skill corresponding to the skill hit event and the hit object hit by the target skill, as well as the corresponding identifiers of the casting object and the hit object, the type of target skill released by the casting object, the coordinates of the casting object and the hit object, etc.
[0066] 102. Obtain the center coordinates of the first capsule of the casting object and the center coordinates of the second capsule of the struck object.
[0067] In a specific virtual game scene, each game object is edited into an independent capsule, with the capsule's range exactly covering the game object model. During game play, the game client containing each game object will synchronize the game object's real-time location information or status to the game server. The game server will uniformly verify the location information of each game object, determine the location information of each game object based on the status, and store the location information. At the same time, the game server will continuously broadcast the location information of surrounding game objects to each game client. In this embodiment, after receiving a skill hit event from a nearby game player, the client containing the current game object can further determine the center coordinates of the first capsule of the casting object and the second capsule of the hit object. When the current game object is the casting object, the current game object client can obtain the first capsule center coordinates locally / on the game server, and extract the second capsule center coordinates of the hit object based on the position information of the surrounding game objects broadcast by the game server; when the current game object is not the casting object, the position information of the casting object and the hit object corresponding to the skill hit event can be further extracted based on the position information of the surrounding game objects broadcast by the game server, where the position information can specifically be the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit object.
[0068] 103. Determine a skill hit point of the hit object based on the center coordinates of the first capsule and the center coordinates of the second capsule, wherein the skill hit point is a hit position of the hit object in the perspective of the game screen where the current game object is located.
[0069] In a specific application scenario, after a skill hit event occurs, the casting object of the skill hit event and the game client where the surrounding game players are located can obtain the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit object. Further, each game client can determine the skill hit point of the hit object based on the received first capsule center coordinates and second capsule center coordinates. It should be noted that the skill hit point is independently determined by the game client where the current game object and / or the surrounding game players are located. Through this method of determining the skill hit point, it can be ensured that the hit special effects played by the corresponding game clients of different game players are all on the model surface of the hit object, which can solve the problem of inaccurate special effect playback position due to fixed hit special effect playback position, thereby creating a good gaming experience for users.
[0070] 104. Play the hit effect that matches the target skill at the skill hit point.
[0071] Among them, the hit special effects may include animation special effects, sound and light special effects, etc., which can be specifically determined according to the target skill released by the caster. Specifically, before playing the hit special effects that match the target skill at the skill hit point, it is necessary to obtain the special effects event under the skill attributes corresponding to the target skill, and establish a binding relationship between the target skill and the special effects event. Furthermore, when it is determined that the target skill triggers the skill hit event, the special effects event that matches the skill attributes corresponding to the target skill can be extracted through the above-mentioned binding relationship, and the hit special effects that match the target skill can be played at the skill hit point by triggering the special effects event. Among them, the special effects event can store special effects data for displaying the hit special effects, which can specifically include the skill animation and / or skill sound and light special effects performance of the target skill, as well as the corresponding skill effect. The special effects performance mainly refers to the art / audio performance of the skill special effects. For example: the burning art / sound and light performance of the fire skill, the freezing art / sound and light performance of the ice skill, etc. A skill effect primarily refers to the skill hit effect that appears on the target after the caster's target skill hits the target. For example, after the caster casts an ice skill and hits the target, the target will remain frozen and / or slowed for a certain period of time.
[0072] For example, if the target skill is a bow and arrow shooting skill, when the arrow hits the target, the arrowhead will be inserted into the target, and the target will bleed at the impact point. At the same time, the target may also perform backward and fall actions accompanied by the hit audio, and the target's health will be reduced accordingly. After the target is hit, the above hit effects will last for a preset time. After this preset time, the hit effects are considered to have ended, and the hit effects playing at the skill impact point will disappear.
[0073] The present embodiment provides a method for playing game special effects. After the client where the current game object is located receives a broadcast message of a skill hit, the method can determine the target skill's caster and the target skill's hit target based on the broadcast message, and obtain the first capsule center coordinates of the caster and the second capsule center coordinates of the hit target; further determine the hit target's skill hit point based on the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is the hit position of the hit target in the perspective of the game screen where the current game object is located; and further play a hit special effect that matches the target skill at the skill hit point. Through the technical solution of this application, each local client can independently determine the target skill's skill hit point based on the relative visual position of the caster and the hit target, and accurately play the hit special effect at the skill hit point. This can ensure that the play position of the hit special effect in the game screen is on the model surface, improve the accuracy of the special effect play position, and make the hit special effect play position more consistent with the visual hit point, thereby creating a good gaming experience for game users. In addition, in this solution, the local client is used to determine the skill hit point, and the server does not need to calculate the skill hit point, which can reduce the computing pressure of the server and reduce performance loss.
[0074] Furthermore, as a refinement and expansion of the specific implementation of the above embodiment, in order to fully illustrate the implementation of this embodiment, this embodiment also provides another game special effect playback method, such as Figure 2 As shown, the method includes:
[0075] 201. The client where the current game object is located receives a broadcast message of a skill hit, wherein the broadcast message includes a target skill casting object and an object hit by the target skill.
[0076] Among them, the current game object can be either the above-mentioned casting object or any surrounding game object of the casting object. The casting object and the hit object can belong to the same game camp (i.e., teammate relationship) or different game camps (i.e., hostile relationship). In a specific application scenario, when a skill hit event occurs in the game scene, the game server will screen the surrounding game objects of this skill hit event based on the data of a certain surrounding area, so as to broadcast the hit message of this skill attack to the surrounding game objects. Accordingly, after a skill hit event occurs to other game objects in a certain surrounding area or the current game object releases a skill to generate a skill hit event, the client where the current game object is located will receive the skill hit message broadcast by the game server in real time, and the casting object information and hit object information of the skill hit event can be extracted according to the skill hit message.
[0077] 202. Determine the skill attack type of the target skill based on the skill configuration information corresponding to the casting object.
[0078] Among them, skill attack types include long-range attacks and melee attacks. Specifically, after receiving the broadcast message of skill hit, the skill configuration information of the target skill corresponding to the casting object can be analyzed first. The skill configuration information includes the skill attack type of the casting object. If it is determined that the skill attack type of the casting object is a melee attack with an attack distance less than a preset distance (the attack distance of a melee attack is less than the attack distance of a long-range attack), since the attack distance is relatively close, the special effect playback status of the skill hit point can be accurately observed. At this time, by executing steps 203a to 206a of the embodiment, the game clients where different surrounding game objects are located can accurately calculate the skill hit points of the hit objects respectively, and play the hit special effects matching the target skill at the skill hit points, so that the hit special effects match the visual hit points of the current game object, making the special effects performance more realistic and able to meet the user's visual needs. If it is determined that the skill attack type of the caster is a long-range attack with an attack distance greater than a preset distance, given that the attack distance is far, the game player's attention to the visual hit point is low and the accuracy requirement is weak. Therefore, by executing step 203b of the embodiment, a hit effect that matches the caster can be played at a fixed position corresponding to the hit effect playback slot of the hit object. This hit effect playback method can reduce the computing pressure of the game client and reduce performance loss. In a specific application scenario, when determining whether the skill attack type of the caster is a melee attack or a long-range attack, the configuration information corresponding to the target skill released by the caster can be used to determine whether it is a melee attack or a long-range attack; or, the maximum attack distance of the target skill can be compared with the preset distance. When the maximum attack distance is less than the preset distance, the skill attack type of the target skill can be determined to be a melee attack; otherwise, it can be determined to be a long-range attack. The preset distance can be determined based on the size of the battlefield area and / or the maximum display range of the game scene.
[0079] 203a. If the skill attack type is a melee attack, obtain the center coordinates of the first capsule of the casting object and the center coordinates of the second capsule of the attacked object.
[0080] As an optional method, in this embodiment, if the skill attack type is a melee attack, when obtaining the first capsule center coordinates of the caster and the second capsule center coordinates of the attacked object, step 203a of the embodiment may specifically include: receiving spatial position information about surrounding game objects broadcast by the game server; and extracting the first capsule center coordinates of the caster and the second capsule center coordinates of the attacked object based on the spatial position information. In specific application scenarios, the game server also synchronizes the position information of surrounding game objects to each game client, so that the game object can promptly know the location of teammates or enemies in the surrounding area. When a skill hit event is determined to have occurred, the game client of the current game object can extract the position information of the caster and the attacked object corresponding to the skill hit event from the position information of the surrounding game objects broadcast by the game server. Specifically, the position information of the first capsule center coordinates of the caster and the second capsule center coordinates of the attacked object within the 3D game space can be extracted.
[0081] 204a. Obtain the struck action posture of the struck object at the current moment, and generate a spatial bounding box of the struck object according to the action posture.
[0082] Among them, the spatial bounding box is an algorithm for solving the optimal bounding space of a discrete point set. The basic idea is to use a geometric body (called a bounding box) with a slightly larger volume and simpler characteristics to approximately replace complex geometric objects. For this embodiment, the hit action posture of the hit object at the moment of being hit can be extracted, and the spatial bounding box of the hit object can be generated based on the hit action posture. When the hit action posture is different, the generated spatial bounding box will also be different. Specifically, each game client can determine the current action posture of the hit object after receiving the broadcast message of the skill hit, and generate the spatial bounding box of the hit object based on the current action posture of the hit object. Among them, the current moment can be represented as the first reaction moment of the game client receiving the skill hit broadcast message. Different network states and / or different network devices may cause the first reaction moments corresponding to the game clients to be different, resulting in small differences between the hit action postures of the hit objects obtained.
[0083] For example, when the attacked object B is hit by the target skill released by the attacking object A, the surrounding game objects of this skill hit event are extracted: game objects C, D, and E. If the game server controls the playback of the hit special effect at a fixed position of the attacked object B at this time, due to different viewing angles, the playback position of the hit special effect in the game screen where a surrounding game object is located may not be on the model surface of the attacked object B, resulting in the playback position of the special effect being inaccurate, affecting the game experience of the game player. To this end, in this application, the game client where game objects A, C, D, and E are located can be used to respectively obtain the attack action posture of the attacked object B at the time of the attack, and generate a spatial bounding box corresponding to the attack action posture of the attacked object B, so that each game client can independently determine the skill hit point based on the spatial bounding box.
[0084] 205a. Generate an attack ray from the center coordinate of the first capsule to the center coordinate of the second capsule, detect the collision point between the attack ray and the spatial bounding box, and determine the skill hit point of the attacked object based on the collision point.
[0085] Accordingly, when each game client independently determines a skill's impact point based on a spatial bounding box, it can first generate an attack ray from the center coordinates of the first capsule toward the center coordinates of the second capsule, further detect the collision point between the attack ray and the spatial bounding box, and determine the skill's impact point on the hit object based on the collision point. Accordingly, when determining the skill's impact point on the hit object based on the collision point, the following steps can specifically include: detecting the first collision point between the attack ray and the spatial bounding box, and determining the first collision point as the skill's impact point on the hit object.
[0086] Following the example of step 204a of the above embodiment, after generating a spatial bounding box of the hit object B and an attack ray from the center coordinate of the first capsule to the center coordinate of the second capsule in the game clients where the game objects A, C, D, and E are located, collision point detection between the attack ray and the spatial bounding box can be performed respectively, that is, the game objects A, C, D, and E respectively determine the first detected collision point as the skill hit point, and determine the skill hit points b1, b2, b3, and b4, where the positions corresponding to the skill hit points b1, b2, b3, and b4 may be the same or different, which may depend on the differences in the hit action postures of the hit objects obtained by each game client. Given that the first reaction moment of different game clients when receiving the skill hit broadcast message may vary due to network status and / or network equipment, the hitting action posture of the hit object obtained at different reaction moments may be different. The spatial bounding box used for skill hit point detection is generated based on the hitting action posture. Therefore, when the hitting action posture is different, the skill hit points determined by different game clients may have small differences within the allowable error range. However, they are all on the model surface of the hit object, thereby ensuring the accuracy and authenticity of the special effects playback position under each game client.
[0087] 206a. Play a special hit effect that matches the target skill at the skill hit point.
[0088] In a specific application scenario, step 206a of the embodiment may specifically include: determining a hit effect that matches the target skill, including a hit animation effect and a first sound effect; and playing the animation effect and the first sound effect at the skill hit point. Specifically, the skill animation and / or skill sound and light effects of the target skill may be displayed in the game scene to present the skill effect. The implementation process is described in the relevant description of step 104 of the embodiment and is not further elaborated here.
[0089] Correspondingly, as a preferred method, the embodiment steps may also include: determining the time information associated with the hit special effect, the time information including the special effect performance duration of the hit special effect and the skill effect duration of the target skill on the hit object; playing the animation special effect and the first sound special effect at the skill hit point according to the special effect performance duration, and updating the hit status of the hit object according to the skill effect duration.
[0090] Among them, the duration of special effects performance mainly refers to the art resources (such as pictures, display effects) / audio performance duration of skill special effects. For example: when the game player controls the casting object to release a fire skill to the hit object, the burning art / audio performance duration of the fire skill on the hit object, etc. The duration of the skill effect of the target skill on the hit object mainly refers to the duration of the skill release effect that appears on the hit object after the casting object releases the target skill. For example: after releasing the ice skill on the skill releasing object, a freezing effect lasting 12 seconds appears on the hit object, etc. In addition, the sound effect event corresponding to the skill attribute can also be obtained, and the sound effect event is used to select the skill sound effect corresponding to the skill attribute from the preset audio engine. That is, different skill sound effects can be pre-configured for different skill attributes in the preset audio engine, so that when determining a skill hit, the sound effect event corresponding to the skill attribute can be obtained. For example, if the target skill is a bow and arrow shooting skill, when the arrow hits the target, it will be embedded in the target, and the target will bleed at the impact point. The target can also perform backward and fall to the ground, and the sound effect of the target skill hitting the target will play. After being hit, the target's health will also be reduced accordingly. These hit effects will last for a short period of time. After this short period of time, the hit effect is considered to have ended, and the hit effect playing at the skill impact point will disappear.
[0091] In specific game scenarios, common skill types primarily include single-target skills and group-target skills (i.e., area-of-effect skills). For some single-target and group-target skills, their special effects can be pre-set to a fixed duration. For example, when a target is attacked by a single-target attack skill from a caster, the duration of the passively triggered special effects is pre-set to a fixed duration, and this fixed duration is equal to a first preset threshold (e.g., 2 seconds). For other single-target and group-target skills, their special effects can be pre-set to a variable duration, and this variable duration exceeds the first preset threshold. These single-target and group-target skills typically manifest as a combined release effect between different skills or a continuous release effect between different skills. For example, a first caster may first release a single-target control skill on a target within a specific range. The control special effects of this single-target control skill are pre-set to a variable duration, and this variable duration exceeds a first preset threshold (e.g., 2 seconds). After the release of this single-target control skill, it is possible for it to be interrupted by subsequent attack skills released by the first caster or a second caster (either in the same faction or the enemy faction). That is, the main reason why the special effect performance duration is set to a variable duration is that the previous skill released previously is covered by the subsequent skill released successively, which will cause the special effect performance duration to be shortened.
[0092] Correspondingly, for some single-person skills and group skills, the duration of their skill effects can also be fixed, and the fixed duration is equal to the second preset threshold. For example: the casting object releases a single-person attack skill to the attacked object, and the duration of the deformation skill effect of the single-person attack skill is pre-set to a fixed duration, and the fixed duration is equal to the second preset threshold (for example: 6 seconds). For another part of single-person skills and group skills, the duration of their skill effects can be pre-set to a variable duration, and the variable duration exceeds the second preset threshold. These single-person skills and group skills are usually manifested as a combined release effect formed between different skills or a continuous release effect formed between different skills. For example, the first casting object first releases a single-person control skill to the attacked object within a specific range, and the duration of the control skill effect of the single-person control skill is pre-set to a variable duration, and the variable duration exceeds the second preset threshold (for example: 6 seconds). After being hit by a single-target control skill, the victim may be hit by a second attack from a skill released by the first caster. In this case, the effect duration of the previously released skill will be superimposed on the subsequent attack skill. That is, the main reason for setting the skill effect duration as variable is that the previously released skill is superimposed on the subsequent skill, which results in an extension of the skill effect duration. For another example, the first caster may first release a group poison skill within a first range of enemy game objects. The health reduction skill effect duration of this single-target control skill is pre-set to a variable duration, and this variable duration exceeds a second preset threshold (e.g., 6 seconds). After the group poison skill is released, it may be interrupted by a second caster releasing a group healing skill within a second range of friendly game objects. That is, the main reason for setting the skill effect duration as variable is that the previously released skill is interrupted and forced to end by the subsequent skill, which results in a shortened skill effect duration.
[0093] Accordingly, when playing the hit special effects that match the target skill at the skill hit point, as an optional method, different special effects and / or skill effects can be set for different body parts in combination with the body characteristics of the hit object, wherein the body characteristics may include height, shape and other characteristics, and different game characters have different body characteristics. Specifically, after determining the skill hit point, the target body part to which the skill hit point corresponds can be further determined, and then the hit special effects that match the special effects and / or skill effects corresponding to the target body part can be played. The corresponding embodiment steps can specifically include: obtaining the position coordinates of the skill hit point; determining the skill hit part of the hit object based on the position coordinates; obtaining a first special effect and / or a first skill effect that matches the skill hit part; and playing a hit special effect that matches the first special effect and / or the first skill effect at the skill hit point.
[0094] Accordingly, when determining the skill hit part of the hit object based on the position coordinates, the hit object can be divided into a preset number of preset skill hit parts based on the body shape characteristics of the hit object in advance, wherein each preset skill hit part is respectively configured with its own skill hit area, and different skill hit areas respectively represent a part of the hit object model and the area coordinates do not overlap. Through area division, each skill hit area will correspond to a set of area coordinates. After determining the skill hit point, the position coordinates of the skill hit point can be matched with each area coordinate set to determine the target area coordinate set containing the position coordinates of the skill hit point, so as to filter out the skill hit part corresponding to the skill hit point. The steps of the embodiment may specifically include: determining the target area coordinate set containing the position coordinates of the skill hit point; and determining the preset skill hit part corresponding to the target area coordinate set as the skill hit part of the hit object. For example, based on the body shape characteristics of the attacked object A, the attacked object is divided into a preset number of preset skill hit parts including a1, a2, a3, and a4, and the skill hit areas corresponding to a1, a2, a3, and a4 are the head area, the torso area, the upper limb area, and the lower limb area, respectively. After determining the skill hit point, the position coordinates of the skill hit point can be matched with the regional coordinate sets of the above four areas respectively. If the target skill hit area containing the skill hit point is filtered out as the upper limb area through coordinate matching, it can be determined that the skill hit part is the upper limb, and the first special effect performance and / or the first skill effect matching the upper limb can be obtained; the hit special effect matching the first special effect performance and / or the first skill effect is played at the skill hit point.
[0095] Correspondingly, when playing the hit special effects that match the target skill at the skill hit point, as another optional method, different special effects performances and / or skill effects in different game scenes can be set in combination with the game scene data of the casting object and the hit object, wherein the game scene data may include the skill hit type (normal hit, hit with projectiles, hit with cold weapons, double hit, triple hit, quadruple hit... etc.) and the brightness of the game environment, for example, when the game scene is in a bright state, the display brightness of the hit special effects can be appropriately increased, and when the game scene is in a dim state, the display brightness of the hit special effects can be appropriately lowered. Specifically, after determining the skill hit point, the game scene data of the casting object and / or the hit object can be further obtained, the game process can be determined according to the game scene data, and then the hit special effects that match the special effects performance and / or skill effects corresponding to the game process can be played. The corresponding embodiment steps may specifically include: obtaining the game scene data where the casting object and / or the hit object is located; determining the second special effect performance and / or the second skill effect that matches the game scene data; and playing the hit special effect that matches the second special effect performance and / or the second skill effect at the skill hit point.
[0096] In a specific application scenario, when playing a hit effect, as another optional implementation, after determining the skill hit point, the hit effect playback effect can be further adjusted based on the body characteristics of the hit object. For example, the sound volume of the hit effect can be adjusted based on the body characteristics of the hit object, so that the hit effect volume matches the body characteristics of the hit object, that is, different body sizes correspond to different hit effect volumes; or the display range of the hit effect can be adjusted based on the body characteristics of the hit object, such that a larger body size results in a larger display range of the hit effect. The corresponding embodiment steps may specifically include: determining the body characteristics of the hit object; adjusting the special effect performance of the hit effect based on the body characteristics; and playing the adjusted hit effect at the skill hit point.
[0097] Correspondingly, as another implementation method, the example steps may further specifically include: determining the skill attributes of the target skill, the skill attributes including the special effect display range, skill attack type, and skill attack duration; if it is determined that the casting object is within the display range corresponding to the current game object, the skill release special effects of the target skill are played according to the skill attributes.
[0098] In this embodiment, in specific application scenarios, it is also possible to simultaneously determine whether the casting object is within the display range corresponding to the current game object. If the casting object is within the display range corresponding to the current game object, the skill release special effects of the target skill can be further played on the game client where the current game object is located. For example, when releasing a bow and arrow skill, the casting object will perform the "draw arrow, draw the bow, shoot the arrow" set of actions within a preset time interval. After the above set of actions are completed, the casting object will shoot the arrow. At the moment of shooting the arrow, the client where the casting object is located will begin to render the arrow's flight trajectory and flight effects. At this time, if the casting object is within the display range corresponding to the current game object, the flight trajectory and flight effects of the target skill released by the casting object can also be further played.
[0099] In step 203b of the embodiment corresponding to step 203a of the embodiment, if the skill attack type is a long-range attack, a hit effect that matches the casting object is played at a fixed position corresponding to the hit effect playback slot of the attacked object.
[0100] For this embodiment, when the skill attack type is a long-range attack, a fixed bone position for playing the hit effect can be set in advance for the hit object through the hit effect playback slot. When the client where the current game object is located receives the broadcast message of the skill hit and determines that a skill hit event has occurred, the skill attack type of the target skill can be determined according to the skill configuration information corresponding to the casting object, and the hit effect matching the skill attack type corresponding to the target skill can be played at the fixed bone position of the hit object. Among them, the playback method of the hit effect is the same as the playback method when the skill attack type is a melee attack. For details, please refer to the relevant description in step 206a of the embodiment, which will not be repeated here.
[0101] By means of the above-mentioned method for playing game special effects, after the client where the current game object is located receives the broadcast message of the skill hit, the target skill's casting object and the target skill's hit target are determined according to the broadcast message, and the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit target are obtained; the skill hit point of the hit target is further determined according to the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is the hit position of the hit target in the perspective of the game screen where the current game object is located; and a hit special effect that matches the target skill is further played at the skill hit point. Through the technical solution in this application, each local client can independently determine the skill hit point of the target skill based on the relative visual position of the casting object and the hit target, and accurately play the hit special effect at the skill hit point, which can ensure that the play position of the hit special effect in the game screen is on the model surface, further improve the accuracy of the special effect play position, and make the hit special effect play position more consistent with the visual hit point, thereby creating a good gaming experience for game users. In addition, in this solution, the local client is used to determine the skill hit point, and the server does not need to calculate the skill hit point, which can reduce the computing pressure of the server and reduce performance loss.
[0102] Further, as Figure 1 and Figure 2 The embodiment of the present application provides a game special effects playback device, such as Figure 3 As shown, the device includes: a receiving module 31, an acquisition module 32, a first determination module 33, and a playing module 34;
[0103] The receiving module 31 is configured to receive a broadcast message of a skill hit at the client where the current game object is located, wherein the broadcast message includes the target of the skill being cast and the target being hit by the skill;
[0104] An acquisition module 32 is configured to acquire the center coordinates of a first capsule of a casting object and the center coordinates of a second capsule of a struck object;
[0105] A first determining module 33 may be configured to determine a skill hit point of the hit object based on the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is a hit position of the hit object in the perspective of the current game screen where the game object is located;
[0106] The playback module 34 can be used to play the hit effect that matches the target skill at the skill hit point.
[0107] In a specific application scenario, in order to determine the skill attack type of the target skill, the playing method of the skill hit special effect can be determined according to the skill attack type, such as Figure 4 As shown, the device further includes: a second determining module 35;
[0108] The second determination module 35 can be used to determine the skill attack type of the target skill according to the skill configuration information corresponding to the casting object;
[0109] If the skill attack type is an attack with an attack distance less than a preset distance, the acquisition module 32 is used to obtain the first capsule center coordinates of the casting object and the second capsule center coordinates of the hit object, and the first determination module 33 is used to determine the skill hit point of the hit object based on the first capsule center coordinates and the second capsule center coordinates, and the playback module 34 is used to play the hit special effects that match the casting object at the skill hit point.
[0110] In a specific application scenario, the acquisition module 32 can be specifically used to receive spatial position information about surrounding game objects broadcast by the game server; and extract the center coordinates of the first capsule of the casting object and the center coordinates of the second capsule of the hit object based on the spatial position information.
[0111] In a specific application scenario, the first determination module 33 can be used to obtain the action posture of the attacked object at the current moment, and generate a spatial bounding box of the attacked object based on the action posture; generate an attack ray from the center coordinate of the first capsule to the center coordinate of the second capsule, and detect the collision point between the attack ray and the spatial bounding box, and determine the skill hit point of the attacked object based on the collision point.
[0112] In a specific application scenario, when detecting the collision point between the attack ray and the spatial bounding box and determining the collision point as the skill hit point of the attacked object, the first determination module 33 can be specifically used to: detect the collision point between the attack ray and the spatial bounding box, and determine the skill hit point of the attacked object based on the collision point.
[0113] In a specific application scenario, the playback module 34 can be used to determine the hit effects that match the target skill, including the hit animation effects and the first sound effects; and play the animation effects and the first sound effects at the skill hit point.
[0114] In specific application scenarios, such as Figure 4 As shown, the device further includes: a third determining module 36;
[0115] The third determining module 36 may be used to determine time information associated with the hit effect, the time information including the duration of the hit effect and the duration of the skill effect of the target skill on the hit object;
[0116] The playing module 34 can be specifically used to play the animation special effect and the first sound special effect at the skill hit point according to the special effect performance duration, and update the hit status of the hit object according to the skill effect duration.
[0117] In a specific application scenario, the playback module 34 can also be used to play a hit effect that matches the casting object at a fixed position corresponding to the hit effect playback slot of the hit object if the skill attack type is an attack with an attack distance greater than a preset distance.
[0118] In specific application scenarios, such as Figure 4 As shown, the device further includes: a fourth determining module 37;
[0119] The fourth determination module 37 can be used to determine the skill attributes of the target skill, including the special effect display range, skill attack type, and skill attack duration;
[0120] The playing module 34 can also be used to play the skill release effects of the target skill according to the skill attributes if it is determined that the casting object is within the display range corresponding to the current game object.
[0121] It should be noted that for other corresponding descriptions of the functional units involved in the game special effects playback device provided in this embodiment, please refer to Figures 1 to 2 The corresponding description in the method will not be repeated here.
[0122] Based on the above Figures 1 to 2 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, this embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned Figures 1 to 2 The game special effects playback method shown.
[0123] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.
[0124] Based on the above Figures 1 to 2 The method shown, and Figure 3 、 Figure 4 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a game special effects playback device, which can be a personal computer, a server, an intelligent attack, or other network devices, etc. The device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 2 The game special effects playback method shown.
[0125] Optionally, the physical device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and the like. The user interface may include a display, an input unit such as a keyboard, and the like. The optional user interface may also include a USB interface, a card reader interface, and the like. The network interface may optionally include a standard wired interface, a wireless interface (such as a Wi-Fi interface), and the like.
[0126] Those skilled in the art will understand that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0127] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device, supporting the execution of information processing programs and other software and / or programs. The network communication module is used to enable communication between components within the storage medium, as well as with other hardware and software within the physical information processing device.
[0128] Through the description of the above embodiments, it will be clear to those skilled in the art that the present application can be implemented by means of software plus the necessary general hardware platform, or by means of hardware. By applying the solution of this embodiment, after the client where the current game object is located receives a broadcast message of a skill hit, the target skill's caster and the target skill's hit target can be determined based on the broadcast message, and the first capsule center coordinates of the caster and the second capsule center coordinates of the hit target can be obtained; the skill hit point of the hit target can be further determined based on the first capsule center coordinates and the second capsule center coordinates, wherein the skill hit point is the hit position of the hit target in the perspective of the game screen where the current game object is located; and a hit effect that matches the target skill can be played at the skill hit point. Through the technical solution of this application, each local client can independently determine the skill hit point of the target skill based on the relative visual position of the caster and the hit target, and accurately play the hit effect at the skill hit point, which can ensure that the play position of the hit effect in the game screen is on the model surface, improve the accuracy of the special effect play position, and make the hit effect play position more consistent with the visual hit point, thereby creating a good gaming experience for game users. In addition, in this solution, the local client is used to determine the skill hit point, and the server does not need to calculate the skill hit point, which can reduce the computing pressure of the server and reduce performance loss.
[0129] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0130] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.
Claims
1. A method for playing game special effects, characterized in that: include: The client where the current game object is located receives a broadcast message of a skill hit, wherein the broadcast message includes the target of the target skill and the target hit by the target skill; Obtaining the center coordinates of a first capsule of the casting object and the center coordinates of a second capsule of the struck object; Determining a skill hit point of the hit object according to the first capsule center coordinate and the second capsule center coordinate, wherein the skill hit point is the hit position of the hit object in the perspective of the game screen where the current game object is located, specifically obtaining the action posture of the hit object at the current moment, and generating a spatial bounding box of the hit object according to the action posture; generating an attack ray from the first capsule center coordinate to the second capsule center coordinate, detecting a collision point between the attack ray and the spatial bounding box, and determining the skill hit point of the hit object according to the collision point; Obtaining the location coordinates of the skill hit point; determining a skill hit portion of the struck object according to the position coordinates, wherein the skill hit portion is a preset number of preset skill hit portions of the struck object divided according to the body shape characteristics of the struck object; Obtaining special effects and / or skill effects that match the skill hit location; A hit special effect that matches the special effect performance and / or skill effect is played at the skill hit point.
2. The method according to claim 1, characterized in that The method further comprises: Determining the skill attack type of the target skill according to the skill configuration information corresponding to the casting object; If the skill attack type is an attack with an attack distance less than a preset distance, the first capsule center coordinates of the casting object and the second capsule center coordinates of the attacked object are obtained, and the skill hit point of the attacked object is determined based on the first capsule center coordinates and the second capsule center coordinates, and a hit special effect matching the casting object is played at the skill hit point.
3. The method according to claim 1, characterized in that The obtaining of the first capsule center coordinates of the casting object and the second capsule center coordinates of the struck object includes: Receive spatial position information about surrounding game objects broadcast by the game server; The first capsule center coordinates of the casting object and the second capsule center coordinates of the struck object are extracted according to the spatial position information.
4. The method according to claim 1, wherein Detecting the collision point between the attack ray and the spatial bounding box, and determining the skill hit point of the attacked object according to the collision point, includes: A first collision point between the attack ray and the space bounding box is detected, and the first collision point is determined as a skill hit point of the attacked object.
5. The method according to claim 1, wherein Playing a hit effect that matches the target skill at the skill hit point includes: Determining a hit special effect that matches the target skill, the hit special effect including a hit animation special effect and a first sound special effect; The animation special effect and the first sound special effect are played at the skill hit point.
6. The method according to claim 5, characterized in that The method further comprises: Determining time information associated with the hit special effect, the time information including the duration of the hit special effect and the duration of the skill effect of the target skill on the hit object; The animation special effect and the first sound special effect are played at the skill hit point according to the special effect performance duration, and the hit state of the hit object is updated according to the skill effect duration.
7. The method according to claim 2, characterized in that The method further comprises: If the skill attack type is an attack with an attack distance greater than a preset distance, a hit special effect that matches the casting object is played at a fixed position corresponding to the hit special effect playback slot of the attacked object.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Determine the skill attributes of the target skill, including the special effect display range, skill attack type, and skill attack duration; If it is determined that the casting object is within the display range corresponding to the current game object, the skill release special effect of the target skill is played according to the skill attribute.
9. A game special effects playback device, characterized in that: include: A receiving module, configured to receive a broadcast message of a skill hit on the client where the current game object is located, wherein the broadcast message includes the target object of the target skill and the target object hit by the target skill; An acquisition module, configured to acquire the center coordinates of a first capsule of the casting object and the center coordinates of a second capsule of the struck object; a determination module, configured to determine a skill hit point of the hit object based on the first capsule center coordinate and the second capsule center coordinate, wherein the skill hit point is the hit position of the hit object in the perspective of the game screen where the current game object is located, specifically obtaining the action posture of the hit object at the current moment, and generating a spatial bounding box of the hit object based on the action posture; generating an attack ray from the first capsule center coordinate to the second capsule center coordinate, detecting a collision point between the attack ray and the spatial bounding box, and determining the skill hit point of the hit object based on the collision point; A playback module is used to obtain the position coordinates of the skill hit point; determine the skill hit part of the hit object based on the position coordinates, wherein the skill hit part is a preset number of preset skill hit parts for the hit object divided according to the body characteristics of the hit object; obtain special effect performance and / or skill effect matching the skill hit part; and play a hit special effect matching the special effect performance and / or skill effect at the skill hit point.
10. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
11. A game special effects playback device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that: When a processor executes the program, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Display control method and device, storage medium and electronic device
CN111084986A
Shooting track processing method and device and electronic equipment
CN112274931A