Game control method, device, equipment and storage medium
By acquiring the motion and environmental parameters of virtual vehicles, and using motion curves and animation templates to determine feedback and animation parameters, the performance consumption problem of terminal devices caused by virtual vehicle animation performance is solved, achieving low-consumption and high-experience game control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2026-03-20
AI Technical Summary
In existing technologies, when there are many types of virtual vehicles, using cumbersome and complex dynamic physics algorithms to determine the animation performance will increase the performance consumption of the terminal device.
By acquiring the motion parameters and environmental parameters of virtual vehicles, and using the motion curves and animation templates of preset motion states, feedback parameters and animation parameters are determined to achieve the animation performance of different types of virtual vehicles under the same motion state.
It reduces the performance consumption of terminal devices, while providing different operating feel differences for different types of virtual vehicles under the same motion state, thus improving the player's gaming experience.
Smart Images

Figure CN115569381B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the game technical field, and in particular to a game control method and device, equipment and storage medium. BACKGROUND
[0002] With the improvement of game technology and game quality, virtual vehicles become an indispensable part of many network games (such as QQ racing). Virtual vehicles in network games can include various types, such as off-road vehicles, sports cars, fantasy racing cars, etc.
[0003] It can be understood that when a player controls a virtual vehicle to drive on a track, the virtual vehicle may encounter collision, drift and other motion states. Currently, different types of virtual vehicles need to use complex and cumbersome dynamic physical algorithms to determine the animation performance of different types of virtual vehicles in different motion states.
[0004] However, there are many types of virtual vehicles in network games, and if each virtual vehicle needs to use complex and cumbersome dynamic physical algorithms to determine the corresponding animation performance, the performance consumption of the terminal device will be increased. SUMMARY
[0005] The present application aims to solve the above problems in the prior art, and provides a game control method, device, equipment and storage medium, which can reduce the performance consumption of the terminal device.
[0006] To achieve the above object, the technical scheme adopted by the embodiments of the present application is as follows:
[0007] In a first aspect, the embodiments of the present application provide a game control method, which comprises:
[0008] In response to the target virtual vehicle being in a preset motion state, obtaining the motion parameters of the target virtual vehicle and the environmental parameters, the environmental parameters including the suspension type parameters of the target virtual vehicle;
[0009] According to the motion parameters of the target virtual vehicle, the environmental parameters and the motion curve corresponding to the preset motion state, determining the feedback parameters of the target virtual vehicle, the motion curve corresponding to the preset motion state being used to represent the change of the feedback parameters with the motion parameters and the environmental parameters in the preset motion state;
[0010] According to the feedback parameters and the animation template corresponding to the preset motion state, determining the animation parameters;
[0011] According to the animation parameters, displaying the motion picture of the target virtual vehicle.
[0012] In a second aspect, the embodiments of the present application further provide a game control device, the device comprising:
[0013] The acquisition module is configured to, in response to the target virtual vehicle being in a preset motion state, acquire a motion parameter of the target virtual vehicle and an environment parameter, the environment parameter comprising a suspension type parameter of the target virtual vehicle.
[0014] The first determination module is configured to determine a feedback parameter of the target virtual vehicle according to the motion parameter of the target virtual vehicle, the environment parameter, and a motion curve graph corresponding to the preset motion state, the motion curve graph corresponding to the preset motion state being used to represent a change of the feedback parameter with the motion parameter and the environment parameter in the preset motion state.
[0015] The second determination module is configured to determine an animation parameter according to the feedback parameter and an animation template corresponding to the preset motion state.
[0016] The display module is configured to display a motion picture of the target virtual vehicle according to the animation parameter.
[0017] In a third aspect, the embodiments of the present application provide an electronic device, comprising a processor, a storage medium, and a bus, the storage medium storing machine readable instructions executable by the processor, the processor and the storage medium communicating through the bus when the electronic device is running, the processor executing the machine readable instructions to perform the steps of the game control method of the first aspect.
[0018] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by the processor to perform the steps of the game control method of the first aspect.
[0019] The present application has the following beneficial effects:
[0020] The embodiments of the present application provide a game control method, device, equipment, and storage medium, the method comprising: in response to a target virtual vehicle being in a preset motion state, acquiring a motion parameter of the target virtual vehicle and an environment parameter, the environment parameter comprising a suspension type parameter of the target virtual vehicle; determining a feedback parameter of the target virtual vehicle according to the motion parameter of the target virtual vehicle, the environment parameter, and a motion curve graph corresponding to the preset motion state, the motion curve graph corresponding to the preset motion state being used to represent a change of the feedback parameter with the motion parameter and the environment parameter in the preset motion state; determining an animation parameter according to the feedback parameter and an animation template corresponding to the preset motion state; and displaying a motion picture of the target virtual vehicle according to the animation parameter.
[0021] By using the game control method provided in the embodiments of the present application, after the feedback parameter of the target virtual vehicle is determined according to the motion parameter, the environmental parameter and the motion curve diagram corresponding to the preset motion state of the target virtual vehicle, the motion picture of the target virtual vehicle is displayed by using the animation parameter determined based on the animation template corresponding to the preset motion state. That is, different types of virtual vehicles correspond to the same animation template in the same motion state. For each motion state, only one animation effect can be made, and then the animation performance of different types of virtual vehicles in different motion states can be realized by using a small amount of animation resources, so that the performance consumption of the terminal device can be reduced.
[0022] Meanwhile, the feedback parameter corresponding to the target virtual vehicle can be determined according to the suspension type parameter, the motion parameter and the motion curve diagram corresponding to the preset motion state of the target virtual vehicle, that is, different types of virtual vehicles correspond to different suspension type parameters, and then the feedback parameters obtained are also different, that is, different types of virtual vehicles correspond to different feedback parameters. Based on this, for the same preset motion state, the animation parameters corresponding to different types of virtual vehicles can be determined according to the feedback parameters corresponding to different types of virtual vehicles and the animation template corresponding to the preset motion state, so that different motion pictures of different types of virtual vehicles are displayed in the same preset motion state, that is, different performances can be achieved, the operation feeling difference can be created for the players, and the game experience of the players can be improved. That is, the operation feeling difference can be created for the players under the premise of reducing the performance consumption of the terminal device. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0024] Figure 1 A flowchart of a game control method provided by the embodiments of the present application;
[0025] Figure 2 A flowchart of another game control method provided by the embodiments of the present application;
[0026] Figure 3 A flowchart of another game control method provided by the embodiments of the present application;
[0027] Figure 4 A flowchart of another game control method provided by the embodiments of the present application;
[0028] Figure 5A flowchart of another game control method provided by an embodiment of the present application is shown in FIG. 2;
[0029] Figure 6 A structural diagram of a game control device provided by an embodiment of the present application is shown in FIG. 3;
[0030] Figure 7 A structural diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0032] Therefore, the detailed description of the embodiments of the present application provided below in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts are within the scope of protection of the present application.
[0033] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, thus, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0034] The game control method in one of the embodiments of the present application can run on a local terminal device or a server. When the game control method runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes the server and a client device.
[0035] In an optional embodiment, various cloud applications can run under the cloud interaction system, for example, cloud gaming. Taking cloud gaming as an example, cloud gaming refers to a game mode based on cloud computing. In the running mode of cloud gaming, the running subject of the game program and the presentation subject of the game picture are separated, and the storage and running of the game control method are completed on the cloud gaming server. The client device is used for receiving and sending data and presenting the game picture. For example, the client device can be a display device close to the user side with data transmission function, such as a mobile terminal, a television, a computer, a palm computer, etc. However, the cloud gaming server in the cloud end performs information processing when playing the game. The player operates the client device to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game picture and other data, returns the data to the client device through the network, and finally decodes and outputs the game picture through the client device.
[0036] In an optional embodiment, taking a game as an example, the local terminal device stores a game program and is used for presenting a game picture. The local terminal device is used for interacting with the player through a graphical user interface, that is, a conventional game program is downloaded and installed on an electronic device and is run. The way in which the local terminal device provides the graphical user interface to the player can include various ways, for example, the graphical user interface can be rendered and displayed on the display screen of the terminal, or the graphical user interface can be provided to the player through holographic projection. For example, the local terminal device can include a display screen used for presenting a graphical user interface including a game picture and a processor used for running the game, generating the graphical user interface and controlling the display of the graphical user interface on the display screen.
[0037] In a possible embodiment, the embodiment of the present application provides a game control method, which provides a graphical user interface through a terminal device. The terminal device can be the local terminal device mentioned above or the client device in the cloud interaction system mentioned above.
[0038] The game control method mentioned in the present application is exemplarily illustrated as follows in combination with the drawings. The execution subject of the method is the terminal device mentioned above, and the terminal device can render and display a graphical user interface of a game. It should be noted that the game can be a multiplayer competitive game or other types of games, which are not limited by the present application.
[0039] The game control method mentioned in the present application is exemplarily illustrated as follows in combination with the drawings. Figure 1 A flowchart of a game control method provided by the embodiment of the present application is shown in FIG. 1. Figure 1 The method can include the following steps.
[0040] S101, in response to the target virtual vehicle being in a preset motion state, obtaining a motion parameter and an environment parameter of the target virtual vehicle.
[0041] The environment parameter includes a suspension type parameter of the target virtual vehicle, and the suspension type parameter can represent a type of the target virtual vehicle. For example, the type of the virtual vehicle in the racing game can include an off-road vehicle, a sports car, a family car, and the like, which are not limited in the present application. It can be understood that the suspension of the off-road vehicle is generally higher, and the corresponding suspension type parameter is larger, the suspension of the sports car is generally lower, and the corresponding suspension type parameter is smaller, and the suspension of the family car is moderate, and the corresponding suspension type parameter is generally larger than the corresponding suspension type parameter of the sports car and smaller than the corresponding suspension type parameter of the off-road vehicle.
[0042] For example, each type of virtual vehicle can correspond to a suspension type parameter interval, and a suspension type parameter (which can be represented by parameter d) is selected from the corresponding suspension type parameter interval according to actual needs as the suspension type parameter corresponding to the type of the virtual vehicle. Another example is that each type of virtual vehicle can directly correspond to a suspension type parameter. It should be noted that the present application is not limited thereto.
[0043] The preset motion state pre-stored in the terminal device can include a collision state, a drift state, a flying state, and the like, which are not limited in the present application. In an implementable embodiment, the terminal device monitors the motion state of the target virtual vehicle controlled by the target player in the racing game in real time, and if the terminal device determines that the current motion state of the target virtual vehicle is the pre-stored preset motion state (such as the collision state) according to the current game data of the target virtual vehicle, the terminal device can obtain the motion parameter of the target virtual vehicle, which can be used to represent the instantaneous speed of the target virtual vehicle, and the terminal device can determine the suspension type parameter of the target virtual vehicle according to the mapping relationship between the type of the virtual vehicle and the suspension type parameter.
[0044] S102, determining a feedback parameter of the target virtual vehicle according to the motion parameter, the environment parameter, and a motion curve corresponding to the preset motion state of the target virtual vehicle.
[0045] The motion curve corresponding to the preset motion state is used to represent the change of the feedback parameter with the motion parameter and the environment parameter under the preset motion state.
[0046] Exemplarily, the memory associated with the terminal device has pre-stored motion curve graphs corresponding to each preset motion state, the abscissa in the motion curve graph is related to the motion parameter and the environmental parameter, after the abscissa is determined, the ordinate corresponding to the abscissa can be taken as the feedback parameter. The abscissa in the motion curve graph corresponding to the preset motion state is obtained according to the motion parameter and the suspension type parameter of the target virtual vehicle included in the environmental parameter of the target virtual vehicle, and then the feedback coefficient of the target virtual vehicle is obtained based on the corresponding relationship between the abscissa and the ordinate in the motion curve graph.
[0047] S103, determining the animation parameter according to the feedback parameter and the animation template corresponding to the preset motion state.
[0048] S104, displaying the motion picture of the target virtual vehicle according to the animation parameter.
[0049] Exemplarily, the memory associated with the terminal device has pre-stored animation templates corresponding to each preset motion state, when it is determined that the target virtual vehicle is currently in a certain preset motion state, the animation template corresponding to the preset motion state can be obtained according to the pre-stored animation templates corresponding to each preset motion state in the memory. It can be understood that the terminal device can display the motion pictures of virtual vehicles of different types based on the animation parameters determined by the same animation template in the same motion state of the virtual vehicles. The animation template corresponding to the preset motion state can be understood as an extreme action animation of the virtual vehicle in the preset motion state, and correspondingly, the animation template corresponding to the preset motion state includes the extreme animation parameter of the virtual vehicle in the extreme case. After the feedback parameter of the target virtual vehicle is determined, the feedback parameter can be taken as the weight of the extreme animation parameter of the virtual vehicle to determine the current animation parameter of the target virtual vehicle, that is, the product of the extreme animation parameter of the virtual vehicle and the feedback parameter is taken as the current animation parameter of the target virtual vehicle.
[0050] Here, the target virtual vehicle is currently in a drift state as an example, the animation template corresponding to the drift state can be understood as a turning bias animation of the target virtual vehicle in the extreme case in the drift state, and correspondingly, the animation template corresponding to the drift state of the target virtual vehicle includes the extreme motion animation parameter, which can be the maximum inclination angle of the target virtual vehicle, such as ∠30. Then, if the feedback parameter of the target virtual vehicle is 0.5, the current animation parameter of the target virtual vehicle is half of the maximum inclination angle mentioned above, that is, ∠15.
[0051] Exemplarily, after determining the current animation parameter of the target virtual vehicle, the terminal device can adjust the limit animation parameter in the animation template corresponding to the preset motion state to the current animation parameter of the target virtual vehicle, and display the adjusted animation template on the graphical user interface of the racing game. For example, the motion picture of the target virtual vehicle in the drifting state is displayed on the graphical user interface.
[0052] In summary, in the game control method provided by the application, after determining the feedback parameter of the target virtual vehicle according to the motion parameter, the environmental parameter and the motion curve corresponding to the preset motion state of the target virtual vehicle, the motion picture of the target virtual vehicle is displayed by using the animation parameter determined by combining the animation template corresponding to the preset motion state. That is, different types of virtual vehicles correspond to the same animation template in the same motion state. For each motion state, only one animation effect is made, and then a small amount of animation resources can be used to realize the animation performance of different types of virtual vehicles in different motion states, so that the performance consumption of the terminal device can be reduced.
[0053] Meanwhile, the feedback parameter corresponding to the target virtual vehicle can be determined according to the suspension type parameter, the motion parameter and the motion curve corresponding to the preset motion state, that is, different types of virtual vehicles correspond to different suspension type parameters, and the feedback parameters obtained are also different, that is, different types of virtual vehicles correspond to different feedback parameters. Based on this, for the same preset motion state, the animation parameter corresponding to different types of virtual vehicles can be determined according to the feedback parameter corresponding to different types of virtual vehicles and the animation template corresponding to the preset motion state, so that different types of virtual vehicles display different motion pictures in the same preset motion state, that is, different performances can be obtained, the difference in operation feeling can be created for players, and the game experience of players can be improved. That is, the application can create the difference in operation feeling for players under the premise of reducing the performance consumption of the terminal device.
[0054] Figure 2 Another flowchart of a game control method provided by an embodiment of the application is shown. Optionally, as shown in Figure 2 determining the feedback parameter of the target virtual vehicle according to the motion parameter, the environmental parameter and the motion curve corresponding to the preset motion state of the target virtual vehicle, includes:
[0055] S201, determining the independent point in the motion curve corresponding to the preset motion state according to the motion parameter and the environmental parameter of the target virtual vehicle.
[0056] The motion curve graph corresponding to the preset motion state is first introduced here. It can be understood that different motion states correspond to different motion curve graphs. Exemplarily, the first feedback sub-parameter corresponding to each suspension type parameter in the preset motion state can be determined according to the suspension type parameters of the plurality of virtual vehicles and the mapping relationship corresponding to the preset motion state, the second feedback sub-parameter corresponding to the preset motion speed in the preset motion state can be determined according to the preset motion speed of each virtual vehicle and the mapping relationship corresponding to the preset motion state, a plurality of independent points can be generated according to each suspension type parameter and the preset motion speed, the dependent point corresponding to each independent point can be generated according to the first feedback sub-parameter and the second feedback sub-parameter corresponding to each independent point, wherein each dependent point represents a feedback parameter, and the motion curve graph corresponding to the preset motion state can be generated according to each independent point and the dependent point corresponding to each independent point. The generation process of the motion curve graph corresponding to other motion states can be referred to the above description, which will not be described here.
[0057] In the process, after the motion parameters and the environmental parameters of the target virtual vehicle are obtained, the independent point in the motion curve graph corresponding to the current motion state (the preset motion state) of the target virtual vehicle can be obtained according to the instantaneous speed corresponding to the motion parameters and the suspension type parameter of the target virtual vehicle included in the environmental parameters.
[0058] S202, according to the independent point in the motion curve graph corresponding to the preset motion state, the dependent point corresponding to the independent point in the motion curve graph is searched.
[0059] S203, the value of the dependent point is taken as the feedback parameter of the target virtual vehicle.
[0060] It can be understood that the independent point and the dependent point in the motion curve graph corresponding to the preset motion state have a one-to-one correspondence. After the independent point is determined, the dependent point corresponding to the independent point can be determined based on the motion curve graph corresponding to the preset motion state, and then the feedback parameter of the target virtual vehicle is the value of the dependent point.
[0061] Optionally, the above-mentioned determining the independent point in the motion curve graph corresponding to the preset motion state according to the motion parameters and the environmental parameters of the target virtual vehicle includes: mapping the motion parameters of the target virtual vehicle into a first parameter according to the mapping relationship corresponding to the preset motion state; mapping the environmental parameters into a second parameter according to the mapping relationship corresponding to the preset motion state; determining the product of the first parameter and the second parameter; and taking the independent point corresponding to the product of the first parameter and the second parameter as the independent point in the motion curve graph corresponding to the preset motion state.
[0062] It should be understood that different motion states correspond to different mapping relationships. Here, we will use the mapping relationship corresponding to this preset motion state as an example. This preset motion state mapping relationship can be understood as mapping parameters to values in the 0-1 range. After obtaining the current instantaneous speed (motion parameter) of the target virtual vehicle, this instantaneous speed can be mapped to a 0-1 value (i.e., the first parameter) based on the mapping relationship corresponding to this preset motion state. Similarly, based on the suspension type parameter of the target virtual vehicle included in the environmental parameters, a second parameter with a value in the 0-1 range can be obtained. Multiplying the first parameter and the second parameter, the product is used as the independent variable point in the motion curve graph corresponding to this preset motion state.
[0063] Optionally, it can be determined whether the current motion state of the target virtual vehicle (i.e., the preset motion state) is track-related, such as drifting being track-related and collision being track-independent. If the current motion state of the target virtual vehicle is track-related, then the environmental parameters also include the track type parameter of the target virtual vehicle. Understandably, the track type parameter characterizes the track conditions; the better the road conditions, the larger the track type parameter. For example, asphalt roads correspond to smaller track type parameters, while dirt roads correspond to larger track type parameters.
[0064] Figure 3 This is a flowchart illustrating another game control method provided in an embodiment of this application. Optionally, as... Figure 3 As shown, the above mapping of environmental parameters to a second parameter based on the preset motion state mapping relationship includes:
[0065] S301. Determine the spring stiffness parameters of the target virtual vehicle based on the suspension type parameters of the target virtual vehicle in the environmental parameters.
[0066] As described above, the suspension type parameter of the target virtual vehicle can be represented by d. Given a fixed suspension type parameter d, the spring stiffness parameter K of the target virtual vehicle is calculated using the following formula, combined with a preset spring coefficient E and the number of coil windings N:
[0067]
[0068] It can be seen that there is a direct proportional relationship between the suspension type parameter d and the spring stiffness parameter K of the target virtual vehicle. Therefore, the spring stiffness parameter K can be controlled by adjusting the suspension type parameter d. This simplifies the calculation process of the spring stiffness parameter K, achieving low power consumption on the terminal device side.
[0069] S302. Determine the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle.
[0070] S303, mapping the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle to the second parameter according to the mapping relationship corresponding to the preset motion state.
[0071] In the determination of the spring stiffness parameter of the target virtual vehicle, the track type parameter corresponding to the track where the target virtual vehicle is currently located is multiplied to obtain a multiplication result. Based on the mapping relationship corresponding to the preset motion state, the multiplication result can be mapped to a value of 0-1 (i.e. the second parameter).
[0072] Figure 4 Another flowchart of a game control method provided by the embodiments of the present application is shown in FIG. 6. As shown in FIG. 6, Figure 4 Optionally, the displaying the motion picture of the target virtual vehicle according to the animation parameter includes:
[0073] S401, adjusting the animation template corresponding to the preset motion state according to the animation parameter to generate a motion image.
[0074] S402, displaying the motion picture of the target virtual vehicle based on the motion image.
[0075] The animation parameter has different meanings in different preset motion states. For example, when the preset motion state is a drift state, the corresponding animation parameter is the inclination angle of the target virtual vehicle, and when the preset motion state is a collision state, the corresponding animation parameter is the rotation angle of the target virtual vehicle. Here, the preset motion state is taken as the drift state as an example. The drift state corresponds to an animation template in the limit condition, i.e. a limit animation image, which includes a limit animation parameter. As an example, the limit animation parameter corresponding to the limit animation image is adjusted to the current animation parameter of the target virtual vehicle to generate a motion image. The motion image is displayed on the graphical user interface, and the motion picture of the target virtual vehicle in the collision state is displayed.
[0076] As described above, the present application introduces adjustable parameters (such as suspension type parameters and track type parameters) to dynamically adjust the suspension of the virtual vehicle, i.e. the motion performance. That is, the suspension characteristics of the virtual vehicle in the racing game can be designed according to the player's needs to improve the entertainment of the racing game.
[0077] Optionally, the adjusting the animation template corresponding to the preset motion state according to the animation parameter to generate a motion image includes: determining the animation parameter corresponding to each frame according to the animation parameter and a preset frame number; and adjusting the animation template corresponding to the preset motion state according to the animation parameter corresponding to each frame to generate a motion image corresponding to each frame.
[0078] The preset frame number can be understood as the frame number of the virtual vehicle from the current motion picture to the target motion picture in the preset motion state, and the target motion picture is an image including animation parameters obtained according to the feedback parameters. Here, the preset motion state is taken as the drift state as an example. The animation parameters (i.e., the inclination angle) of the target virtual vehicle obtained according to the feedback parameters can be processed based on the preset frame number to obtain the inclination angle corresponding to each frame. Assuming that the animation parameters of the target virtual vehicle obtained according to the feedback parameters are ∠15, and the preset frame number is 3, the three frames of images include the current motion picture, the transition motion picture and the target motion picture. It can be understood that the inclination angle corresponding to the current motion picture is ∠0, and the inclination angle corresponding to the target motion picture is ∠15. The inclination angle corresponding to the target motion picture is ∠15, which is averaged to obtain the inclination angle corresponding to the transition motion picture, which is ∠7.5. After obtaining the animation parameters corresponding to each frame, the limit animation parameters in the animation template corresponding to the drift motion state can be adjusted to ∠0, ∠7.5 and ∠15 respectively to generate the motion images corresponding to each frame.
[0079] Optionally, the displaying the motion picture of the target virtual vehicle based on the motion images includes: displaying the motion picture of the target virtual vehicle based on the motion images corresponding to each frame and the display order corresponding to each frame.
[0080] Continuing the above example, the motion images corresponding to each frame include the current motion picture, the transition motion picture and the target motion picture. The current motion picture, the transition motion picture and the target motion picture are displayed in order on the graphical user interface in the order of inclination angle from small to large (i.e., the display order corresponding to each frame), thereby forming the motion picture of the target virtual vehicle in the drift state.
[0081] As can be seen, the present application can obtain the motion picture including multiple images of the target virtual vehicle in the current motion state by using only one animation template, that is, a small amount of animation resources can be used to realize the rich dynamic suspension performance of the virtual vehicle.
[0082] Figure 5 Another flowchart of a game control method provided by an embodiment of the present application is provided. As shown in Figure 5 Optionally, the adjusting the animation template corresponding to the preset motion state according to the animation parameters to generate the motion images includes:
[0083] S501, if the preset motion state is a collision state, obtaining the collision position of the target virtual vehicle.
[0084] S502, adjusting the animation template corresponding to the preset motion state according to the collision position of the target virtual vehicle and the animation parameters to generate the motion images.
[0085] Exemplarily, if the preset motion state is a collision state, the terminal device determines a collision position of the target virtual vehicle according to the obtained game data, and the collision position can include a left front collision, a left collision, a left rear collision, a right collision, and the like. It should be noted that the collision position is not limited in the present application.
[0086] Optionally, the animation parameter corresponding to the collision position is determined according to the collision position of the target virtual vehicle and the animation parameter; and the animation template corresponding to the preset motion state is adjusted according to the animation parameter corresponding to the collision position, so as to generate the motion image.
[0087] Exemplarily, if it is determined that collision performance needs to be performed at multiple collision positions of the target virtual vehicle according to the collision position of the target virtual vehicle, the animation parameter can be processed by averaging according to the number of collision positions, so as to obtain the animation parameter corresponding to each collision position. The limit animation parameter of each collision position in the animation template corresponding to the collision state is adjusted to the animation parameter corresponding to each collision position respectively, and then the motion image is obtained. In this way, the performance of the racing game can be enriched, and the interest of the racing game can be improved.
[0088] Figure 6 A structural schematic diagram of a game control device provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the device includes: Figure 6
[0089] The obtaining module 601 is configured to, in response to the target virtual vehicle being in a preset motion state, obtain a motion parameter of the target virtual vehicle and an environment parameter, and the environment parameter includes a suspension type parameter of the target virtual vehicle.
[0090] The first determining module 602 is configured to determine a feedback parameter of the target virtual vehicle according to the motion parameter of the target virtual vehicle, the environment parameter, and a motion curve graph corresponding to the preset motion state, and the motion curve graph corresponding to the preset motion state is used to represent a change of the feedback parameter with the motion parameter and the environment parameter in the preset motion state.
[0091] The second determining module 603 is configured to determine an animation parameter according to the feedback parameter and an animation template corresponding to the preset motion state.
[0092] The display module 604 is configured to display a motion image of the target virtual vehicle according to the animation parameter.
[0093] Optionally, the first determining module 602 is specifically configured to determine an independent point in the motion curve graph corresponding to the preset motion state according to the motion parameter of the target virtual vehicle and the environment parameter, find a dependent point corresponding to the independent point in the motion curve graph, and take a value of the dependent point as the feedback parameter of the target virtual vehicle.
[0094] Optionally, the first determining module 602 is further configured to map the motion parameter of the target virtual vehicle to a first parameter according to a mapping relationship corresponding to the preset motion state, map the environment parameter to a second parameter according to the mapping relationship corresponding to the preset motion state, determine a product of the first parameter and the second parameter, and take an independent variable point corresponding to the product of the first parameter and the second parameter as an independent variable point in a motion curve diagram corresponding to the preset motion state.
[0095] Optionally, the environment parameter further includes a track type parameter of the target virtual vehicle.
[0096] Correspondingly, the first determining module 602 is further configured to determine a spring stiffness parameter of the target virtual vehicle according to a suspension type parameter of the target virtual vehicle in the environment parameter, determine a product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle, and map the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle to a second parameter according to the mapping relationship corresponding to the preset motion state.
[0097] Optionally, the display module 604 is configured to adjust the animation template corresponding to the preset motion state according to the animation parameter, generate a motion image, and display a motion picture of the target virtual vehicle based on the motion image.
[0098] Optionally, the display module 604 is configured to determine an animation parameter corresponding to each frame according to the animation parameter and a preset frame number, adjust the animation template corresponding to the preset motion state according to the animation parameter corresponding to each frame, generate a motion image corresponding to each frame, and display a motion picture of the target virtual vehicle based on the motion image corresponding to each frame and a display order corresponding to each frame.
[0099] Optionally, the display module 604 is further configured to, if the preset motion state is a collision state, obtain a collision position of the target virtual vehicle, and adjust the animation template corresponding to the preset motion state according to the collision position of the target virtual vehicle and the animation parameter, to generate a motion image.
[0100] Optionally, the display module 604 is further configured to determine an animation parameter corresponding to the collision position according to the collision position of the target virtual vehicle and the animation parameter, and adjust the animation template corresponding to the preset motion state according to the animation parameter corresponding to the collision position, to generate a motion image.
[0101] The above apparatus is used to execute the method provided by the foregoing embodiments, and has similar implementation principles and technical effects, which are not described here in detail.
[0102] The modules above can be one or more integrated circuits configured to implement the methods above, for example, one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when a certain module above is implemented in the form of a processing element scheduling code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of invoking code. For another example, the modules can be integrated together to be implemented in the form of a system-on-a-chip (SOC).
[0103] Figure 7 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in FIG. 1. The electronic device can include a processor 701, a storage medium 702, and a bus 703. The storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device is running, the processor 701 communicates with the storage medium 702 through the bus 703. The processor 701 executes the machine-readable instructions to perform the following steps: Figure 7
[0104] In a feasible implementation, when executing the game control method, the processor 701 is specifically configured to: in response to the target virtual vehicle currently being in a preset motion state, acquire a motion parameter of the target virtual vehicle and an environment parameter, the environment parameter including a suspension type parameter of the target virtual vehicle; determine a feedback parameter of the target virtual vehicle according to the motion parameter of the target virtual vehicle, the environment parameter, and a motion curve graph corresponding to the preset motion state, the motion curve graph corresponding to the preset motion state being used to represent a change of the feedback parameter with the motion parameter and the environment parameter in the preset motion state; determine an animation parameter according to the feedback parameter and an animation template corresponding to the preset motion state; and display a motion picture of the target virtual vehicle according to the animation parameter.
[0105] In a feasible implementation, when executing the game control method, the processor 701 is specifically configured to: determine an independent variable point in the motion curve graph corresponding to the preset motion state according to the motion parameter of the target virtual vehicle and the environment parameter; find a dependent variable point corresponding to the independent variable point in the motion curve graph according to the independent variable point in the motion curve graph corresponding to the preset motion state; and take a value of the dependent variable point as the feedback parameter of the target virtual vehicle.
[0106] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: mapping the motion parameter of the target virtual vehicle to a first parameter according to a mapping relationship corresponding to the preset motion state; mapping the environment parameter to a second parameter according to the mapping relationship corresponding to the preset motion state; determining a product of the first parameter and the second parameter; and taking an independent point corresponding to the product of the first parameter and the second parameter as an independent point in a motion curve diagram corresponding to the preset motion state.
[0107] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: determining a spring stiffness parameter of the target virtual vehicle according to a suspension type parameter of the target virtual vehicle in the environment parameter; determining a product of the spring stiffness parameter of the target virtual vehicle and a track type parameter of the target virtual vehicle; and mapping the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle to a second parameter according to the mapping relationship corresponding to the preset motion state.
[0108] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: adjusting an animation template corresponding to the preset motion state according to the animation parameter to generate a motion image; and displaying a motion picture of the target virtual vehicle based on the motion image.
[0109] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: determining an animation parameter corresponding to each frame according to the animation parameter and a preset frame number; adjusting an animation template corresponding to the preset motion state according to the animation parameter corresponding to each frame to generate a motion image corresponding to each frame; and displaying a motion picture of the target virtual vehicle based on the motion image corresponding to each frame and a display order corresponding to each frame.
[0110] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: if the preset motion state is a collision state, obtaining a collision position of the target virtual vehicle; and adjusting an animation template corresponding to the preset motion state according to the collision position of the target virtual vehicle and the animation parameter to generate a motion image.
[0111] In an implementation, the processor 701 is configured to, when executing the game control method, specifically for: determining an animation parameter corresponding to the collision position according to the collision position of the target virtual vehicle and the animation parameter; and adjusting an animation template corresponding to the preset motion state according to the animation parameter corresponding to the collision position to generate a motion image.
[0112] Optionally, the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is run by a processor, the processor executes the following steps:
[0113] In an implementation, the processor, when executing the game control method, is specifically configured to: in response to the target virtual vehicle being in a preset motion state, acquire a motion parameter of the target virtual vehicle and an environment parameter, the environment parameter including a suspension type parameter of the target virtual vehicle; determine a feedback parameter of the target virtual vehicle according to the motion parameter of the target virtual vehicle, the environment parameter, and a motion curve corresponding to the preset motion state, the motion curve corresponding to the preset motion state being used to represent a change of the feedback parameter with the motion parameter and the environment parameter in the preset motion state; determine an animation parameter according to the feedback parameter and an animation template corresponding to the preset motion state; and display a motion image of the target virtual vehicle according to the animation parameter.
[0114] In an implementation, the processor, when executing the game control method, is specifically configured to: determine an independent variable point in a motion curve corresponding to a preset motion state according to a motion parameter of a target virtual vehicle and an environment parameter; find a dependent variable point corresponding to the independent variable point in the motion curve according to the independent variable point in the motion curve corresponding to the preset motion state; and take a value of the dependent variable point as a feedback parameter of the target virtual vehicle.
[0115] In an implementation, the processor, when executing the game control method, is specifically configured to: map the motion parameter of the target virtual vehicle to a first parameter according to a mapping relationship corresponding to a preset motion state; map the environment parameter to a second parameter according to the mapping relationship corresponding to the preset motion state; determine a product of the first parameter and the second parameter; and take an independent variable point corresponding to the product of the first parameter and the second parameter as an independent variable point in a motion curve corresponding to the preset motion state.
[0116] In an implementation, the processor, when executing the game control method, is specifically configured to: determine a spring stiffness parameter of a target virtual vehicle according to a suspension type parameter of the target virtual vehicle in the environment parameter; determine a product of the spring stiffness parameter of the target virtual vehicle and a track type parameter of the target virtual vehicle; and map the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle to a second parameter according to a mapping relationship corresponding to a preset motion state.
[0117] In an implementation, the processor, when executing the game control method, is specifically configured to: adjust an animation template corresponding to a preset motion state according to an animation parameter to generate a motion image; and display a motion image of a target virtual vehicle based on the motion image.
[0118] In a feasible implementation, the processor, when executing the game control method, specifically for: determining the animation parameter corresponding to each frame according to the animation parameter and the preset frame number; adjusting the animation template corresponding to the preset motion state according to the animation parameter corresponding to each frame, to generate the motion image corresponding to each frame; and displaying the motion picture of the target virtual vehicle based on the motion image corresponding to each frame and the display order corresponding to each frame.
[0119] In a feasible implementation, the processor, when executing the game control method, specifically for: if the preset motion state is a collision state, obtaining the collision position of the target virtual vehicle; and adjusting the animation template corresponding to the preset motion state according to the collision position of the target virtual vehicle and the animation parameter, to generate the motion image.
[0120] In a feasible implementation, the processor, when executing the game control method, specifically for: determining the animation parameter corresponding to the collision position according to the collision position of the target virtual vehicle and the animation parameter; and adjusting the animation template corresponding to the preset motion state according to the animation parameter corresponding to the collision position, to generate the motion image.
[0121] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented by other manners. For example, the apparatus embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, apparatuses or units, which can be electrical, mechanical or other forms.
[0122] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0123] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0124] The integrated unit implemented in the form of software functional units can be stored in a computer readable storage medium. The software functional unit is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in various embodiments of the present application. And the foregoing storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, for short: ROM), random access memory (English: Random Access Memory, for short: RAM), magnetic disk or optical disk and various program code storage media.
[0125] It should be noted that, in this paper, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0126] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: similar reference numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above only describes the preferred embodiments of the present application and is not intended to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A game control method, characterized in that, The method includes: In response to the target virtual vehicle being in a preset motion state, the motion parameters and environmental parameters of the target virtual vehicle are obtained. The environmental parameters include the suspension type parameters and track type parameters of the target virtual vehicle. The preset motion state is a collision state, a drift state, or a jump state. Based on the motion parameters, environmental parameters, and motion curves corresponding to the preset motion state of the target virtual vehicle, the feedback parameters of the target virtual vehicle are determined. The motion curves corresponding to the preset motion state are used to characterize how the feedback parameters change with the motion parameters and environmental parameters under the preset motion state. The animation parameters are determined based on the feedback parameters and the animation template corresponding to the preset motion state; Display the motion animation of the target virtual vehicle according to the animation parameters; The animation template corresponding to the preset motion state includes: extreme animation parameters for the virtual vehicle under extreme conditions. Determining the animation parameters based on the feedback parameters and the animation template corresponding to the preset motion state includes: The feedback parameters are used as weights for the extreme animation parameters corresponding to the virtual vehicle to determine the current animation parameters of the target virtual vehicle.
2. The method according to claim 1, characterized in that, The step of determining the feedback parameters of the target virtual vehicle based on the motion parameters of the target virtual vehicle, environmental parameters, and the motion curve corresponding to the preset motion state includes: Based on the motion parameters and environmental parameters of the target virtual vehicle, determine the independent variable point in the motion curve corresponding to the preset motion state; Based on the independent point in the motion curve graph corresponding to the preset motion state, find the dependent point corresponding to the independent point in the motion curve graph. The value of the dependent variable point is used as the feedback parameter of the target virtual vehicle.
3. The method according to claim 2, characterized in that, The step of determining the independent variable point in the motion curve corresponding to the preset motion state based on the motion parameters and environmental parameters of the target virtual vehicle includes: Based on the mapping relationship corresponding to the preset motion state, the motion parameters of the target virtual vehicle are mapped to the first parameter; Based on the mapping relationship corresponding to the preset motion state, the environmental parameters are mapped to the second parameters; Determine the product of the first parameter and the second parameter; The independent point corresponding to the product of the first parameter and the second parameter is taken as the independent point in the motion curve diagram corresponding to the preset motion state.
4. The method according to claim 3, characterized in that, The step of mapping the environmental parameters to a second parameter according to the mapping relationship corresponding to the preset motion state includes: Based on the suspension type parameter of the target virtual vehicle in the environmental parameters, determine the spring stiffness parameter of the target virtual vehicle; Determine the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle; Based on the mapping relationship corresponding to the preset motion state, the product of the spring stiffness parameter of the target virtual vehicle and the track type parameter of the target virtual vehicle is mapped to the second parameter.
5. The method according to any one of claims 1-4, characterized in that, The step of displaying the motion image of the target virtual vehicle according to the animation parameters includes: Adjust the animation template corresponding to the preset motion state according to the animation parameters to generate a motion image; Based on the motion image, the motion scene of the target virtual vehicle is displayed.
6. The method according to claim 5, characterized in that, The step of adjusting the animation template corresponding to the preset motion state according to the animation parameters to generate a motion image includes: Based on the animation parameters and the preset number of frames, determine the animation parameters corresponding to each frame; Adjust the animation template corresponding to the preset motion state according to the animation parameters corresponding to each frame, and generate motion images corresponding to each frame; The step of displaying the motion image of the target virtual vehicle includes: Based on the motion images corresponding to each frame and the display order of each frame, the motion image of the target virtual vehicle is displayed.
7. The method according to claim 5, characterized in that, The step of adjusting the animation template corresponding to the preset motion state according to the animation parameters to generate a motion image includes: If the preset motion state is a collision state, then the collision position of the target virtual vehicle is obtained; Based on the collision location of the target virtual vehicle and the animation parameters, the animation template corresponding to the preset motion state is adjusted to generate a motion image.
8. The method according to claim 7, characterized in that, The step of adjusting the animation template corresponding to the preset motion state based on the collision position of the target virtual vehicle and the animation parameters to generate a motion image includes: Based on the collision location of the target virtual vehicle and the animation parameters, determine the animation parameters corresponding to the collision location; Adjust the animation template corresponding to the preset motion state according to the animation parameters corresponding to the collision position to generate a motion image.
9. A game control device, characterized in that, The device includes: The acquisition module is used to respond to the target virtual vehicle being in a preset motion state, and to acquire the motion parameters and environmental parameters of the target virtual vehicle. The environmental parameters include the suspension type parameters and track type parameters of the target virtual vehicle. The preset motion state is a collision state, a drift state, or a jump state. The first determining module is used to determine the feedback parameters of the target virtual vehicle based on the motion parameters, environmental parameters, and the motion curve corresponding to the preset motion state. The motion curve corresponding to the preset motion state is used to characterize the changes of the feedback parameters with the motion parameters and environmental parameters under the preset motion state. The second determining module is used to determine the animation parameters based on the feedback parameters and the animation template corresponding to the preset motion state; The display module is used to display the motion image of the target virtual vehicle according to the animation parameters; The animation template corresponding to the preset motion state includes: extreme animation parameters corresponding to the virtual vehicle under extreme conditions. The second determining module is specifically used to use the feedback parameters as the weights of the extreme animation parameters corresponding to the virtual vehicle to determine the animation parameters currently corresponding to the target virtual vehicle.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the game control method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the game control method as described in any one of claims 1-8.
Citation Information
Patent Citations
Control method and device of virtual auto-racking object, storage medium, and electronic device
CN110465091A
Program for driving game and recording medium with the recorded program
JP2002224439A