CN110772784B - Carrier control method and device, storage medium and electronic device - Google Patents
Carrier control method and device, storage medium and electronic device Download PDFInfo
- Publication number
- CN110772784B CN110772784B CN201911032602.4A CN201911032602A CN110772784B CN 110772784 B CN110772784 B CN 110772784B CN 201911032602 A CN201911032602 A CN 201911032602A CN 110772784 B CN110772784 B CN 110772784B
- Authority
- CN
- China
- Prior art keywords
- target
- speed
- target vehicle
- vehicle
- state
- 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
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing 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
- A63F13/428—Processing 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 involving motion or position input signals, e.g. signals representing the rotation of an input controller or a player's arm motions sensed by accelerometers or gyroscopes
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
- A63F13/52—Controlling the output signals based on the game progress involving aspects of the displayed game scene
- A63F13/525—Changing parameters of virtual cameras
- A63F13/5258—Changing parameters of virtual cameras by dynamically adapting the position of the virtual camera to keep a game object or game character in its viewing frustum, e.g. for tracking a character or a ball
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/55—Controlling game characters or game objects based on the game progress
- A63F13/57—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
- A63F13/573—Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/80—Special adaptations for executing a specific game genre or game mode
- A63F13/803—Driving vehicles or craft, e.g. cars, airplanes, ships, robots or tanks
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features 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/60—Methods for processing data by generating or executing the game program
- A63F2300/64—Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- Theoretical Computer Science (AREA)
- Control Of Driving Devices And Active Controlling Of Vehicle (AREA)
Abstract
The invention discloses a carrier control method and device, a storage medium and an electronic device. Wherein, the method comprises the following steps: the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained; under the condition that the motion state indicates that the target virtual character moves by taking the target carrier and the target carrier is in an automatic running state, acquiring the current target running speed of the target carrier; and controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state. The invention solves the technical problem of higher complexity of the control operation of the carrier caused by the fact that the user needs to manually complete the switching operation of the driving mode of the carrier.
Description
Technical Field
The invention relates to the field of computers, in particular to a carrier control method and device, a storage medium and an electronic device.
Background
In many game scenes, a carrier is often arranged to assist a virtual object controlled by a player to move as quickly as possible in the game scene, so as to shorten the moving time.
In order to facilitate the virtual object to take into account other game operations during the driving process, the vehicle is often switched to an automatic driving mode. However, in the automatic driving control method provided by the related art, when the vehicle accelerates or decelerates due to an obstacle, the vehicle exits from the automatic driving mode, and further, the player needs to frequently switch manually to enter the automatic driving mode again. That is to say, for a vehicle in a game scene, a user is often required to manually complete the switching operation of the driving mode, which causes a problem of high complexity of the vehicle control operation.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a carrier control method and device, a storage medium and an electronic device, which at least solve the technical problem that the complexity of carrier control operation is higher because a user needs to manually complete the switching operation of the driving mode of a carrier.
According to an aspect of the embodiments of the present invention, there is provided a vehicle control method, including: the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained; when the motion state indicates that the target virtual character moves by taking a target vehicle and the target vehicle is in an automatic driving state, acquiring the current target driving speed of the target vehicle; and controlling the target vehicle to maintain the automatic driving state when the target driving speed is within a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state.
According to another aspect of the embodiments of the present invention, there is also provided a vehicle control apparatus, including: the game client side is used for controlling the target virtual character to run a game task, and acquiring the motion state of the target virtual character; a second obtaining unit, configured to obtain a current target driving speed of the target vehicle when the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in an automatic driving state; a first control unit, configured to control the target vehicle to maintain the automatic travel state when the target travel speed is within a target speed section configured for the target vehicle, where the target speed section is used to trigger switching control of the automatic travel state.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the vehicle control method when running.
According to another aspect of the embodiments of the present invention, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the vehicle control method through the computer program.
In the embodiment of the present invention, through the embodiments provided in the present application, in the process of a game client controlling a target virtual character to run a game task, a motion state of the target virtual character is obtained, and in a case that the motion state indicates that the target virtual character is moving on a target vehicle and the target vehicle is in an automatic running state, a current target running speed of the target vehicle is obtained. And under the condition that the target running speed is in the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, and avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again so as to realize the effect of simplifying the vehicle control operation. And then the technical problem that the complexity of the control operation of the carrier is higher because the user needs to manually complete the switching operation of the running mode of the carrier is solved.
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 an application environment of an alternative vehicle control method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of an alternative vehicle control method according to an embodiment of the invention;
fig. 3 is a schematic diagram of an alternative vehicle control method according to an embodiment of the invention;
fig. 4 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 5 is a schematic flow chart of another alternative vehicle control method according to an embodiment of the present invention;
fig. 6 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 7 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 8 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 9 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 10 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention;
fig. 11 is a schematic diagram of another alternative vehicle control method according to an embodiment of the invention; fig. 12 is a schematic structural diagram of an alternative vehicle control apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of an alternative electronic device according to an embodiment of the 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.
According to an aspect of the embodiments of the present invention, an vehicle control method is provided, optionally, as an optional implementation manner, the vehicle control method may be but not limited to be applied to a vehicle control system in a hardware environment as shown in fig. 1, where the vehicle control system may include but is not limited to a terminal device 102, a network 110, and a server 112. The terminal device 102 runs a game client, and is configured to control a target virtual character to complete a game task in a game scene.
The terminal device 102 may include, but is not limited to: a human-computer interaction screen 104, a processor 106 and a memory 108. The man-machine interaction screen 104 is used for acquiring a man-machine interaction instruction through a man-machine interaction interface and is also used for presenting a game picture in a game task; the processor 106 is used for controlling the target virtual character to execute the specified operation to complete the game task in response to the human-computer interaction instruction. The memory 108 is used for storing the attribute information of the target virtual character and the attribute information of the target vehicle taken by the target virtual character. Here, the server may include but is not limited to: the database 114 and the processing engine 116, wherein the processing engine 116 is configured to call a target speed interval stored in the database 114, compare the target speed interval with a current target traveling speed of a target vehicle, and control the target vehicle to maintain an automatic traveling state when the target traveling speed is determined to be in the target speed interval. The automatic driving state is avoided once the driving speed of the target vehicle changes, so that the user object needs to be frequently manually switched from the manual driving state to the automatic driving state again, and the effect of simplifying the complexity of the control operation of the vehicle is achieved.
The specific process comprises the following steps: an interactive interface of a game client running a game task (as shown in fig. 1, a shooting game is adopted, and a target virtual character snipes a target object at a far position) is displayed on a human-computer interaction screen 104 in the terminal device 102. The motion state of the target virtual character is acquired and transmitted to the server 112 through the network 110 as by steps S102-S112. And when the server 112 determines that the target virtual character takes the target vehicle according to the motion state, acquiring a running mode configured for the target vehicle in the game task, monitoring the running speed of the target vehicle when the adopted running mode is determined to be the automatic running mode, and determining that the target vehicle is in the automatic running state when the running speed of the target vehicle reaches the target speed interval and the duration reaches the target threshold. And then returns the determined result to the terminal device 102.
Then, in the case where the target vehicle is determined to be in the automatic traveling state, the terminal device 102 obtains the current target traveling speed of the target vehicle as in steps S114 to S116. And under the condition that the target running speed is within the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again, and further achieving the effect of simplifying the vehicle control operation.
Optionally, as an optional implementation manner, as shown in fig. 2, the vehicle control method includes:
s202, acquiring the motion state of a target virtual character in the process of controlling the target virtual character to run a game task at one game client;
s204, under the condition that the motion state indicates that the target virtual character moves by taking the target carrier and the target carrier is in an automatic running state, acquiring the current target running speed of the target carrier;
and S206, controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering switching control of the automatic driving state.
Optionally, in this embodiment, the vehicle control method may be applied, but not limited to, in game applications that require a vehicle to assist a target virtual character in a game scene to complete a game task, such as a remote shooting type game application, a racing type game application, and the like, and the moving time of the target virtual character is shortened by controlling the target virtual character to ride the vehicle. The Game application may be a Multiplayer Online tactical sports Game (MOBA) or a Single-Player Game (SPG). It should be noted that the types of game applications described above may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.
Optionally, in this embodiment, the motion state of the target virtual character may include, but is not limited to: the riding target carrier moves and moves independently. That is, when the target virtual character receives a movement command and needs to move from point a to point B, one vehicle may be selected to complete the movement, or the movement may be completed by walking or running. In the process of adopting the carrier to move, the moving time of the target virtual character for completing the movement is shortened.
In addition, in the present embodiment, the driving status of the target vehicle may include, but is not limited to: a manual driving state, an automatic driving state, wherein in the manual driving state, the target vehicle needs a user to manually control the moving direction and the moving speed. For example, the moving direction and moving speed of the target vehicle are controlled by control keys and/or a control rocker arranged in the game client. Under the automatic driving state, the target vehicle automatically moves forwards at a constant speed according to the preset driving speed without manually interfering the driving process of the vehicle by a user, so that the user can conveniently execute other game operations in the process of taking the target vehicle to ensure the completion of game tasks.
In the present embodiment, the target speed interval may be, but is not limited to, configured for the target vehicle in advance, and is used for triggering the switching control of the automatic driving state of the target vehicle. For example, when the current target running speed of the target vehicle is in the target speed interval, controlling the target vehicle to keep an automatic running state; and when the current target running speed of the target vehicle is greater than the upper limit speed of the target speed interval or when the current target running speed of the target vehicle is less than the lower limit speed of the target speed interval, triggering the target vehicle to be switched from the automatic running state to the manual running state.
Alternatively, in the present embodiment, the target driving speed may be, but not limited to, a current driving speed obtained by monitoring the target vehicle in real time for the terminal device. That is, after the adjustment operation of the speed adjustment is performed on the target vehicle, the target traveling speed may be, but is not limited to, the adjusted traveling speed of the target vehicle. Wherein, the adjusting operation may include, but is not limited to, one of the following:
1) and acquiring a speed adjusting instruction triggered by executing man-machine interaction operation in the game client. The man-machine interaction operation may be, but is not limited to, a click operation performed on a man-machine interaction key set in a man-machine interaction interface in the game client or a slide operation performed on a man-machine interaction area. The man-machine interaction operation is used for adjusting the running speed of the target vehicle, such as acceleration operation or deceleration operation. That is, the target vehicle running speed is controlled and adjusted in a targeted manner through an active triggering mode.
For example, as shown in fig. 3, when the target virtual character is riding on the target vehicle and the target vehicle is in the automatic travel state, the click operation performed on the acceleration button is acquired, and the acceleration operation is performed on the target vehicle, so that the adjusted travel speed is obtained as the current target travel speed of the target vehicle.
2) And under the condition that the target carrier is detected to collide with a target prop object set in the game task, adjusting the running speed of the target carrier according to the prop type of the target prop object. The prop type of the target prop object may include, but is not limited to: an additive type prop object, and an obstacle type prop object. If the target carrier is determined to collide with the item object of the addition class, performing acceleration operation on the target carrier; and executing deceleration operation on the target vehicle under the condition that the target vehicle is determined to collide with the obstacle type prop object. That is, the driving speed of the target vehicle is adaptively adjusted by passive triggering control.
It should be noted that the method for determining that the target carrier collides with the target item object includes: (1) the target vehicle is provided with a first collision monitoring range, the target prop object is also provided with a second collision monitoring range, and the target vehicle and the target prop object are determined to collide under the condition that intersection of the first collision monitoring range and the second collision monitoring range is detected; (2) the target carrier is provided with a first collision monitoring range, and when the position of the target prop object is detected to be located in the first collision monitoring range, the target carrier is determined to collide with the target prop object; (3) and the target prop object is also provided with a second collision monitoring range, and when the position of the target carrier is detected to be positioned in the second collision monitoring range, the target carrier is determined to collide with the target prop object.
For example, as shown in fig. 4, when the target virtual character is riding on a target vehicle and the target vehicle is in an automatic traveling state, and when it is detected that the target vehicle collides with an obstacle object (such as an obstacle shown in fig. 4) of an obstacle type, a deceleration operation is performed on the target vehicle, and an adjusted traveling speed is obtained as a current target traveling speed of the target vehicle.
Further, in this embodiment, when the target vehicle collides with an obstacle object, the collision may include, but is not limited to: comparing the obstacle height of the obstacle type prop object with the tire radius of the target vehicle; and when the obstacle height is larger than or equal to the tire radius, determining that the target vehicle cannot cross the obstacle object of the obstacle class, and executing deceleration operation until the running speed is reduced to zero (less than the lower limit speed of the target speed interval). That is, in the case where the obstacle height is larger than the tire radius, the target vehicle will eventually exit the automatic travel state. And under the condition that the obstacle height is smaller than the tire radius, determining a prop object of the target vehicle crossing the obstacle class, and after the target vehicle crosses the prop object of the obstacle class, performing deceleration operation on the target vehicle to obtain an adjusted running speed serving as the current target running speed of the target vehicle.
In addition, in the embodiment, when the traveling speed before the adjustment of the target vehicle is within the target speed interval and the adjusted traveling speed is still within the target speed interval, the target vehicle may be controlled to maintain the automatic traveling state. If the upper limit speed of the target speed interval is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is carried out is 85km/h, and the current target running speed obtained after the acceleration operation is carried out is 95 km/h. The target vehicle can be controlled to maintain the automatic traveling state. Further, in the case where no power is applied to the target vehicle to continue acceleration, the target vehicle starts to be passively decelerated due to resistance, but the decelerated traveling speed is still in the target speed range.
In the present embodiment, when it is detected that the current target traveling speed of the target vehicle is greater than the upper limit speed of the target speed section or when it is detected that the current target traveling speed of the target vehicle is less than the lower limit speed of the target speed section, the target vehicle is controlled to be switched from the automatic traveling state to the non-automatic traveling state (which may also be referred to as a manual traveling state). If the upper limit speed of the target speed interval is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target running speed obtained after the acceleration operation is performed is 110km/h, the target vehicle can be controlled to be switched to a non-automatic running state. Further, in the case where no power is applied to the target vehicle to maintain the traveling speed, the target vehicle starts to be passively decelerated due to the resistance, and the decelerated traveling speed eventually reaches zero since the target vehicle enters the non-automatic traveling state.
Optionally, in this embodiment, before acquiring the current target traveling speed of the target vehicle, the method may further include, but is not limited to: in the case where it is determined that the automatic travel mode has been configured for the target vehicle, a travel speed of the target vehicle is detected. And determining an operation mode configured for the game task and prompting information at a position matched with the operation mode under the condition that the running speed of the target vehicle is in a target speed interval and the duration reaches a target threshold value. And after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters an automatic driving state, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.
Further, in the present embodiment, the above operation mode may include, but is not limited to, at least one of the following: a key control mode, a single rocker control mode and a rocker key combination control mode. The key control mode here may be that four direction control keys, such as "up", "down", "left", and "right", are arranged in the human-computer interaction interface of the game client. The four direction control keys can be arranged on one side of the human-computer interaction interface (the user can control the human-computer interaction interface with one hand) or on two sides of the human-computer interaction interface (the user can control the human-computer interaction interface with two hands, for example, one side is 'up' and 'down', and the other side is 'left' and 'right'). Here, "up" and "down" may be used to control the target vehicle to advance or reverse, and "left" and "right" are used to control the target vehicle to turn left or right. The single-rocker control mode may be to provide a rocker control panel in the human-machine interface of the game client. The swing rod control panel slides in the swing rod control panel to realize the movement control of the target carrier in four directions of up, down, left and right. The rocker button can be provided with a steering wheel and an acceleration button (also called as an accelerator) in a man-machine interaction interface in combination with a control mode. The steering wheel is used for controlling the target vehicle to turn left or turn right, and the acceleration key is used for controlling the target vehicle to advance.
The description is made with reference to the example shown in fig. 5: it is assumed that a target virtual character is controlled to perform one game task in a remote shooting-type game client. Further, in the case that it is determined that the target virtual character is moving on the target vehicle according to the motion state of the target virtual character, the steps S502 to S514 are executed:
in step S502, the driving mode configured for the target vehicle is obtained, and if it is determined in step S504-1 that the driving mode is the non-automatic driving mode, step S506-1 is executed to control the target vehicle to be in the manual driving state all the time without detecting whether the current target driving speed of the target vehicle is in the target speed interval. Further, it may be continuously detected whether the driving mode of the target vehicle is adjusted to the automatic driving mode in the game task.
In the case where the target vehicle is determined to be in the automatic driving mode in step S504-2, step S506-2 is executed to determine whether the current target driving speed of the target vehicle is within the target speed range and the duration thereof reaches the target threshold? And under the condition that the current target running speed of the target carrier is determined to be in the target speed interval and the duration reaches the target threshold value, acquiring an operation mode configured for the game task, and determining a confirmation mode of the automatic running state according to the operation mode. If the operation mode is determined to be the key control mode, a first determination manner of the automatic driving state is adopted (for example, a first prompt key is displayed at a first position matched with the key control mode) in steps S508-1 to S510-1; if the operation mode is determined to be the single-rocker control mode, adopting a second confirmation mode of the automatic driving state (for example, displaying a prompt track on the operation area matched with the single-rocker control mode) in steps S508-2 to S510-2; in step S508-3 to step S510-3, if the operation mode is determined to be the rocker key combination control mode, a third confirmation manner of the automatic driving state is adopted (for example, a second prompt key is displayed at a second position matching the rocker key combination control mode).
Further, in step S512-1, if it is detected that the target vehicle is not confirmed to enter the automatic driving state according to the confirmation method, that is, the target vehicle is still in the manual driving state, the method returns to step S502 to continue the detection. In steps S512-2 to S514, upon detecting that the target vehicle is confirmed to enter the automatic traveling state according to the confirmation method, the speed protection is performed on the target vehicle (i.e. the target vehicle is controlled to maintain the automatic traveling state if the target traveling speed of the target vehicle is within the target speed interval). And continuously detecting the current target running speed of the target carrier.
In step S506-2, if it is determined that the current target traveling speed of the target vehicle is not within the target speed interval and/or the duration of the target speed interval does not reach the target threshold, it is determined that the target vehicle is still in the manual traveling state (as in step S512-1), and the process returns to step S504-2 for continuous detection.
According to the embodiment provided by the application, in the process that the game client controls the target virtual character to run one game task, the motion state of the target virtual character is obtained, and under the condition that the motion state indicates that the target virtual character is moving by taking the target carrier and the target carrier is in the automatic running state, the current target running speed of the target carrier is obtained. And under the condition that the target running speed is in the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, and avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again so as to realize the effect of simplifying the vehicle control operation. And further overcome the problem that the complexity of the vehicle control operation is high because the user needs to manually and frequently switch the vehicle running state in the related technology.
As an alternative, in a case that the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in the automatic driving state, acquiring the current target driving speed of the target vehicle includes:
s1, acquiring a speed adjusting instruction triggered by executing man-machine interaction operation in the game client, wherein the speed adjusting instruction is used for indicating and adjusting the target running speed;
s2, responding to the speed adjusting instruction, adjusting the running speed of the target vehicle to obtain the adjusted running speed;
at S3, the adjusted running speed is set as the acquired target running speed.
Optionally, in this embodiment, the human-computer interaction operation for triggering the speed adjustment instruction may include, but is not limited to, one of the following: the operation for triggering the target vehicle to accelerate and the operation for triggering the target vehicle to decelerate. Furthermore, the operation type of the human-computer interaction operation here may include, but is not limited to, at least one of the following: clicking a key, sliding an interaction area and clicking input voice. For example, an 'acceleration' key for triggering acceleration and a 'brake' key for triggering deceleration are arranged in the human-computer interaction interface; for another example, the interaction area in the human-computer interaction interface is set, and the up-sliding trigger is accelerated, the down-sliding trigger is decelerated, and the like. The above is merely an example, and this is not limited in this embodiment.
Specifically, referring to fig. 3, still taking the remote shooting game application as an example, the game client controls the target virtual character to execute one game task, and when it is determined that the target virtual character is riding on the target vehicle and the target vehicle is in the automatic driving state, if a click operation performed on the "acceleration" key shown in fig. 3 is acquired and a speed adjustment command (for example, an acceleration command) is generated in response to the click operation, the game client performs an acceleration operation on the target vehicle ridden on the target virtual character, for example, applies power to obtain an acceleration-adjusted driving speed, and uses the adjusted driving speed as the current target driving speed of the target vehicle. Further, comparing the target running speed with the upper limit speed and the lower limit speed of the target speed interval, and controlling the target vehicle to continuously keep the automatic running state if the target running speed is still in the target speed interval.
According to the embodiment provided by the application, the speed adjusting instruction triggered by executing the man-machine interaction operation in the game client is obtained, the running speed of the target carrier is adjusted in response to the speed adjusting instruction, the current target running speed is obtained, whether the target carrier is still in the automatic running state is further judged according to the target running speed, and therefore the situation that the target carrier is directly triggered to exit the automatic running state when the running speed of the target carrier changes is avoided, the target carrier in the automatic running state is subjected to speed protection, and the problem that the carrier control operation is complex due to the fact that a user needs to frequently and manually switch the running state in the related art is solved.
As an alternative, in a case that the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in the automatic driving state, acquiring the current target driving speed of the target vehicle includes:
s1, determining the item type of the target item object when the collision between the target carrier and the target item object set in the game task is detected;
s2, under the condition that the item type indicates that the target item object is an addition item object, performing acceleration operation on the target vehicle to obtain accelerated running speed as target running speed;
and S3, when the item type indicates that the target item object is an item object of the obstacle type, executing a deceleration operation on the target vehicle to obtain a decelerated running speed as a target running speed.
Optionally, in this embodiment, the target item object may include, but is not limited to: the method comprises the steps of adding a type item object and an obstacle type item object, wherein the adding type item object is used for executing acceleration operation on a target vehicle, such as an acceleration auxiliary item; the obstacle object is used for performing deceleration operation on the target vehicle, such as roadblocks and the like.
It should be noted that, the target item object may be, but is not limited to, set at a predetermined geographic location in the game task, and after the target vehicle travels at the geographic location, the target vehicle will be passively triggered to collide, resulting in deceleration of the target vehicle. The above is merely an example, and this is not limited in this embodiment.
Specifically, referring to fig. 4, still taking the remote shooting game application as an example, the game client controls the target virtual character to execute one game task, and when it is determined that the target virtual character is riding on the target vehicle and the target vehicle is in the automatic running state, if it is detected that the target vehicle collides with an obstacle object (such as an obstacle shown in fig. 4) of the obstacle type as shown in fig. 4, the game client performs a deceleration operation on the target vehicle riding on the target virtual character to obtain a decelerated and adjusted running speed, and the adjusted running speed is used as the current target running speed of the target vehicle. Further, comparing the target running speed with the upper limit speed and the lower limit speed of the target speed interval, and controlling the target vehicle to continuously keep the automatic running state if the target running speed is still in the target speed interval.
Alternatively, in this embodiment, in the step S3, the performing the deceleration operation on the target vehicle to obtain the decelerated traveling speed includes:
s31, comparing the obstacle height of the target prop object with the tire radius of the target vehicle;
s32, determining that the target vehicle cannot cross the target prop object under the condition that the obstacle height is larger than or equal to the radius of the tire; after the target vehicle is subjected to the deceleration operation, the decelerated running speed of the target vehicle reaches zero;
s33, determining that the target vehicle will cross the target prop object under the condition that the obstacle height is smaller than the radius of the tire; and acquiring the decelerated running speed after the target carrier crosses the target prop object.
Specifically, as shown in fig. 6, if the obstacle height h of the obstacle object is greater than the tire radius r, it is determined that the target vehicle cannot cross the obstacle object, and the traveling speed of the target vehicle is finally reduced to zero (less than the lower limit speed of the target speed interval) after the target vehicle performs the deceleration operation. That is, in the case where the obstacle height is larger than the tire radius, the target vehicle will eventually exit the automatic travel state.
In addition, as shown in fig. 7, when the obstacle height h is smaller than the tire radius r, it is determined that the target vehicle will cross the item object of the obstacle class. Further, after the target vehicle crosses the obstacle-like item object, a deceleration operation is performed on the target vehicle to obtain an adjusted running speed as the current target running speed of the target vehicle.
According to the embodiment provided by the application, under the condition that the target carrier is detected to collide with the target prop object set in the game task, the prop type of the target prop object is determined; and performing speed adjustment on the target carrier according to the property type to obtain the current target running speed, and further judging whether the target carrier is still in an automatic running state according to the target running speed, so that the target carrier is directly triggered to exit the automatic running state when the running speed of the target carrier changes, the speed protection of the target carrier in the automatic running state is realized, and the problem of complex carrier control operation caused by frequent manual switching of the running state by a user in the related technology is further solved.
As an optional scheme, after obtaining the current target running speed of the target vehicle, the method further includes:
1) controlling the target vehicle to keep an automatic driving state under the condition that the target driving speed is detected to be increased and still less than the upper limit speed of the target speed interval;
2) in the case where it is detected that the target travel speed has decreased but is still greater than the lower limit speed of the target speed section, the target vehicle is controlled to maintain the automatic travel state.
In the present embodiment, when it is determined that the traveling speed of the target vehicle has changed, the changed target traveling speed v and the target speed section [ v ] allocated to the target vehicle are requiredLower part,vOn the upper part]A comparison is made. Assume that the current target traveling speed v of the target vehicle after the adjustment has increased relative to the traveling speed v0 before the adjustment, but is still less than the upper limit speed v of the target speed sectionOn the upper partAnd controlling the target vehicle to keep the automatic running state. Alternatively, it is assumed that the current target traveling speed v of the target vehicle after the adjustment is reduced from the traveling speed v0 before the adjustment, but is still greater than the lower limit speed v of the target speed sectionLower partThen control the targetThe vehicle keeps the automatic driving state.
For example, it is assumed that the upper limit speed of the target speed section is 100km/h, the lower limit speed is 80km/h, the running speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target running speed obtained after the acceleration operation is performed is 95 km/h. The target vehicle can be controlled to maintain the automatic traveling state. Further, in the case where no power is applied to the target vehicle to continue acceleration, the target vehicle starts to be passively decelerated due to resistance, but the decelerated traveling speed is still in the target speed range.
As an optional scheme, after obtaining the current target running speed of the target vehicle, the method further includes:
1) controlling the target vehicle to be switched from an automatic driving state to a non-automatic driving state under the condition that the target driving speed is detected to be larger than the upper limit speed of the target speed interval;
2) and controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state when the target driving speed is detected to be smaller than the lower limit speed of the target speed section.
In the present embodiment, when it is determined that the traveling speed of the target vehicle has changed, the changed target traveling speed v and the target speed section [ v ] allocated to the target vehicle are requiredLower part,vOn the upper part]A comparison is made. Assuming that the current target traveling speed v of the target vehicle after adjustment is greater than the upper limit speed v of the target speed section with respect to the traveling speed v0 before adjustmentOn the upper partAnd controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state. Alternatively, it is assumed that the current target traveling speed v of the target vehicle after adjustment is lower than the lower limit speed v of the target speed section with respect to the traveling speed v0 before adjustmentLower partAnd controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state.
For example, if the upper limit speed of the target speed section is 100km/h, the lower limit speed is 80km/h, the traveling speed of the target vehicle before the acceleration operation is performed is 85km/h, and the current target traveling speed obtained after the acceleration operation is performed is 110km/h, the target vehicle may be controlled to switch to the non-automatic traveling state. Further, in the case where no power is applied to the target vehicle to maintain the traveling speed, the target vehicle starts to be passively decelerated due to the resistance, and the decelerated traveling speed eventually reaches zero since the target vehicle enters the non-automatic traveling state.
By the embodiment provided by the application, when the current target running speed is not in the target speed interval after the target vehicle is detected to be adjusted, the control target vehicle is switched from the automatic running state to the non-automatic running state, and after the acceleration power disappears, the running speed of the target vehicle is reduced along with the control target vehicle and is finally reduced to zero. Therefore, the target carrier is recovered to the manual driving state, and the target carrier can still be ensured to flexibly exit from the automatic driving state.
As an optional scheme, before obtaining the current target running speed of the target vehicle, the method further includes:
s1, detecting a travel speed of the target vehicle in a case where it is determined that the automatic travel mode has been configured for the target vehicle;
s2, determining an operation mode configured for the game task when the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches the target threshold value;
s3, displaying the prompt information at the position matched with the operation mode in the game client;
and S4, after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters an automatic driving state, wherein the confirmation instruction is an instruction triggered by the user object using the game client to execute a confirmation operation.
Optionally, in this embodiment, the game client may further include, but is not limited to, configuring an automatic driving mode for the target vehicle and configuring an operation mode for the game task.
The description is made with reference to the example shown in fig. 8:
as shown in fig. 8, an automatic driving mode may be configured in the configuration interface, and when it is determined that the target vehicle is configured as the automatic driving mode when it is set to "on" as shown in fig. 8, in the case that it is detected that the driving speed of the target vehicle is in the target speed interval and the duration reaches the target threshold, the user may be directly prompted to confirm whether to enter the automatic driving state.
Further, as shown in fig. 8, an operation mode may also be configured in the configuration interface, as shown in fig. 8, where the operation mode includes one of the following: a key control mode, a single rocker control mode and a rocker key combination control mode. Here, the key control mode may be that four direction control keys, such as "up", "down", "left", and "right", are arranged in the human-computer interaction interface of the game client, as shown in fig. 9. Here, "up" and "down" may be used to control the target vehicle to advance or reverse, and "left" and "right" are used to control the target vehicle to turn left or right. The single-rocker control mode may be to provide a rocker control panel in the human-machine interface of the game client. Wherein, the swing rod control panel slides to realize the movement control of the target vehicle in four directions of up, down, left and right, as shown in fig. 10. The rocker button and the control mode may be a steering wheel and an acceleration button (also referred to as a throttle) disposed in the human-computer interface, as shown in fig. 11. The steering wheel is used for controlling the target vehicle to turn left or turn right, and the acceleration key is used for controlling the target vehicle to advance.
Optionally, in this embodiment, displaying the prompt information at the position in the game client that matches the operation mode includes:
1) under the condition that the operation mode is a key control mode, displaying a first prompt key at a first position matched with the key control mode, wherein after the click operation executed on the first prompt key is detected, a confirmation instruction is generated to determine that the target vehicle enters an automatic driving state;
2) under the condition that the operation mode is a single-rocker control mode, displaying a prompt track on an operation area matched with the single-rocker control mode, wherein after detecting that a user object performs sliding operation according to the prompt track, a confirmation instruction is generated to determine that the target vehicle enters an automatic driving state;
3) and under the condition that the operation mode is a rocker key combination control mode, displaying a second prompt key at a second position matched with the rocker key combination control mode, wherein after the click operation executed on the second prompt key is detected, a confirmation instruction is generated, and the target vehicle is determined to enter an automatic driving state.
Specifically, as described with reference to fig. 9, it is assumed that, when the operation mode is the key control mode, the first presentation key is displayed at the first position matching the key control mode. As shown in fig. 9, an automatic travel state confirmation key is provided in the vicinity of the up and down direction keys, and when a confirmation instruction triggered by a click operation performed on the confirmation key by the user object is acquired, it is determined that the control target vehicle enters the automatic travel state.
Specifically, as described with reference to fig. 10, it is assumed that when the operation mode is the single-stick control mode, the presentation trajectory is displayed in the operation area matching the single-stick control mode. As shown in fig. 10, a prompt trajectory is displayed in the area near the joystick control panel, and when a confirmation instruction triggered by a slide operation performed by the user object in accordance with the prompt trajectory is acquired, it is determined that the control target vehicle enters the automatic travel state.
Specifically, as described with reference to fig. 11, it is assumed that, when the operation mode is the rocker key combination control mode, the second prompt key is displayed at the second position matching the rocker key combination control mode. As shown in fig. 11, an automatic travel state confirmation key is provided near the "accelerator", and when a confirmation instruction triggered by a click operation performed on the confirmation key by the user object is acquired, it is determined that the control target vehicle enters the automatic travel state.
By the embodiment provided by the application, aiming at different operation modes configured for the game task, different confirmation prompt modes are determined, so that whether the target vehicle meeting the conditions is controlled to enter the automatic driving state or not is confirmed by using the user object of the game client. Therefore, manual intervention operation of a user is avoided, other game operations in the game task are executed by hands, control operation on the target carrier is simplified, and efficiency of completing the game task is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiments of the present invention, there is also provided a vehicle control apparatus for implementing the vehicle control method. As shown in fig. 12, the apparatus includes:
1) a first obtaining unit 1202 configured to obtain a motion state of a target virtual character during a game client controlling the target virtual character to run a one-game task;
2) a second obtaining unit 1204, configured to obtain a current target traveling speed of the target vehicle when the motion state indicates that the target virtual character is moving on the target vehicle and the target vehicle is in an automatic traveling state;
3) a first control unit 1206, configured to control the target vehicle to maintain the automatic traveling state if the target traveling speed is within a target speed interval configured for the target vehicle, where the target speed interval is used to trigger switching control of the automatic traveling state.
Alternatively, in the present embodiment, the vehicle control device may be applied to, but not limited to, game applications that require a vehicle to assist a target virtual character in a game scene to complete a game task, such as a remote shooting type game application, a racing type game application, and the like, and the moving time of the target virtual character is shortened by controlling the target virtual character to ride the vehicle. The Game application may be a Multiplayer Online tactical sports Game (MOBA) or a Single-Player Game (SPG). It should be noted that the types of game applications described above may include, but are not limited to, at least one of the following: two-dimensional (2D) game applications, Three-dimensional (3D) game applications, Virtual Reality (VR) game applications, Augmented Reality (AR) game applications, Mixed Reality (MR) game applications. The above is merely an example, and the present embodiment is not limited to this.
Optionally, in this embodiment, the motion state of the target virtual character may include, but is not limited to: the riding target carrier moves and moves independently. That is, when the target virtual character receives a movement command and needs to move from point a to point B, one vehicle may be selected to complete the movement, or the movement may be completed by walking or running. In the process of adopting the carrier to move, the moving time of the target virtual character for completing the movement is shortened.
In addition, in the present embodiment, the driving status of the target vehicle may include, but is not limited to: a manual driving state, an automatic driving state, wherein in the manual driving state, the target vehicle needs a user to manually control the moving direction and the moving speed. For example, the moving direction and moving speed of the target vehicle are controlled by control keys and/or a control rocker arranged in the game client. Under the automatic driving state, the target vehicle automatically moves forwards at a constant speed according to the preset driving speed without manually interfering the driving process of the vehicle by a user, so that the user can conveniently execute other game operations in the process of taking the target vehicle to ensure the completion of game tasks.
In the present embodiment, the target speed interval may be, but is not limited to, configured for the target vehicle in advance, and is used for triggering the switching control of the automatic driving state of the target vehicle. For example, when the current target running speed of the target vehicle is in the target speed interval, controlling the target vehicle to keep an automatic running state; and when the current target running speed of the target vehicle is greater than the upper limit speed of the target speed interval or when the current target running speed of the target vehicle is less than the lower limit speed of the target speed interval, triggering the target vehicle to be switched from the automatic running state to the manual running state.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
According to the embodiment provided by the application, in the process that the game client controls the target virtual character to run one game task, the motion state of the target virtual character is obtained, and under the condition that the motion state indicates that the target virtual character is moving by taking the target carrier and the target carrier is in the automatic running state, the current target running speed of the target carrier is obtained. And under the condition that the target running speed is in the target speed interval, controlling the target vehicle to keep an automatic running state so as to avoid triggering the target vehicle to exit the automatic running state due to the change of the running speed of the target vehicle, thereby achieving the purpose of speed protection of the target vehicle in the automatic running state, and avoiding the need of repeatedly manually adjusting by a user to recover to the automatic running state again so as to realize the effect of simplifying the vehicle control operation. And further overcome the problem that the complexity of the vehicle control operation is high because the user needs to manually and frequently switch the vehicle running state in the related technology.
As an alternative, the second obtaining unit 1204 includes:
1) the system comprises a first acquisition module, a second acquisition module and a control module, wherein the first acquisition module is used for acquiring a speed adjustment instruction triggered by executing human-computer interaction operation in a game client, and the speed adjustment instruction is used for indicating and adjusting the target running speed;
2) the adjusting module is used for responding to the speed adjusting instruction and adjusting the running speed of the target carrier to obtain the adjusted running speed;
3) and the first determining module is used for taking the adjusted running speed as the acquired target running speed.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an alternative, the second obtaining unit 1204 includes:
1) the second determining module is used for determining the item type of the target item object under the condition that the target carrier is detected to collide with the target item object set in the game task;
2) the first operation module is used for executing acceleration operation on the target vehicle to obtain accelerated running speed serving as target running speed under the condition that the property type indicates that the target property object is an addition type property object;
3) and the second operation module is used for executing deceleration operation on the target vehicle to obtain a decelerated running speed as the target running speed under the condition that the property type indicates that the target property object is the property object of the obstacle class.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an alternative, the second operation module includes:
1) the comparison submodule is used for comparing the obstacle height of the target prop object and the tire radius of the target carrier;
2) the first determining submodule is used for determining that the target vehicle cannot cross the target prop object under the condition that the obstacle height is larger than or equal to the radius of the tire; after the target vehicle is subjected to the deceleration operation, the decelerated running speed of the target vehicle reaches zero;
3) a second determining submodule for determining that the target vehicle will cross the target prop object if the obstacle height is less than the tire radius; and acquiring the decelerated running speed after the target carrier crosses the target prop object.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an optional scheme, the method further comprises the following steps:
1) a second control unit, configured to, after acquiring a current target traveling speed of the target vehicle, control the target vehicle to maintain an automatic traveling state if it is detected that the target traveling speed has increased but is still less than an upper limit speed of the target speed interval;
2) and a third control unit for controlling the target vehicle to maintain the automatic travel state in a case where it is detected that the target travel speed has decreased but is still greater than a lower limit speed of the target speed section.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an optional scheme, the method further comprises the following steps:
1) the fourth control unit is used for controlling the target vehicle to be switched from the automatic driving state to the non-automatic driving state under the condition that the target driving speed is detected to be larger than the upper limit speed of the target speed interval after the current target driving speed of the target vehicle is obtained;
2) and a fifth control unit for controlling the target vehicle to switch from the automatic travel state to the non-automatic travel state in a case where it is detected that the target travel speed is less than a lower limit speed of the target speed section.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an optional scheme, the method further comprises the following steps:
1) the detection unit is used for detecting the running speed of the target vehicle under the condition that the automatic running mode is determined to be configured for the target vehicle before the current target running speed of the target vehicle is obtained;
2) the first determining unit is used for determining an operation mode configured for the game task under the condition that the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches a target threshold value;
3) the display unit is used for displaying prompt information at a position matched with the operation mode in the game client;
4) and the second determining unit is used for determining that the target vehicle enters an automatic driving state after a confirmation instruction is obtained according to the prompt information, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
As an alternative, the display unit includes:
1) the first display module is used for displaying a first prompt key at a first position matched with the key control mode under the condition that the operation mode is the key control mode, wherein a confirmation instruction is generated to determine that the target vehicle enters an automatic driving state after the click operation executed on the first prompt key is detected;
2) the second display module is used for displaying a prompt track on an operation area matched with the single-rocker control mode under the condition that the operation mode is the single-rocker control mode, wherein after the sliding operation executed by the user object according to the prompt track is detected, a confirmation instruction is generated to determine that the target vehicle enters the automatic driving state;
3) and the third display module is used for displaying a second prompt key at a second position matched with the rocker key combination control mode under the condition that the operation mode is the rocker key combination control mode, wherein a confirmation instruction is generated after the click operation executed on the second prompt key is detected, and the target vehicle is determined to enter the automatic driving state.
For a specific embodiment, reference may be made to the example shown in the vehicle control method, and details in this example are not described herein again.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device for implementing the vehicle control method, as shown in fig. 13, the electronic device includes a memory 1302 and a processor 1304, the memory 1302 stores a computer program, and the processor 1304 is configured to execute the steps in any one of the method embodiments through the computer program.
Optionally, in this embodiment, the electronic apparatus may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring the motion state of the target virtual character in the process that the game client controls the target virtual character to run a game task;
s2, acquiring the current target running speed of the target vehicle under the condition that the motion state indicates that the target virtual character is moving by taking the target vehicle and the target vehicle is in an automatic running state;
and S3, controlling the target vehicle to keep the automatic driving state when the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering the switching control of the automatic driving state.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 13 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palmtop computer, and a Mobile Internet Device (MID), a PAD, and the like. Fig. 13 is a diagram illustrating a structure of the electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
The memory 1302 may be used to store software programs and modules, such as program instructions/modules corresponding to the vehicle control method and apparatus in the embodiments of the present invention, and the processor 1304 executes various functional applications and data processing by running the software programs and modules stored in the memory 1302, that is, implementing the vehicle control method. The memory 1302 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1302 may further include memory located remotely from the processor 1304, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1302 may be specifically, but not limited to, used for storing attribute information of the target virtual character, and information such as attribute information and status information of the target vehicle. As an example, as shown in fig. 13, the memory 1302 may include, but is not limited to, a first obtaining unit 1202, a second obtaining unit 1204 and a first control unit 1206 of the vehicle control device. In addition, the vehicle control device may further include, but is not limited to, other module units in the vehicle control device, which is not described in detail in this example.
Optionally, the transmitting device 1306 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 1306 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmitting device 1306 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In addition, the electronic device further includes: a display 1308 for displaying a game screen in a game task; and a connection bus 1310 for connecting the respective module parts in the above-described electronic apparatus.
According to a further aspect of an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, acquiring the motion state of the target virtual character in the process that the game client controls the target virtual character to run a game task;
s2, acquiring the current target running speed of the target vehicle under the condition that the motion state indicates that the target virtual character is moving by taking the target vehicle and the target vehicle is in an automatic running state;
and S3, controlling the target vehicle to keep the automatic driving state when the target driving speed is in a target speed interval configured for the target vehicle, wherein the target speed interval is used for triggering the switching control of the automatic driving state.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
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.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above 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 several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
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 several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be 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 network 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 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 (14)
1. A vehicle control method, comprising:
the method comprises the steps that in the process that a game client controls a target virtual character to run a game task, the motion state of the target virtual character is obtained;
when the motion state indicates that the target virtual character moves by taking a target vehicle and the target vehicle is in an automatic running state, responding to an operation triggered in the game client, and acquiring an adjusted running speed as a current target running speed of the target vehicle; determining that the target running speed is in a target speed interval and controlling the target vehicle to keep the automatic running state under the condition that the target running speed is greater than a lower limit speed of a target speed interval configured for the target vehicle and is less than an upper limit speed of the target speed interval;
controlling the target vehicle to maintain the automatic running state under the condition that the target running speed is detected to be increased, but the increased running speed is still less than the upper limit speed of the target speed interval; or
Controlling the target vehicle to maintain the automatic driving state under the condition that the target driving speed is detected to be reduced, but the reduced driving speed is still larger than the lower limit speed of the target speed interval;
controlling the target vehicle to switch from the automatic driving state to a non-automatic driving state in the case that the target driving speed is detected to be greater than the upper limit speed of the target speed interval;
controlling the target vehicle to switch from the automatic travel state to a non-automatic travel state if it is detected that the target travel speed is less than the lower limit speed of the target speed interval.
2. The method of claim 1, wherein, in a case that the motion state indicates that the target virtual character is moving with a target vehicle and the target vehicle is in an automatic travel state, acquiring the adjusted travel speed as the current target travel speed of the target vehicle in response to an operation triggered in the game client comprises:
acquiring a speed adjusting instruction triggered by executing human-computer interaction operation in the game client, wherein the speed adjusting instruction is used for indicating to adjust the target running speed;
responding to the speed adjusting instruction, and adjusting the running speed of the target vehicle to obtain the adjusted running speed;
and taking the adjusted running speed as the acquired target running speed.
3. The method of claim 1, wherein, in a case that the motion state indicates that the target virtual character is moving with a target vehicle and the target vehicle is in an automatic travel state, acquiring the adjusted travel speed as the current target travel speed of the target vehicle in response to an operation triggered in the game client comprises:
determining the prop type of a target prop object under the condition that the target carrier is detected to collide with the target prop object set in the game task;
under the condition that the prop type indicates that the target prop object is an addition prop object, performing acceleration operation on the target vehicle to obtain accelerated running speed serving as the target running speed;
and under the condition that the prop type indicates that the target prop object is a prop object of an obstacle class, executing a deceleration operation on the target vehicle to obtain a decelerated running speed serving as the target running speed.
4. The method of claim 3, wherein the performing a deceleration operation on the target vehicle to obtain a decelerated travel speed comprises:
comparing the obstacle height of the target prop object with the tire radius of the target vehicle;
determining that the target vehicle will not be able to cross the target prop object if the obstacle height is greater than or equal to the tire radius; after performing a deceleration operation on the target vehicle, the decelerated travel speed of the target vehicle will reach zero;
determining that the target vehicle will span the target prop object if the obstacle height is less than the tire radius; and acquiring the decelerated running speed after the target carrier crosses the target prop object.
5. The method of claim 1, further comprising, prior to said obtaining the adjusted travel speed as the current target travel speed of the target vehicle:
detecting a travel speed of the target vehicle if it is determined that an automatic travel mode has been configured for the target vehicle;
determining an operation mode configured for the game task under the condition that the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches a target threshold value;
displaying prompt information at a position matched with the operation mode in the game client;
and after a confirmation instruction is acquired according to the prompt information, determining that the target vehicle enters the automatic driving state, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.
6. The method of claim 5, wherein displaying the hint information at the location in the game client that matches the operational mode comprises:
under the condition that the operation mode is a key control mode, displaying a first prompt key at a first position matched with the key control mode, wherein after the click operation executed on the first prompt key is detected, the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state;
displaying a prompt track on an operation area matched with the single-rocker control mode under the condition that the operation mode is the single-rocker control mode, wherein after the sliding operation executed by the user object according to the prompt track is detected, the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state;
and under the condition that the operation mode is a rocker key combination control mode, displaying a second prompt key at a second position matched with the rocker key combination control mode, wherein after the click operation executed on the second prompt key is detected, the confirmation instruction is generated, and the target vehicle is determined to enter the automatic driving state.
7. A vehicle control device, comprising:
the game client side is used for controlling the target virtual character to run a game task, and acquiring the motion state of the target virtual character;
a second obtaining unit, configured to, in a case that the motion state indicates that the target virtual character is moving by taking a target vehicle and the target vehicle is in an automatic running state, obtain, in response to an operation triggered in the game client, an adjusted running speed as a current target running speed of the target vehicle;
a first control unit configured to determine that the target travel speed is in a target speed section and control the target vehicle to maintain the automatic travel state when the target travel speed is greater than a lower limit speed of the target speed section configured for the target vehicle and less than an upper limit speed of the target speed section;
a second control unit, configured to, after the current target traveling speed of the target vehicle is obtained, control the target vehicle to maintain the automatic traveling state if it is detected that the target traveling speed has increased but is still less than an upper limit speed of the target speed interval;
a third control unit configured to control the target vehicle to maintain the automatic travel state if it is detected that the target travel speed has decreased but is still greater than a lower limit speed of the target speed section;
a fourth control unit, configured to, after the current target traveling speed of the target vehicle is obtained, control the target vehicle to switch from the automatic traveling state to a non-automatic traveling state when it is detected that the target traveling speed is greater than an upper limit speed of the target speed interval;
a fifth control unit, configured to control the target vehicle to switch from the automatic travel state to a non-automatic travel state when it is detected that the target travel speed is less than a lower limit speed of the target speed section.
8. The apparatus of claim 7, wherein the second obtaining unit comprises:
the first acquisition module is used for acquiring a speed adjustment instruction triggered by executing human-computer interaction operation in the game client, wherein the speed adjustment instruction is used for indicating to adjust the target running speed;
the adjusting module is used for responding to the speed adjusting instruction and adjusting the running speed of the target carrier to obtain the adjusted running speed;
and the first determination module is used for taking the adjusted running speed as the acquired target running speed.
9. The apparatus of claim 7, wherein the second obtaining unit comprises:
the second determination module is used for determining the prop type of the target prop object under the condition that the target carrier is detected to collide with the target prop object set in the game task;
the first operation module is used for executing acceleration operation on the target vehicle to obtain accelerated running speed serving as the target running speed under the condition that the property type indicates that the target property object is an addition type property object;
and the second operation module is used for executing deceleration operation on the target vehicle to obtain a decelerated running speed as the target running speed under the condition that the prop type indicates that the target prop object is a prop object of an obstacle class.
10. The apparatus of claim 9, wherein the second operation module comprises:
the comparison submodule is used for comparing the obstacle height of the target prop object and the tire radius of the target carrier;
a first determining submodule for determining that the target vehicle will not be able to cross the target prop object if the obstacle height is greater than or equal to the tire radius; after performing a deceleration operation on the target vehicle, the decelerated travel speed of the target vehicle will reach zero;
a second determination submodule to determine that the target vehicle will cross the target prop object if the obstacle height is less than the tire radius; and acquiring the decelerated running speed after the target carrier crosses the target prop object.
11. The apparatus of claim 7, further comprising:
a detection unit, configured to detect a driving speed of the target vehicle when it is determined that an automatic driving mode has been configured for the target vehicle before the adjusted driving speed is obtained as a current target driving speed of the target vehicle;
the first determining unit is used for determining an operation mode configured for the game task under the condition that the running speed of the target vehicle is detected to be in the target speed interval and the duration time reaches a target threshold value;
the display unit is used for displaying prompt information at a position matched with the operation mode in the game client;
and the second determining unit is used for determining that the target vehicle enters the automatic driving state after a confirmation instruction is obtained according to the prompt information, wherein the confirmation instruction is an instruction triggered by a user object using the game client to execute a confirmation operation.
12. The apparatus of claim 11, wherein the display unit comprises:
the first display module is used for displaying a first prompt key at a first position matched with the key control mode under the condition that the operation mode is the key control mode, wherein the confirmation instruction is generated after the click operation executed on the first prompt key is detected so as to determine that the target vehicle enters the automatic driving state;
a second display module, configured to display a prompt track on an operation area matched with the single-joystick control mode when the operation mode is the single-joystick control mode, where the confirmation instruction is generated to determine that the target vehicle enters the automatic driving state after a sliding operation performed by the user object according to the prompt track is detected;
and the third display module is used for displaying a second prompt key at a second position matched with the rocker key combination control mode under the condition that the operation mode is the rocker key combination control mode, wherein the confirmation instruction is generated after the click operation executed on the second prompt key is detected, and the target vehicle is determined to enter the automatic driving state.
13. A computer-readable storage medium comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 6.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911032602.4A CN110772784B (en) | 2019-10-28 | 2019-10-28 | Carrier control method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911032602.4A CN110772784B (en) | 2019-10-28 | 2019-10-28 | Carrier control method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110772784A CN110772784A (en) | 2020-02-11 |
CN110772784B true CN110772784B (en) | 2021-05-11 |
Family
ID=69387057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911032602.4A Active CN110772784B (en) | 2019-10-28 | 2019-10-28 | Carrier control method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110772784B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111514587B (en) | 2020-04-27 | 2021-05-11 | 网易(杭州)网络有限公司 | Information processing method, device, equipment and storage medium |
CN111760275B (en) * | 2020-07-08 | 2024-07-30 | 网易(杭州)网络有限公司 | Game control method and device and electronic equipment |
CN112896177B (en) * | 2021-03-26 | 2023-01-10 | 北京车和家信息技术有限公司 | Method and device for determining vehicle running speed, storage medium and electronic equipment |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6467888B2 (en) * | 2014-11-27 | 2019-02-13 | いすゞ自動車株式会社 | Vehicle automatic traveling control device and vehicle automatic traveling method |
CN108349504B (en) * | 2015-11-04 | 2022-05-10 | 日产自动车株式会社 | Autonomous vehicle operation device and autonomous vehicle operation method |
CN108509139B (en) * | 2018-03-30 | 2019-09-10 | 腾讯科技(深圳)有限公司 | Control method for movement, device, electronic device and the storage medium of virtual objects |
CN110124307B (en) * | 2019-04-26 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Operation control method and apparatus, storage medium, and electronic apparatus |
CN110134462B (en) * | 2019-05-09 | 2020-12-01 | 腾讯科技(深圳)有限公司 | Control method and device of virtual role, storage medium and electronic device |
CN110090443B (en) * | 2019-05-24 | 2021-03-16 | 腾讯科技(深圳)有限公司 | Virtual object control method and device, storage medium and electronic device |
-
2019
- 2019-10-28 CN CN201911032602.4A patent/CN110772784B/en active Active
Non-Patent Citations (2)
Title |
---|
孤岛惊魂4怎么自动驾驶;吾爱当当当;《https://jingyan.baidu.com/article/0eb457e5d7568403f1a90513.html》;20180103;全文 * |
绝地求生更新了添加了静音载具?还能自动驾驶!;admin;《http://www.cfc56.com/heping/594.html》;20190829;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN110772784A (en) | 2020-02-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110772784B (en) | Carrier control method and device, storage medium and electronic device | |
CN109847361B (en) | Method and device for synchronizing motion states, storage medium and electronic device | |
CN109011559B (en) | Method, device, equipment and storage medium for controlling virtual carrier in game | |
US11806622B2 (en) | Information display method and apparatus, electronic device, and computer storage medium | |
CN110013671B (en) | Action execution method and device, storage medium and electronic device | |
US20120229660A1 (en) | Methods and apparatus for remote controlled devices | |
JP2022517853A (en) | Viewpoint switching control method, equipment, electronic devices and computer programs | |
CN110201387B (en) | Object control method and device, storage medium and electronic device | |
KR102700298B1 (en) | Method and device for controlling virtual objects, storage medium, and electronic device | |
WO2019022841A1 (en) | Controlling behavior of entities in funnel sections of a computer-represented environment | |
CN107899236B (en) | Information processing method, information processing device, electronic equipment and storage medium | |
CN111494963A (en) | Vehicle-mounted game method, system, device, computer equipment and storage medium | |
CN110339560B (en) | Vehicle-mounted game method and device | |
JP2023542148A (en) | Method, apparatus, electronic device, and storage medium for controlling movement of virtual objects in a game | |
CN108434730A (en) | Control method, device, storage medium, processor and the terminal of game object | |
CN113101638A (en) | Interactive data processing method and device in game | |
WO2022227934A1 (en) | Virtual vehicle control method and apparatus, device, medium, and program product | |
CN109876443B (en) | Object control method and device, storage medium and electronic device | |
JP2021524076A (en) | Virtual camera placement system | |
CN111035928B (en) | Method and device for displaying travel route, storage medium and electronic device | |
CN110465091B (en) | Control method and device for virtual racing car object, storage medium and electronic device | |
CN112870701A (en) | Control method and device of virtual role | |
CN112546627A (en) | Route guiding method, device, storage medium and computer equipment | |
CN113559515B (en) | Object control method and device, storage medium and electronic equipment | |
KR20230085934A (en) | Picture display method and apparatus, device, storage medium, and program product in a virtual scene |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40021021 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |