Animation implementation method and device in two-dimensional game, and role control method and device in two-dimensional game

Through the preset combination of still and jump animations, the problem of jumping lattice animations and lattice distance and direction is solved, and the animation drawing efficiency is improved and the smooth movement of virtual characters in the game is achieved.

CN120132336APending Publication Date: 2025-06-13NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311714766.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, the distance and relative direction between the lattice jump animation and adjacent lattice are associated with the distance and relative direction, resulting in a large number of animation drawings, high labor cost and low efficiency in game development.

Method used

By obtaining the stationary state animation and jump state animation preset by the virtual character, and according to the preset animation playback logic, the stationary state animation is played loop and the jump state animation is played when the conditions are met, forming a global universal jump grid animation.

Benefits of technology

It reduces the amount of animation drawing, reduces the manpower and time consumption of game development, improves development efficiency, and realizes the smooth and natural effects and accurate movement of virtual characters in jumping animations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120132336A_ABST
    Figure CN120132336A_ABST
Patent Text Reader

Abstract

The invention discloses an animation implementation method and device in a two-dimensional game, a role control method and device, electronic equipment and a computer readable storage medium. The animation implementation method in the game comprises the steps that a first animation and a second animation preset for a virtual role are obtained; acquiring position information corresponding to each grid in the plurality of grids; according to a preset animation playing logic, playing the first animation and the second animation so as to display a first jump animation that the virtual character jumps from the first grid to the second grid; and in response to completion of playing of the second animation, taking the position indicated by the position information corresponding to the second grid as the position after the virtual character completes jumping. According to the method, the jump animation of the virtual character is separated from the movement displacement of the virtual character, so that the technical problems of large animation drawing quantity, high game development labor cost and low efficiency caused by correlation of the distance and the relative direction between the jump lattice animation and the adjacent lattices in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method for implementing animations in a two-dimensional game, a method for controlling characters in a two-dimensional game, and their devices, electronic devices, and computer-readable storage media. Background Art

[0002] With the development of computer technology and the diversification of terminal functions, there are more and more types of games. The hopscotch game is usually used as an auxiliary reward game and is presented in the graphical user interface of the user terminal in the form of a two-dimensional game. Players determine the number of grids that the virtual character hops by rolling a dice or other means, and control the virtual character to hop between the grids shown in the game scene according to the determined number, and obtain the rewards corresponding to the grids that have been hopped.

[0003] Currently, in the hopscotch game, the hopping of the virtual character between the grids is realized based on the hopscotch animation, and the hopscotch animation is associated with the distance and relative direction between two adjacent grids. Therefore, to develop a hopscotch game, it is necessary to draw corresponding hopscotch animations for each possible distance and relative direction between the grids, which will undoubtedly increase the consumption of manpower and time and reduce the game development efficiency.

[0004] Therefore, the prior art has the technical problem that because the hopscotch animation is associated with the distance and relative direction between adjacent grids, the number of animations to be drawn is large, and the human cost of game development is high and the efficiency is low. Summary of the Invention

[0005] This application provides a method for implementing animations in a two-dimensional game, a method for controlling characters in a two-dimensional game, and their devices, electronic devices, and computer-readable storage media, so as to solve the technical problem in the prior art that because the hopscotch animation is associated with the distance and relative direction between adjacent grids, the number of animations to be drawn is large, and the human cost of game development is high and the efficiency is low.

[0006] In a first aspect, an embodiment of the present application provides a method for implementing animations in a two-dimensional game. The game scene of the game includes at least a plurality of grids and a virtual character. The method includes: obtaining a first animation and a second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character; obtaining the position information corresponding to each of the plurality of grids; playing the first animation and the second animation according to a preset animation playing logic to display a first jumping animation of the virtual character jumping from a first grid to a second grid; where the first grid and the second grid are any two adjacent grids among the plurality of grids, the virtual character jumps from the first grid to the second grid in a preset jumping order, and the animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met; in response to completing the playing of the second animation, using the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

[0007] In a second aspect, an embodiment of the present application provides a method for controlling a character in a two-dimensional game. A graphical user interface is provided through a terminal device. The content displayed on the graphical user interface includes at least a part of the game scene and an operation control. The game scene includes a plurality of grids and a virtual character controlled by the terminal device. The method includes: displaying a first game screen on the graphical user interface, where in the first game screen, the virtual character is located on a third grid, and the third grid is one of the plurality of grids; in response to a trigger operation on the operation control, determining the number of grids to be jumped; controlling the virtual character to move from the third grid to a fourth grid one by one in a preset jumping order, and playing a first jumping animation during the process of the virtual character moving one by one. The fourth grid is the last one of the grids to be jumped. The first jumping animation is an animation of the virtual character jumping from a first grid to a second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the plurality of grids. According to the preset jumping order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met; displaying a second game screen on the graphical user interface, where in the second game screen, the virtual character is located on the fourth grid.

[0008] In a third aspect, an embodiment of the present application provides an animation implementation device in a two-dimensional game. The game scene of the game includes at least a plurality of grids and a virtual character. The device includes: a first acquisition unit, a second acquisition unit, an animation playback unit, and a position movement unit. The first acquisition unit is configured to acquire a first animation and a second animation preset for the virtual character. The first animation is used to represent the stationary state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The second acquisition unit is configured to acquire the position information corresponding to each of the plurality of grids. The animation playback unit is configured to play the first animation and the second animation according to a preset animation playback logic to display a first jumping animation of the virtual character jumping from a first grid to a second grid. Wherein, the first grid and the second grid are any two adjacent grids among the plurality of grids, and the virtual character jumps from the first grid to the second grid according to a preset jumping sequence. The animation playback logic includes looping the first animation and playing the second animation when a preset playback condition is met. The position movement unit is configured to, in response to completion of the playback of the second animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

[0009] Fourth method, an embodiment of the present application provides a character control device in a two-dimensional game. A graphical user interface is provided through a terminal device. The content displayed on the graphical user interface at least includes a partial game scene and an operation control. The game scene includes a plurality of grids and a virtual character controlled by the terminal device. The device includes: a first display unit, a determination unit, a control unit, and a second display unit; the first display unit is configured to display a first game screen on the graphical user interface, in which the virtual character is located on a third grid, and the third grid is one of the plurality of grids; the determination unit is configured to determine the number of grids to be jumped in response to a trigger operation on the operation control; the control unit is configured to control the virtual character to move grid by grid from the third grid to a fourth grid according to a preset jump order, and play a first jump animation during the grid-by-grid movement of the virtual character. The fourth grid is the last one of the grids to be jumped. The first jump animation is an animation of the virtual character jumping from a first grid to a second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the plurality of grids. According to the preset jump order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met; the second display unit is configured to display a second game screen on the graphical user interface, in which the virtual character is located on the fourth grid.

[0010] Fifth aspect, an embodiment of the present application provides an electronic device, including: a memory and a processor; the memory is configured to store one or more computer instructions; the processor is configured to execute the one or more computer instructions to implement the above method.

[0011] Sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which one or more computer instructions are stored. When the instructions are executed by a processor, the above method is executed.

[0012] Compared with the prior art, the method for implementing animations in a 2D game provided by this application obtains a first animation (for representing the static state of a virtual character) and a second animation (for representing the jumping state of the virtual character), and when controlling the virtual character to jump from the first grid to the second grid among any two adjacent grids, plays the first animation and the second animation according to a preset animation playing logic (looping the first animation and playing the second animation when meeting the preset playing conditions), forming a first jumping animation of the virtual character jumping from the first grid to the second grid, and then assigns the position indicated by the position information of the second grid to the virtual character as the position where the virtual character is located after the jumping animation is played. By splitting the jumping animation of the virtual character from the movement displacement of the virtual character on two adjacent grids, and resetting the current position of the virtual character to the position of the latter grid (the second grid) among the two adjacent grids after each jumping animation is played, this method not only achieves a smooth and natural jumping effect, but also realizes the accurate movement of the virtual character. Since the first animation and the second animation are animations preset for the virtual character and are independent of the distance and relative direction between adjacent grids, the first jumping animation composed of the first animation and the second animation is a globally universal grid-jumping animation. When developing a game, regardless of whether there are differences in distance and relative direction between any two adjacent grids, only one set of grid-jumping animations needs to be drawn, reducing the human and time consumption in the animation drawing stage during the game development process, and solving the technical problems in the prior art that due to the association between the grid-jumping animations and the distance and relative direction between adjacent grids, the number of animations to be drawn is large, resulting in high human costs and low efficiency in game development. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 FIG. 6 is a schematic diagram of a grid-jumping game provided by an embodiment of this application;

[0014] Figure 2 FIG. 7 is another schematic diagram of a grid-jumping game provided by an embodiment of this application;

[0015] Figure 3 FIG. 8 is an application system diagram of the method for implementing animations in a 2D game provided by an embodiment of this application;

[0016] Figure 4 FIG. 9 is a flowchart of the method for implementing animations in a 2D game provided by the first embodiment of this application;

[0017] FIG. 5(a) is a first schematic diagram of the method for implementing animations in a 2D game provided by the first embodiment of this application;

[0018] FIG. 5(b) is a second schematic diagram of the method for implementing animations in a 2D game provided by the first embodiment of this application;

[0019] Figure 5(c) is a schematic diagram of an animation playing logic provided by the first embodiment of the present application;

[0020] Figure 5(d) is the third schematic diagram of the animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0021] Figure 5(e) is the fourth schematic diagram of the animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0022] Figure 6(a) is the first schematic diagram of another animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0023] Figure 6(b) is the second schematic diagram of another animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0024] Figure 6(c) is the third schematic diagram of another animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0025] Figure 6(d) is a schematic diagram of another animation playing logic provided by the first embodiment of the present application;

[0026] Figure 6(e) is the fourth schematic diagram of another animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0027] Figure 6(f) is the fifth schematic diagram of another animation implementation method in the two-dimensional game provided by the first embodiment of the present application;

[0028] Figure 7 is the flowchart of the character control method in the two-dimensional game provided by the second embodiment of the present application;

[0029] Figure 8(a) is the first schematic diagram of the character control method in the two-dimensional game provided by the second embodiment of the present application;

[0030] Figure 8(b) is the second schematic diagram of the character control method in the two-dimensional game provided by the second embodiment of the present application;

[0031] Figure 8(c) is the third schematic diagram of the character control method in the two-dimensional game provided by the second embodiment of the present application;

[0032] Figure 8(d) is the fourth schematic diagram of the character control method in the two-dimensional game provided by the second embodiment of the present application;

[0033] Figure 9 is the structural schematic diagram of the animation implementation device in the two-dimensional game provided by the third embodiment of the present application;

[0034] Figure 10 is the structural schematic diagram of the character control device in the two-dimensional game provided by the fourth embodiment of the present application;

[0035] Figure 11 It is a schematic structural diagram of an electronic device provided by the fifth embodiment of the present application. Detailed implementation manners

[0036] A lot of specific details are set forth in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.

[0037] With the development of computer technology and the diversification of terminal functions, there are more and more types of games. The hopscotch game is usually used as an auxiliary reward game and presented in the graphical user interface of the user terminal in the form of a two-dimensional game. Players determine the number of grids for the virtual character to hop by rolling dice or other means, and control the virtual character to hop among the grids shown in the game scene according to the determined number, and obtain the rewards corresponding to the grids that have been hopped.

[0038] Currently, the common hopscotch games include top-down and side-view forms. Figure 1 It is a schematic diagram of a hopscotch game provided by an embodiment of the present application.

[0039] As Figure 1 (a) shows, this hopscotch game is in top-down form. There are 12 grids in the game, and each grid corresponds to a kind of reward. Players click the start button 101 to make the cursor move among the 12 grids in a preset order (such as, counterclockwise direction) until the cursor stops at a certain grid, and the player can obtain the reward corresponding to this grid. In this game, no dedicated virtual character is set, and the movement of the cursor is equivalent to the movement of the virtual character among the grids, and the number of grids that the cursor moves is randomly generated.

[0040] As Figure 1 (b) shows, this hopscotch game is in side-view form. There are multiple grids in the game. Currently, 6 grids are shown in the graphical user interface. Players roll dice, that is, click the dice-rolling button 102, to determine the number of grids for the virtual character to hop (such as, 3 grids), control the virtual character to hop forward according to the determined number, and obtain rewards (such as, hop forward 3 grids from the current grid 103 to grid 106, and the player can obtain the rewards corresponding to grid 104, grid 105, and grid 106. Of course, in different games, the reward methods can be different. In some games, the reward obtained by the player is the reward corresponding to grid 106).

[0041] Currently, in the hopscotch game, the virtual character's jump between grids is realized based on the hopscotch animation. The hopscotch animation is associated with the distance and relative direction between two adjacent grids, that is, associated with the jump displacement of the virtual character between two adjacent grids. If the hopscotch animation does not match the jump displacement of the virtual character, abnormal phenomena such as slipping steps will occur.

[0042] Take Figure 1 (b) as an example for illustration. Assume that the positions of grid 103 and grid 104 are the same on the Y (vertical) axis, and the distance between the center of grid 103 and the center of grid 104 is 2 centimeters. Then, the jump displacement of the virtual character from grid 103 to grid 104 is (2,0), that is, it is necessary to draw a hopscotch animation corresponding to the jump displacement (2,0) (defined as hopscotch animation 1 here). When controlling the virtual character to jump from grid 103 to grid 104 and playing the above hopscotch animation 1, the animation effect of the virtual character jumping from the center position of grid 103 to the center position of grid 104 can be presented on the graphical user interface. If the drawn hopscotch animation (defined as hopscotch animation 2 here) is the hopscotch animation corresponding to the jump displacement (1,0), then when the virtual character jumps from grid 103 to grid 104 and plays the above hopscotch animation 2, the animation effect that the virtual character jumps from the center position of grid 103 to the left edge of grid 104 but slips to the center position of grid 104 will be presented on the graphical user interface, causing an abnormal visual experience for the player.

[0043] Based on this, when developing a hopscotch game, it is necessary to draw corresponding hopscotch animations for each possible distance and relative direction between grids. For Figure 1 (b) the shown hopscotch game, since the grids have the same size and shape and the positions on the Y axis are the same, the jump displacement of the virtual character each time it jumps between grids will be the same. Then, only one hopscotch animation matching this jump displacement needs to be drawn. However, for a hopscotch game with inconsistent grid sizes, since the grid sizes and shapes are different, the positions between the centers of adjacent grids will be different, and the jump displacements of the virtual character each time it jumps between grids will be different. Then, it is necessary to draw matching hopscotch animations for each jump displacement, which will undoubtedly increase the human and time consumption.

[0044] Figure 2 is a schematic diagram of another hopscotch game provided by an embodiment of the present application.

[0045] Such as Figure 2As shown in the figure, the game includes 6 grids, each with a different size and shape, and the positions of the centers of the grids are also different. Therefore, it is necessary to draw hopscotch animations A corresponding to the distance and relative direction between grid 201 and grid 202, hopscotch animation B corresponding to the distance and relative direction between grid 202 and grid 203, hopscotch animation C corresponding to the distance and relative direction between grid 203 and grid 204, hopscotch animation D corresponding to the distance and relative direction between grid 204 and grid 205, and hopscotch animation E corresponding to the distance and relative direction between grid 205 and grid 206, a total of 5 hopscotch animations.

[0046] In an actual hopscotch game, the number of grids included in the game is relatively large. Therefore, it is necessary to draw more hopscotch animations, which is time-consuming and laborious. Therefore, the prior art has the technical problem that because the hopscotch animations are associated with the distance and relative direction between adjacent grids, the number of animations to be drawn is large, and the labor cost of game development is high and the efficiency is low.

[0047] In addition, after the hopscotch animation is drawn, a movement action can be created through the set movement interface. Assuming that the position of the starting grid is (687, 64) and the position of the target grid is (788, 80), the following code can be created through the set movement interface to enable the virtual character to jump from the starting grid to the target grid:

[0048] / / CCActionInterval*moveBy=CCMoveBy::create(2,ccp(101,16)),

[0049] Among them, 2 means to complete the jump from the starting grid to the target grid within 2 seconds, and ccp(101, 16) means the displacement required by the virtual character to jump from the starting grid to the target grid on the x-axis and y-axis.

[0050] Therefore, before each jump of the virtual character, it is also necessary to adapt the jump displacement of the virtual character to the distance and relative direction between the grids. For a hopscotch game including grids of different sizes, this will consume a lot of time and make the program calculation more difficult.

[0051] In summary, there is an urgent need for an animation implementation method that can reduce the number of hopscotch animations drawn and can be adapted to a hopscotch game with grids of different sizes, so as to solve the technical problems of high labor cost and low efficiency in game development existing in the prior art.

[0052] In view of this, the present application provides a method for implementing animations in a two-dimensional game. By separating the jumping animation of a virtual character from the movement displacement of the virtual character between two adjacent grids, and resetting the current position of the virtual character to the position of the second grid (the latter grid) among the two adjacent grids after each completion of the jumping animation playback, not only a smooth and natural jumping effect is achieved, but also the accurate movement of the virtual character is realized. Since the first animation and the second animation are preset animations for the virtual character and are independent of the distance and relative direction between adjacent grids, the first jumping animation composed of the first animation and the second animation is a globally applicable grid-hopping animation. When developing a game, regardless of whether there are differences in distance and relative direction between any two adjacent grids, only a set of grid-hopping animations needs to be drawn, reducing the human and time consumption in the animation drawing stage during the game development process, and solving the technical problems in the prior art that due to the association between the grid-hopping animation and the distance and relative direction between adjacent grids, the number of animations to be drawn is large, and the human cost of game development is high and the efficiency is low.

[0053] The following further elaborates in detail on the method for implementing animations in a two-dimensional game, the method for controlling characters in a two-dimensional game, their devices, electronic devices, and computer-readable storage media described in the present application with reference to specific embodiments and accompanying drawings.

[0054] Figure 3 It is an application system diagram of a method for implementing animations in a two-dimensional game provided by an embodiment of the present application. As Figure 3 shown, the method for implementing animations in the game provided by an embodiment of the present application is applied to a server 302, and the system further includes a client 301. The client 301 can be any device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a personal digital assistant (Personal Digital Assistant, PDA), etc. The server 302 can be a service module inside the client 301, a service device connected to the client 301, or a game server connected to multiple clients 301. After the server 302 detects a jump trigger operation occurring on the client 301 (such as a user performing a click operation on a start control, a dice-throwing operation, etc. on the client 301), it can apply the method provided by an embodiment of the present application to present a smooth and natural grid-hopping animation effect on the graphical user interface of the client 301.

[0055] The first embodiment of the present application provides a method for implementing animations in a two-dimensional game. The game scene of the game includes at least multiple grids and a virtual character. This method is applicable to two-dimensional grid-hopping games, especially two-dimensional grid-hopping games with different grid sizes and shapes and different grid spacings.

[0056] Figure 4 It is a flowchart of the animation implementation method in the 2D game provided by this embodiment. The following combines Figure 4 to describe in detail the animation implementation method in the 2D game provided by this embodiment. The embodiments involved in the following description are used to explain the technical solutions of this application and are not used as limitations for actual use.

[0057] As Figure 4 shown, the animation implementation method in the 2D game provided by this embodiment includes the following steps S410 to S440:

[0058] Step S410, obtain a first animation and a second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character.

[0059] Step S420, obtain the position information corresponding to each of the multiple grids.

[0060] Step S430, according to the preset animation playing logic, play the first animation and the second animation to display a first jumping animation of the virtual character jumping from the first grid to the second grid; wherein, the first grid and the second grid are any two adjacent grids among the multiple grids, the virtual character jumps from the first grid to the second grid in the preset jumping order, and the animation playing logic includes looping to play the first animation and playing the second animation when the preset playing condition is met.

[0061] Step S440, in response to the completion of the playing of the second animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

[0062] In the game provided by this embodiment, the multiple grids have a preset arrangement, the virtual character is a controlled virtual character controlled by the terminal device, and in response to receiving a grid-jumping instruction, control the virtual character to jump grid by grid among the multiple grids in the preset jumping order until the number of jumps indicated by the grid-jumping instruction is reached. In a specific implementation, corresponding rewards can be given to the user according to the reward information carried by all the grids jumped by the virtual character or the target grid where the jump ends.

[0063] In an alternative implementation, this game is a sub-game in the main game. When the player controls the virtual character to trigger a reward in the main game, the game interface pops up on the main game interface, and in response to a randomly specified number of jumping grids or the number of jumping grids determined in response to the player's trigger operation (such as rolling a dice), control the virtual character to jump grid by grid among the multiple grids to obtain a reward, and this reward can be used in the main game.

[0064] In another alternative implementation, the game is a link game for other applications (e.g., a shopping website). When the user purchases an item or the purchase quantity of an item reaches a preset quantity, the game interface pops up on the application interface of the application, and in response to a randomly specified number of jumping grids or the number of jumping grids determined in response to a trigger operation by the user (e.g., rolling a dice), the virtual character is controlled to jump grid by grid among multiple grids to obtain a reward, and the reward can be used in the application.

[0065] Of course, the method provided in this embodiment can also be applied to an independent hopscotch game or a hopscotch game in other interactive scenarios. The following content only describes the animation implementation method in the hopscotch game and does not limit the interactive scenario to which the game belongs.

[0066] Figure 5 (including Figures 5(a) to 5(e) ) is a schematic diagram of the animation implementation method in the two-dimensional game provided in this embodiment. The following describes in detail the steps involved in the animation implementation method in the two-dimensional game provided in this embodiment with reference to Figure 5:

[0067] Regarding step S410:

[0068] In this step, the first animation and the second animation preset for the virtual character are obtained.

[0069] The first animation is used to represent the static state of the virtual character, which can be understood as the standing animation of the virtual character standing on the grid. In the first animation, the skeleton posture of the virtual character does not change, but changes in the expression of the virtual character are not excluded, such as blinking, smiling, etc. The animation duration of the first animation can be relatively short, such as 0.2 seconds, and the standing stay time of the virtual character on the grid can be extended by looping the first animation subsequently.

[0070] The second animation is used to represent the jumping state of the virtual character, which can be understood as the jumping animation of the virtual character leaving the grid and jumping forward. In the second animation, the skeleton posture of the virtual character changes, mainly manifested as gradually changing from the standing posture to the jumping posture. The animation duration of the second animation is relatively long, such as 2 seconds, and the second animation is usually played in a single-play form in subsequent animation playback. In a specific implementation, the second animation consists of multiple key frames, and the attribute information of the key frames includes the change values of the skeleton posture of the virtual character, such as bone displacement, scaling, shearing, rotation amount, etc., and the intermediate process of posture change is obtained by interpolation between two key frames.

[0071] In an alternative implementation provided in this embodiment, the first animation and the second animation are two-dimensional bone animations.

[0072] Before obtaining the first animation and the second animation preset for the virtual character, the game developer needs to pre - produce the standing animation (i.e., the first animation) and the jumping animation (i.e., the second animation) for the virtual character based on a skeletal animation software (such as Spine software).

[0073] Since the skeletal animation software is an application software independent of the game engine, obtaining the first animation and the second animation is actually to retrieve the first animation and the second animation from the skeletal animation software based on the function interface of the skeletal animation software.

[0074] In an optional implementation manner, the first animation and the second animation are skeletal animations produced based on Spine software, and the acquisition of the first animation and the second animation can be achieved through the following expression:

[0075] Spine.AnimationState spineAnimationState = skeletonAnimation.state

[0076] (Expression 1)

[0077] Among them, Spine.AnimationState represents an instance of the Spine skeletal animation state class, which is used to control operations such as playing and pausing animations, switching animations, etc. skeletonAnimation.state represents an instance of the Spine skeletal animation component, which is an object used to load and play Spine skeletal animations, and the state property represents the current state of the Spine skeletal animation. By assigning "skeletonAnimation.state" to "spineAnimationState", the behavior of the Spine skeletal animation can be controlled using the instantiated object.

[0078] Figure 5(a) is the first schematic diagram of the animation implementation method in the 2D game provided in this embodiment, that is, the schematic diagram of obtaining the first animation and the second animation.

[0079] As shown in Figure 5(a), the skeletal animation software (such as Spine software) 511 stores the pre - produced first animation 521 and second animation 522 for the virtual character 50. Among them, the first animation 521 is the standing animation of the virtual character 50, and the second animation 522 is the jumping animation of the virtual character 50. The server (such as the game engine server) 512 retrieves the first animation 521 and the second animation 522 from the skeletal animation software 511 through the function interface (Application Programming Interface, API) of the skeletal animation software.

[0080] Regarding step S420:

[0081] In this step, the position information corresponding to each of the multiple grids will be obtained.

[0082] Since the multiple grids can be a set of grids with different sizes, shapes, and non-uniform distances, in order for the virtual character to accurately move to each grid or the preset position of each grid, it is necessary to obtain the position information of each grid among the multiple grids before playing the animation. In an optional implementation manner, the position information refers to the coordinates of the grid in the game scene.

[0083] During the construction of the game scene, the placement position of each grid in the game scene is pre-set. Therefore, obtaining the position information of the grid does not require complex calculations, and the position information corresponding to each grid can be obtained by traversing each grid in the game scene.

[0084] In an optional implementation manner provided in this embodiment, the virtual character needs to jump to the center point of each grid. Therefore, the position information corresponding to the grid includes the position information corresponding to the center point of the grid.

[0085] FIG. 5(b) is a second schematic diagram of the animation implementation method in the two-dimensional game provided in this embodiment, that is, a schematic diagram of obtaining the position information corresponding to each of the multiple grids.

[0086] As shown in FIG. 5(b), the game scene includes 9 grids. The server 512 can obtain the position information corresponding to each grid by traversing grids 1, 2, 3, 4, 5, 6, 7, 8, and 9. Specifically, the coordinates corresponding to the center point of each grid are obtained, as shown in Table 1:

[0087] Table 1 Position Information Table of Grids

[0088]

[0089]

[0090] As can be seen from Table 1, the displacement from grid 1 to grid 2 is (141, 1), the displacement from grid 2 to grid 3 is (141, -1), the displacement from grid 3 to grid 4 is (141, 1), the displacement from grid 4 to grid 5 is (119, -1), the displacement from grid 5 to grid 6 is (141, 0), the displacement from grid 6 to grid 7 is (141, 1), the displacement from grid 7 to grid 8 is (119, 0), and the displacement from grid 8 to grid 9 is (119, 0). It can be seen that the distances between multiple grids in the game scene are not completely equidistant. In the prior art, at least one hopscotch animation needs to be drawn for each of the displacements (141, 1), (141, -1), (119, -1), (141, 0), and (119, 0), that is, a total of 5 hopscotch animations are drawn.

[0091] Regarding step S430:

[0092] In this step, according to the preset animation playing logic, the first animation and the second animation will be played to form the first jump animation of the virtual character jumping from the first grid to the second grid.

[0093] The first grid and the second grid are any two adjacent grids among the multiple grids. According to the preset jump order, the second grid is located after the first grid. The first grid can be understood as the starting grid for jumping among any two adjacent grids. Among the multiple grids, any grid except the grid ranked last according to the preset jump order may become the first grid. Of course, in a hopscotch game with cyclic jumping, the grid ranked last according to the preset jump order may also become the first grid. The second grid can be understood as the target grid for jumping among any two adjacent grids. Among the multiple grids, any grid except the grid ranked first according to the preset jump order may become the second grid. Of course, in a hopscotch game with cyclic jumping, the grid ranked first according to the preset jump order may also become the second grid.

[0094] As shown in the multiple grids in Figure 5(b), assuming the preset jump order is to jump in the direction from grid 1 to grid 9, then when the virtual character 50 jumps from grid 1 to grid 2, grid 1 is the first grid and grid 2 is the second grid. When the virtual character 50 further jumps from grid 2 to grid 3, grid 2 is the first grid and grid 3 is the second grid.

[0095] The animation playing logic can be understood as the animation playing order and playing conditions set by the game developer on the animation time axis according to the preliminary design of the jump animation.

[0096] In an alternative implementation provided in this embodiment, the preset animation playing logic for the first animation and the second animation includes looping the first animation and playing the second animation when a preset playing condition is met.

[0097] In an alternative implementation, the preset playing condition includes that the number of loop plays of the first animation reaches a preset number. That is, the animation playing logic includes: looping the first animation and playing the second animation in response to the number of loop plays of the first animation reaching the preset number.

[0098] In this implementation, the number of loop plays of the first animation is used as the start condition for playing the second animation. Specifically, the preset standing and staying duration of the virtual character on the grid determines the number of loop plays of the first animation. For example, the animation duration of the first animation is 0.2 seconds, and the preset standing and staying duration of the virtual character on the grid set by the game developer is 0.8 seconds. That is, after the virtual character stands and stays on the first grid for 0.8 seconds, it starts to jump to the second grid. Then, the preset number of loop plays of the first animation is 4 times. After the number of loop plays of the first animation reaches 4 times, the second animation starts to be played.

[0099] In an alternative implementation, the preset playing condition includes that the loop playing duration of the first animation reaches a preset duration. That is, the animation playing logic includes: looping the first animation and playing the second animation in response to the loop playing duration of the first animation reaching the preset duration.

[0100] In this implementation, the loop playing duration of the first animation is used as the start condition for playing the second animation. Specifically, the preset standing and staying duration of the virtual character on the grid determines the loop playing duration of the first animation. For example, the animation duration of the first animation is 0.2 seconds, and the preset standing and staying duration of the virtual character on the grid set by the game developer is 1 second. That is, after the virtual character stands and stays on the first grid for 1 second, it starts to jump to the second grid. Then, the preset loop playing duration of the first animation is 1 second. After the loop playing duration of the first animation reaches 1 second, the second animation starts to be played.

[0101] According to the animation playing logic, playing the first animation and the second animation can form a jumping animation of the virtual character jumping from the first grid to the second grid. In the method provided in this embodiment, the jumping animation of the virtual character jumping from the first grid to the second grid is defined as the first jumping animation.

[0102] As described above, the position information corresponding to the grid includes the position information corresponding to the center point of the grid. Therefore, in a specific implementation, the first jump animation is a jump animation in which the virtual character jumps from the center point of the first grid to the center point of the second grid. That is, according to the animation playing logic, the first animation and the second animation are played to form the first jump animation in which the virtual character jumps from the center point of the first grid to the center point of the second grid.

[0103] FIG. 5(c) is a schematic diagram of an animation playing logic provided in this embodiment.

[0104] As shown in FIG. 5(c), the animation playing logic includes: first, the first animation 521 is looped on the animation timeline, and when a preset playing condition is met (that is, the number of loop plays of the first animation reaches a preset number, or the loop playing duration of the first animation reaches a preset duration), the second animation 522 is played once.

[0105] In a specific implementation, the first animation is a skeletal animation made based on Spine software. The loop playing of the first animation can be achieved through the following expression:

[0106] skeleton_animation:SetAnimation(0,idle,ture)(Expression 2)

[0107] Among them, skeleton_animation represents referring to the skeletal animation player, SetAnimation represents the animation playing method, 0 represents the animation playing track in the skeletal animation player. The first animation is a single animation, not a mixed animation, and the playing track defaults to 0; idle represents the animation name of the first animation, and ture represents that the playing method of the first animation is loop playing.

[0108] In another specific implementation, the second animation is a skeletal animation made based on Spine software. The single play of the second animation can be achieved through the following expression:

[0109] skeleton_animation:SetAnimation(0,jump,false)(Expression 3)

[0110] Among them, skeleton_animation represents referring to the skeletal animation player, SetAnimation represents the animation playing method, 0 represents the animation playing track in the skeletal animation player. The second animation is a single animation, not a mixed animation, and the playing track defaults to 0; jump represents the animation name of the second animation, and false represents that the playing method of the second animation is single play.

[0111] FIG. 5(d) is a third schematic diagram of the animation implementation method in the 2D game provided in this embodiment, that is, according to the preset animation playback logic, the first animation and the second animation are played to form a schematic diagram of the first jump animation of the virtual character jumping from the first grid to the second grid.

[0112] As shown in FIG. 5(d), when the virtual character 50 jumps from grid 1 to grid 2, grid 1 is the first grid and grid 2 is the second grid. According to the animation playback logic shown in FIG. 5(c) (assuming that the preset playback condition is that the first animation loops for 0.8 seconds), the first animation 521 and the second animation 522 are played, and an animation can be formed in the game scene where the virtual character 50 stands and stays on grid 1 for 0.8 seconds and then jumps to grid 2.

[0113] Regarding step S440:

[0114] In this step, in response to the completion of the playback of the second animation, the position indicated by the position information corresponding to the second grid is used as the position of the virtual character after jumping.

[0115] By playing the first animation and the second animation, the jump of the virtual character between the grids is shown to the user. From the visual sense, the user sees that the virtual character has left the starting grid of the jump (i.e., the first grid). However, in fact, this visual sense is formed by the first animation and the second animation, and the position of the virtual character in the game scene has not actually changed and still stays on the first grid. If the position of the virtual character is not set, there will be a phenomenon that the virtual character flashes back to the first grid after the animation playback ends.

[0116] Based on this, in an optional implementation manner provided in this embodiment, the position of the virtual character after jumping can be set to the position corresponding to the jump termination grid (i.e., the second grid), so as to realize the position movement of the virtual character in the game scene and make the position of the virtual character actually change. Specifically, when the second animation is played to completion, the position information corresponding to the second grid is used as the character position information of the virtual character after jumping, that is, the position of the second grid is used as the position of the virtual character after jumping. In this way, the virtual character can be moved to the second grid at the same time when the animation is played to completion, and the purpose of the virtual character jumping from the first grid to the second grid is realized.

[0117] In a specific implementation manner, the position information corresponding to the grid includes the position information corresponding to the center point of the grid. Therefore, in response to the completion of the playback of the second animation, the center position of the second grid is used as the position of the virtual character after jumping, so as to realize the accurate jump of the virtual character from the center point of the first grid to the center point of the second grid.

[0118] Figure 5(e) is the fourth schematic diagram of the animation implementation method in the 2D game provided in this embodiment, that is, the schematic diagram of realizing the position movement of the virtual character in the game scene.

[0119] As shown in Figure 5(e), in response to the completion of the playback of the second animation 522, the position indicated by the position information (367, 158) corresponding to grid 2 (i.e., the center point of grid 2) is used as the position after the virtual character 50 jumps, and the virtual character 50 is moved to the center point of grid 2 in the game scene.

[0120] Through the above steps, based on a set of animations (the first animation and the second animation), the animation effect of showing the virtual character accurately jumping from the first grid to the second grid to the user is realized, greatly reducing the number of animations produced and saving the labor time consumption in the animation drawing stage.

[0121] On the basis of the above steps, this embodiment also provides an alternative implementation manner of the animation implementation method in the 2D game to form an animation effect in which the virtual character jumps from the first grid to the second grid and steps on the second grid to cause it to sink. The implementation of this animation effect will be described in detail below.

[0122] In an alternative implementation manner, after the step of obtaining the first animation and the second animation preset for the virtual character, the method provided in this embodiment further includes: obtaining a third animation preset for the second grid, and the third animation is used to represent the sinking state of the second grid.

[0123] Since the grids in the game scene usually have different shapes and sizes, and the grid surfaces often have different patterns, texts, numbers, colors, etc. to show different attributes of the grids to the user. For example, the position and jumping direction of the grid are shown to the user through digital numbers, and the rewards corresponding to the grid are shown to the user through texts, patterns, etc.

[0124] In a specific implementation manner, the grid has a preset text, and the preset text includes at least one of the following texts: text text, digital text, graphic text, and the third animation is an editor animation.

[0125] Since the bone animation software (such as Spine software) does not have a text editing function and cannot implement the preset text on the grid, therefore, different from the first animation and the second animation, the third animation cannot be drawn based on the bone animation software. In a specific implementation manner, the third animation is an editor animation, and the editor can be understood as a component in the game engine. Before obtaining the third animation, game developers will pre-draw the sinking animation (i.e., the third animation) for the second grid based on the editor. Therefore, obtaining the third animation is actually to call the third animation from the editor.

[0126] Based on this, in an alternative implementation provided in this embodiment, the animation playback logic is an animation timeline logic designed for the first animation, the second animation, and the third animation, including playing the third animation after the second animation is played. That is, the first animation is looped on the animation timeline, and when a preset playback condition is met, the second animation is played, and after the second animation is played, the third animation is played.

[0127] In a specific implementation, the third animation is an editor animation made using the editor of the Cocos Creator game engine. The single playback of the third animation can be achieved through the following expression:

[0128] widget.runAction(timeline)(Expression 4)

[0129] Wherein, widge represents an instance of the CCS animation object, runAction() represents a method for executing an action, and timeline represents the animation timeline object of the CCS animation. By calling this method, the widget object can play the CCS animation according to the instructions of the animation timeline. When the animation timeline ends, the third animation will automatically stop playing.

[0130] Since the third animation is the animation of the second grid sinking, therefore, according to the animation playback logic, playing the first animation, the second animation, and the third animation can form a jumping animation in which the virtual character jumps from the first grid to the second grid and causes the second grid to sink. In the method provided in this embodiment, defining the jumping animation of playing the virtual character jumping from the first grid to the second grid and causing the second grid to sink as the second jumping animation.

[0131] The following is an example of the animation implementation method in this implementation. Figure 6 (including Figures 6(a) to 6(f) ) is a schematic diagram of another animation implementation method in the two-dimensional game provided in this embodiment.

[0132] As shown in Figure 6, the animation implementation method in the two-dimensional game provided in this embodiment may further include the following steps:

[0133] Step S610, obtaining the first animation and the second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character.

[0134] Step S620, obtaining the third animation preset for the second grid, where the third animation is used to represent the sinking state of the second grid.

[0135] Step S630: Obtain the position information corresponding to each of the multiple grids, where the position information corresponding to a grid includes the position information corresponding to the center point of the grid.

[0136] Step S640: According to the animation playing logic, play the first animation, the second animation, and the third animation to form a second jump animation in which the virtual character jumps from the first grid to the second grid and causes the second grid to sink. The animation playing logic includes looping the first animation, playing the second animation when a preset playing condition is met, and playing the third animation after the second animation is played.

[0137] Step S650: In response to the completion of playing the third animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after jumping.

[0138] FIG. 6(a) is a first schematic diagram of another animation implementation method in the two-dimensional game provided in this embodiment, that is, a schematic diagram of obtaining the first animation and the second animation.

[0139] As shown in FIG. 6(a), a pre-made first animation 621 and a second animation 622 for the virtual character 60 are stored in a skeletal animation software (such as Spine software) 611. Among them, the first animation 621 is a standing animation of the virtual character 60, and the second animation 622 is a jumping animation of the virtual character 60. The server (such as a game engine server) 612 retrieves the first animation 621 and the second animation 622 from the skeletal animation software 611 through the function interface of the skeletal animation software.

[0140] FIG. 6(b) is a second schematic diagram of another animation implementation method in the two-dimensional game provided in this embodiment, that is, a schematic diagram of obtaining the third animation.

[0141] As shown in FIG. 6(b), a pre-made third animation 623 for the second grid is stored in an editor (such as a Cocos Creator game engine editor) 613. The third animation 623 is a sinking animation of the second grid. The server (such as a game engine server) 612 calls the third animation 623 from the editor 613.

[0142] FIG. 6(c) is a third schematic diagram of another animation implementation method in the two-dimensional game provided in this embodiment, that is, a schematic diagram of obtaining the position information corresponding to each of the multiple grids.

[0143] As shown in FIG. 6(c), the game scene includes nine grids. By traversing grids 1, 2, 3, 4, 5, 6, 7, 8, and 9, the server 612 can obtain the position information corresponding to the center point of each grid, specifically: grid 1(226,157), grid 2(367,158), grid 3(508,157), grid 4(649,158), grid 5(768,157), grid 6(909,157), grid 7(1050,158), grid 8(1169,158), grid 9(1288,158).

[0144] FIG. 6(d) is a schematic diagram of another animation playing logic provided by this embodiment.

[0145] As shown in FIG. 6(d), the animation playing logic includes: first, loop-play the first animation 621 on the animation timeline. When the preset playing condition is met (that is, the number of loop-playing times of the first animation reaches the preset number of times, or the loop-playing duration of the first animation reaches the preset duration), play the second animation 622 once. After the second animation 622 finishes playing, play the third animation 623 once.

[0146] FIG. 6(e) is a fourth schematic diagram of another animation implementation method in the two-dimensional game provided by this embodiment, that is, according to the animation playing logic, play the first animation, the second animation, and the third animation to form a schematic diagram of the second jump animation in which the virtual character jumps from the first grid to the second grid and causes the second grid to sink.

[0147] As shown in FIG. 6(e), when the virtual character 60 jumps from grid 1 to grid 2, grid 1 is the first grid and grid 2 is the second grid. According to the animation playing logic shown in FIG. 6(d) (assuming the preset playing condition is that the first animation loops for 0.8 seconds), play the first animation 621, the second animation 622, and the third animation 623, and an animation can be formed in the game scene where the virtual character 60 stands and stays at the center point of grid 1 for 0.8 seconds, then jumps to grid 2, and then jumps to the center point of grid 2 and causes grid 2 to sink.

[0148] FIG. 6(f) is a fifth schematic diagram of another animation implementation method in the two-dimensional game provided by this embodiment, that is, a schematic diagram of realizing the position movement of the virtual character in the game scene.

[0149] As shown in FIG. 6(f), in response to the completion of the playback of the third animation 623, the position indicated by the position information (367,158) corresponding to grid 2 (that is, the center point of grid 2) is used as the post-jump position of the virtual character 60, and the virtual character 60 moves to the center point of grid 2 in the game scene.

[0150] In the above first embodiment, the method for implementing animations in the two-dimensional game provided by the present application is described in detail. By splitting the jumping animation of the virtual character from the movement displacement of the virtual character on two adjacent grids, and resetting the current position of the virtual character to the position of the latter grid (the second grid) among the two adjacent grids after each completion of the jumping animation playback, not only a smooth and natural jumping effect is achieved, but also the accurate movement of the virtual character is realized. Since the first animation and the second animation are animations preset for the virtual character and are independent of the distance and relative direction between adjacent grids, the first jumping animation composed of the first animation and the second animation is a globally applicable grid-hopping animation. When developing the game, regardless of whether there are differences in distance and relative direction between any two adjacent grids, only a set of grid-hopping animations needs to be drawn, reducing the human and time consumption in the animation drawing stage during the game development process, and solving the technical problems in the prior art that due to the association between the grid-hopping animation and the distance and relative direction between adjacent grids, the number of animations to be drawn is large, and the human cost of game development is high and the efficiency is low.

[0151] In addition, the first embodiment also provides a method for implementing an animation in which a virtual character steps on the second grid and causes the second grid to sink, enhancing the visual effect of the game. Based on the method for implementing animations in the two-dimensional game provided in the first embodiment, other visual effects can also be added, such as the visual effect of the second grid rebounding after sinking, the visual effect of the second grid breaking after being stepped on, etc., which will not be described in detail here.

[0152] It should be noted that the examples in the first embodiment are only for explaining the method described in the present application and do not serve as a limitation for actual use. The method for implementing animations in the two-dimensional game provided by the present application includes but is not limited to the method described in the first embodiment.

[0153] The second embodiment of the present application provides a method for controlling a character in a two-dimensional game. By providing a graphical user interface through a terminal device, the content displayed on the graphical user interface at least includes part of the game scene and an operation control. The game scene includes multiple grids and a virtual character controlled by the terminal device. The method provided in this embodiment adopts the method for implementing animations in the game provided in the first embodiment of the present application. When controlling the virtual character to move between adjacent grids, a jumping animation is played to achieve the grid-hopping effect of the virtual character.

[0154] Figure 7 is a flowchart of the method for controlling a character in the two-dimensional game provided in this embodiment. The following will be combined with Figure 7 to describe in detail the method for controlling a character in the two-dimensional game provided in this embodiment. The embodiments involved in the following description are used to explain the technical solutions of the present application and do not serve as a limitation for actual use.

[0155] AsFigure 7 As shown, the method for controlling a character in a two-dimensional game provided in this embodiment includes the following steps S710 to S740:

[0156] Step S710, display a first game screen in the graphical user interface, where the virtual character is located on a third grid in the first game screen, and the third grid is one of the multiple grids.

[0157] Step S720, in response to a trigger operation on the operation control, determine the number of grids to be jumped.

[0158] Step S730, control the virtual character to move from the third grid to the fourth grid one by one according to a preset jump order, and play a first jump animation during the process of the virtual character moving one by one. The fourth grid is the last one of the grids to be jumped. The first jump animation is an animation of the virtual character jumping from a first grid to a second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the multiple grids. According to the preset jump order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met.

[0159] Step S740, display a second game screen on the graphical user interface, where the virtual character is located on the fourth grid in the second game screen.

[0160] The method for controlling a character in a two-dimensional game provided in this embodiment is applicable to two-dimensional hopscotch games, especially two-dimensional hopscotch games with different grid sizes and shapes and different distances between grids.

[0161] In the game provided in this embodiment, the multiple grids have a preset arrangement. The virtual character is a controlled virtual character controlled by a terminal device. In response to receiving a hopscotch instruction, control the virtual character to jump one by one among the multiple grids according to a preset jump order until the number of jumps indicated by the hopscotch instruction is reached. In a specific implementation, corresponding rewards can be given to the user according to the reward information carried by all the grids jumped by the virtual character or the target grid where the jump ends.

[0162] In an alternative implementation, the game is a sub-game within the main game. When the player controls the virtual character to trigger a reward in the main game, the game interface pops up on the main game interface. And in response to a randomly specified number of jumping grids, or the number of jumping grids determined in response to the player's triggering operation (e.g., rolling a die), the virtual character is controlled to jump grid by grid among multiple grids to obtain a reward, which can be used in the main game.

[0163] In another alternative implementation, the game is a link game of another application (e.g., a certain shopping website). When the user purchases an item, or the purchase quantity of an item reaches a preset quantity, the game interface pops up on the application interface of the application. And in response to a randomly specified number of jumping grids, or the number of jumping grids determined in response to the user's triggering operation (e.g., rolling a die), the virtual character is controlled to jump grid by grid among multiple grids to obtain a reward, which can be used in the application.

[0164] Of course, the method provided in this embodiment can also be applied to an independent hopscotch game or a hopscotch game in other interaction scenarios. The following content only describes the character control method in the hopscotch game and does not limit the interaction scenario to which the game belongs.

[0165] Figure 8 (including Figures 8(a) to 8(d) ) is a schematic diagram of the character control method in the two-dimensional game provided in this embodiment. The steps involved in the character control method in the two-dimensional game provided in this embodiment will be described in detail below with reference to Figure 8:

[0166] Regarding step S710:

[0167] In this step, a first game screen will be displayed in the graphical user interface, and in the first game screen, the virtual character is located on the third grid.

[0168] The first game screen can be understood as the game screen before the jump is started, or can be understood as the game screen after the virtual character has completed the previous round of hopscotch actions and is waiting to start the current round of hopscotch actions. In this game screen, the virtual character can stand on the starting grid of the jump, or can stand on the target grid after the previous round of hopscotch actions. Of course, it can also stand on a randomly specified grid, which is defined as the third grid in this embodiment.

[0169] In an alternative implementation, the display of the first game screen on the graphical user interface is a game screen independently displayed in response to the user entering the hopscotch game based on the game account.

[0170] In another alternative implementation, the first game screen displayed on the graphical user interface is a game screen that is displayed on top of the main interface in response to the user controlling the virtual character to trigger a game reward in the main interface game. This game screen can cover the main interface in full screen form or cover a part of the main interface in half screen form.

[0171] FIG. 8(a) is a first schematic diagram of the character control method in the two-dimensional game provided by this embodiment.

[0172] As shown in FIG. 8(a), in response to a game trigger operation (e.g., triggering a game reward in the main interface game), a first game screen 801 and an operation control 81 are displayed on the graphical user interface. The display content of the first game screen 801 includes a plurality of grids placed in the game scene (including: grid 831, grid 832, grid 833, grid 834, grid 835, grid 836, grid 837, grid 838, grid 839), and a virtual character 82 currently standing on grid 831.

[0173] Regarding step S720:

[0174] In this step, the number of grids to be jumped will be determined in response to the trigger operation on the operation control.

[0175] The operation control can be understood as a trigger control for starting the grid-jumping action of the virtual character. By triggering this operation control, the player can send a grid-jumping instruction to the server, and the server controls the virtual character to move grid by grid according to the number of grids to be jumped indicated by the grid-jumping instruction.

[0176] In an alternative implementation, the number of grids to be jumped can be a value determined before entering the game. By triggering this operation control, the player enables the server to obtain this value. For example, in the main interface game, the number of enemy characters defeated by the player controlling the virtual character is used as the number of grids to be jumped. In another alternative implementation, the number of grids to be jumped can also be a value randomly generated after entering the game. By triggering this operation control, the player enables the server to randomly select a value as the number of grids to be jumped. In another alternative implementation, the number of grids to be jumped can also be a value generated based on the player's trigger operation on this operation control. For example, by clicking this operation control, a numerical selection mode of throwing a dice is formed, and the value of the thrown dice is used as the number of grids to be jumped. The specific implementation method is not limited here.

[0177] FIG. 8(b) is a second schematic diagram of the character control method in the two-dimensional game provided by this embodiment.

[0178] As shown in Figure 8(b), in response to the player's click operation on the operation control 81, an animation of throwing a dice is displayed on the upper layer of the first game screen 801. The value of the dice thrown is the number of grids to be jumped. In Figure 8(b), the value of the dice thrown is 4. Then, the number of grids to be jumped is 4. That is to say, the virtual character 82 needs to start from grid 831 and jump 4 times to reach grid 835.

[0179] Regarding step S730:

[0180] In this step, the virtual character will be controlled to move grid by grid from the third grid to the fourth grid according to the preset jumping order, and the first jumping animation will be played during the process of the virtual character moving grid by grid.

[0181] After the player triggers the operation control, the server can control the virtual character to jump grid by grid from the third grid according to the determined number of grids to be jumped, until all the grids to be jumped are passed, that is, the grid-jumping action of this round is completed. In this embodiment, the last grid among the grids to be jumped is defined as the fourth grid. As shown in Figure 8(b), grid 831 is the third grid, and the number of grids to be jumped is 4. Then, the grids to be jumped include grid 832, grid 833, grid 834, and grid 835. Among them, grid 835 is the last grid to be jumped. Therefore, grid 835 is the fourth grid.

[0182] The first jumping animation is the grid-jumping animation played when the virtual character jumps between any two adjacent grids from the third grid to the fourth grid, and it is the animation effect achieved by the method provided in the first embodiment of this application. Specifically, the first jumping animation is an animation of the virtual character jumping from the first grid to the second grid formed by playing the first animation and the second animation according to the preset animation playing logic. The first grid and the second grid are any two adjacent grids among multiple grids. According to the preset jumping order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when the preset playing condition is met.

[0183] In an optional implementation manner provided in this embodiment, the animation playing logic further includes playing a third animation after the second animation is played. The third animation is used to represent the sunken state of the second grid.

[0184] Based on this, control the virtual character to move from the third grid to the fourth grid one by one according to the preset jumping sequence, and play the first jumping animation during the process of the virtual character moving one by one. It may also include: controlling the virtual character to move from the third grid to the fourth grid one by one according to the preset jumping sequence, and playing the second jumping animation during the process of the virtual character moving one by one. The second jumping animation is an animation formed by playing the first animation, the second animation, and the third animation according to the animation playing logic, where the virtual character jumps from the first grid to the second grid and causes the second grid to sink.

[0185] In an optional implementation manner provided in this embodiment, controlling the virtual character to move from the third grid to the fourth grid one by one according to the preset jumping sequence may also include: controlling the virtual character to move from the center point of the third grid to the center point of the fourth grid one by one according to the preset jumping sequence.

[0186] The above content has been described in detail in the first embodiment of this application. For specific reference, please refer to the description in the first embodiment and will not be elaborated here.

[0187] Figure 8(c) is the third schematic diagram of the character control method in the two-dimensional game provided in this embodiment.

[0188] As shown in Figure 8(c), in response to the player's click operation on the operation control 81, after determining the number of grids to be jumped (4), control the virtual character 82 to jump from the grid 831 to the grid 835 one by one through 4 jumps, and play the first jumping animation (or the second jumping animation) during each jump.

[0189] Regarding step S740:

[0190] In this step, a second game screen will be displayed on the graphical user interface, and the virtual character in the second game screen is located on the fourth grid.

[0191] The second game screen can be understood as the game screen where the current round of jumping action has been completed. After completing the jump, the virtual character is located on the fourth grid. Specifically, it is located at the center point of the fourth grid.

[0192] Figure 8(d) is the fourth schematic diagram of the character control method in the two-dimensional game provided in this embodiment.

[0193] As shown in Figure 8(d), in response to completing the movement of the virtual character 82 from the grid 831 to the grid 835 one by one, a second game screen 802 is displayed on the graphical user interface. In the second game screen 802, the virtual character 82 stands on the grid 835, specifically at the center point of the grid 835.

[0194] The above second embodiment provides various optional implementation manners of the character control method in the two-dimensional game. It should be noted that the examples in the second embodiment are only for explaining the method described in this application and are not used as a limitation for actual use. The character control method in the two-dimensional game provided by this application includes but is not limited to the method described in the second embodiment.

[0195] The third embodiment of this application provides an animation implementation device in a two-dimensional game. The game scene of the game includes at least a plurality of grids and a virtual character.

[0196] Figure 9 It is a schematic structural diagram of the animation implementation device in the two-dimensional game provided by this embodiment.

[0197] Such as Figure 9 As shown, the animation implementation device in the two-dimensional game provided by this embodiment includes: a first acquisition unit 901, a second acquisition unit 902, an animation playback unit 903, and a position movement unit 903.

[0198] The first acquisition unit 901 is configured to acquire a first animation and a second animation preset for the virtual character. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character.

[0199] Optionally, the first animation and the second animation are two-dimensional bone animations;

[0200] The acquisition of the first animation and the second animation preset for the virtual character includes:

[0201] Based on the function interface of the bone animation software, the first animation and the second animation are retrieved from the bone animation software.

[0202] The second acquisition unit 902 is configured to acquire the position information corresponding to each of the plurality of grids.

[0203] The animation playback unit 903 is configured to play the first animation and the second animation according to a preset animation playback logic to display a first jumping animation of the virtual character jumping from a first grid to a second grid; wherein, the first grid and the second grid are any two adjacent grids among the plurality of grids, the virtual character jumps from the first grid to the second grid according to a preset jumping sequence, and the animation playback logic includes circularly playing the first animation and playing the second animation when a preset playback condition is satisfied.

[0204] Optionally, the position information corresponding to the grid includes the position information corresponding to the center point of the grid;

[0205] Playing the first animation and the second animation according to a preset animation playing logic to display a first jumping animation of the virtual character jumping from the first grid to the second grid includes:

[0206] Playing the first animation and the second animation according to the animation playing logic to display a first jumping animation of the virtual character jumping from the center point of the first grid to the center point of the second grid.

[0207] Optionally, the preset playing condition includes that the number of loop plays of the first animation reaches a preset number;

[0208] The animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the number of loop plays of the first animation reaching the preset number.

[0209] Optionally, the preset playing condition includes that the loop playing duration of the first animation reaches a preset duration;

[0210] The animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the loop playing duration of the first animation reaching the preset duration.

[0211] Optionally, after the step of obtaining the first animation and the second animation preset for the virtual character, it is further used to:

[0212] Obtain a third animation preset for the second grid, where the third animation is used to represent the sunken state of the second grid.

[0213] Optionally, the animation playing logic further includes playing the third animation after the second animation is played;

[0214] Playing the first animation and the second animation according to the preset animation playing logic further includes:

[0215] Playing the first animation, the second animation and the third animation according to the animation playing logic to display a second jumping animation of the virtual character jumping from the first grid to the second grid and causing the second grid to sink.

[0216] Optionally, the grid has preset text and the third animation is an editor animation;

[0217] The obtaining of the third animation preset for the second grid includes:

[0218] Calling the third animation from the editor.

[0219] Optionally, the preset text includes at least one of the following texts:

[0220] Text text, numeric text, graphic text.

[0221] The position moving unit 904 is configured to, in response to completion of the playback of the second animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

[0222] The fourth embodiment of the present application provides a character control device in a two-dimensional game. A graphical user interface is provided through a terminal device. The content displayed on the graphical user interface at least includes a partial game scene and an operation control. The game scene includes a plurality of grids and a virtual character controlled by the terminal device.

[0223] Figure 10 It is a schematic structural diagram of the character control device in the two-dimensional game provided in this embodiment.

[0224] As Figure 10 As shown, the character control device in the two-dimensional game provided in this embodiment includes: a first display unit 1001, a determination unit 1002, a control unit 1003, and a second display unit 1004.

[0225] The first display unit 1001 is configured to display a first game screen in the graphical user interface. In the first game screen, the virtual character is located on a third grid, and the third grid is one of the plurality of grids.

[0226] The determination unit 1002 is configured to determine the number of grids to be jumped in response to a trigger operation on the operation control.

[0227] The control unit 1003 is configured to control the virtual character to move grid by grid from the third grid to a fourth grid in a preset jump order, and play a first jump animation during the grid-by-grid movement of the virtual character. The fourth grid is the last one of the grids to be jumped. The first jump animation is an animation of the virtual character jumping from a first grid to a second grid formed by playing a first animation and a second animation according to a preset animation playback logic. The first grid and the second grid are any two adjacent grids among the plurality of grids. According to the preset jump order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playback logic includes loop-playing the first animation and playing the second animation when a preset playback condition is met.

[0228] Optionally, the animation playing logic further includes playing a third animation after the second animation is played, where the third animation is used to represent the sunken state of the second grid;

[0229] Controlling the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence, and playing a first jumping animation during the process of the virtual character moving one grid at a time, includes:

[0230] Controlling the virtual character to move from the third grid to the fourth grid one grid at a time according to the preset jumping sequence, and playing a second jumping animation during the process of the virtual character moving one grid at a time, where the second jumping animation is an animation formed by playing the first animation, the second animation, and the third animation according to the animation playing logic, in which the virtual character jumps from the first grid to the second grid and causes the second grid to sink.

[0231] Optionally, controlling the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence, includes:

[0232] Controlling the virtual character to move from the center point of the third grid to the center point of the fourth grid one grid at a time according to the preset jumping sequence.

[0233] The second display unit 1004 is configured to display a second game screen on the graphical user interface, where the virtual character is located on the fourth grid in the second game screen.

[0234] The fifth embodiment of the present application provides an electronic device, Figure 11 which is a schematic structural diagram of the electronic device provided in this embodiment.

[0235] As Figure 11 shown, the electronic device provided in this embodiment includes: a memory 1101 and a processor 1102;

[0236] The memory 1101 is configured to store computer instructions for executing an animation implementation method in a two-dimensional game and / or a character control method in a two-dimensional game;

[0237] The processor 1102 is configured to execute the computer instructions stored in the memory 1101 to perform the following operations:

[0238] Obtain a first animation and a second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character;

[0239] Obtain the position information corresponding to each of the multiple grids;

[0240] Play the first animation and the second animation according to the preset animation playing logic to display the first jumping animation of the virtual character jumping from the first grid to the second grid; wherein, the first grid and the second grid are any two adjacent grids among the multiple grids, and the virtual character jumps from the first grid to the second grid according to the preset jumping sequence, and the animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met;

[0241] In response to completing the playing of the second animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

[0242] Optionally, after the step of obtaining the first animation and the second animation preset for the virtual character, the following operations are further performed:

[0243] Obtain a third animation preset for the second grid, and the third animation is used to characterize the sunken state of the second grid.

[0244] Optionally, the animation playing logic further includes playing the third animation after the second animation is played;

[0245] The playing of the first animation and the second animation according to the preset animation playing logic further includes:

[0246] Play the first animation, the second animation and the third animation according to the animation playing logic to display the second jumping animation of the virtual character jumping from the first grid to the second grid and causing the second grid to sink.

[0247] Optionally, the first animation and the second animation are two-dimensional bone animations;

[0248] The obtaining of the first animation and the second animation preset for the virtual character includes:

[0249] Based on the function interface of the bone animation software, retrieve the first animation and the second animation from the bone animation software.

[0250] Optionally, the grid has preset text, and the third animation is an editor animation;

[0251] The obtaining of the third animation preset for the second grid includes:

[0252] Call the third animation from the editor.

[0253] Optionally, the preset text includes at least one of the following texts:

[0254] Text text, numeric text, graphic text.

[0255] Optionally, the position information corresponding to the grid includes the position information corresponding to the center point of the grid;

[0256] Playing the first animation and the second animation according to a preset animation playing logic to display a first jumping animation of the virtual character jumping from the first grid to the second grid includes:

[0257] Playing the first animation and the second animation according to the animation playing logic to display a first jumping animation of the virtual character jumping from the center point of the first grid to the center point of the second grid.

[0258] Optionally, the preset playing condition includes that the number of loop plays of the first animation reaches a preset number;

[0259] The animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the number of loop plays of the first animation reaching the preset number.

[0260] Optionally, the preset playing condition includes that the loop playing duration of the first animation reaches a preset duration;

[0261] The animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the loop playing duration of the first animation reaching the preset duration.

[0262] Or, perform the following operations:

[0263] Display a first game screen in the graphical user interface, where the virtual character is located on a third grid in the first game screen, and the third grid is one of the multiple grids;

[0264] In response to a trigger operation on the operation control, determine the number of grids to be jumped;

[0265] Control the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence, and play a first jumping animation during the process of the virtual character moving one grid at a time. The fourth grid is the last one among the grids to be jumped. The first jumping animation is an animation of the virtual character jumping from the first grid to the second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the multiple grids. According to the preset jumping sequence, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met;

[0266] Display a second game screen on the graphical user interface, where the virtual character is located on the fourth grid in the second game screen.

[0267] Optionally, the animation playing logic further includes playing a third animation after the second animation is played. The third animation is used to represent the sunken state of the second grid;

[0268] The control of the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence and play a first jumping animation during the process of the virtual character moving one grid at a time includes:

[0269] Control the virtual character to move from the third grid to the fourth grid one grid at a time according to the preset jumping sequence, and play a second jumping animation during the process of the virtual character moving one grid at a time. The second jumping animation is an animation of the virtual character jumping from the first grid to the second grid and causing the second grid to sink, formed by playing the first animation, the second animation, and the third animation according to the animation playing logic.

[0270] Optionally, the control of the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence includes:

[0271] Control the virtual character to move from the center point of the third grid to the center point of the fourth grid one grid at a time according to the preset jumping sequence.

[0272] The sixth embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions, and the computer instructions are used to implement the methods described in the embodiments of the present application when executed by a processor.

[0273] It should be noted that relational terms such as "first", "second", etc. in this text are only used to distinguish one entity or operation from another entity or operation, and do not require or imply any actual relationship or order between these entities or operations. In addition, words such as "include", "have", "contain", and "comprise" and other similar forms have the same meaning, and, at the end of any one or more items after any of the above words, it is open-ended, and none of the above nouns indicates that the one or more items have been enumerated exhaustively, or are limited to these enumerated one or more items.

[0274] As used herein, unless otherwise expressly stated, the term "or" includes all possible combinations, except where infeasible. For example, if it is expressed that a database may include A or B, then unless otherwise specifically provided or infeasible, it may include database A, or B, or A and B. As a second example, if it is expressed that a certain database may include A, B, or C, then unless otherwise specifically provided or infeasible, the database may include database A, or B, or C, or A and B, or A and C, or B and C, or A and B and C.

[0275] It is worth noting that the above embodiments can be implemented by hardware or software (program code), or a combination of hardware and software. If implemented by software, it can be stored in the above computer-readable medium. When executed by a processor, this software can execute the methods disclosed above. The computing units and other functional units described in this disclosure can be implemented by hardware or software, or a combination of hardware and software. Those of ordinary skill in the art will also understand that the above multiple modules / units can be combined into one module / unit, and each of the above modules / units can be further divided into multiple sub-modules / sub-units.

[0276] In the above detailed description, the embodiments have been described with reference to many specific details, and these details may vary depending on the implementation. Certain adaptations and modifications can be made to the embodiments. For those skilled in the art, some other embodiments can be obviously obtained from the specific implementation manners disclosed in this application. This specification and examples are only for exemplary purposes, and the true scope and essence of this application are set forth by the claims. The step sequence shown in the drawings is also only for illustrative purposes and does not mean to be limited to any specific steps or sequences. Therefore, those skilled in the art will realize that when implementing the same method, these steps can be executed in a different order.

[0277] In the drawings and detailed description of this application, exemplary embodiments are disclosed. However, many variations and modifications can be made to these embodiments. Correspondingly, although specific terms are used, these terms are only general and descriptive, and not for the purpose of limitation.

Claims

1. A method for implementing animations in a 2D game, characterized in that, the game scene of the game includes at least multiple grids and a virtual character, and the method includes: Obtaining a first animation and a second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character; Obtaining the position information corresponding to each of the multiple grids; According to the preset animation playing logic, playing the first animation and the second animation to display a first jumping animation of the virtual character jumping from a first grid to a second grid; wherein, the first grid and the second grid are any two adjacent grids among the multiple grids, and the virtual character jumps from the first grid to the second grid according to a preset jumping order, and the animation playing logic includes looping to play the first animation and playing the second animation when a preset playing condition is met; In response to completing the playing of the second animation, using the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

2. The method according to claim 1, characterized in that, after the step of obtaining the first animation and the second animation preset for the virtual character, the method further includes: Obtaining a third animation preset for the second grid, where the third animation is used to represent the sunken state of the second grid.

3. The method according to claim 2, characterized in that, the animation playing logic further includes playing the third animation after the second animation is played; The step of playing the first animation and the second animation according to the preset animation playing logic further includes: According to the animation playing logic, playing the first animation, the second animation and the third animation to display a second jumping animation of the virtual character jumping from the first grid to the second grid and causing the second grid to sink.

4. The method according to claim 1, characterized in that, the first animation and the second animation are 2D bone animations; The step of obtaining the first animation and the second animation preset for the virtual character includes: Based on the function interface of the bone animation software, retrieving the first animation and the second animation from the bone animation software.

5. The method according to claim 2, characterized in that, the grid has a preset text, and the third animation is an editor animation; The step of obtaining the third animation preset for the second grid includes: Retrieving the third animation from the editor.

6. The method according to claim 5, characterized in that, the preset text includes at least one of the following texts: Text text, digital text, graphic text.

7. The method according to claim 1, characterized in that, the position information corresponding to the grid includes the position information corresponding to the center point of the grid; The step of playing the first animation and the second animation according to the preset animation playing logic to display a first jumping animation of the virtual character jumping from a first grid to a second grid includes: According to the animation playing logic, play the first animation and the second animation to display a first jumping animation in which the virtual character jumps from the center point of the first grid to the center point of the second grid.

8. The method according to claim 1, wherein, the preset playing condition includes that the number of loop plays of the first animation reaches a preset number; the animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the number of loop plays of the first animation reaching the preset number.

9. The method according to claim 1, wherein, the preset playing condition includes that the loop playing duration of the first animation reaches a preset duration; the animation playing logic includes: looping and playing the first animation, and playing the second animation in response to the loop playing duration of the first animation reaching the preset duration.

10. A method for controlling a character in a two-dimensional game, wherein, a graphical user interface is provided through a terminal device, and the content displayed on the graphical user interface at least includes part of the game scene and an operation control. The game scene includes a plurality of grids and a virtual character controlled by the terminal device. The method includes: displaying a first game screen on the graphical user interface, in which the virtual character is located on a third grid, and the third grid is one of the plurality of grids; determining the number of grids to be jumped in response to a trigger operation on the operation control; controlling the virtual character to move grid by grid from the third grid to a fourth grid according to a preset jumping order, and playing a first jumping animation during the grid-by-grid movement of the virtual character. The fourth grid is the last one of the grids to be jumped. The first jumping animation is an animation in which the virtual character jumps from a first grid to a second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the plurality of grids. According to the preset jumping order, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping and playing the first animation, and playing the second animation when a preset playing condition is met; displaying a second game screen on the graphical user interface, in which the virtual character is located on the fourth grid.

11. The method according to claim 10, wherein, the animation playing logic further includes playing a third animation after the second animation is played. The third animation is used to represent the subsidence state of the second grid; the controlling the virtual character to move grid by grid from the third grid to a fourth grid according to a preset jumping order, and playing a first jumping animation during the grid-by-grid movement of the virtual character includes: Control the virtual character to move from the third grid to the fourth grid one grid at a time according to the preset jumping sequence, and play a second jumping animation during the process of the virtual character moving one grid at a time. The second jumping animation is an animation formed by playing the first animation, the second animation, and the third animation according to the animation playing logic, in which the virtual character jumps from the first grid to the second grid and causes the second grid to sink.

12. The method according to claim 10, wherein, the control of the virtual character to move from the third grid to the fourth grid one grid at a time according to the preset jumping sequence includes: controlling the virtual character to move from the center point of the third grid to the center point of the fourth grid one grid at a time according to the preset jumping sequence.

13. An animation implementation device in a two-dimensional game, wherein, the game scene of the game includes at least multiple grids and a virtual character, and the device includes: a first acquisition unit, a second acquisition unit, an animation playback unit, and a position movement unit; the first acquisition unit is configured to acquire a first animation and a second animation preset for the virtual character, where the first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character; the second acquisition unit is configured to acquire the position information corresponding to each of the multiple grids; the animation playback unit is configured to play the first animation and the second animation according to a preset animation playing logic to display a first jumping animation in which the virtual character jumps from the first grid to the second grid; wherein, the first grid and the second grid are any two adjacent grids among the multiple grids, the virtual character jumps from the first grid to the second grid according to a preset jumping sequence, and the animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met; the position movement unit is configured to, in response to the completion of the playback of the second animation, use the position indicated by the position information corresponding to the second grid as the position of the virtual character after completing the jump.

14. A character control device in a two-dimensional game, wherein, a graphical user interface is provided through a terminal device, and the content displayed on the graphical user interface includes at least a part of the game scene and an operation control. The game scene includes multiple grids and a virtual character controlled by the terminal device, and the device includes: a first display unit, a determination unit, a control unit, and a second display unit; the first display unit is configured to display a first game screen on the graphical user interface, in which the virtual character is located on the third grid, and the third grid is one of the multiple grids; the determination unit is configured to determine the number of grids to be jumped in response to a trigger operation on the operation control. The control unit is configured to control the virtual character to move from the third grid to the fourth grid one grid at a time according to a preset jumping sequence, and play a first jumping animation during the process of the virtual character moving one grid at a time. The fourth grid is the last one of the grids to be jumped. The first jumping animation is an animation of the virtual character jumping from the first grid to the second grid formed by playing a first animation and a second animation according to a preset animation playing logic. The first grid and the second grid are any two adjacent grids among the multiple grids. According to the preset jumping sequence, the second grid is located after the first grid. The first animation is used to represent the static state of the virtual character, and the second animation is used to represent the jumping state of the virtual character. The animation playing logic includes looping the first animation and playing the second animation when a preset playing condition is met; The second display unit is configured to display a second game screen on the graphical user interface, where the virtual character is located on the fourth grid in the second game screen.

15. An electronic device, characterized in that, it includes: a memory and a processor; The memory is configured to store one or more computer instructions; The processor is configured to execute the one or more computer instructions to implement the method according to any one of claims 1-12.

16. A computer-readable storage medium, on which one or more computer instructions are stored, characterized in that, when the instructions are executed by a processor, the method according to any one of claims 1-12 is executed.