CN108837508B - Method and device for controlling carrier in game - Google Patents

Method and device for controlling carrier in game Download PDF

Info

Publication number
CN108837508B
CN108837508B CN201810645080.4A CN201810645080A CN108837508B CN 108837508 B CN108837508 B CN 108837508B CN 201810645080 A CN201810645080 A CN 201810645080A CN 108837508 B CN108837508 B CN 108837508B
Authority
CN
China
Prior art keywords
vehicle
steering
driving
determining
speed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810645080.4A
Other languages
Chinese (zh)
Other versions
CN108837508A (en
Inventor
陈启明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810645080.4A priority Critical patent/CN108837508B/en
Publication of CN108837508A publication Critical patent/CN108837508A/en
Application granted granted Critical
Publication of CN108837508B publication Critical patent/CN108837508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Traffic Control Systems (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a method and a device for controlling a carrier in a game. Wherein, the method comprises the following steps: acquiring current driving information of a carrier in a game; monitoring the operation angle of a direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information; determining steering parameters of the vehicle according to the operation angle; and controlling the vehicle to move according to the steering parameters, wherein the steering parameters at least comprise a steering radius. The invention solves the technical problem of repeated collision and stiff holding of the carrier after the collision of the carrier in the game.

Description

Method and device for controlling carrier in game
Technical Field
The invention relates to the field of computers, in particular to a method and a device for controlling a carrier in a game.
Background
During a racing game (e.g., racing, airplane racing, and cool game) performed by a game player, a game object (e.g., a racing car, an airplane, etc.) operated by the game player may deviate from a normal running path due to an operation error, such as a collision with another racing car, a left-right turning control error, etc., which may easily make it difficult for the game object operated by the game player to turn around, and particularly, at an edge of a racing track in the game, the racing car may repeatedly collide or stand.
In order to solve the above problems, the prior art mainly adopts the following two schemes:
the first scheme is as follows: setting a resident control (such as the resident control a in the display interface shown in fig. 1) on the game interface, or enabling the game object operated by the game player to return to the correct driving route by operating the resident control or the reset button when the game object operated by the game player enters an abnormal state.
The second method comprises the following steps: after the game object operated by the game player is abnormal, the game object is controlled to be reset to the middle position of the driving route, and the game object is made to flash to prompt that the resetting operation is completed.
By using the two schemes, the direction control operation of the game player in the game is not consistent, the feeling of turning around driving is avoided, and the game experience of the game player is poor.
Aiming at the problem that the collision of the carrier in the game causes repeated collision and stiff holding of the carrier, no effective solution is provided at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for controlling a carrier in a game, which at least solve the technical problem of repeated collision and stiff holding of the carrier after collision of the carrier in the game.
According to an aspect of an embodiment of the present invention, there is provided a method for controlling a vehicle in a game, including: acquiring current driving information of a carrier in a game; monitoring the operation angle of a direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information; determining a steering parameter of the vehicle according to the operation angle, wherein the steering parameter at least comprises a steering radius; and controlling the vehicle to move according to the steering parameters.
Further, the direction control is a virtual steering wheel, and the operation angle is a deflection angle of the virtual steering wheel.
Further, the method for controlling the vehicle in the game further comprises the following steps: at least one of the traveling direction and the traveling speed of the vehicle is acquired.
Further, the method for controlling the vehicle in the game further comprises the following steps: judging the route information of the driving route of the carrier, wherein the route information represents the route type of the driving route of the carrier; determining preset driving information of the vehicle according to the route information, wherein the preset driving information comprises at least one of the following information: presetting a driving direction and a driving speed; and determining that the vehicle is in an abnormal driving state according to the current driving information and the preset driving information.
Further, the method for controlling the vehicle in the game further comprises the following steps: obtaining a central line of a driving route of a carrier; determining a plurality of preset positions on the central line, wherein a preset angle is formed between every two adjacent preset positions; determining the type of the route as a straight line under the condition that the adjacent preset angles are the same; and under the condition that the adjacent preset angles are different, determining the type of the route as a curve.
Further, the method for controlling the vehicle in the game further comprises the following steps: when the vehicle runs in a straight line, the offset of the preset running direction is determined as a first offset.
Further, the method for controlling the vehicle in the game further comprises the following steps: and determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the first offset and the driving speed is less than the preset driving speed.
Further, the method for controlling the vehicle in the game further comprises the following steps: and determining the offset of the preset driving direction as a second offset when the vehicle drives on the curve.
Further, the method for controlling the vehicle in the game further comprises the following steps: and determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the second offset and the driving speed is less than the preset driving speed.
Further, the steering parameters further include: steering speed, wherein controlling the vehicle in the game further comprises: if the operation angle is larger than the first angle, adjusting the steering radius to a first steering radius, and adjusting the steering speed of the vehicle to a first steering speed, wherein the first steering radius is in negative correlation with the operation angle, and the first steering speed is in positive correlation with the operation angle; and under the condition that the operation angle is larger than or equal to a second angle, controlling the steering radius to be adjusted to a second steering radius, and controlling the steering speed to be adjusted to a second steering speed, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constant.
Further, the method for controlling the vehicle in the game further comprises the following steps: determining the turning axle center of the vehicle according to the turning radius; and controlling the vehicle to move according to the turning axle center and the steering speed.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for controlling a vehicle in a game, including: the acquisition module is used for acquiring the current running information of the carrier in the game; the monitoring module is used for monitoring the operation angle of the direction control under the condition that the vehicle is determined to be in the abnormal driving state according to the current driving information; the determining module is used for determining steering parameters of the vehicle according to the operation angle, wherein the steering parameters at least comprise a steering radius; and the control module is used for controlling the movement of the carrier according to the steering parameters.
According to another aspect of the embodiments of the present invention, there is also provided a terminal for controlling a vehicle in a game, including: a direction control; and the processor runs the program, wherein the program runs to execute the following processing steps on the data output from the control: acquiring current driving information of a carrier in a game; monitoring the operation angle of a direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information; determining a steering parameter of the vehicle according to the operation angle, wherein the steering parameter at least comprises a steering radius; and controlling the vehicle to move according to the steering parameters.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein the program executes a method of controlling a vehicle in a game.
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, where the program executes a method for controlling a vehicle in a game.
In the embodiment of the invention, the vehicle is controlled according to the angle of the operating rocker, the current running information of the vehicle in the game is acquired, then the operating angle of the direction control is monitored under the condition that the vehicle is determined to be in an abnormal running state according to the current running information, the steering parameter of the vehicle is determined according to the operating angle, and finally the vehicle is controlled to move according to the steering parameter, wherein the steering parameter at least comprises the steering radius. It is easy to notice that the user can control the carrier in the game only by operating the angle of the rocker without complex operation, thereby reducing the frustration of the novice player. In addition, under the condition that the vehicle is in an abnormal driving state, the angle of the rocker operated by the user reflects the psychological state of the user, and the control feeling of the user is improved. Finally, because the similarity between the operation of angle control on the rocker and the scene of operating the carrier in the real world is larger, the mode of operating the angle of the rocker is adopted to control the carrier to be closer to the real world, and the game experience of the user is further improved. Therefore, the scheme provided by the application can achieve the purposes of reducing the dead time of the carrier in the abnormal running state and enabling the carrier to be quickly separated from the abnormal running state, thereby realizing the technical effect of improving the game experience of a user and further solving the technical problems of repeated collision and dead of the carrier after the carrier collides in the game.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a display interface according to the prior art;
FIG. 2 is a flowchart of a method for controlling a vehicle in a game according to an embodiment of the present invention;
FIG. 3 is a schematic illustration of an alternative direction of travel offset according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an alternative travel route according to an embodiment of the present invention;
FIG. 5 is a schematic view of an alternative display interface according to an embodiment of the invention;
FIG. 6 is a schematic diagram of an alternative directional control according to an embodiment of the present invention;
FIG. 7 is a graphical illustration of an alternative operating angle versus turning radius in accordance with an embodiment of the present invention;
FIG. 8 is a graphical illustration of an alternative operating angle versus steering speed in accordance with an embodiment of the present invention;
FIG. 9 is a schematic view of an alternative vehicle operation according to an embodiment of the present invention; and
fig. 10 is a schematic structural diagram of an apparatus for controlling a vehicle in a game according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for controlling a vehicle in a game, where the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer executable instructions, and where a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that described herein.
Fig. 2 is a flowchart of a method for controlling a vehicle in a game according to an embodiment of the present invention, as shown in fig. 2, the method includes the following steps:
step S202, current running information of the vehicle in the game is obtained.
In step S202, the carrier is a game object controlled by a game player in the game, wherein the game object can be, but is not limited to, a game object in a racing game, such as an airplane, a racing car, a boat, etc. In addition, the current driving information of the vehicle at least comprises the current driving speed and driving direction of the vehicle.
In an alternative, the game terminal may acquire current driving information of the vehicle. Specifically, in the process of controlling the vehicle to play the game by the game player, the game terminal collects the current driving information of the vehicle every preset time (for example, 0.1ms), and further obtains the current driving information of the vehicle. In the above process, the game terminal may be, but is not limited to, a mobile terminal (e.g., a mobile phone, a tablet) and a stationary terminal (e.g., a desktop computer, a large game machine).
And step S204, monitoring the operation angle of the direction control under the condition that the vehicle is determined to be in the abnormal driving state according to the current driving information.
The driving state of the vehicle mainly includes a normal driving state and an abnormal driving state, where the abnormal driving state is a state in which the vehicle collides with another vehicle or an object to repeatedly collide with or be held by the vehicle, for example, when a racing car collides with an edge of a racing track in a racing game, the racing car repeatedly collides with or is held by the racing track. The normal driving state refers to a state that the vehicle normally drives on a preset route.
In step S204, the direction control may be a virtual steering wheel, a virtual button or a virtual joystick on the game interface, or a hardware device connected to the game terminal, such as a joystick. In addition, the operation angle of the direction control can be a deflection angle of the virtual steering wheel, and can also be an included angle between a connecting line of the touch point and a preset position in the virtual rocker and a preset direction.
In an alternative, after obtaining the current driving information of the vehicle, the game terminal may determine whether the vehicle is in an abnormal driving state according to the current driving information of the vehicle. After the abnormal driving state of the carrier is determined, the game terminal detects whether the direction control element receives a control signal for a game player to operate the direction control element, if the control signal is detected, the game terminal determines that the game player operates the direction control element, and then the operation angle of the game player operating the direction control element is continuously monitored.
Step S206, determining the steering parameters of the vehicle according to the operation angle.
It should be noted that the steering parameter of the vehicle at least includes one of the following: the steering radius of the vehicle and the steering speed of the vehicle.
In an alternative, after obtaining the operation angle of the game player operating the direction control, the game terminal determines the steering radius and the steering speed of the vehicle for steering according to the operation angle of the direction control, for example, the larger the operation angle, the smaller the steering radius and the larger the steering speed. The steering radius, the steering speed and the operation angle satisfy a preset relationship, such as a linear relationship and a hyperbolic relationship, and the expression form of the preset relationship may be, but is not limited to, a table and a curve.
In another alternative, determining the steering parameter of the vehicle according to the operation angle further includes determining the steering direction of the operation angle, that is, determining the steering direction of the game player for operating the direction control, for example, turning 20 ° to the left and 10 ° to the right. The steering parameters of the vehicle are determined according to the steering direction of the operation angle and the size of the operation angle, specifically, the circle center position of the circle center corresponding to the steering radius is determined according to the steering direction of the operation angle, and then the steering parameters of the vehicle are determined according to the circle center position and the size of the operation angle.
Step S208, controlling the vehicle to move according to the steering parameters.
Specifically, after determining the steering parameters of the vehicle, the game terminal may control the vehicle to rotate according to the steering radius and turn at the steering speed, thereby bringing the vehicle into a normal driving route. After the vehicle is counted to the normal driving route, the game player can normally control the vehicle to play the game.
Therefore, when the abnormal running of the vehicle is detected (for example, collision occurs at a curve), the steering radius of the vehicle can be adjusted according to the operation angle of the direction control component for controlling the running of the vehicle, so that the dead time of the vehicle in the abnormal state is reduced (for example, continuous collision at the curve can be avoided after the steering radius of the vehicle is adjusted), the vehicle can be quickly separated from the abnormal state, and a game player has more realistic driving experience.
Based on the schemes defined in the above steps S202 to S208, it can be known that, by acquiring the current driving information of the vehicle in the game, and then in the case that it is determined that the vehicle is in the abnormal driving state according to the current driving information, the operation angle of the directional control is monitored, and the steering parameter of the vehicle is determined according to the operation angle, and finally, the vehicle is controlled to move according to the steering parameter, wherein the steering parameter at least includes the steering radius.
It is easy to notice that the user can control the carrier in the game only by operating the angle of the rocker without complex operation, thereby reducing the frustration of the novice player. In addition, under the condition that the vehicle is in an abnormal driving state, the angle of the rocker operated by the user reflects the psychological state of the user, and the control feeling of the user is improved. Finally, because the similarity between the operation of angle control on the rocker and the scene of operating the carrier in the real world is larger, the mode of operating the angle of the rocker is adopted to control the carrier to be closer to the real world, and the game experience of the user is further improved.
Therefore, the scheme provided by the application can achieve the purposes of reducing the dead time of the carrier in the abnormal running state and enabling the carrier to be quickly separated from the abnormal running state, thereby realizing the technical effect of improving the game experience of a user and further solving the technical problems of repeated collision and dead of the carrier after the carrier collides in the game.
In an alternative scheme, the current driving information of the vehicle in the game is acquired, namely at least one of the driving direction and the driving speed of the vehicle is acquired. Wherein, confirm that the carrier is in unusual travel state according to current travel information, include:
step S2040, judging the route information of the driving route of the carrier, wherein the route information represents the route type of the driving route of the carrier;
step S2042, determining preset driving information of the vehicle according to the route information, wherein the preset driving information includes at least one of: presetting a driving direction and a driving speed;
step S2044, determining that the vehicle is in an abnormal driving state according to the current driving information and the preset driving information.
It should be noted that, in step S2040, the route type at least includes a straight line and a curved line, and different route types correspond to different preset driving information, for example, in the case that the route type is a straight line, as shown in the schematic diagram of the offset amount of the driving direction shown in fig. 3, the driving direction parallel to the straight line is 0 °, and the offset amount range of the driving direction of the vehicle in the normal driving state is 0 to a1, that is, the offset amount range of the preset driving direction is 0 to a 1. In the case of a curve, the travel direction parallel to the current straight line tangent is 0 °, and the offset amount range of the travel direction of the vehicle in the normal travel state is 0 to a2, i.e., the offset amount range of the preset travel direction is 0 to a 1. The position of the vehicle on the driving route is different, and the direction of 0 degree is changed. And in the case where the route type is a curved line, the running direction parallel to the tangent of the current running route is 0 °.
As can be seen from the above, before determining the preset driving information of the vehicle according to the route information, the route type of the driving route where the vehicle is located needs to be determined, wherein the method for determining the route type may include the following steps:
step S20402, acquiring a central line of a driving route of the vehicle;
step S20404, determining a plurality of preset positions on the central line, wherein a preset angle is formed between every two adjacent preset positions;
step S20406, determining the type of the route as a straight line under the condition that the adjacent preset angles are the same;
step S20408, in the case that the adjacent preset angles are different, determining that the route type is a curve.
Specifically, as shown in the schematic diagram of the driving route shown in fig. 4, L is a central line of the driving route, and end points of line segments L1, L2 and L3 are located at preset positions on the central line, wherein the lengths of the three line segments are the same, which reflects that the displacements of the vehicles passing through the three preset positions on the driving route are the same. In addition, each two line segments have an included angle, i.e. a preset angle, for example, in fig. 4, the included angle between the line segment L1 and the line segment L2 is α, and the included angle between the line segment L2 and the line segment L3 is β. In the case where the route type is a curve, α is not the same as β; whereas in the case of a straight line type of course, α is the same as β, typically 180 ° or 0 °.
It should be noted that after the route type is determined, the preset driving information of the vehicle can be determined according to the route information, and then the vehicle is determined to be in an abnormal driving state according to the current driving information and the preset driving information. In an alternative, in the case where the vehicle is traveling in a straight line, the offset amount of the preset traveling direction is determined as the first offset amount. And determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the first offset and the driving speed is less than the preset driving speed. And determining the offset of the preset driving direction as a second offset when the vehicle drives on the curve. And determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the second offset and the driving speed is less than the preset driving speed.
In addition, the offset amount in the traveling direction is an offset angle between the vehicle orientation and the direction parallel to the traveling route, or an offset angle between the vehicle orientation and the direction tangential to the curve. Taking the straight line shown in fig. 3 as an example, in the normal driving state, the offset amount of the vehicle in the driving direction ranges from 0 to a1, and if the offset amount of the vehicle in the driving direction is greater than a1 and/or the driving speed is less than the preset driving speed v1, the vehicle is determined to be in the abnormal driving state. The method for determining whether the vehicle is in the abnormal driving state on the curve is similar to the above method, and is not repeated herein.
In the case that it is determined that the vehicle is in an abnormal driving state, the game player may operate a direction control to control the movement of the vehicle, wherein the direction control may be a joystick S as shown in fig. 5. Specifically, when the operation angle is larger than the first angle, the steering radius is adjusted to a first steering radius, and the steering speed of the vehicle is adjusted to a first steering speed, wherein the first steering radius is in negative correlation with the operation angle, and the first steering speed is in positive correlation with the operation angle; and under the condition that the operation angle is larger than or equal to a second angle, controlling the steering radius to be adjusted to a second steering radius, and controlling the steering speed to be adjusted to a second steering speed, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constant.
In the above process, the first angle may be a1 ' in fig. 6, where if the angle a ' at which the game player operates the direction control is less than a1 ', the vehicle will move at the turning radius and the turning speed in the normal driving state of the vehicle. When the operation angle a ' is larger than a1 ' (a1 ' ≦ 180 °) and smaller than a2 ', the steering speed and the steering angle are changed according to the magnitude of the operation angle a ', as shown in a graph between the operation angle and the steering radius shown in fig. 7 and a graph between the operation angle and the steering speed shown in fig. 8, wherein d1 is the steering radius of the vehicle in the normal driving state, d2 is the steering radius of the vehicle in the abnormal driving state, v1 is the steering speed of the vehicle in the normal driving state, and v2 is the steering speed of the vehicle in the abnormal driving state. When the operation angle a ' is larger than a2 ' (a2 ' ≦ 180 °), the vehicle moves with a steering radius d2 and a steering speed v 2.
After the steering parameter of the vehicle is determined, the game terminal may control the vehicle to move according to the steering parameter, which may specifically include the following steps:
step S2080, determining the turning axle center of the vehicle according to the turning radius;
step S2082, controlling the vehicle to move according to the turning axis and the steering speed.
Specifically, after the steering radius of the vehicle is determined, the axle center of the vehicle can be determined according to the steering radius of the vehicle, and as shown in fig. 9, after the steering radii R1 and R2 of the vehicle a and the vehicle B, the turning axle center of the vehicle can be determined according to the current position and the steering radius of the vehicle, for example, the turning axle center of the vehicle a is D, and the turning axle center of the vehicle B is C. The vehicle is rotated according to the turning axle center of the vehicle, and the vehicle is moved by the steering speed of the vehicle, so that the vehicle enters a normal driving state from an abnormal driving state.
In addition, it should be noted that, if the current driving state of the vehicle is determined to be the normal driving state according to the current driving information and the preset driving information, when the game player operates the direction control, if the operation angle of the direction control is greater than the maximum operation angle, the game terminal controls the vehicle to turn according to the maximum turning angle.
Example 2
According to an embodiment of the present invention, there is further provided an apparatus for controlling a vehicle in a game, which is capable of executing the method for controlling a vehicle in a game in embodiment 10, wherein fig. 10 is a schematic structural diagram of the apparatus for controlling a vehicle in a game according to the embodiment of the present invention, and as shown in fig. 10, the apparatus includes: an acquisition module 1001, a monitoring module 1003, a determination module 1005, and a control module 1007.
The obtaining module 1001 is configured to obtain current driving information of a vehicle in a game; the monitoring module 1003 is used for monitoring the operation angle of the direction control under the condition that the vehicle is determined to be in the abnormal driving state according to the current driving information; a determining module 1005, configured to determine a steering parameter of the vehicle according to the operation angle, where the steering parameter at least includes a steering radius; and the control module 1007 is used for controlling the movement of the vehicle according to the steering parameters.
It should be noted that the direction control is a virtual steering wheel, and the operation angle is a deflection angle of the virtual steering wheel.
In addition, it should be noted that the acquiring module 1001, the monitoring module 1003, the determining module 1005 and the control module 1007 correspond to steps S202 to S208 in embodiment 1, and the four modules are the same as the corresponding steps in the implementation example and application scenario, but are not limited to the disclosure in embodiment 1.
In an optional aspect, the obtaining module includes: a first obtaining module. The first obtaining module is used for obtaining at least one of the driving direction and the driving speed of the vehicle.
In an alternative aspect, the monitoring module includes: the device comprises a judging module, a first determining module and a second determining module. The judging module is used for judging the route information of the driving route of the carrier, wherein the route information represents the route type of the driving route of the carrier; the first determining module is used for determining preset driving information of the vehicle according to the route information, wherein the preset driving information comprises at least one of the following: presetting a driving direction and a driving speed; and the second determining module is used for determining that the vehicle is in an abnormal driving state according to the current driving information and the preset driving information.
It should be noted that the determining module, the first determining module and the second determining module correspond to steps S2040 to S2044 in embodiment 1, and the three modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1.
In an optional aspect, the determining module includes: the device comprises a first obtaining module, a third determining module, a fourth determining module and a fifth determining module. The first acquisition module is used for acquiring a central line of a driving route of the vehicle; the third determining module is used for determining a plurality of preset positions on the central line, wherein a preset angle is formed between every two adjacent preset positions; the fourth determining module is used for determining the type of the route as a straight line under the condition that the adjacent preset angles are the same; and the fifth determining module is used for determining the type of the route as a curve under the condition that the adjacent preset angles are different.
It should be noted that the first obtaining module, the third determining module, the fourth determining module and the fifth determining module correspond to steps S20402 to S20408 in embodiment 1, and the four modules are the same as the corresponding steps in the implementation example and application scenarios, but are not limited to the disclosure in embodiment 1.
In an alternative, the first determining module includes: and a sixth determining module. The sixth determining module is used for determining the offset of the preset driving direction as the first offset under the condition that the vehicle is driven in a straight line.
In an optional aspect, the determining module includes: and a seventh determining module. The seventh determining module is used for determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is larger than the first offset and the driving speed is smaller than the preset driving speed.
In an alternative, the first determining module includes: and an eighth determining module. The eighth determining module is configured to determine that the offset of the preset driving direction is the second offset when the vehicle drives on the curve.
In an optional aspect, the determining module includes: a ninth determination module. The ninth determining module is used for determining that the vehicle is in an abnormal driving state under the condition that the offset of the driving direction of the vehicle is larger than the second offset and the driving speed is smaller than the preset driving speed.
In an optional aspect, the steering parameter further comprises: a steering speed, wherein the determining module comprises: the device comprises a first adjusting module and a second adjusting module. The first adjusting module is used for adjusting the steering radius to a first steering radius and adjusting the steering speed of the vehicle to a first steering speed under the condition that the operation angle is larger than the first angle, wherein the first steering radius is in negative correlation with the operation angle, and the first steering speed is in positive correlation with the operation angle; and the second adjusting module is used for controlling the steering radius to be adjusted to a second steering radius and controlling the steering speed to be adjusted to a second steering speed under the condition that the operation angle is larger than or equal to a second angle, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constants.
In an alternative, the control module includes: a tenth determination module and a control sub-module. The tenth determining module is used for determining the turning axle center of the vehicle according to the turning radius; and the control submodule is used for controlling the vehicle to move according to the turning axle center and the steering speed.
It should be noted that the tenth determining module and the control sub-module correspond to steps S2080 to S2082 in embodiment 1, and the two modules are the same as the corresponding steps in the example and application scenarios, but are not limited to the disclosure of embodiment 1.
Example 3
According to an embodiment of the present invention, there is further provided an embodiment of a terminal for controlling a vehicle in a game, where the terminal is capable of executing the method for controlling a vehicle in a game in embodiment 1, and the terminal includes: a directional control and a processor.
The processor runs a program, and the program runs to execute the following processing steps on the data output from the control: acquiring current driving information of a carrier in a game; monitoring the operation angle of a direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information; determining a steering parameter of the vehicle according to the operation angle, wherein the steering parameter at least comprises a steering radius; and controlling the vehicle to move according to the steering parameters.
It should be noted that the direction control is a virtual steering wheel, and the operation angle is a deflection angle of the virtual steering wheel.
Therefore, the current running information of the carrier in the game is obtained, the operation angle of the direction control is monitored under the condition that the abnormal running state of the carrier is determined according to the current running information, the steering parameter of the carrier is determined according to the operation angle, and finally the carrier is controlled to move according to the steering parameter.
It is easy to notice that the user can control the carrier in the game only by operating the angle of the rocker without complex operation, thereby reducing the frustration of the novice player. In addition, under the condition that the vehicle is in an abnormal driving state, the angle of the rocker operated by the user reflects the psychological state of the user, and the control feeling of the user is improved. Finally, because the similarity between the operation of angle control on the rocker and the scene of operating the carrier in the real world is larger, the mode of operating the angle of the rocker is adopted to control the carrier to be closer to the real world, and the game experience of the user is further improved.
Therefore, the scheme provided by the application can achieve the purposes of reducing the dead time of the carrier in the abnormal running state and enabling the carrier to be quickly separated from the abnormal running state, thereby realizing the technical effect of improving the game experience of a user and further solving the technical problems of repeated collision and dead of the carrier after the carrier collides in the game.
In an alternative, the processor is further configured to obtain at least one of a driving direction and a driving speed of the vehicle.
In an optional scheme, the processor is further configured to determine route information of a driving route of the vehicle, determine preset driving information of the vehicle according to the route information, and then determine that the vehicle is in an abnormal driving state according to the current driving information and the preset driving information, where the preset driving information includes at least one of: the method comprises the steps of presetting a driving direction, presetting a driving speed and representing the type of a driving route of a carrier by route information.
In an optional scheme, the processor is further configured to obtain a center line of a driving route of the vehicle, and determine a plurality of preset positions on the center line, wherein if adjacent preset angles are the same, it is determined that the route type is a straight line; and if the adjacent preset angles are different, determining that the route type is a curve. Wherein, a preset angle is formed between two adjacent preset positions.
In an alternative, the processor is further configured to determine that the offset of the preset driving direction is a first offset in a case where the vehicle is driving in a straight line, and determine that the vehicle is in an abnormal driving state in a case where the offset of the driving direction of the vehicle is greater than the first offset and the driving speed is less than a preset driving speed.
In an alternative, the processor is further configured to determine that the offset of the preset driving direction is a second offset when the vehicle is driven on the curve, and determine that the vehicle is in an abnormal driving state when the offset of the driving direction of the vehicle is greater than the second offset and the driving speed is less than the preset driving speed.
In an optional aspect, the steering parameter further comprises: a steering speed, wherein the processor is further configured to adjust the steering radius to a first steering radius and the steering speed of the vehicle to a first steering speed if the operating angle is greater than the first angle, wherein the first steering radius is inversely related to the operating angle, and the first steering speed is positively related to the operating angle; and under the condition that the operation angle is larger than or equal to a second angle, controlling the steering radius to be adjusted to a second steering radius, and controlling the steering speed to be adjusted to a second steering speed, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constant.
In an alternative scheme, the processor is further used for determining the turning axle center of the vehicle according to the steering radius and controlling the vehicle to move according to the turning axle center and the steering speed.
Example 4
According to another aspect of the embodiments of the present invention, there is also provided a storage medium including a stored program, wherein the program executes the method of controlling a vehicle in a game in embodiment 1.
Example 5
According to another aspect of the embodiments of the present invention, there is also provided a processor for executing a program, where the program executes the method for controlling a vehicle in a game in embodiment 1.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method for controlling a vehicle in a game, comprising:
acquiring current driving information of a carrier in a game;
monitoring the operation angle of a direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information;
determining a steering parameter of the vehicle according to the operation angle, wherein the steering parameter at least comprises a steering radius and/or a steering speed;
controlling the vehicle to move according to the steering parameters;
the steering parameters further include: the steering speed and/or the steering radius, wherein determining a steering parameter of the vehicle from the operating angle comprises: if the operating angle is larger than a first angle, adjusting the steering radius to a first steering radius, and adjusting the steering speed of the vehicle to a first steering speed, wherein the first steering radius is inversely related to the operating angle, and the first steering speed is positively related to the operating angle; controlling the steering radius to be adjusted to a second steering radius and controlling the steering speed to be adjusted to a second steering speed when the operating angle is larger than or equal to a second angle, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constant;
wherein determining that the vehicle is in the abnormal driving state according to the current driving information includes:
judging the route information of the driving route of the carrier, wherein the route information represents the route type of the driving route of the carrier;
determining preset driving information of the vehicle according to the route information, wherein the preset driving information comprises at least one of the following information: presetting a driving direction and a driving speed;
and determining that the vehicle is in the abnormal driving state according to the current driving information and the preset driving information.
2. The method of claim 1, wherein the directional control is a virtual steering wheel and the operating angle is a yaw angle of the virtual steering wheel.
3. The method of claim 1, wherein obtaining current driving information of a vehicle in a game comprises:
at least one of a traveling direction and a traveling speed of the vehicle is acquired.
4. The method of claim 1, wherein determining the route information of the driving route of the vehicle comprises:
obtaining a central line of a driving route of the vehicle;
determining a plurality of preset positions on the middle line, wherein a preset angle is formed between every two adjacent preset positions;
determining the type of the route as a straight line under the condition that the adjacent preset angles are the same;
and under the condition that the adjacent preset angles are different, determining that the route type is a curve.
5. The method of claim 4, wherein determining the preset driving information according to the route information comprises:
and determining the offset of the preset driving direction as a first offset under the condition that the vehicle is driven in the straight line.
6. The method of claim 5, wherein determining that the vehicle is in the abnormal driving state according to the current driving information and the preset driving information comprises:
and determining that the vehicle is in the abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the first offset and the driving speed is less than the preset driving speed.
7. The method of claim 4, wherein determining the preset driving information according to the route information comprises:
and determining the offset of the preset driving direction as a second offset under the condition that the vehicle drives on the curve.
8. The method of claim 7, wherein determining that the vehicle is in the abnormal driving state according to the current driving information and the preset driving information comprises:
and determining that the vehicle is in the abnormal driving state under the condition that the offset of the driving direction of the vehicle is greater than the second offset and the driving speed is less than the preset driving speed.
9. The method of claim 1, wherein controlling the vehicle movement according to the steering parameter comprises:
determining a turning axle center of the vehicle according to the turning radius;
and controlling the vehicle to move according to the turning axle center and the steering speed.
10. An apparatus for controlling a vehicle in a game, comprising:
the acquisition module is used for acquiring the current running information of the carrier in the game;
the monitoring module is used for monitoring the operation angle of the direction control under the condition that the vehicle is determined to be in an abnormal driving state according to the current driving information;
a determining module, configured to determine a steering parameter of the vehicle according to the operating angle, where the steering parameter at least includes a steering radius and/or a steering speed;
the control module is used for controlling the carrier to move according to the steering parameters;
the steering parameters further include: the steering speed and/or the steering radius, wherein the determining module comprises: a first adjusting module, configured to adjust the steering radius to a first steering radius and adjust the steering speed of the vehicle to a first steering speed if the operating angle is greater than a first angle, where the first steering radius is inversely related to the operating angle, and the first steering speed is positively related to the operating angle; the second adjusting module is used for controlling the steering radius to be adjusted to a second steering radius and controlling the steering speed to be adjusted to a second steering speed under the condition that the operating angle is larger than or equal to a second angle, wherein the second steering radius is smaller than the first steering radius, the second steering speed is larger than the first steering speed, and the second steering radius and the second steering speed are constant;
wherein the monitoring module comprises: the system comprises a judging module, a judging module and a judging module, wherein the judging module is used for judging the route information of the driving route of a carrier, and the route information represents the route type of the driving route of the carrier; a first determining module, configured to determine preset driving information of the vehicle according to the route information, where the preset driving information includes at least one of: presetting a driving direction and a driving speed; and the second determining module is used for determining that the vehicle is in the abnormal driving state according to the current driving information and the preset driving information.
11. A storage medium characterized by comprising a stored program, wherein the program executes the in-game vehicle control method according to any one of claims 1 to 9.
12. A processor for executing a program, wherein the program is executed to perform the method for controlling a vehicle in a game according to any one of claims 1 to 9.
CN201810645080.4A 2018-06-21 2018-06-21 Method and device for controlling carrier in game Active CN108837508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810645080.4A CN108837508B (en) 2018-06-21 2018-06-21 Method and device for controlling carrier in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810645080.4A CN108837508B (en) 2018-06-21 2018-06-21 Method and device for controlling carrier in game

Publications (2)

Publication Number Publication Date
CN108837508A CN108837508A (en) 2018-11-20
CN108837508B true CN108837508B (en) 2022-04-29

Family

ID=64203567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810645080.4A Active CN108837508B (en) 2018-06-21 2018-06-21 Method and device for controlling carrier in game

Country Status (1)

Country Link
CN (1) CN108837508B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110465091B (en) * 2019-08-09 2020-12-11 腾讯科技(深圳)有限公司 Control method and device for virtual racing car object, storage medium and electronic device
CN112192568A (en) * 2020-09-30 2021-01-08 广东唯仁医疗科技有限公司 Intelligent shopping robot control method and system based on 5G network
CN112148622B (en) * 2020-10-15 2022-02-25 腾讯科技(深圳)有限公司 Control method and device of virtual prop, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07275510A (en) * 1994-04-13 1995-10-24 Sega Enterp Ltd Game device
CN104915564A (en) * 2015-06-16 2015-09-16 深圳市腾讯计算机***有限公司 Virtual character turning implementing method and device
CN105641927A (en) * 2015-12-31 2016-06-08 网易(杭州)网络有限公司 Virtual object steering control method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7625287B2 (en) * 2005-10-05 2009-12-01 Nintendo Co., Ltd. Driving game steering wheel simulation method and apparatus
US7744451B2 (en) * 2005-11-14 2010-06-29 Microsoft Corporation Speed-dependent suggested driving lines

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07275510A (en) * 1994-04-13 1995-10-24 Sega Enterp Ltd Game device
CN104915564A (en) * 2015-06-16 2015-09-16 深圳市腾讯计算机***有限公司 Virtual character turning implementing method and device
CN105641927A (en) * 2015-12-31 2016-06-08 网易(杭州)网络有限公司 Virtual object steering control method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QQ飞车手游复位键是什么 怎么用复位键卡bug,http://www.qqtn.com/article/article_230414_1.html;网友整理;《百度》;20180103;第1页 *

Also Published As

Publication number Publication date
CN108837508A (en) 2018-11-20

Similar Documents

Publication Publication Date Title
CN108837508B (en) Method and device for controlling carrier in game
CN108597530B (en) Sound reproducing method and apparatus, storage medium and electronic apparatus
CN110170169B (en) Information display method and device, storage medium and electronic device
WO2020199820A1 (en) Object control method and device, and storage medium and electronic device
CN106155553B (en) Virtual object motion control method and device
CN107301801B (en) Operation method and device for VR (virtual reality) simulated driving, VR helmet and storage medium
US20170136346A1 (en) Interaction Method, Interaction Apparatus and User Equipment
CN109876444B (en) Data display method and device, storage medium and electronic device
CN108536350B (en) Virtual object control method and equipment
CN111298443B (en) Game object control method and device, electronic equipment and storage medium
CN112257542B (en) Obstacle sensing method, storage medium and electronic device
CN110013671A (en) Movement executes method and apparatus, storage medium and electronic device
CN108434730A (en) Control method, device, storage medium, processor and the terminal of game object
CN108479068B (en) Virtual object display method and equipment
CN114061047B (en) Method and device for controlling air conditioner and air conditioner
CN109925713B (en) Object control method and device, storage medium and electronic device
CN108579079B (en) Virtual object steering control method and device, electronic equipment and storage medium
KR20210106561A (en) Virtual racing car control method and apparatus, storage medium and device
CN110465091B (en) Control method and device for virtual racing car object, storage medium and electronic device
CN111803934B (en) Control method, terminal, electronic device and storage medium for character cards in game
CN109701262B (en) Game equipment and method and device for controlling VR game role to move
CN113050796A (en) Environment adjusting method, device and system for head-mounted equipment and head-mounted equipment
CN105760822B (en) A kind of vehicle drive control method and system
US20230082510A1 (en) Controlling a virtual vehicle using auxiliary control function
CN112633124B (en) Target vehicle judging method of automatic driving vehicle and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant