Character hit processing method and device, electronic equipment and computer readable medium
Patent Information
- Application Number
- CN202311798626.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2043-12-25
AI Technical Summary
[0003]目前的射击游戏中游戏角色的受击表现大多处理得相对简单,游戏角色依赖固定的受击动画(如静态动画序列)做出受击表现,角色整体向受击方向产生晃动偏移,角色受击动作比较呆板,可动态变化部分少
[0020]In the character hit processing method of the exemplary implementation of this disclosure, when the game character is hit, the region hit animation corresponding to each hit area is obtained according to the hit area of the game character. Then, according to the mixing weight of the hit animation corresponding to each hit area, the region hit animation of each hit area is mixed with the target basic posture of the game character. Then, according to the difference between the mixed hit animation of the game character and the target basic posture of the game character, the dynamic hit animation of the game character is obtained. Finally, the dynamic hit animation of the game character is superimposed with the dynamic action animation to obtain the current dynamic hit performance of the game character. The method for handling character hits in the exemplary embodiments of this disclosure mixes the area hit animation of each hit region with the target base posture of the game character, then extracts the dynamic hit animation of the game character and dynamically overlays it with the current dynamic action animation of the game character. On the one hand, it can realize continuous dynamic hits on multiple parts of the game character, optimize and enrich the dynamic performance of the game character when hit, make the hit feedback meet the subconscious expectations of the player, and make the hit performance more realistic, diverse, and more in line with the visual feeling of physical properties. On the other hand, by using dynamic overlay, the hit animation under the same base posture can also be applied to other postures. While ensuring the harmony and unity between the hit performance and the original animation performance, it can also improve the production efficiency of the game character's dynamic hit animation.
Smart Images

Figure CN117717774B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a method for handling character hits, a device for handling character hits, an electronic device, and a computer-readable medium. Background Technology
[0002] In the combat experience of shooting games, game characters will frequently receive or generate continuous multi-directional attacks. That is, the game character will be shot continuously by bullets from different directions or continuously shot at other units. In addition, shooting games usually require the character not to interrupt the current action when being shot. The character needs to make high-frequency and expected hit reactions without destroying the original action animation posture.
[0003] In most current shooting games, the hit reactions of game characters are handled in a relatively simple way. Game characters rely on fixed hit animations (such as static animation sequences) to make hit reactions. The character as a whole shakes and shifts in the direction of the hit. The character's hit action is relatively rigid and has few dynamic variations.
[0004] Therefore, there is an urgent need in this field for a method to handle character hits, which can optimize the dynamic performance of the character when hit, making the dynamic hit performance of the character more realistic.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a method for handling character hits, a device for handling character hits, an electronic device, and a computer-readable medium, thereby optimizing the dynamic performance of a character when hit, at least to a certain extent, and making the dynamic hit performance of the character more realistic.
[0007] According to a first aspect of this disclosure, a method for handling character being attacked is provided, comprising providing a graphical user interface via a terminal device, the graphical user interface including at least a portion of a game scene, the game scene containing at least one game character, the method comprising:
[0008] When the game character is hit, the hit animation corresponding to each hit area is obtained according to the hit area of the game character;
[0009] Based on the hit animation blending weights corresponding to each hit area, the region hit animations of each hit area are blended with the target base pose of the game character to obtain the blended hit animation of the game character.
[0010] The dynamic hit animation of the game character is obtained based on the difference between the hybrid hit animation of the game character and the target base posture of the game character;
[0011] The dynamic motion animation corresponding to the target's basic posture is obtained, and the dynamic hit animation of the game character is superimposed on the dynamic motion animation to obtain the current dynamic hit performance of the game character.
[0012] According to a second aspect of this disclosure, a device for processing character hits is provided, which provides a graphical user interface via a terminal device, the graphical user interface including at least a portion of a game scene, the game scene containing at least one game character, the device comprising:
[0013] The area animation acquisition module is used to acquire the area hit animation corresponding to each hit area when the game character is hit.
[0014] The area animation blending module is used to blend the area hit animation of each hit area with the target base posture of the game character according to the hit animation blending weight corresponding to each hit area, so as to obtain the blended hit animation of the game character.
[0015] The hit animation generation module is used to obtain the dynamic hit animation of the game character based on the difference between the hybrid hit animation of the game character and the target basic posture of the game character;
[0016] The dynamic motion overlay module is used to acquire the dynamic motion animation corresponding to the target's basic posture, and overlay the game character's dynamic hit animation with the dynamic motion animation to obtain the game character's current dynamic hit performance.
[0017] According to a third aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the character being attacked processing method described in any of the preceding claims by executing the executable instructions.
[0018] According to a fourth aspect of this disclosure, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, implements the character attack handling method described in any of the preceding claims.
[0019] The exemplary embodiments disclosed herein may have the following beneficial effects:
[0020] In the character hit processing method of the exemplary implementation of this disclosure, when the game character is hit, the region hit animation corresponding to each hit area is obtained according to the hit area of the game character. Then, according to the mixing weight of the hit animation corresponding to each hit area, the region hit animation of each hit area is mixed with the target basic posture of the game character. Then, according to the difference between the mixed hit animation of the game character and the target basic posture of the game character, the dynamic hit animation of the game character is obtained. Finally, the dynamic hit animation of the game character is superimposed with the dynamic action animation to obtain the current dynamic hit performance of the game character. The method for handling character hits in the exemplary embodiments of this disclosure mixes the area hit animation of each hit region with the target base posture of the game character, then extracts the dynamic hit animation of the game character and dynamically overlays it with the current dynamic action animation of the game character. On the one hand, it can realize continuous dynamic hits on multiple parts of the game character, optimize and enrich the dynamic performance of the game character when hit, make the hit feedback meet the subconscious expectations of the player, and make the hit performance more realistic, diverse, and more in line with the visual feeling of physical properties. On the other hand, by using dynamic overlay, the hit animation under the same base posture can also be applied to other postures. While ensuring the harmony and unity between the hit performance and the original animation performance, it can also improve the production efficiency of the game character's dynamic hit animation.
[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0023] Figure 1 A schematic diagram of an exemplary system architecture for a character being attacked, to which embodiments of the present disclosure can be applied, is shown;
[0024] Figure 2 A flowchart illustrating a method for handling character attacks according to an exemplary embodiment of this disclosure is shown.
[0025] Figure 3 A schematic diagram illustrating the basic stance for crouching shooting according to a specific embodiment of the present disclosure is shown.
[0026] Figure 4 A flowchart illustrating a method for generating a set of area hit animations according to an exemplary embodiment of this disclosure is shown.
[0027] Figure 5 The diagram illustrates the division of the hit area for a character according to a specific embodiment of the present disclosure.
[0028] Figure 6 A schematic diagram of the process for blending area hit animations of various hit areas in an exemplary embodiment of this disclosure is shown;
[0029] Figure 7 A schematic diagram illustrating the process of superimposing dynamic hit animation and dynamic motion animation of a game character in an exemplary embodiment of this disclosure is shown.
[0030] Figure 8 A schematic diagram illustrating the process of obtaining dynamic hit animation of a game character by combining the physical hit actions of the game character in an exemplary embodiment of this disclosure is shown.
[0031] Figure 9 The illustration shows a schematic diagram of the physical simulation results of the force on the chest of a character according to a specific embodiment of the present disclosure;
[0032] Figure 10 The illustration shows a schematic diagram of the physical simulation results of the force on the left hand of a character holding a gun according to a specific embodiment of the present disclosure;
[0033] Figure 11 The diagram illustrates a single part being struck from different directions according to a specific embodiment of the present disclosure;
[0034] Figure 12 The illustration shows a schematic diagram of multiple parts being struck repeatedly according to a specific embodiment of the present disclosure;
[0035] Figure 13 The illustration shows a schematic diagram of a special character type hit feedback according to a specific embodiment of the present disclosure;
[0036] Figure 14 A block diagram of a character-based attack processing apparatus according to an exemplary embodiment of this disclosure is shown;
[0037] Figure 15 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown. Detailed Implementation
[0038] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of these specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0039] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0040] Figure 1 A schematic diagram of a system architecture for an exemplary application environment in which a method and apparatus for handling character hits, according to embodiments of the present disclosure, can be applied.
[0041] like Figure 1 As shown, system architecture 100 may include multiple mobile terminals 101, 102, and 103, a network 104, and a server 105. Network 104 serves as a medium for providing communication links between mobile terminals 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wireless communication links.
[0042] It should be understood that Figure 1 The number of mobile terminals, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of mobile terminals, networks, and servers can be included. For example, server 105 could be a server cluster consisting of multiple servers.
[0043] Mobile terminals 101, 102, and 103 can be various electronic devices with processors, including but not limited to smartphones, tablets, and laptops. Server 105 can be a server providing various services. For example, mobile terminals 101, 102, and 103 can use their processors to obtain hit information of the game character when the character is hit, and upload this information to server 105. Server 105 can then use its processor to blend the regional hit animations of each hit area with the target base posture of the game character, based on the weighted blending of the hit animations corresponding to each hit area, to obtain a blended hit animation. Based on the difference between the blended hit animation and the target base posture, server 105 can obtain a dynamic hit animation. It can also obtain the dynamic motion animation corresponding to the target base posture and overlay the dynamic hit animation and dynamic motion animation to obtain the current dynamic hit behavior of the game character. Mobile terminals 101, 102, and 103 can use their processors to display the current dynamic hit behavior of the game character on a graphical user interface.
[0044] In one embodiment of this disclosure, the method for handling character attacks can run on a local terminal device or a server. When the method for handling character attacks runs on a server, it can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0045] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separate. The storage and execution of the character's hit handling method are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0046] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0047] In one possible implementation, this disclosure provides a method for handling character being attacked, which provides a graphical user interface through a terminal device, wherein the terminal device may be the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.
[0048] This example implementation first provides a method for handling character attacks, providing a graphical user interface (GUI) via a terminal device. The GUI includes at least a portion of the game scene, and the game scene contains at least one game character. (See reference) Figure 2 As shown, the method for handling the above-mentioned character being hit may include the following steps:
[0049] Step S210. When the game character is hit, obtain the area hit animation corresponding to each hit area according to the hit area of the game character.
[0050] Step S220. Based on the hit animation blending weights corresponding to each hit area, blend the area hit animation of each hit area with the target base pose of the game character to obtain the blended hit animation of the game character.
[0051] Step S230. Based on the difference between the game character's mixed hit animation and the game character's target base posture, obtain the game character's dynamic hit animation.
[0052] Step S240. Obtain the dynamic motion animation corresponding to the target's basic posture, and overlay the game character's dynamic hit animation with the dynamic motion animation to obtain the game character's current dynamic hit performance.
[0053] In the character hit processing method of the exemplary implementation of this disclosure, when the game character is hit, the region hit animation corresponding to each hit area is obtained according to the hit area of the game character. Then, according to the mixing weight of the hit animation corresponding to each hit area, the region hit animation of each hit area is mixed with the target basic posture of the game character. Then, according to the difference between the mixed hit animation of the game character and the target basic posture of the game character, the dynamic hit animation of the game character is obtained. Finally, the dynamic hit animation of the game character is superimposed with the dynamic action animation to obtain the current dynamic hit performance of the game character. The method for handling character hits in the exemplary embodiments of this disclosure mixes the area hit animation of each hit region with the target base posture of the game character, then extracts the dynamic hit animation of the game character and dynamically overlays it with the current dynamic action animation of the game character. On the one hand, it can realize continuous dynamic hits on multiple parts of the game character, optimize and enrich the dynamic performance of the game character when hit, make the hit feedback meet the subconscious expectations of the player, and make the hit performance more realistic, diverse, and more in line with the visual feeling of physical properties. On the other hand, by using dynamic overlay, the hit animation under the same base posture can also be applied to other postures. While ensuring the harmony and unity between the hit performance and the original animation performance, it can also improve the production efficiency of the game character's dynamic hit animation.
[0054] Below, in conjunction with Figures 3 to 13 The steps described above in this example implementation will be explained in more detail.
[0055] In step S210, when the game character is hit, the area hit animation corresponding to each hit area is obtained according to the hit area of the game character.
[0056] In this example implementation, multiple hit zones can be divided for the game character based on various body parts. For example, for a character, the left hand and left arm can be considered a hit zone, the torso can be considered a hit zone, and the right leg and right foot can also be considered a hit zone. Each hit zone can correspond to one or more hit animations. A hit animation refers to the animation corresponding to the impact action produced when a body part within the hit zone is attacked from a certain direction.
[0057] In this example implementation, the target basic posture of the game character can be determined first, and the set of area hit animations corresponding to the target basic posture can be obtained. Then, based on the hit area of the game character and the hit direction corresponding to each hit area, the area hit animations corresponding to each hit area can be filtered from the set of area hit animations corresponding to the target basic posture.
[0058] The basic stance of a game character refers to the posture of the game character when stationary, such as the basic stance for shooting while standing, the basic stance for shooting while crouching, the basic stance for shooting while standing unarmed, and other different basic stances of the character. Figure 3 The diagram illustrates a basic crouching shooting posture according to a specific embodiment of this disclosure, representing the basic crouching shooting posture of a game character in a static state. The target basic posture refers to the static basic posture corresponding to the game character in its current state. Multiple different dynamic postures of the game character may correspond to the same static target basic posture. For example, when the game character is standing empty-handed, walking empty-handed, or running empty-handed, the corresponding target basic posture is a static standing empty-handed basic posture. Conversely, when the game character is standing with a gun or running with a gun, the corresponding target basic posture is a static standing shooting basic posture.
[0059] In this example implementation, for each basic stance of the game character, there can be a corresponding set of area hit animations. This set of area hit animations contains the area hit animations of the game character in each hit area under each hit direction in that basic stance. The area hit animations obtained are different under different basic actions.
[0060] When obtaining the area hit animation corresponding to the hit area, it is necessary to first determine the target base posture corresponding to the game character in the current state, obtain the area hit animation set corresponding to the target base posture, and then find the area hit animation that meets the conditions from the area hit animation set corresponding to the target base posture, based on the game character's hit area and the hit direction corresponding to the hit area.
[0061] In this example implementation, such as Figure 4 As shown, the method for generating a set of area hit animations for game characters can specifically include the following steps:
[0062] Step S410. Divide the game character into multiple different preset hit zones according to the game character's character type. Each preset hit zone contains at least one body part of the game character.
[0063] When categorizing hit animations in a game, it's crucial to consider the design purpose behind the categorization. In shooting games, players can freely aim at any part of an enemy unit's body and attack from any direction relative to the enemy. The frequency of damage varies depending on the type of weapon used, and the attack effect is highly likely related to the weapon's rate of fire. Therefore, to create rich and realistic hit reactions in shooting games, hit animations need to be categorized according to the hit location and direction, and a sufficiently diverse range of hit animations is required to reflect attacks from multiple directions and locations received by the game character.
[0064] Based on the above analysis, when creating area-based hit animations, the game character can be divided into multiple hit zones. The more hit zones there are, the more area-based hit animations there will be, resulting in better effects, but also higher production costs. Therefore, based on the characteristics of shooting games, a set of rules for splitting area-based hit animations can be developed to balance the number of area-based hit animations and their impact.
[0065] When defining hit zones, since game characters vary depending on the game's theme, they can generally be categorized into three main types based on their physical characteristics: bipedal characters, quadrupedal characters, and special characters. Bipedal characters are humanoid creatures, standing on two legs with human-like physical features, such as human characters and other game characters with similar postures. Quadrupedal characters are units whose torso is supported by four limbs, representing a typical terrestrial locomotion structure, such as common quadrupedal animals. Special characters partially conform to or do not conform to either of the above two types, and are created in games with non-realistic worldviews. After classifying game characters, hit zones can be defined according to these different types.
[0066] In this example implementation, a bipedal character can be divided into a left upper torso region, a right upper torso region, a middle torso region, a head region, and left and right lower limb regions. Figure 5 The diagram illustrates a schematic representation of the hit zone division for a character according to a specific embodiment of the present disclosure.
[0067] Quadrupedal character types can be divided into a forequarter, hindquarter, and head area. All four limbs are supporting legs, and when subjected to force, these legs must remain stationary to avoid displacement. The limbs and torso have a strong linkage; therefore, the limbs can be grouped within the torso. The forelimbs and chest cavity are considered the same area, the forequarter, while the hind legs and pelvis are considered the same area, the hindquarter.
[0068] Game characters with special character types can be divided into normal body parts areas and special body parts areas. The normal body parts area can be divided in a similar way to the bipedal or quadrupedal character types mentioned above, while the special body parts area can be divided separately based on the specific circumstances.
[0069] Step S420. For each preset hit zone of the game character, determine at least one preset hit direction associated with the preset hit zone.
[0070] For each preset hit zone of the game character, different preset hit zones can be set with one or more different preset hit directions according to the characteristics of the shooting game. The preset hit direction is the direction of attack that the preset hit zone may be attacked.
[0071] Bipedal characters consist of limbs, torso, and head. In a basic stance, if only the most important limb components are considered, each part would generate hit animations in four directions (front, back, left, and right), requiring a total of 24 hit animations – a considerable number. Therefore, the number of hit animations can be balanced by incorporating the characteristics of shooting games into the character breakdown.
[0072] For example, characters are often in a shooting stance with their arms outstretched. When viewed from the front / back, the silhouettes of their arms are concentrated on their chest / back, covering a small area. When viewed from the side, the silhouettes of their arms are longer. In shooting games, the light hit animation should disrupt the character's aiming posture as little as possible to ensure the core shooting mechanics experience. Since third-person shooters primarily use a back-view or over-the-shoulder perspective, maintaining a shooting posture in these perspectives is crucial. If the arms are the hit area, the best hit animation is a forward / backward force. Combining these two characteristics, we can group the arm, shoulder, chest, and back on the same side into the same hit area. That is, "the left side of the upper torso" includes the left arm, left shoulder, left chest, and left back; the same applies to the right side. The hit animation for this area is designed so that the main points of impact are concentrated on the left and right pectoral muscles / back to the left and right shoulders. The default direction of impact is from the front / back of the character. During movement, the hands maintain a grip on the gun and do not leave the gun. Based on the above division, there are 2 hit animations for the "left side of the upper torso" and 2 for the "right side of the upper torso", for a total of 4 hit animations for the upper torso.
[0073] Continuing downwards, the "lower half of the upper torso" is the area near the waist and abdomen of the game character. The silhouette area of this region is relatively similar from any direction, and the force movement in each direction has little impact on the aiming posture. The hit animation in this region is designed so that the main force points are concentrated in the movement from the character's abdomen to the lower back and hips. The preset hit directions can come from the character's front, back, left, and right directions. Therefore, there are a total of 4 hit animations in this region.
[0074] The "head area" refers to the area above the character's neck. The silhouette size of this area is relatively similar from any direction, and the impact of force on aiming posture is minimal. The hit animation design for this area is as follows: when the preset hit direction is forward / backward, the main force is concentrated on the character's forehead / back of the head, resulting in a backward / forward tilt. If the preset hit direction is left / right, the main force is concentrated on the character's left / right cheekbone, resulting in a left / right external rotation of the head. This area is not designed with the main force concentrated on the left / right temples for a left / right swaying motion because: firstly, left / right swaying might obstruct the field of vision from an over-the-shoulder viewpoint; secondly, the high frequency of hits in shooting games makes frequent left / right head movements unsightly. Based on the above analysis, there are a total of 4 hit animations for the "head area".
[0075] The "lower limb area" refers to the game character's legs. The main point of impact is concentrated on the left / right thighs. The design of the leg hit animation requires that the feet remain in place when hit, without any displacement. The impact is mainly expressed by the thighs driving the knees to rotate inward / outward, avoiding sliding when applied to other animation poses. In shooting games, a game character's left and right legs may be hit simultaneously. For aesthetic reasons, only the inward rotation movement is retained. That is, the left leg produces an inward animation with the preset impact direction to the left, and the right leg produces an inward animation with the preset impact direction to the right. Therefore, there are a total of 2 hit animations in the "lower limb area".
[0076] Based on the above regional division method and the analysis of the direction of impact on each part, the bipedal character type produces a total of 14 impact animations in each part and direction under a basic posture. This division method can balance the impact effect and the amount of resources.
[0077] When viewed from the front / back, the silhouette area of a quadrupedal character is relatively small, while it is larger when viewed from the side. Furthermore, the head also obscures the view from the front. Therefore, the design of the quadrupedal character's area impact animation is as follows: the main impact points are concentrated on the left and right sides of the chest / pelvis, involving the movement of the front and hind limbs. The default impact directions are from the left and right sides of the character, resulting in a total of four impact animations across these two areas. The design of the "head area" is similar to that of the bipedal character and will not be elaborated upon here.
[0078] Special character types can be independently divided into special areas that cannot be summarized by bipedal and quadrupedal character types and handled separately.
[0079] Step S430. Determine multiple basic poses of the game character, and generate area hit animations for each preset hit area in each relevant preset hit direction for each basic pose, so as to obtain the area hit animation set corresponding to each basic pose.
[0080] Finally, multiple basic stances of the game character are determined, and for each basic stance, area hit animations of each preset hit area in each relevant preset hit direction are generated, resulting in a set of area hit animations corresponding to each basic stance.
[0081] The resource quantity for bipedal character types can be planned according to the importance of the character, with different numbers of basic stances. For example, the protagonist / human character type is the most numerous and important character type in the game, and the basic stances can be divided into standing shooting stance, crouching shooting stance, unarmed standing stance, and unarmed crouching stance. This would generate a total of the number of basic stances multiplied by the number of bipedal area hit animations, covering most situations. For instance, according to the above division method, a human character has 14 area hit animations in one basic stance, and a human character has 4 basic stances. Therefore, the total number of resources contained in the human character's area hit animation set is 14 × 4 = 56. Other humanoid bipedal characters can be divided into basic stances according to their importance. For example, characters who do not need to carry guns can be divided into only two basic stances: unarmed standing stance and unarmed crouching stance, requiring only 28 total resources.
[0082] In this example implementation, the design and planning for shooting games balances the amount of animation resources and the effects of hit animations, which can reduce costs while achieving hit effects from multiple angles, multiple parts, and multiple directions, enriching the character's hit performance, and meeting the characteristics and requirements of shooting.
[0083] Continue to refer to Figure 2 As shown, in step S220, the area hit animation of each hit area is mixed with the target base posture of the game character according to the hit animation mixing weight corresponding to each hit area, so as to obtain the mixed hit animation of the game character.
[0084] In this example implementation, the hit animation blending weight refers to the blending weight corresponding to each hit region when blending regional hit animations. To achieve multiple parts simultaneously displaying high-frequency hit effects from multiple directions, the divided hit regions can be blended using multiple poses. A variable is established to control the hit animation blending weight for each region. That is, each region outputs its current hit animation result, and then the blending is performed according to the hit animation blending weight variable for each region. The value range of the hit animation blending weight can be, for example, (0, 1). In addition to the regional poses, it is also necessary to blend with the target base pose of the game character. That is, the number of blended poses is the number of divided regions plus 1. The larger the weight of the target base pose, the smaller the amplitude of the hit animation. In practical applications, each hit region can correspond to an enumeration number. The in-game script passes the corresponding region enumeration number to the animation blueprint based on the hit part to obtain the corresponding region hit animation.
[0085] In this example implementation, such as Figure 6 As shown, based on the hit animation blending weights corresponding to each hit area, the region hit animation of each hit area is blended with the target base pose of the game character to obtain the game character's blended hit animation. This process can specifically include the following steps:
[0086] Step S610. Obtain the hit amplitude parameters corresponding to each hit area. The hit amplitude parameters include the single hit amplitude value of the area and the rate of change of the area amplitude value.
[0087] In this example implementation, when blending the area hit animations of various hit zones, the blending ratio needs to be controlled by script parameters to achieve dynamic and real-time responses. The hit amplitude parameter is a parameter related to weapon attributes. In controlling the hit amplitude parameter, a total hit amplitude value for light hit animations can be set. This total hit amplitude value is used to determine the proportion of superimposed dynamic animations during dynamic overlay, distinguishing the overall performance after different weapons hit. The hit amplitude parameter also includes a single-hit amplitude value for the area, reflecting the blending weight of the corresponding area after a single hit from different weapons. The hit amplitude parameter also includes the rate of change of the area amplitude value, reflecting the rate of decay or increase of the area amplitude value. As long as the area's weight value is not 0, the rate of change of the area amplitude value approaches 0. These hit amplitude parameters are configured within the weapon attributes, and the corresponding parameters are called when a weapon hits a character. By configuring parameters in conjunction with weapon characteristics, different weapon feedbacks can be differentiated.
[0088] Step S620. Determine the hit animation blending weight corresponding to each hit area based on the single hit amplitude value of each hit area.
[0089] The single hit amplitude value of the area is used to reflect the mixed weight of the corresponding area after a single hit by different firearms. Based on the single hit amplitude value of each hit area, the mixed weight of the hit animation corresponding to each hit area can be determined, that is, the mixed ratio value of the corresponding area.
[0090] Step S630. Determine the current animation blending weight corresponding to each hit area at the current moment based on the hit time, hit animation blending weight and the rate of change of the area amplitude value corresponding to each hit area.
[0091] Based on the time difference between the impact time and the current time for each impacted area, and with reference to the impact animation blending weight and the rate of change of the area amplitude value, the current animation blending weight corresponding to each impacted area at the current time can be determined.
[0092] Step S640. Based on the current animation blending weight corresponding to each hit area and the base posture blending weight corresponding to the target's base posture, blend the area hit animation of each hit area and the target's base posture to obtain the game character's blended hit animation at the current moment.
[0093] In this example implementation, the total hit amplitude value can be obtained from the hit amplitude parameter of the hit area, and the area cooldown time of the hit area can be determined based on the total hit amplitude value; the area hit animation of the hit area is triggered based on the area cooldown time. Specifically, the area cooldown time of the hit area can be obtained by multiplying the base cooldown time and the total hit amplitude value.
[0094] When a single area is hit multiple times, the corresponding area's hit animation needs to be reset. In shooting games, some weapons have extremely high rates of fire. If the hit animation is reset according to the actual rate of fire, and the hit frequency is too high, the visually affected character will shake frequently, producing an exaggerated hit effect. Therefore, a cooldown time needs to be set based on the weapon type; this is the time interval between light hit animations triggered on a single body part. Within this time interval, the hit animation for that single body part will not be triggered repeatedly until the cooldown time ends.
[0095] The base cooldown time can be calculated by averaging the firing rates of all weapons in the game. The product of this average value and the total impact amplitude of each weapon is the final cooldown time, which is easy to configure. For example, the base cooldown time (0.5) * the impact amplitude after the weapon hits (0.2 for submachine guns) = 0.1. This means that weapons with a high firing rate have a small total impact amplitude, a small impact animation, and a short cooldown time; weapons with a low firing rate have a large total impact amplitude, a large impact animation, and a long cooldown time.
[0096] In this example implementation, when multiple hit areas are hit multiple times in succession, the rate of change of the area amplitude value of the previous hit area can be adjusted according to the hit order of each hit area.
[0097] When multiple hit areas are hit by shots in succession, if the hit animations of multiple areas are blended with a weight of 1 for all areas, the result is equivalent to the weights being equally distributed among the areas, weakening the hit performance of all areas. To provide timely and intuitive hit feedback, it is necessary to accelerate the decay of the single hit amplitude value of the previous area according to the hit sequence. The decay of the single hit amplitude value can follow a "loop-out" curve, fast in and slow out, making room for the performance of the next area. While decaying the single hit amplitude value of the previous area, the single hit amplitude value of the current hit area can be increased to 1, following a "loop-in" curve, slow in and fast out, for a better transition with the previous hit area. In this way, when multiple hit areas are hit by shots multiple times, only one hit area has the highest weight at any given moment, while other hit areas are in the decay process at different stages, and other areas still have leeway to participate, making the hit performance of multiple areas richer and more reasonable.
[0098] In this example implementation, if the weapon hitting the game character is a multi-shot scattering weapon, and the multi-shot scattering weapon hits multiple hit areas of the game character at the same time, then a target hit area is determined from the multiple hit areas hit by the multi-shot scattering weapon, and the area hit animation of the target hit area is triggered.
[0099] For weapons that can fire multiple projectiles in a single shot (such as shotguns), if a single shot hits multiple hit areas of the game character at the same time, one target hit area can be identified, and only the hit animation of that area will be reported. The hit actions of other areas can be ignored.
[0100] In this example implementation, when determining the target impact area, the impact area with the highest number of bullet hits can be selected from the multiple impact areas hit by the multi-shot scattering weapon based on the number of bullets hit in each impact area. Alternatively, the impact area closest to the game character's center of gravity among the multiple impact areas hit by the multi-shot scattering weapon can also be selected as the target impact area.
[0101] The target impact area can be selected based on the number of bullets hitting each area. That is, if the total number of bullets hitting a certain area is the highest, then that area is selected as the target impact area. If several areas have the same number of bullets hitting them, then the area closer to the body's center of gravity is selected as the target impact area. For example, if the abdomen and arm are attacked by the same number of bullets at the same time, then the abdomen area is selected as the target impact area, and only the abdomen area is shown in the impact animation.
[0102] In this example implementation, when the same area is attacked from different directions, the weight of the area can be determined by the above rules. The attack animations in each direction within the area can be selected based on the direction of the attack in the game, and switched sequentially according to the trigger order. The transition of the attack animation during the switch adopts an inertial transition (obtaining the time difference between the current frame and the previous frame, the target pose, and the target pose, using inertial interpolation in three directions for coordinates, and using quaternion axis-angle decomposition for displacement interpolation), making the switching of the attack direction more natural.
[0103] Continue to refer to Figure 2 As shown, in step S230, the dynamic hit animation of the game character is obtained based on the difference between the game character's mixed hit animation and the game character's target base posture.
[0104] In this example implementation, the dynamic hit animation of the game character can be extracted by subtracting the game character's blended hit animation from its target base pose. Specifically, the dynamic hit animation of the game character can be obtained by taking the game character's target base pose as a reference and calculating the difference between each frame of the blended hit animation and the target base pose.
[0105] Since light hit animations cannot disrupt the ongoing original action, a dynamic overlay method can be used. This involves subtracting the mixed hit animation from the target's base posture during its creation to obtain the dynamic component of the mixed hit animation relative to the target's base posture. This dynamic component is then extracted and overlaid onto the character's current dynamic motion animation. This allows for a hit reaction that doesn't disrupt the original dynamic motion. For example, subtracting the standing head hit animation from its base standing posture reveals how the head moves when hit. This dynamic result is then overlaid onto the game character's running animation, resulting in a head hit reaction within the running animation.
[0106] In step S240, the dynamic motion animation corresponding to the target's basic posture is obtained, and the dynamic hit animation of the game character is superimposed on the dynamic motion animation to obtain the current dynamic hit performance of the game character.
[0107] In this example implementation, the dynamic motion animation corresponding to the target's basic posture can be obtained, and according to a dynamic overlay scheme, the game character's dynamic hit animation is overlaid with the game character's dynamic motion animation to obtain the game character's current dynamic hit performance. Here, dynamic motion animation refers to the game character's dynamic motion animation corresponding to the static basic posture. For example, the dynamic motion animation corresponding to the basic posture of standing empty-handed is either a walking animation or a running animation.
[0108] In this example implementation, such as Figure 7 As shown, the dynamic hit animation of a game character is overlaid with the dynamic action animation to obtain the current dynamic hit performance of the game character. This can specifically include the following steps:
[0109] Step S710. Obtain the hit amplitude parameter corresponding to the current hit area. The hit amplitude parameter includes the total hit amplitude value of the current hit area.
[0110] The current hit area refers to the area where the game character was most recently hit. The total hit amplitude value of the current hit area can be obtained through the hit amplitude parameter of the weapon. The total hit amplitude value of the current hit area is used to determine the proportion of the superimposed animation during dynamic superimposition.
[0111] Step S720. Based on the total hit amplitude value of the current hit area, determine the maximum amplitude value and the duration of the maximum amplitude value of the current hit area.
[0112] When a single hit area is hit, the total hit amplitude value can transmit the maximum amplitude value and the duration of the maximum amplitude value for that weapon, depending on the weapon type. The duration of the maximum amplitude value is how long after the maximum amplitude value is hit it begins to return to zero.
[0113] Step S730. Determine the current amplitude value of the current hit area based on the hit time, maximum amplitude value, and duration of the maximum amplitude value of the current hit area.
[0114] Based on the time difference between the impact time of the current impact area and the current moment, and referring to the maximum amplitude value and the duration of the maximum amplitude value, the current amplitude value of the current impact area can be determined.
[0115] Step S740. Based on the current amplitude value of the current hit area, overlay the dynamic hit animation of the game character with the dynamic action animation to obtain the current dynamic hit performance of the game character.
[0116] After the maximum amplitude value duration ends, the current amplitude value of the current hit area decays to 0 at different speeds depending on the type of firearm. During the decay, it can follow a "double entry and exit curve", with a slow entry and slow exit, so that the hit performance ends smoothly.
[0117] This example implementation serves a dynamic overlay scheme for hit animations. For instance, the design of a leg hit animation must ensure that the game character's feet do not shift. This is because it is desired that when dynamically overlaying leg hit animations, the character's feet will not move dynamically, and when overlaid on other basic postures, it will not affect the original animation's foot position, leading to situations such as sliding. The same applies to the arms; the design of arm hit animations must ensure that the hands do not move dynamically, so that even under severe impact, it will not affect the player's grip on the weapon.
[0118] In this example implementation, the hit animation, while balancing the amount of animation resources and the hit effects, has covered most situations as much as possible. To achieve a more delicate and realistic hit performance, physical force effects can be combined with the hit animation, so that the force experienced by the game character is affected by the results of realistic physics simulation. For example... Figure 8 As shown, if the physical force effects are combined with the hit animation, the dynamic hit animation of the game character can be obtained based on the difference between the game character's mixed hit animation and the game character's target base posture. This can specifically include the following steps:
[0119] Step S810. Create rigid skeletons on the main skeleton of the game character, with constraints between the rigid skeletons.
[0120] In game design, the interconnected bones inside a game character form a skeletal structure, and character animation can be generated by changing the orientation and position of the character's bones.
[0121] Rigid bodies can be built onto the main skeleton of a game character to create physical assets. Rigid bodies are used to control the skeleton, enabling physics simulation and allowing the game character's behavior to be physically controlled. Rigid bodies can withstand forces and torques, allowing the game character to move realistically. Constraints between rigid bodies can be modeled after the joint mobility angles of similar organisms in reality.
[0122] Step S820. Based on the weapon type hitting the impact area, obtain the impact force parameters and constraint curves corresponding to the impact area.
[0123] In this example implementation, different force parameter templates can be preset according to different firearm types. The force parameter template includes the magnitude of the force and the radius of influence of the force, and the relationship between the magnitudes of the forces conforms to the impact force relationship of different firearms in the real world. The results of the physical simulation are not completely controllable, and animation control is necessary to ensure that the overall impact posture is aesthetically pleasing.
[0124] Different constraint curves can be preset according to the type of firearm, including global physical constraint curves and local constraint curves. The constraint curves are custom curves, set according to the principle of first releasing and then tightening within a unit of time. With this setting, after the rigid body is subjected to force, there is sufficient displacement / rotation space for movement. Then the frequency of the constraint spring decreases to 0 and the spring damping increases, so that the rigid body moves and is pulled back to the animation position. This controls the return of the rigid body after being pushed, simulating the limb returning to its original position after being hit.
[0125] Step S830. Based on the direction of impact corresponding to the impact area, as well as the impact force parameters and constraint curves corresponding to the impact area, obtain the physical impact action of the game character.
[0126] The location and direction of the attack on the game character are used as the location and direction of the force on the rigid body, propelling the impacted rigid body into motion. The radius of influence of the force determines which nearby rigid bodies will also move, preventing the force from being transmitted too far.
[0127] Figure 9 The illustration shows a schematic diagram of the physical simulation results of the force on the chest of a character according to a specific embodiment of the present disclosure; Figure 10 The illustration shows a schematic diagram of the physical simulation results of the force on the left hand of a character holding a gun according to a specific embodiment of the present disclosure.
[0128] Step S840. Determine the physical animation blending coefficient of the game character at the current moment based on the physical animation blending curve of the game character.
[0129] To ensure that the rhythm of the physics simulation aligns with the rhythm of the animation, a physics-animation blending coefficient can be set between the physics simulation and the impact animation. A coefficient of 0 indicates a completely animated result, while a coefficient of 1 indicates a completely physical result. Within each impact animation, a physics-animation blending curve can be pre-configured. This curve represents the change in the physics-animation blending coefficient, reaching a value of 1 when the animation reaches its maximum amplitude. In other words, when the impact action is at its maximum, the weight of the physics simulation also reaches its maximum.
[0130] Step S850. Mix the game character's mixed hit animation with the game character's physical hit action according to the physical animation mixing coefficient to obtain the game character's physical animation mixed action.
[0131] Based on the game character's physical animation blending coefficient at the current moment, the game character's blended hit animation is blended with the game character's physical hit action to obtain the game character's physical animation blended action. The physical animation blended action and the animation blended action have the same hit timing and cooldown interval.
[0132] Step S860. Based on the difference between the game character's physical animation mixed action and the game character's target base posture, obtain the game character's dynamic hit animation.
[0133] Finally, the difference between the game character's physical animation blend and the target base posture is calculated. Based on the difference between the physical animation blend and the target base posture, the game character's dynamic hit animation is obtained. Compared to using only the hit animation, mixing the game character's blended hit animation with the game character's physical hit action and then subtracting it from the target base posture produces a more realistic physical simulation of the hit effect, similar to the animation rhythm and based on the animation performance.
[0134] In this example implementation, in order to ensure that the game character is not affected by the current game operation when hit, the hit lock area of the game character can be determined according to the target basic posture of the game character. The physical hit action of the hit lock area does not produce displacement.
[0135] In shooting games, the position of hands and feet is crucial. Influencing hand position disrupts the gun-holding / aiming stance, while affecting foot position causes slippage, compromising the believability of actions. Therefore, based on the character's current target stance, specific rigid body positions can be locked as the hit-locked area for the current animation. This hit-locked area will not shift during physics simulation, thus not affecting normal gameplay. For example, under normal conditions, the foot rigid body can be locked to prevent displacement during physical hits. When the character's stance changes to a prone position or other situations where the feet are no longer used for support (such as gliding), the locked area can be released.
[0136] Figure 11 The illustration shows a single part of the body being struck from different directions according to a specific embodiment of the present disclosure. The game character's head produces different impact actions when attacked from the right and rear. Figure 12 The illustration shows a schematic diagram of multiple parts being struck repeatedly according to a specific embodiment of the present disclosure; Figure 13 The illustration shows a schematic diagram of hit feedback for a specific character type according to a specific embodiment of the present disclosure. The character hit handling method in this example embodiment can achieve continuous dynamic hits from multiple angles, multiple body parts, and multiple directions, enriching the character's hit performance while meeting the characteristics of shooting. By combining animation effects with physical simulation, the physical simulation becomes more controllable, making the hit performance more realistic and diverse.
[0137] It should be noted that although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0138] Furthermore, this disclosure also provides a device for handling character hits, providing a graphical user interface via a terminal device. The graphical user interface includes at least a portion of a game scene, and the game scene contains at least one game character. (Reference) Figure 14 As shown, the character's hit processing device may include a region animation acquisition module 1410, a region animation mixing module 1420, a hit animation generation module 1430, and a dynamic action overlay module 1440. Wherein:
[0139] The area animation acquisition module 1410 can be used to acquire the area hit animation corresponding to each hit area based on the hit area of the game character when the game character is hit.
[0140] The area animation blending module 1420 can be used to blend the area hit animation of each hit area with the target base posture of the game character according to the hit animation blending weight corresponding to each hit area, so as to obtain the blended hit animation of the game character.
[0141] The hit animation generation module 1430 can be used to obtain the dynamic hit animation of the game character based on the difference between the game character's mixed hit animation and the game character's target base posture.
[0142] The dynamic motion overlay module 1440 can be used to acquire the dynamic motion animation corresponding to the target's basic posture, and overlay the game character's dynamic hit animation with the dynamic motion animation to obtain the game character's current dynamic hit performance.
[0143] In some exemplary embodiments of this disclosure, the region animation acquisition module 1410 may include a target basic attitude determination unit and a region hit animation filtering unit. Wherein:
[0144] The target base pose determination unit can be used to determine the target base pose of a game character and obtain the set of area hit animations corresponding to the target base pose;
[0145] The area hit animation filtering unit can be used to filter area hit animations corresponding to each hit area from the set of area hit animations corresponding to the target's basic posture, based on the hit area of the game character and the hit direction corresponding to each hit area.
[0146] In some exemplary embodiments of this disclosure, the character hit processing apparatus provided in this disclosure may further include a hit animation set generation module, which may include a preset hit area division unit, a preset hit direction determination unit, and a hit animation set generation unit. Wherein:
[0147] The preset hit zone division unit can be used to divide the game character into multiple different preset hit zones according to the game character type. Each preset hit zone contains at least one body part of the game character.
[0148] The preset hit direction determination unit can be used to determine at least one preset hit direction related to each preset hit area of a game character.
[0149] The hit animation set generation unit can be used to determine multiple basic poses of a game character. For each basic pose, it generates area hit animations for each preset hit area in each relevant preset hit direction, so as to obtain the area hit animation set corresponding to each basic pose.
[0150] In some exemplary embodiments of this disclosure, the regional animation blending module 1420 may include a hit amplitude parameter acquisition unit, an animation blending weight determination unit, a current animation blending weight determination unit, and a blended hit animation generation unit. Wherein:
[0151] The hit amplitude parameter acquisition unit can be used to acquire the hit amplitude parameters corresponding to each hit area. The hit amplitude parameters include the single hit amplitude value of the area and the rate of change of the area amplitude value.
[0152] The animation blending weight determination unit can be used to determine the hit animation blending weight corresponding to each hit area based on the single hit amplitude value of each hit area.
[0153] The current animation blending weight determination unit can be used to determine the current animation blending weight corresponding to each hit area at the current moment based on the hit time, the hit animation blending weight, and the rate of change of the area amplitude value corresponding to each hit area.
[0154] The hybrid hit animation generation unit can be used to blend the region hit animation of each hit area with the target's base posture based on the current animation blend weight corresponding to each hit area and the base posture blend weight corresponding to the target's base posture, so as to obtain the hybrid hit animation of the game character at the current moment.
[0155] In some exemplary embodiments of this disclosure, the character hit processing apparatus provided in this disclosure may further include a region hit animation cooldown trigger module, which may include a region cooldown time determination unit and a region hit animation trigger unit. Wherein:
[0156] The area cooldown time determination unit can be used to obtain the total hit amplitude value from the hit amplitude parameter of the hit area, and determine the area cooldown time of the hit area based on the total hit amplitude value;
[0157] The area hit animation trigger unit can be used to trigger area hit animations based on the area cooldown time.
[0158] In some exemplary embodiments of this disclosure, the area cooling time determination unit may include an area cooling time calculation unit, which can be used to obtain the area cooling time of the hit area based on the product of the base cooling time and the total hit amplitude value.
[0159] In some exemplary embodiments of this disclosure, the character hit processing device provided in this disclosure may further include an amplitude value change speed adjustment module. The amplitude value change speed adjustment module can be used to adjust the amplitude value change speed of the previous hit area according to the hit order of each hit area when multiple hit areas are hit multiple times in succession.
[0160] In some exemplary embodiments of this disclosure, a character hit processing apparatus provided in this disclosure may further include a target hit area determination module. The target hit area determination module may be used to determine a target hit area from the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas hit by the multiple hit areas, and trigger the area hit animation of the target hit area.
[0161] In some exemplary embodiments of this disclosure, the target hit area determination module may include a bullet number determination unit, which can be used to determine the hit area with the most bullets from multiple hit areas hit by the multi-shot scattering weapon as the target hit area based on the number of bullets hit in each hit area.
[0162] In some exemplary embodiments of this disclosure, the target hit area determination module may further include a center of gravity distance determination unit, which can be used to determine the target hit area as the hit area closest to the center of gravity of the game character among the multiple hit areas hit by the multi-shot scattering weapon.
[0163] In some exemplary embodiments of this disclosure, the hit animation generation module 1430 may specifically be used to obtain the dynamic hit animation of the game character based on the target base posture of the game character and the difference between each frame of the hybrid hit animation of the game character and the target base posture.
[0164] In some exemplary embodiments of this disclosure, the dynamic motion overlay module 1440 may include a hit amplitude parameter acquisition unit, a maximum amplitude value duration determination unit, a current amplitude value determination unit, and a dynamic motion animation overlay unit. Wherein:
[0165] The hit amplitude parameter acquisition unit can be used to acquire the hit amplitude parameter corresponding to the current hit area. The hit amplitude parameter includes the total hit amplitude value of the current hit area.
[0166] The maximum amplitude value duration determination unit can be used to determine the maximum amplitude value and the maximum amplitude value duration of the current hit area based on the total hit amplitude value of the current hit area;
[0167] The current amplitude value determination unit can be used to determine the current amplitude value of the current impacted area based on the impact time, maximum amplitude value, and duration of the maximum amplitude value of the current impacted area;
[0168] The dynamic motion animation overlay unit can be used to overlay the game character's dynamic hit animation with the game character's dynamic motion animation based on the current amplitude value of the current hit area, so as to obtain the game character's current dynamic hit performance.
[0169] In some exemplary embodiments of this disclosure, the impact animation generation module 1430 may further include a skeleton rigid body creation unit, a constraint curve acquisition unit, a physical impact action determination unit, a physical animation blending coefficient determination unit, a physical impact action blending unit, and a physical animation blending action subtraction unit. Wherein:
[0170] Rigid body building units can be used to create rigid bodies on the main skeleton of a game character, and there are constraints between the rigid bodies.
[0171] The constraint curve acquisition unit can be used to obtain the impact force parameters and constraint curves corresponding to the impact area based on the weapon type hitting the impact area;
[0172] The physical impact action determination unit can be used to obtain the physical impact action of the game character based on the impact direction corresponding to the impact area, as well as the impact force parameters and constraint curves corresponding to the impact area.
[0173] The physics animation blending coefficient determination unit can be used to determine the physics animation blending coefficient of the game character at the current moment based on the physics animation blending curve of the game character;
[0174] The physical hit animation blending unit can be used to blend the game character's blended hit animation with the game character's physical hit action according to the physical animation blending coefficient, so as to obtain the game character's physical animation blending action.
[0175] The physical animation blending motion subtraction unit can be used to obtain the dynamic hit animation of the game character based on the difference between the physical animation blending motion of the game character and the target base posture of the game character.
[0176] In some exemplary embodiments of this disclosure, the hit animation generation module 1430 may further include a hit lock area determination unit, which can be used to determine the hit lock area of the game character based on the target basic posture of the game character, wherein the physical hit action of the hit lock area does not produce displacement.
[0177] The specific details of each module / unit in the above-mentioned character hit processing device have been described in detail in the corresponding method embodiment section, and will not be repeated here.
[0178] Figure 15 A schematic diagram of the structure of a computer system suitable for implementing the embodiments of the present disclosure is shown.
[0179] It should be noted that, Figure 15 The computer system 1500 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0180] like Figure 15 As shown, the computer system 1500 includes a central processing unit (CPU) 1501, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1502 or programs loaded from storage section 1508 into random access memory (RAM) 1503. The RAM 1503 also stores various programs and data required for system operation. The CPU 1501, ROM 1502, and RAM 1503 are interconnected via bus 1504. An input / output (I / O) interface 1505 is also connected to bus 1504.
[0181] The following components are connected to I / O interface 1505: an input section 1506 including a keyboard, mouse, etc.; an output section 1507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN card, modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to I / O interface 1505 as needed. Removable media 1511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1510 as needed so that computer programs read from them can be installed into storage section 1508 as needed.
[0182] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1509, and / or installed from removable medium 1511. When the computer program is executed by central processing unit (CPU) 1501, it performs various functions defined in the system of this disclosure.
[0183] It should be noted that the computer-readable medium disclosed herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0184] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0185] In another aspect, this disclosure also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
[0186] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules described above can be embodied in one module. Conversely, the features and functions of one module described above can be further divided and embodied by multiple modules.
[0187] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein.
[0188] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for handling character being hit, characterized in that, The method includes providing a graphical user interface (GUI) via a terminal device, wherein the GUI includes at least a portion of a game scene, and the game scene contains at least one game character. When the game character is hit, the hit animation corresponding to each hit area is obtained according to the hit area of the game character; Based on the hit animation blending weights corresponding to each of the hit areas, the region hit animations of each hit area are blended with the target base posture of the game character to obtain the blended hit animation of the game character; the process of blending the region hit animations of each hit area with the target base posture of the game character to obtain the blended hit animation of the game character includes: obtaining the hit amplitude parameters corresponding to each of the hit areas, wherein the hit amplitude parameters include the single hit amplitude value of the area and the rate of change of the area amplitude value; based on the respective hit animation blending weights of each hit area... Based on the single hit amplitude value of each hit area, determine the hit animation blending weight corresponding to each hit area; based on the hit time corresponding to each hit area, the hit animation blending weight, and the rate of change of the area amplitude value, determine the current animation blending weight corresponding to each hit area at the current moment; based on the current animation blending weight corresponding to each hit area and the base posture blending weight corresponding to the target's base posture, blend the area hit animation of each hit area and the target's base posture to obtain the blended hit animation of the game character at the current moment; The dynamic hit animation of the game character is obtained based on the difference between the hybrid hit animation of the game character and the target base posture of the game character; The dynamic motion animation corresponding to the target's basic posture is obtained, and the dynamic hit animation of the game character is superimposed on the dynamic motion animation to obtain the current dynamic hit performance of the game character.
2. The method for handling character attacks according to claim 1, characterized in that, The step of obtaining the area hit animation corresponding to each hit area based on the hit area of the game character includes: Determine the target base pose of the game character and obtain the set of area hit animations corresponding to the target base pose; Based on the hit area of the game character and the hit direction corresponding to each hit area, the area hit animation corresponding to each hit area is selected from the set of area hit animations corresponding to the target's basic posture.
3. The method for handling character attacks according to claim 2, characterized in that, The method further includes: The game character is divided into multiple different preset hit zones according to the character type of the game character, and each preset hit zone contains at least one body part of the game character; For each preset hit zone of the game character, determine at least one preset hit direction associated with the preset hit zone; Multiple basic poses of the game character are determined, and for each basic pose, a region hit animation is generated for each preset hit area in each relevant preset hit direction, so as to obtain a set of region hit animations corresponding to each basic pose.
4. The method for handling character attacks according to claim 1, characterized in that, The method further includes: Obtain the total hit amplitude value from the hit amplitude parameter of the hit area, and determine the area cooldown time of the hit area based on the total hit amplitude value; The area hit animation is triggered based on the area cooldown time.
5. The method for handling character attacks according to claim 4, characterized in that, The step of determining the area cooldown time of the hit area based on the total hit amplitude value includes: The area cooldown time of the hit area is obtained by multiplying the base cooldown time by the total hit amplitude value.
6. The method for handling character attacks according to claim 1, characterized in that, The method further includes: When multiple hit areas are hit in succession, the rate of change of the area amplitude value of the previous hit area is adjusted according to the hit order of each hit area.
7. The method for handling character attacks according to claim 1, characterized in that, The method further includes: If the weapon hitting the game character is a multi-shot scattering weapon, and the multi-shot scattering weapon hits multiple hit areas of the game character simultaneously, then a target hit area is determined from the multiple hit areas hit by the multi-shot scattering weapon, and the area hit animation of the target hit area is triggered.
8. The method for handling character attacks according to claim 7, characterized in that, Determining a target impact area from the multiple impact areas hit by the multi-shot scattering weapon includes: Based on the number of bullets hit in each of the said hit areas, the hit area with the highest number of bullets hit is determined from the multiple hit areas hit by the multi-shot scattering weapon as the target hit area.
9. The method for handling character attacks according to claim 7, characterized in that, Determining a target impact area from the multiple impact areas hit by the multi-shot scattering weapon includes: The target impact area is defined as the impact area closest to the center of gravity of the game character among the multiple impact areas hit by the multi-shot scattering weapon.
10. The method for handling character attacks according to claim 1, characterized in that, The step of obtaining the dynamic hit animation of the game character based on the difference between the game character's hybrid hit animation and the game character's target base posture includes: Based on the target base posture of the game character, the dynamic hit animation of the game character is obtained according to the difference between each frame of the game character's hybrid hit animation and the target base posture.
11. The method for handling character attacks according to claim 1, characterized in that, The step of overlaying the game character's dynamic hit animation with the dynamic action animation to obtain the game character's current dynamic hit performance includes: Obtain the hit amplitude parameter corresponding to the current hit area, wherein the hit amplitude parameter includes the total hit amplitude value of the current hit area; Based on the total hit amplitude value of the current hit area, determine the maximum amplitude value and the duration of the maximum amplitude value of the current hit area; The current amplitude value of the current impacted area is determined based on the impact time of the current impacted area, the maximum amplitude value, and the duration of the maximum amplitude value; The game character's dynamic hit animation is superimposed with the dynamic action animation based on the current amplitude value of the current hit area to obtain the game character's current dynamic hit performance.
12. The method for handling character attacks according to claim 1, characterized in that, The step of obtaining the dynamic hit animation of the game character based on the difference between the game character's hybrid hit animation and the game character's target base posture includes: Rigid skeletons are built on the main skeleton of the game character, and there are constraint relationships between the various rigid skeletons. Based on the type of weapon hitting the impact area, obtain the impact force parameters and constraint curves corresponding to the impact area; Based on the impact direction corresponding to the impact area, as well as the impact force parameters and constraint curves corresponding to the impact area, the physical impact action of the game character is obtained. Based on the physical animation blending curve of the game character, determine the physical animation blending coefficient of the game character at the current moment; The game character's mixed hit animation is blended with the game character's physical hit action according to the physical animation blending coefficient to obtain the game character's physical animation blending action; The dynamic hit animation of the game character is obtained based on the difference between the physical animation mixed action of the game character and the target basic posture of the game character.
13. The method for handling character attacks according to claim 12, characterized in that, The method further includes: Based on the target basic posture of the game character, the hit lock area of the game character is determined, wherein the physical hit action of the hit lock area does not produce displacement.
14. A device for processing character hits, characterized in that, A graphical user interface is provided via a terminal device, wherein the graphical user interface includes at least a portion of a game scene, and the game scene contains at least one game character; the device includes: The area animation acquisition module is used to acquire the area hit animation corresponding to each hit area when the game character is hit. The region animation blending module is used to blend the region-based hit animations of each hit region with the target base posture of the game character according to the hit animation blending weights corresponding to each hit region, thereby obtaining a blended hit animation for the game character. The process of blending the region-based hit animations of each hit region with the target base posture of the game character according to the hit animation blending weights to obtain a blended hit animation for the game character includes: obtaining hit amplitude parameters corresponding to each hit region, wherein the hit amplitude parameters include the region single hit amplitude value and the region amplitude value change rate. The degree; based on the single hit amplitude value of each hit area, the hit animation blending weight corresponding to each hit area is determined; based on the hit time corresponding to each hit area, the hit animation blending weight, and the rate of change of the area amplitude value, the current animation blending weight corresponding to each hit area at the current moment is determined; based on the current animation blending weight corresponding to each hit area and the base posture blending weight corresponding to the target base posture, the area hit animation of each hit area and the target base posture are blended to obtain the blended hit animation of the game character at the current moment; The hit animation generation module is used to obtain the dynamic hit animation of the game character based on the difference between the hybrid hit animation of the game character and the target basic posture of the game character; The dynamic motion overlay module is used to acquire the dynamic motion animation corresponding to the target's basic posture, and overlay the game character's dynamic hit animation with the dynamic motion animation to obtain the game character's current dynamic hit performance.
15. An electronic device, characterized in that, include: processor; as well as A memory for storing one or more programs, which, when executed by the processor, cause the processor to implement the method for handling character attacks as described in any one of claims 1 to 13.
16. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method for handling character attacks as described in any one of claims 1 to 13.
Citation Information
Patent Citations
Game control method and device, equipment and storage medium
CN112870700A
Game device, input method and input program for game device
WO2007139075A1