Method and device for generating frame data, storage medium, and computer equipment
By generating following movement path frame data on the server side, the performance pressure and lack of performance problems of the following function in the existing technology are solved, and NPC character following is realized, improving the game experience and competitiveness.
Patent Information
- Application Number
- CN202011439747.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-21
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2040-09-21
AI Technical Summary
In existing multiplayer online role-playing games, the following function has problems such as performance pressure, lack of performance, and poor following effects. Especially in multiplayer collaborative gameplay, especially when the client calculates the following path, it is easy to cause lag and cannot be implemented. Follow NPC characters.
Obtain the target moving path frame data of the target object through the server, generate synchronous following data frames and asynchronous following data frames based on the preset following frame number difference, and perform interpolation processing to generate following moving path frame data, so that the following object can follow the target object smoothly. , improve the following effect and reduce the burden on the client.
It improves the game experience, reduces client performance pressure, avoids lags and frame drops, enables NPC role following, and enhances the competitiveness of game products and player experience.
Smart Images

Figure CN112426717B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and apparatus for generating frame data, a storage medium, and a computer device. Background Art
[0002] In traditional MMORPG games (multiplayer online role-playing game), there are a large number of multiplayer collaborative gameplays (such as multiplayer dungeons, multiplayer tasks, large-scale game battlefields, etc.). These gameplays have one thing in common: multiple people are required to go to a starting point at the same time to start the gameplay. In the process of going to the starting point of the gameplay, it is often necessary to go through a long journey. During this journey, it is usually very boring and tedious. The boring process will greatly reduce the player's gaming experience. However, this kind of journey experience is not uncommon in the game, so how to improve the player's gaming experience when entering each gameplay becomes very important.
[0003] With the rapid development of game social needs and personal identity needs, most existing games have adopted the follow function to enhance the player experience. In recent times, the follow gameplay in games has shown explosive growth. The current more common mobile follow gameplay solution is: when the second character needs to follow the first character, the first character client will determine the follow path of the second character based on the movement path of the first character, and the first character client will send the follow path to the server, which will then be forwarded to the second character client by the server. The second character client controls the movement of the second character according to the received follow path to show the follow effect of the second character on the first character. The above solution has two defects: first, the follow path is calculated by the first character client, and the client has performance pressure, which can easily cause client freezes and performance loss; second, the second character can only completely follow the movement trajectory of the first character. If the first character moves with freezes, speeds up and slows down, the effect of the second character following the first character is poor. Third, players cannot follow the NPC characters in the game.
[0004] In summary, the defects of the above following solutions need to be solved urgently. Summary of the invention
[0005] In view of this, the present application provides a method and apparatus for generating frame data, a storage medium, and a computer device.
[0006] According to one aspect of the present application, a method for generating frame data is provided, which is applied to a server and includes:
[0007] Acquire target movement path frame data corresponding to the target object, and determine the synchronous following data frame corresponding to the following object according to the preset following frame number difference corresponding to the following object and the target movement path frame data, wherein the following frame time corresponding to the synchronous following data frame is the same as the target frame time corresponding to the target data frame, the following frame position corresponding to the synchronous following data frame is determined based on the position of the target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame whose forward direction differs from the target data frame by the preset following frame number difference;
[0008] Performing interpolation processing based on the position corresponding to the target moving path frame data to determine the asynchronous following data frame corresponding to the following object;
[0009] The following movement path frame data corresponding to the following object is generated according to the synchronous following data frame and the asynchronous following data frame.
[0010] Specifically, the asynchronous following data frame includes an initial following data frame; and the determining of the asynchronous following data frame corresponding to the following object specifically includes:
[0011] Acquire a first target frame position and a first target frame time corresponding to a first target data frame in the target moving path frame data, and acquire a first following frame position of the following object, wherein the first target data frame is the first frame in the target moving path frame data;
[0012] Performing interpolation based on the first target frame position and the first following frame position to obtain an initial following frame position that matches the preset following frame number difference;
[0013] The initial following frame time corresponding to the initial following frame position is marked, and the initial following data frame in the following moving path frame data is determined, wherein the first initial following frame time is the first target frame time.
[0014] Specifically, the asynchronous following data frame includes a starting following data frame; and the determining of the asynchronous following data frame corresponding to the following object specifically includes:
[0015] Acquire a first target frame position corresponding to a first target data frame and a second target frame position corresponding to a second target data frame in the target moving path frame data, wherein the second target data frame is a data frame that differs from the first target data frame by the preset follow-up frame number difference;
[0016] interpolating based on the first target frame position and the second target frame position to obtain a starting following frame position that matches the preset following frame number difference, wherein the starting following frame position includes the second target frame position;
[0017] The starting following frame time corresponding to the starting following frame position is marked according to the first target frame time and the second target frame time, and the starting following frame data in the following movement path frame data is determined.
[0018] Specifically, before interpolating based on the first target frame position and the second target frame position, the method further includes:
[0019] Acquire all starting target frame positions corresponding to the first target data frame and the second target data frame;
[0020] If the starting target frame position is repeated, interpolation is performed based on the first target frame position and the second target frame position.
[0021] Specifically, each target data frame included in the target moving path frame data also corresponds to a target frame state, and the follow-up frame state corresponding to the synchronous follow-up data frame is the target frame state corresponding to the target data frame that is before the time-synchronized target data frame and differs by the preset follow-up frame number.
[0022] Specifically, each target data frame included in the target moving path frame data further corresponds to a target frame speed, and the asynchronous following data frame includes a stop following data frame; and determining the asynchronous following data frame corresponding to the following object specifically includes:
[0023] When the target frame speed corresponding to any third target data frame in the target data frames is zero, obtaining a stop target frame state corresponding to a stop target data frame whose number before the third target data frame is equal to the preset follow-up frame number difference;
[0024] When the stop target frame state includes multiple ones, acquiring a fourth target data frame whose state has changed, and determining a fourth target frame position corresponding to the fourth target data frame;
[0025] According to the third target frame time corresponding to the third target data frame, acquiring the second follow-up frame position corresponding to the time-synchronized synchronous follow-up data frame;
[0026] The stop following data frame corresponding to the following object is determined based on the distance between the second following frame position and the fourth target frame position.
[0027] Specifically, the determining the stop-follow data frame corresponding to the follow object specifically includes:
[0028] If the distance between the second following frame position and the fourth target frame position is less than or equal to a preset stop-following distance, the fourth target frame position is used as the first stop position of the following object, and the stop-following data frame is determined according to the second following frame position and the first stop position.
[0029] Specifically, the determining the stop-follow data frame corresponding to the follow object specifically includes:
[0030] If the distance between the second following frame position and the fourth target frame position is greater than the preset stop-follow distance, the second stop position of the following object is determined based on the third target frame position corresponding to the third target data frame, and the stop-follow data frame is determined according to the second following frame position and the second stop position.
[0031] Specifically, if the following object includes multiple objects, before acquiring the target moving path frame data corresponding to the target object, the method further includes:
[0032] Determine a following order for each of the following objects respectively, and determine a preset following frame number difference corresponding to each of the following objects respectively according to the following order;
[0033] After generating the following movement path frame data corresponding to the following object, the method further includes:
[0034] The following movement path frame data is sent to the following terminals corresponding to each of the plurality of following objects.
[0035] According to another aspect of the present application, a device for generating frame data is provided, which is applied to a server, and includes:
[0036] A synchronous following frame determination module, used for acquiring target moving path frame data corresponding to a target object, and determining a synchronous following data frame corresponding to the following object according to a preset following frame number difference corresponding to the following object and the target moving path frame data, wherein a following frame time corresponding to the synchronous following data frame is the same as a target frame time corresponding to a target data frame, a following frame position corresponding to the synchronous following data frame is determined based on a position of a target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame whose forward direction differs from the target data frame by the preset following frame number difference;
[0037] An asynchronous following frame determination module, configured to perform interpolation processing based on the position corresponding to the target moving path frame data, and determine the asynchronous following data frame corresponding to the following object;
[0038] The following frame data generating module is used to generate the following movement path frame data corresponding to the following object according to the synchronous following data frame and the asynchronous following data frame.
[0039] Specifically, the asynchronous follow-up data frame includes an initial follow-up data frame; the asynchronous follow-up frame determination module specifically includes:
[0040] an initial frame time acquisition unit, configured to acquire a first target frame position and a first target frame time corresponding to a first target data frame in the target movement path frame data, and to acquire a first following frame position of the following object, wherein the first target data frame is the first frame in the target movement path frame data;
[0041] an initial frame position determining unit, configured to interpolate based on the first target frame position and the first following frame position to obtain an initial following frame position matching the preset following frame number difference;
[0042] The initial following frame determining unit is used to mark the initial following frame time corresponding to the initial following frame position, and determine the initial following data frame in the following moving path frame data, wherein the first initial following frame time is the first target frame time.
[0043] Specifically, the asynchronous follow-up data frame includes a start-up follow-up data frame; the asynchronous follow-up frame determination module specifically includes:
[0044] A first starting frame data acquisition unit is used to acquire a first target frame position corresponding to a first target data frame and a second target frame position corresponding to a second target data frame in the target moving path frame data, wherein the second target data frame is a data frame that differs from the first target data frame by a preset follow-up frame number difference;
[0045] a starting frame position determining unit, configured to interpolate based on the first target frame position and the second target frame position to obtain a starting following frame position that matches the preset following frame number difference, wherein the starting following frame position includes the second target frame position;
[0046] The starting frame data determining unit is used to mark the starting following frame time corresponding to the starting following frame position according to the first target frame time and the second target frame time, and determine the starting following frame data in the following movement path frame data.
[0047] Specifically, the following data frame determination module also includes:
[0048] a second starting frame data acquisition unit, configured to acquire all starting target frame positions corresponding to the first target data frame and the second target data frame before interpolation is performed based on the first target frame position and the second target frame position;
[0049] The starting judgment unit is used for interpolating based on the first target frame position and the second target frame position if the starting target frame position is repeated.
[0050] Specifically, each target data frame included in the target moving path frame data also corresponds to a target frame state, and the follow-up frame state corresponding to the synchronous follow-up data frame is the target frame state corresponding to the target data frame that is before the time-synchronized target data frame and differs by the preset follow-up frame number.
[0051] Specifically, each target data frame included in the target moving path frame data further corresponds to a target frame speed, and the asynchronous following data frame includes a stop following data frame; the asynchronous following frame determination module specifically includes:
[0052] a stop frame state acquisition unit, configured to acquire a stop target frame state corresponding to a stop target data frame having a number equal to the difference between the preset number of follow-up frames and the third target data frame before the third target data frame when the target frame speed corresponding to any third target data frame in the target data frame is zero;
[0053] A state switching frame acquisition unit, used for acquiring a fourth target data frame whose state has changed when the stop target frame state includes multiple states, and determining a fourth target frame position corresponding to the fourth target data frame;
[0054] a stop frame position acquisition unit, configured to acquire a second following frame position corresponding to a time-synchronized synchronous following data frame according to a third target frame time corresponding to the third target data frame;
[0055] The stop-follow frame determining unit is used to determine the stop-follow data frame corresponding to the follow object based on the distance between the second follow frame position and the fourth target frame position.
[0056] Specifically, the stop-follow frame determination unit includes:
[0057] The first stop-follow frame determination subunit is used to use the fourth target frame position as the first stop position of the follow object if the distance between the second follow frame position and the fourth target frame position is less than or equal to a preset stop-follow distance, and determine the stop-follow data frame according to the second follow frame position and the first stop position.
[0058] Specifically, the stop-follow frame determination unit includes:
[0059] The second stop-follow frame determination subunit is used to determine the second stop position of the follow object based on the third target frame position corresponding to the third target data frame if the distance between the second follow frame position and the fourth target frame position is greater than a preset stop-follow distance, and determine the stop-follow data frame according to the second follow frame position and the second stop position.
[0060] Specifically, the device also includes:
[0061] A following frame number difference determination module, used for, if the following object includes multiple following objects, determining the following order of each following object respectively before acquiring the target moving path frame data corresponding to the target object, and determining the preset following frame number difference corresponding to each following object respectively according to the following order;
[0062] The following data frame sending module is used for sending the following movement path frame data corresponding to the following object to the following terminals corresponding to each of the plurality of following objects after generating the following movement path frame data corresponding to the following object.
[0063] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned method for generating frame data is implemented.
[0064] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned method for generating frame data when executing the program.
[0065] By means of the above technical scheme, the present application provides a method and device for generating frame data, a storage medium, and a computer device, wherein the server obtains the target moving path frame data corresponding to the target object, thereby determining the synchronous following data frame and the asynchronous following data frame corresponding to the following object based on the target moving path frame data according to the preset following frame number difference, thereby generating the following moving path frame data, so that the following object can show the following effect of the target object by moving based on the following moving path frame data. Compared with the prior art, the present application transfers the cumbersome process of determining the following moving path frame data to a high-performance server for processing, greatly improving the processing efficiency, avoiding the problem of freezing, frame loss, performance loss, and even the problem of following loss during the following process caused by excessive client performance pressure, and determining the following trajectory position of the following object by interpolation based on the moving trajectory position of the target object, so that the following motion performance effect of the following object is improved. On the other hand, it solves the problem that the prior art cannot realize the following of NPC characters in the game scene, provides technical support for increasing the gameplay in the game development stage, and also provides a guarantee for players to experience more gameplay in the game experience stage, thereby improving the player's game experience and the competitiveness of game products.
[0066] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0068] Figure 1 A schematic diagram of a process for generating frame data provided by an embodiment of the present application is shown;
[0069] Figure 2 A schematic flow chart of another method for generating frame data provided by an embodiment of the present application is shown;
[0070] Figure 3 A schematic flow chart of another method for generating frame data provided by an embodiment of the present application is shown;
[0071] Figure 4 A schematic flow chart of another method for generating frame data provided by an embodiment of the present application is shown;
[0072] Figure 5 A schematic diagram of the structure of a device for generating frame data provided by an embodiment of the present application is shown;
[0073] Figure 6 A schematic structural diagram of another device for generating frame data provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0074] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0075] In this embodiment, a method for generating frame data is provided, which is applied to a server, such as Figure 1 As shown, the method includes:
[0076] Step 101, obtaining target movement path frame data corresponding to the target object, and determining a synchronous following data frame corresponding to the following object according to a preset following frame number difference corresponding to the following object and the target movement path frame data, wherein a following frame time corresponding to the synchronous following data frame is the same as a target frame time corresponding to the target data frame, a following frame position corresponding to the synchronous following data frame is determined based on a position of a target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame that differs from the target data frame in a forward direction by a preset following frame number difference;
[0077] Step 102, performing interpolation processing based on the position corresponding to the target moving path frame data to determine the asynchronous following data frame corresponding to the following object;
[0078] Step 103: Generate following movement path frame data corresponding to the following object according to the synchronous following data frame and the asynchronous following data frame.
[0079] The embodiment of the present application is mainly applied to the server. In a scenario applied to the game server, the motion following instruction can be specifically a motion following instruction of the game character. After the game server receives the motion following instruction of the game character from the game player client, the target object terminal and the following terminal are determined by parsing the instruction, thereby determining the object to be followed indicated by the instruction, that is, the target object, and the following object. Among them, the following object can be one or more, and the motion following instruction can come from the target object terminal. For example, in a multiplayer collaborative game, the players form a team in the game scene, and the team leader initiates the team following instruction, commanding one or more players in the team to follow him. The motion following instruction can also come from the following terminal, for example, player A clicks on the avatar of player B in the game scene to initiate following, and player A follows player B to move in the game scene. In addition, the motion following instruction can be a player following another player, such as player A following player B, or a player following an NPC in the game scene, such as player A following the NPC character "Chief of the Small Fishing Village" in the game scene, or a NPC following another player in the game scene, such as the NPC character "Guardian of the Demon Tower" in the game scene following player A. The embodiment of the present application takes the application to a game server as an example to explain the provided technical solution, but the present application is not limited to the application to a game server, and can be applied to motion following in any application scenario, for example, the following of a target object by a following object in animation production.
[0080] The server obtains the target movement path frame data corresponding to the target object from the target terminal. The target movement path frame data is the movement path of the target object recorded in frames at the beginning and after the motion following instruction is created. For example, the frame rate in the game scene is 10 Hz, that is, 1 second is expressed by 10 frames. The motion following instruction is created at 1 o'clock, then the data frames of the character at 1 o'clock and after 1 o'clock are obtained, that is, the data frames corresponding to 1 o'clock, 1:00:01 seconds, and 1:00:01 seconds. The data frame should at least include the target object position data and an identifier that can represent the time corresponding to the data frame. For example, the identifier of the data frame corresponding to the time can be in the form of a number. Specifically, the first frame can be used to represent the data frame of the target object at 1 o'clock, the second frame can be used to identify the data frame of the target object at 1:00:01 seconds..., and the actual time corresponding to the data frame or the encoded data of the actual time can also be used to represent it. In addition, in the target terminal, the client can record all the moving path frame data of the target object in real time, so that the server can call the historical data of the target object at any time at any time; it can also record the moving path frame data of the target object after the motion following instruction is created, and provide data support for other characters to follow the target object; it can also record the latest moving path frame data generated by the target object, such as recording the moving path frame data within 1 minute, and deleting earlier data.
[0081] After the server obtains the target moving path frame data corresponding to the target object, it determines the moving path frame data of the following object based on the data and the preset following frame difference, wherein the preset following frame difference refers to the number of frames between the moving path of the following object and the moving path of the target object. When there are multiple following objects, the following frame differences corresponding to the multiple following objects can be determined in sequence according to the following order of the following objects. The following frame differences can increase in sequence with the following order. For example, the preset following frame difference corresponding to the first following object is 5 frames, the preset following frame difference corresponding to the second following object is 8 frames, and so on. Assuming that the target object corresponds to a following object, the preset following frame difference corresponding to the following object is 5 frames. In the following state, if the current position of the target object is A, the following object will reach A after 0.5 seconds (preset following frame difference / frame rate=5 / 10=0.5). After determining the following movement path frame data, the server sends the following movement path frame data to the following object client. The following object client can control the movement of the following object according to the received following movement path frame data to achieve the effect that the following object can follow the movement of the target object. The player of the following object can follow the movement of the target object without the need for the following player to perform operations.
[0082] In the above embodiment, each target data frame included in the target moving path frame data corresponds to a target frame time and a target frame position. The synchronous following stage refers to the stage in which the following object moves completely according to the moving trajectory of the target object. In contrast, it also includes an asynchronous following stage. For example, in the starting stage of the target object, the target object may stop and go. In order to improve the following performance, the following object may not move in the stop-and-go manner of the target object, but in a smoother manner. At this time, the following object may not move according to the target frame position of the target data frame corresponding to the target object.
[0083] For the synchronous following stage, there is a synchronous following data frame corresponding to the following movement path frame data. In the following process in the actual game scene, most of the following processes belong to synchronous following. In the embodiment of the present application, each target data frame corresponds to a target frame time, and the target frame time is used to reflect the actual time or game world time corresponding to this frame data. The following frame time corresponding to the synchronous following data frame is the same as the target frame time corresponding to the target data frame. For example, the following object starts to follow the target object at 1 o'clock, and synchronously follows the moving path of the target object after 1 o'clock and 0.5 seconds. Assuming that the preset following frame difference is 5, the game frame rate is 10Hz, and the following object and the target object have a following time difference of 0.5 seconds, then the following object should follow the moving characteristics of the target object at 1 o'clock and 0.5 seconds at 1 o'clock and 1 second. The synchronous following start time of the following object can be determined at 1:01 second, and the data frame corresponding to 1:01 second can be found in the target moving path frame data, and 1:01 second can be determined as the following frame time corresponding to the synchronous following frame, and then 5 frames can be shifted forward to obtain the target frame position corresponding to the target data frame at 1:00.5 seconds, and the position can be determined as the position of the synchronous following data frame, and the following frame time corresponding to the synchronous following frame is 1:01 second. For another example, if the following frame time corresponding to the synchronous following frame is 1:01.1 seconds, then the following frame position corresponding to the synchronous following frame is the position corresponding to the target frame at 1:00.6 seconds. By analogy, all synchronous following frames are determined, and then the following moving path frame data is determined.
[0084] In addition, in some special following stages, the following moving path frame data of the following object can be determined by interpolation based on the position corresponding to the target moving path frame data and the position corresponding to the following object. For example, in the initial following stage of the following object, the motion following instruction has been issued, but due to the preset following frame number difference, the following object has not yet started to follow the target object. The initial following data frame of the following object can be determined based on the interpolation result by interpolating based on the position of the following object and the initial position of the target object corresponding to the target moving path frame data of the target object. For another example, the target object shows a moving speed that is fast and slow in several consecutive frames, such as moving 10 meters from the first frame to the second frame, 1 meter from the second frame to the third frame, and 8 meters from the third frame to the fourth frame... At this time, the following data frame position that can show a smooth moving effect can be obtained by interpolating the positions corresponding to the first frame and the last frame in these frames of data. For the following moving path frames corresponding to some special following stages, they can be determined by the above-mentioned interpolation method, so as to achieve a smooth following effect of the following object.
[0085] By applying the technical solution of this embodiment, the server obtains the target moving path frame data corresponding to the target object, and then determines the synchronous following data frame and the asynchronous following data frame corresponding to the following object based on the target moving path frame data according to the preset following frame number difference, thereby generating the following moving path frame data, so that the following object can show the following effect of the target object by moving based on the following moving path frame data. Compared with the prior art, the embodiment of the present application transfers the cumbersome process of determining the following moving path frame data to a high-performance server for processing, greatly improving the processing efficiency, avoiding the problem of freezing, frame loss, performance loss, and even the problem of losing the following object during the following process due to excessive client performance pressure, and determining the following trajectory position of the following object by interpolation based on the moving trajectory position of the target object, so that the following motion performance effect of the following object is improved. On the other hand, it solves the problem that the prior art cannot realize the following of NPC characters in the game scene, provides technical support for increasing the gameplay in the game development stage, and also provides a guarantee for players to experience more gameplay in the game experience stage, thereby improving the player's game experience and the competitiveness of game products.
[0086] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for generating frame data is provided, such as Figure 2 As shown, the method includes:
[0087] In order to improve the performance of the following function, the embodiment of the present application provides multiple ways to determine the frame data of the following moving path. Multiple implementation methods can be used in different stages of target following. Specifically, step 103 may include:
[0088] Method 1: In the initial following stage of the following object, such as Figure 2 As shown, step 102 specifically includes:
[0089] Step 102-1-1, obtaining a first target frame position and a first target frame time corresponding to a first target data frame in the target moving path frame data, and obtaining a first following frame position of a following object, wherein the first target data frame is the first frame in the target moving path frame data;
[0090] Step 102-1-2, interpolating based on the first target frame position and the first following frame position to obtain an initial following frame position that matches a preset following frame number difference;
[0091] Step 102-1-3, marking the initial following frame time corresponding to the initial following frame position, and determining the initial following data frame in the following moving path frame data, wherein the first initial following frame time is the first target frame time.
[0092] In the above embodiment, the initial following stage of the following object refers to the stage where the motion following instruction has been issued, but due to the preset following frame number difference, the following object has not yet started to follow the target object. For example, the preset following frame number difference is 5. If the following object wants to follow the target object, it needs to wait until the target object moves for 5 frames before starting to move. In order to solve the problem that the following object is in a waiting state during the display time of these 5 frames of images, resulting in poor following display effect, the embodiment of the present application sets an initial following data frame for the above initial following stage, so that the following object can move according to the initial following data frame to avoid waiting in place. Specifically, the first frame in the target moving path frame data is obtained as the first target data frame, the first target frame position and the first target frame time corresponding to the first target data frame, that is, the initial position of the target object, the first target frame time is used as the following start time of the following object, and the following object enters the following state from this time. The following object data frame corresponding to this time is the first following frame of the following object, and the position of the following object at the following start time, that is, the first following frame position, is further obtained, so as to interpolate the first target frame position and the first following frame position, and determine the initial following data frame of the following object according to the interpolation result, wherein the interpolation result is used as the position information of the initial following data frame, and the time information of the initial following data frame is synchronized with the target following data frame.
[0093] For example, the preset follow frame difference is 5, the time of obtaining the first target data frame corresponding to the target object is 1 o'clock, the position is A, and the position B of the follow object at 1 o'clock is obtained, then interpolation processing is performed on positions A and B to obtain 4 interpolation positions including position B, interpolation 1, interpolation 2, interpolation 3, and interpolation 4, and the corresponding time information is marked in the order of the distance from the interpolation position to position A from large to small. The time corresponding to position B is 1 o'clock, the time corresponding to interpolation 1 is 1:00.1 seconds, and the time corresponding to interpolation 2 is 1:00.2 seconds... In this way, the initial follow data frame is determined, and the follow object moves according to the initial follow data frame. It can also be shown in the first 5 frames of images at the beginning of the follow as a moving state approaching the target object, so as to avoid the follow object client showing the sluggish waiting effect of the follow object, and improve the expressiveness of the follow state in the game scene.
[0094] Method 2: In the initial stage of following the object, Figure 3 As shown, step 102 specifically includes:
[0095] Step 102-2-1, obtaining a first target frame position corresponding to a first target data frame and a second target frame position corresponding to a second target data frame in the target moving path frame data, wherein the second target data frame is a data frame that differs from the first target data frame by a preset number of follow-up frames;
[0096] Step 102-2-2, interpolating based on the first target frame position and the second target frame position to obtain a starting follow frame position that matches a preset follow frame number difference, wherein the starting follow frame position includes the second target frame position;
[0097] Step 102-2-3, marking the start-follow frame time corresponding to the start-follow frame position according to the first target frame time and the second target frame time, and determining the start-follow frame data in the follow-up movement path frame data.
[0098] In the above embodiment, the starting following stage of the following object refers to the stage in which the following object follows the starting moving path of the target object. For example, after the motion following instruction is issued, the target object starts to change from the original stopped state to the moving state. The target object may be in a stop-and-go hesitant state for a short period of time when it starts to move. If the following object follows the moving path of the target object frame by frame, then the following object will also present this state, resulting in a decrease in the following expression. Therefore, the embodiment of the present application sets a starting following frame for the following object, so that the following object can follow the starting following frame when following the target object in the starting stage, so that the following path is smooth and the following effect is improved.
[0099] Specifically, the first frame in the target moving path frame data is obtained as the first target data frame, and the second target data frame that differs from the first target data frame by a preset follow-up frame number difference is obtained, and the first target frame position corresponding to the first target data frame and the second target frame position corresponding to the second target data frame are obtained. For example, the preset follow-up frame number difference is 5, the first target data frame is the data frame corresponding to 1 o'clock, and the second target data frame is the data frame corresponding to 1 o'clock and 0.5 seconds. Further, based on the above-mentioned first target frame position and second target frame position, interpolation is performed to obtain 5 interpolation positions (5 is the preset follow-up frame number difference) including the second target frame position as the starting follow-up frame position, and then the corresponding time information is marked for each starting follow-up frame position in turn to obtain a complete starting follow-up frame, and the starting follow-up frame is sent to the following terminal as part of the follow-up moving path frame data to guide the following moving path of the following object, so that the movement of the following object in the starting stage tends to be smooth, thereby improving the following effect.
[0100] In addition, in the above embodiment, if the target object does not show a stop-and-go starting state when the character following is initiated, then the following data frame of the following object can be directly determined according to the target data frame corresponding to the target object, and there is no need to smooth the position information in the target data frame. Specifically, after step 102-2-1 and before step 102-2-2, it can also include: obtaining all the starting target frame positions corresponding to the first target data frame and the second target data frame; if the starting target frame positions are repeated, then step 102-2-2 is executed. Among them, if the obtained starting target frame positions are repeated, it means that the target object shows a stop-and-go starting state after the following instruction starts, and the starting state should be smoothed according to the above method.
[0101] Method 3: During the stop and follow phase of the follow object, Figure 4 As shown, step 102 specifically includes:
[0102] Step 102-3-1, when the target frame speed corresponding to any third target data frame in the target data frame is zero, obtaining the stop target frame state corresponding to the stop target data frame whose number before the third target data frame is equal to the preset follow-up frame number difference;
[0103] Step 102-3-2, when there are multiple stop target frame states, obtain a fourth target data frame whose state has changed, and determine a fourth target frame position corresponding to the fourth target data frame;
[0104] Step 102-3-3, acquiring a second follow-up frame position corresponding to a time-synchronized synchronous follow-up data frame according to a third target frame time corresponding to the third target data frame;
[0105] Step 102-3-4, based on the distance between the second following frame position and the fourth target frame position, determine the stop following data frame corresponding to the following object.
[0106] In the above embodiment, it should be explained first that each target data frame included in the target moving path frame data also corresponds to a target frame state, and the follow-up frame state corresponding to the synchronous follow-up data frame is the target frame state corresponding to the target data frame that is different from the time-synchronized target data frame by a preset follow-up frame number difference. In other words, in addition to following the position of the corresponding target data frame, the follow-up data frame also follows the state of the target data frame, wherein the target frame state may include the flight state, walking state, etc. of the target object. If the target object is in the flight state at position A, then the follow-up object should also be in the flight state when it follows to position A. If the target object switches from the flight state to the walking state at position B, then the follow-up object should also switch from the flight state to the walking state when it follows to position B. On this basis, there are some more special situations. For example, the target object stops at position D soon after switching from a flying state to a walking state at position C. If the synchronous following method is used, the following object should also stop at position D after switching from a flying state to a walking state at position C. However, if following in this way, the following object will stop at the same position as the target object, which will cause poor overlapping display effects of multiple characters in the game scene. Therefore, when the target object stops moving, the following object should stop at a distance from the target object. In addition, if the state of the target object changes during the stopping stage, the stop following data frame of the following object can be determined by the above embodiment.
[0107] Specifically, first, a data frame corresponding to the target object in the stop stage is obtained. If the speed corresponding to the target data frame is zero, it means that the target object has stopped moving at the corresponding position of the frame. Therefore, the third target data frame with zero target frame data in the target data frame and the previous five data frames (5 is a preset follow-up frame number difference) including the third target data frame are obtained as the stop target data frame; secondly, by obtaining the stop target frame state corresponding to the stop target data frame, it is determined whether the target object has a state switch in the stop stage. If the stop target frame state includes multiple states, it means that the target object has a state switch in the stop stage; then, after determining the target object After the state switching occurs in the stop phase, the fourth target data frame where the state switching occurs and the fourth target frame position corresponding to the fourth target data frame, that is, the position where the state switching occurs in the target object, are obtained; then, the position of the following object at the third target frame time (the third target frame time is the time when the target object stops moving) is obtained, that is, the above-mentioned second following frame position; finally, the stop following data frame of the following object is set according to the distance between the second following position and the fourth target frame position, that is, the stop following data frame is determined according to the distance between the position where the state switching occurs in the target object and the position where the following object is at the time when the target object stops moving.
[0108] In step 102-3-4 of the above embodiment, specifically, if the distance between the second following frame position and the fourth target frame position is less than or equal to the preset stop-follow distance, the fourth target frame position is used as the first stop position of the following object, and the stop-follow data frame is determined according to the second following frame position and the first stop position. And, if the distance between the second following frame position and the fourth target frame position is greater than the preset stop-follow distance, the second stop position of the following object is determined based on the third target frame position corresponding to the third target data frame, and the stop-follow data frame is determined according to the second following frame position and the second stop position.
[0109] In this embodiment, it is assumed that the target object switches from the flying state to the walking state in the stop phase, and the target object stops at position D soon after switching from the flying state to the walking state at position C. When the target object stops at position D, the follower object moves to position E. Since the target object stops moving after stopping at position D, the stop following data frame of the follower object should be determined according to the distance between position E and position D. If the distance between position E and position D is close (less than or equal to the preset stop following distance), it means that the follower object is close to the target object when it stops moving. In order to reflect that the state of the follower object switches with the state of the target object, the follower object is moved to position C and then stops moving, that is, the fourth target frame position (the state switching position of the target object) is used as the first stop position of the follower object, and the stop following data frame is set based on the fourth target frame position (to ensure that the position corresponding to the last frame of the stop following data frame is the fourth target frame position). Since the state of the follower object follows the state of the target object, the movement of the follower object according to the stop following data frame can be expressed as the follower object following the target object to move to position C and stop, and before position C, it is expressed as a flying state, and at position C, it is expressed as a walking state.
[0110] If the distance between position E and position D is far (greater than the preset stop and follow distance), it means that the target object is far away from the following object when it stops moving. In order to reflect the following of the target object by the following object at the position and state levels, and to prevent the following object from overlapping with the target object when stopping, the stop position of the following object is determined based on position D (the third target frame position), that is, the stop and follow data frame of the following object is determined according to the moving stop position of the target object. For example, based on the moving direction of the target object, a position of the target object at a certain distance from position D is determined as the second stop position F (for example, a position 0.5 meters away from position D in the game scene is determined as the stop position), and a stop and follow data frame is set based on the second stop position. Since the state of the following object follows the state of the target object, the movement of the following object according to the stop and follow data frame can be expressed as the following object following the target object to move to position F and stop, and the following object is in a flying state before position C and in a walking state at and after position C.
[0111] By determining the following data frame through the above three embodiments, the following object can appear to move towards the target object in the initial stage instead of waiting in place, can start smoothly in the starting stage to avoid the stuck state of stopping and starting when completely following the target object, can completely follow the position and state of the target object in the synchronization stage, and can ensure that the state switching process of the target object is fully reflected and stops at a position that does not overlap with the target object in the stop stage. The above methods all have the technical effect of improving the performance of the following object in the following process, improving the user's gaming experience, and the above calculations are performed in conjunction with a high-performance server to ensure accurate calculations without causing performance pressure on the client.
[0112] In addition, in any embodiment of the present application, specifically, if there are multiple following objects, the following order of each following object is determined respectively, and the preset following frame number difference corresponding to each following object is determined according to the following order. Accordingly, the following movement path frame data is sent to the following terminals corresponding to each of the multiple following objects.
[0113] In this embodiment, one target object may correspond to multiple following objects. For example, a game team in a game scene includes three people. The team leader initiates the team following, and the other two team members may follow the team leader. In order to avoid non-overlapping display of each team member during the following process, multiple preset following frame differences may be set for this situation. For example, the following frame difference corresponding to following object 1 is 5, and the following frame difference corresponding to following object 2 is 10. On this basis, according to the following moving path frame data determination method provided in the embodiment of the present application, the following moving path frame data corresponding to each following object is determined respectively, and sent to the corresponding following terminal, so that when multiple characters follow the target object, there will be no role overlap, thereby improving the following display effect.
[0114] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a device for generating frame data, which is applied to a server, such as Figure 5 As shown, the device comprises:
[0115] The synchronous following frame determination module 61 is used to obtain the target moving path frame data corresponding to the target object, and determine the synchronous following data frame corresponding to the following object according to the preset following frame number difference corresponding to the following object and the target moving path frame data, wherein the following frame time corresponding to the synchronous following data frame is the same as the target frame time corresponding to the target data frame, the following frame position corresponding to the synchronous following data frame is determined based on the position of the target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame that differs from the target data frame in the forward direction by the preset following frame number difference;
[0116] The asynchronous following frame determining module 62 is used to perform interpolation processing based on the position corresponding to the target moving path frame data to determine the asynchronous following data frame corresponding to the following object;
[0117] The following frame data generating module 63 is used to generate following movement path frame data corresponding to the following object according to the synchronous following data frame and the asynchronous following data frame.
[0118] In specific application scenarios, such as Figure 6 As shown, the asynchronous follow-up frame determination module 62 specifically includes:
[0119] The initial frame time acquisition unit 6201 is used to acquire a first target frame position and a first target frame time corresponding to a first target data frame in the target moving path frame data, and acquire a first following frame position of a following object, wherein the first target data frame is the first frame in the target moving path frame data;
[0120] The initial frame position determining unit 6202 is used to interpolate based on the first target frame position and the first following frame position to obtain an initial following frame position that matches a preset following frame number difference;
[0121] The initial following frame determining unit 6203 is used to mark the initial following frame time corresponding to the initial following frame position, and determine the initial following data frame in the following moving path frame data, wherein the first initial following frame time is the first target frame time.
[0122] In specific application scenarios, such as Figure 6 As shown, the asynchronous follow-up frame determination module 62 specifically includes:
[0123] The first starting frame data acquisition unit 6204 is used to acquire a first target frame position corresponding to the first target data frame and a second target frame position corresponding to the second target data frame in the target moving path frame data, wherein the second target data frame is a data frame that differs from the first target data frame by a preset number of follow-up frames;
[0124] A starting frame position determining unit 6205 is configured to interpolate based on the first target frame position and the second target frame position to obtain a starting following frame position that matches a preset following frame number difference, wherein the starting following frame position includes the second target frame position;
[0125] The starting frame data determining unit 6206 is used to mark the starting following frame time corresponding to the starting following frame position according to the first target frame time and the second target frame time, and determine the starting following frame data in the following movement path frame data.
[0126] In specific application scenarios, such as Figure 6 As shown, the asynchronous follow-up frame determination module 62 further includes:
[0127] The second starting frame data acquisition unit 6207 is used to acquire all starting target frame positions corresponding to the first target data frame and the second target data frame before interpolation is performed based on the first target frame position and the second target frame position;
[0128] The starting judgment unit 6208 is configured to perform interpolation based on the first target frame position and the second target frame position if there is duplication in the starting target frame position.
[0129] In a specific application scenario, each target data frame included in the target moving path frame data also corresponds to a target frame state, and the follow-up frame state corresponding to the synchronous follow-up data frame is the target frame state corresponding to the target data frame that differs by a preset follow-up frame number before the time-synchronized target data frame.
[0130] In specific application scenarios, such as Figure 6 As shown, each target data frame included in the target moving path frame data also corresponds to a target frame speed; the asynchronous following frame determination module 62 specifically includes:
[0131] The stop frame state acquisition unit 6209 is used to acquire the stop target frame state corresponding to the stop target data frame whose number of difference with the preset follow-up frame number before the third target data frame is equal to when the target frame speed corresponding to any third target data frame in the target data frame is zero;
[0132] The state switching frame acquisition unit 6210 is used to acquire a fourth target data frame whose state has changed when the stop target frame state includes multiple states, and determine a fourth target frame position corresponding to the fourth target data frame;
[0133] The stop frame position acquisition unit 6211 is used to acquire the second following frame position corresponding to the time-synchronized synchronous following data frame according to the third target frame time corresponding to the third target data frame;
[0134] The stop-following frame determining unit 6212 is configured to determine a stop-following data frame corresponding to the follow-up object based on the distance between the second follow-up frame position and the fourth target frame position.
[0135] In a specific application scenario, which is not shown in the figure, the stop-following frame determination unit 6212 specifically includes:
[0136] The first stop-follow frame determination subunit 62121 is used to use the fourth target frame position as the first stop position of the follow object if the distance between the second follow frame position and the fourth target frame position is less than or equal to the preset stop-follow distance, and determine the stop-follow data frame according to the second follow frame position and the first stop position.
[0137] In a specific application scenario, which is not shown in the figure, the stop-following frame determination unit 6212 specifically includes:
[0138] The second stop-follow frame determination subunit 62122 is used to determine the second stop position of the follow-up object based on the third target frame position corresponding to the third target data frame if the distance between the second follow-up frame position and the fourth target frame position is greater than the preset stop-follow distance, and determine the stop-follow data frame according to the second follow-up frame position and the second stop position.
[0139] In specific application scenarios, such as Figure 6 As shown, the device also includes:
[0140] A following frame number difference determining module 64 is used to determine the following order of each following object before acquiring the target moving path frame data corresponding to the target object if there are multiple following objects, and to determine the preset following frame number difference corresponding to each following object according to the following order;
[0141] The following data frame sending module 65 is used to generate the following movement path frame data corresponding to the following object, and then send the following movement path frame data to the corresponding following terminals.
[0142] It should be noted that for other corresponding descriptions of the functional units involved in the device for generating frame data provided in the embodiment of the present application, reference can be made to Figures 1 to 4 The corresponding description in the method will not be repeated here.
[0143] Based on the above Figures 1 to 4 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figures 1 to 4 The method of generating frame data is shown.
[0144] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0145] Based on the above Figures 1 to 4 The method shown, and Figures 5 and 6 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 4 The method of generating frame data is shown.
[0146] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.
[0147] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0148] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.
[0149] Through the description of the above implementation methods, the technicians in this field can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware to implement the server to obtain the target moving path frame data corresponding to the target object, thereby determining the synchronous following data frame and the asynchronous following data frame corresponding to the following object on the basis of the target moving path frame data according to the preset following frame number difference, thereby generating the following moving path frame data, so that the following object can show the following effect of the target object by moving based on the following moving path frame data. Compared with the prior art, the embodiment of the present application transfers the cumbersome process of determining the following moving path frame data to a high-performance server for processing, greatly improving the processing efficiency, avoiding the problem of freezing, frame loss, performance loss, and even the problem of following loss during the following process caused by excessive client performance pressure, and determining the following trajectory position of the following object by interpolation based on the moving trajectory position of the target object, so that the following motion performance effect of the following object is improved. On the other hand, it solves the problem that the prior art cannot realize the following of NPC characters in the game scene, provides technical support for increasing the gameplay in the game development stage, and also provides a guarantee for players to experience more gameplay in the game experience stage, thereby improving the player's game experience and the competitiveness of game products.
[0150] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0151] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A method for generating frame data, applied to a server, characterized in that: include: Receive a game character motion following instruction from a game player client, determine the target object and the following object indicated by the game character motion following instruction; obtain target movement path frame data corresponding to the target object, and determine the synchronous following data frame corresponding to the following object according to a preset following frame number difference corresponding to the following object and the target movement path frame data, wherein the following frame time corresponding to the synchronous following data frame is the same as the target frame time corresponding to the target data frame, the following frame position corresponding to the synchronous following data frame is determined based on the position of the target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame that differs from the target data frame in the forward direction by the preset following frame number difference; An interpolation process is performed based on the position corresponding to the target moving path frame data to determine the asynchronous following data frame corresponding to the following object, wherein the asynchronous following data frame includes a starting following data frame; wherein: a first target frame position corresponding to the first target data frame and a second target frame position corresponding to the second target data frame in the target moving path frame data are obtained, wherein the second target data frame is a data frame after the first target data frame that differs by the preset following frame number difference, and the first target data frame is the first frame in the target moving path frame data; interpolation is performed based on the first target frame position and the second target frame position to obtain a starting following frame position that matches the preset following frame number difference, wherein the starting following frame position includes the second target frame position; a starting following frame time corresponding to the starting following frame position is marked according to the first target frame time and the second target frame time, and the starting following frame data in the following moving path frame data is determined; The following movement path frame data corresponding to the following object is generated according to the synchronous following data frame and the asynchronous following data frame.
2. The method according to claim 1, characterized in that The asynchronous following data frame includes an initial following data frame; and the step of determining the asynchronous following data frame corresponding to the following object specifically includes: Acquire a first target frame position and a first target frame time corresponding to a first target data frame in the target moving path frame data, and acquire a first following frame position of the following object; Performing interpolation based on the first target frame position and the first following frame position to obtain an initial following frame position that matches the preset following frame number difference; The initial following frame time corresponding to the initial following frame position is marked, and the initial following data frame in the following moving path frame data is determined, wherein the first initial following frame time is the first target frame time.
3. The method according to claim 1, characterized in that Before interpolating based on the first target frame position and the second target frame position, the method further includes: Acquire all starting target frame positions corresponding to the first target data frame and the second target data frame; If the starting target frame position is repeated, interpolation is performed based on the first target frame position and the second target frame position.
4. The method according to claim 1, characterized in that Each target data frame included in the target moving path frame data also corresponds to a target frame state, and the follow-up frame state corresponding to the synchronous follow-up data frame is the target frame state corresponding to the target data frame that is before the time-synchronized target data frame and differs by the preset follow-up frame number.
5. The method according to claim 4, characterized in that Each target data frame included in the target moving path frame data further corresponds to a target frame speed, and the asynchronous following data frame includes a stop following data frame; and determining the asynchronous following data frame corresponding to the following object specifically includes: When the target frame speed corresponding to any third target data frame in the target data frames is zero, obtaining a stop target frame state corresponding to a stop target data frame whose number before the third target data frame is equal to the preset follow-up frame number difference; When the stop target frame state includes multiple ones, acquiring a fourth target data frame whose state has changed, and determining a fourth target frame position corresponding to the fourth target data frame; According to the third target frame time corresponding to the third target data frame, acquiring the second follow-up frame position corresponding to the time-synchronized synchronous follow-up data frame; The stop following data frame corresponding to the following object is determined based on the distance between the second following frame position and the fourth target frame position.
6. The method according to claim 5, characterized in that The step of determining the stop-follow data frame corresponding to the follow object specifically includes: If the distance between the second following frame position and the fourth target frame position is less than or equal to a preset stop-following distance, the fourth target frame position is used as the first stop position of the following object, and the stop-following data frame is determined according to the second following frame position and the first stop position.
7. The method according to claim 5, characterized in that The step of determining the stop-follow data frame corresponding to the follow object specifically includes: If the distance between the second following frame position and the fourth target frame position is greater than the preset stop-follow distance, the second stop position of the following object is determined based on the third target frame position corresponding to the third target data frame, and the stop-follow data frame is determined according to the second following frame position and the second stop position.
8. The method according to claim 1, characterized in that If the following object includes multiple objects, before acquiring the target moving path frame data corresponding to the target object, the method further includes: Determine a following order for each of the following objects respectively, and determine a preset following frame number difference corresponding to each of the following objects respectively according to the following order; After generating the following movement path frame data corresponding to the following object, the method further includes: The following movement path frame data is sent to the following terminals corresponding to each of the plurality of following objects.
9. A device for generating frame data, applied to a server, characterized in that: include: A synchronous following frame determination module is used to receive a game character motion following instruction from a game player client, determine a target object and a following object indicated by the game character motion following instruction; obtain target movement path frame data corresponding to the target object, and determine a synchronous following data frame corresponding to the following object according to a preset following frame number difference corresponding to the following object and the target movement path frame data, wherein a following frame time corresponding to the synchronous following data frame is the same as a target frame time corresponding to the target data frame, a following frame position corresponding to the synchronous following data frame is determined based on a position of a target following frame corresponding to the corresponding target data frame, and the target following frame is a data frame that differs from the target data frame in the forward direction by the preset following frame number difference; An asynchronous following frame determination module is used to perform interpolation processing based on the position corresponding to the target moving path frame data to determine the asynchronous following data frame corresponding to the following object, wherein the asynchronous following data frame includes a starting following data frame; wherein: a first target frame position corresponding to the first target data frame and a second target frame position corresponding to the second target data frame in the target moving path frame data are obtained, wherein the second target data frame is a data frame after the first target data frame and differs by the preset following frame number difference, and the first target data frame is the first frame in the target moving path frame data; interpolation is performed based on the first target frame position and the second target frame position to obtain a starting following frame position that matches the preset following frame number difference, wherein the starting following frame position includes the second target frame position; a starting following frame time corresponding to the starting following frame position is marked according to the first target frame time and the second target frame time, and the starting following frame data in the following moving path frame data is determined; The following frame data generating module is used to generate the following movement path frame data corresponding to the following object according to the synchronous following data frame and the asynchronous following data frame.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating frame data according to any one of claims 1 to 8 is implemented.
11. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method for generating frame data according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Character motion following method and device, computing device and storage medium
CN110292773A
Game state synchronization method and device and game state display method and device
CN110694266A
Method and device for generating frame data, storage medium and computer equipment
CN111921201A
Game program and game apparatus
JP2017047028A
Device and method to control game where characters are moved on map
US20090247300A1
