CN-122006252-A - Game character processing method, device and computer program product
Abstract
The disclosure provides a game character processing method, a game character processing device and a computer program product, and relates to the technical field of computer graphics. The method comprises the steps of obtaining a play multiplying power of an image sequence corresponding to an animation model of a game role, wherein the play multiplying power is determined according to a moving path and a moving speed of the game role in a game scene, generating a moving image sequence of the game role in the game scene according to the animation model of the game role, the play multiplying power, the moving path and the moving speed, wherein the moving image sequence comprises an image sequence corresponding to the animation model, the image sequence is played at the play multiplying power, the image sequence corresponding to the animation model comprises a key frame and one or more transition frames positioned between any two adjacent key frames, the key frames at least comprise a jump frame and a drop frame, and the horizontal position of the axis of the game role in the drop frame is advanced by a step distance compared with the horizontal position of the axis of the game role in the jump frame.
Inventors
- LI SHIMIN
Assignees
- 网易(杭州)网络有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241112
Claims (14)
- 1. A method of processing a game character, comprising: acquiring the play multiplying power of an image sequence corresponding to an animation model of a game role, wherein the play multiplying power is determined according to the moving path and the moving speed of the game role in a game scene; Generating a moving image sequence of the game role in a game scene according to the animation model of the game role, the play multiplying power, the moving path and the moving speed, wherein the moving image sequence comprises an image sequence which is played at the play multiplying power and corresponds to the animation model; The image sequence corresponding to the animation model comprises key frames and one or more transition frames positioned between any two adjacent key frames, wherein the key frames at least comprise a take-off frame and a drop frame; The horizontal position of the axis of the game character in the drop frame is advanced by a stride distance from the horizontal position in the take-off frame.
- 2. The method according to claim 1, wherein the game character is a quadruped, the front two feet of the game character are located at a higher level than the rear two feet in the jump frame, and the rear two feet of the game character are located at a higher level than the front two feet in the drop frame.
- 3. The method according to claim 1, wherein the vertical position of the axis of the game character in the same key frame and/or the stride distance are different in different plays of the image sequence corresponding to the animation model.
- 4. The method of processing a game character according to claim 1, wherein the key frame further includes a start frame located before the take-off frame and an end frame located after the drop frame.
- 5. The method according to claim 4, wherein an axis of the game character is different in a vertical position in at least one of key frames of the start frame, the take-off frame, the drop frame, and the end frame.
- 6. The method according to claim 1, wherein the step of obtaining the playback magnification of the image sequence corresponding to the animation model of the game character further comprises detecting whether a predetermined condition is satisfied; and when the preset conditions are not met, the moving path, the moving speed and the playing multiplying power are preset.
- 7. The method according to claim 1, wherein the step of obtaining the playback magnification of the image sequence corresponding to the animation model of the game character further comprises detecting whether a predetermined condition is satisfied; the method further comprises the steps of: When the preset conditions are met, operation data and a preset strategy of the player character are obtained, and a real-time moving path and a real-time moving speed of the game character in a game scene are determined in real time according to the operation data and the preset strategy; The obtaining the playing multiplying power of the image sequence corresponding to the animation model of the game role comprises the following steps: And acquiring the playing multiplying power in real time according to the real-time moving path and the real-time moving speed of the game role in the game scene.
- 8. A method of processing a game character according to any one of claims 1 to 7, further comprising: and adjusting the stride distance and/or the vertical position of the axis of the game role in at least one key frame in real time according to a preset animation curve function, the moving path and the moving speed in an image sequence corresponding to the animation model.
- 9. The method according to claim 1, wherein the step of obtaining the playback magnification of the image sequence corresponding to the animation model of the game character further comprises detecting whether a predetermined condition is satisfied; The obtaining the playing multiplying power of the image sequence corresponding to the animation model of the game role comprises the following steps: When the preset conditions are met, operation data and a preset strategy of the player character are obtained, and a real-time moving path and a real-time moving speed of the game character in a game scene are obtained in real time according to the operation data and the preset strategy; And selecting a corresponding group of parameter values from a plurality of groups of parameter values preset by the animation model according to the real-time moving path and the real-time moving speed of the game character in the game scene, wherein the parameter values comprise the playing multiplying power, and the animation model with different parameter values corresponds to different gaits of the game character.
- 10. The method of processing a game character according to claim 9, wherein each of the plurality of sets of parameter values further comprises a vertical position of the stride distance and/or an axis of the game character in at least one key frame.
- 11. The method for processing game characters according to claim 6,7 or 9, wherein the preset condition includes detecting that the game character needs to respond to actions of other game characters to make corresponding actions.
- 12. The method of processing a game character according to claim 1, wherein the game character is a non-player character or the game character is a quadruped.
- 13. A game character processing apparatus comprising: the acquisition module is used for acquiring the play multiplying power of the image sequence corresponding to the animation model of the game character, wherein the play multiplying power is determined according to the moving path and the moving speed of the game character in the game scene; The generation module is used for generating a moving image sequence of the game role in a game scene according to the animation model of the game role, the play multiplying power, the moving path and the moving speed, wherein the moving image sequence comprises an image sequence which is played at the play multiplying power and corresponds to the animation model; the image sequence corresponding to the animation model comprises key frames and one or more transition frames positioned between any two adjacent key frames, wherein the key frames comprise a take-off frame and a drop frame; The horizontal position of the axis of the game character in the drop frame is advanced by a stride distance from the horizontal position in the take-off frame.
- 14. A computer program product comprising a computer program capable of implementing the method of any one of claims 1 to 12 when at least a part of the computer program is executed by a processor.
Description
Game character processing method, device and computer program product Technical Field The present disclosure relates to the field of computer graphics, and in particular, to a method, an apparatus, and a computer program product for processing a game character. Background When a game character is represented in a game, it is often necessary to face switching of various movement patterns and speeds, such as from stationary to walking, from walking to running, and switching of running at various speeds. However, in the existing practice, when the speed of the game character needs to be switched, a sliding phenomenon, that is, a phenomenon that the animation is inconsistent with the actual position, is easy to occur, so that the game character looks like sliding in a scene rather than naturally walking or running. This phenomenon often breaks the user's sense of immersion and appears unrealistic. In high-demand scenes, such as realistic natural environments or high-dynamic interaction scenes, the problem of sliding is particularly prominent. Disclosure of Invention One or more embodiments of the present disclosure provide a method for processing a game character, where the method includes obtaining a play magnification of an image sequence corresponding to an animation model of the game character, where the play magnification is determined according to a moving path and a moving speed of the game character in a game scene, generating a motion image sequence of the game character in the game scene according to the animation model of the game character, the play magnification, the moving path and the moving speed, where the motion image sequence includes an image sequence corresponding to the animation model that is played at the play magnification, where the image sequence corresponding to the animation model includes a key frame and one or more transition frames located between any two adjacent key frames, where the key frame includes at least a skip frame and a drop frame, and a horizontal position of an axis of the game character in the drop frame is advanced by a stride distance from a horizontal position in the skip frame. According to the method provided by one or more embodiments of the present disclosure, the game character is a quadruped, in the jump frame, the level of the front two feet of the game character is higher than the level of the rear two feet, and in the drop frame, the level of the rear two feet of the game character is higher than the level of the front two feet. According to the method provided in one or more embodiments of the present disclosure, in different plays of the image sequence corresponding to the animation model, the vertical position of the axis of the game character in the same key frame and/or the stride distance are different. According to the method provided in one or more embodiments of the present specification, the key frame further includes a start frame located before the skip frame, and an end frame located after the drop frame. According to one or more embodiments of the present disclosure, the axis of the game character is vertically positioned differently in at least one of the start frame, the take-off frame, the drop frame, and the end frame. According to the method provided by one or more embodiments of the present disclosure, before obtaining the playing magnification of the image sequence corresponding to the animation model of the game character, detecting whether a preset condition is satisfied, and when the preset condition is not satisfied, the moving path, the moving speed and the playing magnification are preset. According to the method provided by one or more embodiments of the present disclosure, before obtaining the playing magnification of the image sequence corresponding to the animation model of the game character, detecting whether a preset condition is met, when the preset condition is met, obtaining operation data and a preset strategy of the player character, and determining a real-time moving path and a real-time moving speed of the game character in the game scene in real time according to the operation data and the preset strategy, wherein obtaining the playing magnification of the image sequence corresponding to the animation model of the game character includes obtaining the playing magnification in real time according to the real-time moving path and the real-time moving speed of the game character in the game scene. According to the method provided by one or more embodiments of the present disclosure, the method further includes adjusting, in real time, the stride distance and/or the vertical position of the axis of the game character in at least one keyframe in an image sequence corresponding to the animation model according to a preset animation curve function, the movement path and the movement speed. According to the method provided by one or more embodiments of the present disclosure, before obtaining the playing magnification o