Game character control method, device and electronic equipment
By using the movement instructions and operations of external input devices in shooting games, one-handed control of virtual characters is achieved, which solves the game experience problem when players can only use one hand to operate, and improves the intuitiveness and realism of the game.
Patent Information
- Application Number
- CN202010963043.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-14
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2040-09-14
AI Technical Summary
In shooting games, when players can only use one hand to operate due to special reasons, they cannot take into account character movement and perspective operation, resulting in a limited gaming experience.
Provide a graphical user interface through the terminal device, using movement instructions and operations from external input devices to achieve one-handed control of the virtual character's perspective and movement, including long press or click operations on preset buttons or controls, and determining the character based on movement parameters and trajectories Movement and perspective changes.
It enables players to control the movement and perspective of virtual characters with one hand, which improves the game experience, simplifies the operation process, and enhances the intuitiveness and realism of the game.
Smart Images

Figure CN112057865B
Abstract
Description
Technical Field
[0001] The present application relates to the field of data detection technology, and in particular to a method, device and electronic device for controlling a game character. Background Art
[0002] In most shooting games, players generally control the movement of the character through the keyboard and control the player's perspective through external input devices. The cooperation of both hands is required to play the game well. However, sometimes players can only operate with one hand due to special reasons, and cannot take into account both movement and perspective operations. Summary of the invention
[0003] The purpose of the present application is to provide a method, device and electronic device for controlling a game character, which can simultaneously control the movement and viewing angle of the game character by operating an external input device with one hand.
[0004] In a first aspect, an embodiment of the present application provides a method for controlling a game character, wherein a graphical user interface of a game is provided through a terminal device, the display content of the graphical user interface at least partially includes a game scene and a virtual character, and the terminal device includes an external input device. The method includes: in response to a movement instruction of the external input device, controlling the perspective of the virtual character to change accordingly; in response to a first operation directed to the external input device, determining a first movement parameter of the virtual character according to the movement of the external input device; and controlling the virtual character to move in the game scene according to the first movement parameter; and in response to an end operation of the first operation, restoring the external input device's control of the perspective of the virtual character according to the movement.
[0005] Furthermore, the above-mentioned external input device provides a preset button or a preset control, and the first operation includes: a long press operation on the preset button or preset control with a pressing time greater than a first preset time, or a preset number of click operations on the preset button or preset control.
[0006] Furthermore, the above method also includes: in response to the end operation of the first operation, controlling the movement of the virtual character according to a preset first method; wherein the first method includes: maintaining the virtual character to continue moving in the game scene according to the first movement parameter; or, controlling the perspective and movement of the virtual character at the same time according to the movement of the external input device after the first operation ends.
[0007] Furthermore, the above-mentioned step of simultaneously controlling the perspective and movement of the virtual character according to the movement of the external input device after the first operation is completed includes: determining a second movement parameter of the virtual character according to the movement of the external input device after the first operation is completed, controlling the movement of the virtual character in the game scene according to the second movement parameter, and controlling the perspective of the virtual character to change accordingly according to the movement of the external input device after the first operation is completed.
[0008] Furthermore, the method further includes: in response to a second operation of the external input device, stopping the movement of the virtual character.
[0009] Furthermore, the above-mentioned second operation includes: a long press operation on the designated key with a pressing time greater than a second preset time, or a click operation on the designated key for a preset number of times; the designated key includes: a preset button or a preset control of an external input device.
[0010] Furthermore, the above-mentioned first movement parameter includes: movement direction and movement speed; the step of determining the first movement parameter of the virtual character according to the movement of the external input device, and controlling the movement of the virtual character in the game scene according to the first movement parameter includes: determining a movement trajectory corresponding to the movement of the external input device within the current detection period; controlling the movement of the virtual character according to the movement trajectory; the movement trajectory includes the movement direction and movement speed of the virtual character at multiple time points.
[0011] Furthermore, the step of controlling the movement of the virtual character according to the movement trajectory includes: enlarging the movement trajectory according to a preset ratio; determining the enlarged movement trajectory as the target movement route of the virtual character; and controlling the virtual character to move according to the target movement route.
[0012] Furthermore, the above-mentioned first movement parameter includes a movement direction and a movement speed; the step of determining the first movement parameter of the virtual character according to the movement of the external input device includes: determining a first movement vector corresponding to the movement of the external input device within the current detection period; determining the first movement parameter of the virtual character according to the target vector; the target vector includes the first movement vector or a movement vector obtained by summing the first movement vector and the second movement vector corresponding to the previous detection period.
[0013] Furthermore, the step of determining the first movement vector corresponding to the movement of the external input device within the current detection period includes: detecting a movement trajectory corresponding to the movement of the external input device within the current detection period; and constructing a first movement vector from the starting point to the end point based on the starting point and the end point of the movement trajectory.
[0014] Furthermore, the step of determining the first movement parameter of the virtual character according to the target vector includes: determining the direction of the target vector as the movement direction of the virtual character; and determining the movement speed of the virtual character according to the size of the target vector.
[0015] Furthermore, the step of determining the moving speed of the virtual character according to the size of the target vector includes: converting the size of the target vector according to a preset pixel-to-speed mapping relationship to obtain a converted speed; and using the converted speed as the moving speed of the virtual character.
[0016] Furthermore, the step of determining the moving speed of the virtual character according to the size of the target vector further includes: determining whether the converted speed exceeds a preset maximum moving speed; if so, determining the maximum moving speed as the moving speed of the virtual character.
[0017] Furthermore, the above method also includes: in response to a first operation on an external input device, displaying a character movement control in a graphical user interface; the character movement control is used to display a movement trajectory corresponding to the movement of the external input device.
[0018] Furthermore, the above-mentioned game is configured with a one-handed operation assistance function. Before the step of responding to the first operation directed to the external input device, the method also includes: responding to the start operation of the one-handed operation assistance function, setting the one-handed operation assistance function to an on state.
[0019] Furthermore, the above method also includes: in response to a closing operation of the one-handed operation auxiliary function, setting the one-handed operation auxiliary function to an off state; in response to a movement operation on an external input device, controlling the perspective of the virtual character according to the movement of the external input device.
[0020] In a second aspect, an embodiment of the present application further provides a device for controlling a game character, which provides a graphical user interface of a game through a terminal device, wherein the display content of the graphical user interface at least partially includes a game scene and a virtual character, the game is configured with a one-handed operation assistance function, and the terminal device includes an external input device. The device includes: a perspective control module, which is used to control the perspective of the virtual character to change accordingly in response to a movement instruction of the external input device; a character movement control module, which is used to respond to a first operation for the external input device, determine a first movement parameter of the virtual character according to the movement of the external input device; and control the virtual character to move in the game scene according to the first movement parameter; a function recovery module, which is used to respond to an end operation of the first operation, and restore the perspective control of the virtual character by the external input device according to the movement.
[0021] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the above-mentioned game character control method.
[0022] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned game character control method.
[0023] The embodiments of the present application provide a method, device and electronic device for controlling a game character. The game is equipped with a one-handed operation auxiliary function. The terminal device is equipped with an external input device. The user can control the movement of the virtual character by operating the external input device and moving the external input device. After the above-mentioned operation is completed, the perspective of the virtual character can be controlled by moving the external input device. The embodiments of the present application can realize the control of the movement and perspective of the virtual character through the player's one-handed operation, thereby improving the player's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 A flowchart of a method for controlling a game character provided in an embodiment of the present application;
[0026] Figure 2 A flowchart of a character movement control method provided in an embodiment of the present application;
[0027] Figure 3 A flowchart of another character movement control method provided in an embodiment of the present application;
[0028] Figure 4 A schematic diagram of mouse movement and character movement provided in an embodiment of the present application;
[0029] Figure 5 Another schematic diagram of mouse movement and character movement provided in an embodiment of the present application;
[0030] Figure 6 Another schematic diagram of mouse movement and character movement provided in an embodiment of the present application;
[0031] Figure 7 A schematic diagram of a UI control provided in an embodiment of the present application;
[0032] Figure 8 A structural block diagram of a game character control device provided in an embodiment of the present application;
[0033] Fig. 9 A structural block diagram of another game character control device provided in an embodiment of the present application;
[0034] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The technical solution of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0036] Figure 1 A flowchart of a method for controlling a game character provided in an embodiment of the present application. In this embodiment, a graphical user interface of a game is provided through a terminal device, and the display content of the graphical user interface at least partially includes a game scene and a virtual character. The terminal device includes an external input device, which can be a mouse, or an external input device such as a touchpad or a handle. The user can control the movement of the virtual character by operating the external input device and moving the external input device. After the above operation is completed, the perspective of the virtual character can be controlled by moving the external input device, so that the user can control the movement and perspective of the virtual character through one-handed operation, thereby improving the player's gaming experience.
[0037] The above-mentioned game character control method specifically comprises the following steps:
[0038] Step S102, in response to a movement instruction from an external input device, controlling the perspective of the virtual character to change accordingly.
[0039] During the game, especially shooting games, the user generally controls the movement of the virtual character through a first external input device (such as a keyboard), and controls the perspective of the virtual character through a second external input device (such as a mouse), which requires the cooperation of both hands to play the game well.
[0040] For the external input device responsible for processing the perspective adjustment, the virtual character's perspective can be controlled to change by monitoring the movement of the external input device. The external input device may include a mouse, a touchpad, a handle, etc. For example, when the player moves the mouse to the left or slides to the left on the touchpad, the virtual character's perspective can be controlled to change to look to the left.
[0041] Step S104, in response to a first operation on an external input device, determining a first movement parameter of the virtual character according to the movement of the external input device; and controlling the virtual character to move in the game scene according to the first movement parameter.
[0042] The above-mentioned external input device may provide a preset button or a preset control, such as the left button on a mouse, or a control in a designated area on a touchpad, etc. The above-mentioned first operation may include: a long press operation on the above-mentioned preset button or the above-mentioned preset control with a pressing time longer than the first preset time, or a preset number of click operations on the above-mentioned preset button or the above-mentioned preset control. The above-mentioned first preset time can be set differently according to the needs of the game, such as 5 seconds, and long press operations shorter than this time are invalid, so as to avoid the influence of the player's misoperation on the movement of the virtual character; the above-mentioned preset number of click operations, for example, the first single click of the preset button is to start the first operation, and the second single click of the preset button is to end the first operation, or the first double click of the preset button is to start the first operation, and the second double click of the preset button is to end the first operation, etc. Compared with the long press operation of the preset button, this method can free the fingers and make the operation easier.
[0043] In the case where the player performs the first operation on the preset button of the external input device, the movement of the virtual character is controlled according to the movement of the external input device. There are many specific control methods, such as determining the movement direction and movement distance of the virtual character according to the movement trajectory corresponding to the movement of the external input device, or controlling the movement of the virtual character according to the movement vector corresponding to the movement of the external input device, such as determining the movement speed and movement direction of the virtual character according to the size and direction of the movement vector, etc., which are not specifically limited here. When the first movement parameter of the virtual character is determined according to the movement of the external input device; and the virtual character is controlled to move in the game scene according to the first movement parameter, the external input device temporarily blocks the control of the perspective of the virtual character.
[0044] In an optional implementation, during the game, the perspective of the virtual character is usually bound to a first external input device responsible for processing the perspective control of the virtual character, and the movement of the virtual character is usually bound to a second external input device responsible for processing the movement control of the virtual character. Therefore, the perspective of the virtual character can be adjusted according to the movement of the first external input device, and the movement of the virtual character can be adjusted according to the movement of the second external input device. The two types of control rights of the virtual character correspond to different external input devices and are independent of each other.
[0045] When responding to the first operation, the first external input device will temporarily block the viewing angle control of the virtual character, and at the same time take over the movement control of the virtual character, so that the first movement parameter of the virtual character is determined according to the movement of the external input device; and the virtual character is controlled to move in the game scene according to the first movement parameter.
[0046] Step S106, in response to the end operation of the first operation, the external input device is restored to control the perspective of the virtual character according to the movement.
[0047] If the first operation is a long press operation, the end operation of the first operation is to release the preset button or preset control, and if the first operation is a single click operation, the end operation of the first operation is to click the preset button or preset control again. After the first operation ends, the perspective of the virtual character can be restored to be controlled according to the movement of the external input device. For example, if the external input device moves to the left, the perspective of the virtual character looks to the left.
[0048] In an optional implementation, during the game, the perspective of the virtual character is usually bound to a first external input device responsible for processing the perspective control of the virtual character, and the movement of the virtual character is usually bound to a second external input device responsible for processing the movement control of the virtual character. Therefore, the perspective of the virtual character can be adjusted according to the movement of the first external input device, and the movement of the virtual character can be adjusted according to the movement of the second external input device. The two types of control rights of the virtual character correspond to different external input devices and are independent of each other.
[0049] When responding to the first operation, the first external input device will temporarily block the viewing angle control of the virtual character and take over the movement control of the virtual character at the same time. When responding to the end operation of the first operation, the first external input device will take over the viewing angle control of the virtual character again.
[0050] In the game character control method provided in the embodiment of the present application, the terminal device includes an external input device, and the user can control the movement of the virtual character by operating the external input device and moving the external input device. After the above operation is completed, the perspective of the virtual character can be controlled by moving the external input device. The embodiment of the present application can realize the control of the movement and perspective of the virtual character through one-handed operation, thereby improving the player's gaming experience.
[0051] In order to improve the game experience of players, the embodiments of the present application provide a variety of implementation methods for controlling the movement of virtual characters according to the movement of external input devices, which are described in detail below:
[0052] The first one: See Figure 2 A flowchart of a character movement control method shown is implemented as follows:
[0053] Step S202, determining a movement trajectory corresponding to the movement of the external input device within the current detection period;
[0054] In actual applications, since the time a player uses his hands to operate the external input device to move is relatively short, the above detection period is also a very small value. By monitoring the position of the external input device in real time, its movement trajectory within the current detection period can be determined.
[0055] Step S204, controlling the movement of the virtual character according to the movement trajectory; the movement trajectory includes the movement direction and movement speed of the virtual character at multiple time points.
[0056] Specifically, the movement track may be enlarged according to a preset ratio; the enlarged movement track may be determined as the target movement route of the virtual character; and the virtual character may be controlled to move according to the target movement route.
[0057] The movement of the virtual character is controlled by the movement trajectory of the external input device detected within the current detection period. In this process, there is a time difference between the movement of the external input device and the movement of the virtual character, namely the above-mentioned detection period. Since the value of the detection period is very small, it can be almost considered that the movement of the external input device and the movement of the virtual character are carried out synchronously.
[0058] This method is to enlarge the movement trajectory of the external input device according to a certain proportion, so that the virtual character moves completely along the enlarged trajectory. This can improve the player's sense of reality and intuitiveness when playing the game. The player can move the external input device as he wants the character to move. It is simple and intuitive, easy to operate, and does not require too much thinking.
[0059] Second: See Figure 3 The flowchart of another character movement control method shown is implemented as follows:
[0060] Step S302: determining a first movement vector corresponding to the movement of the external input device within the current detection period.
[0061] Specifically, firstly, the movement trajectory corresponding to the movement of the external input device within the current detection period is detected; the method is the same as the above step S202, which will not be repeated here. Then, according to the starting point and the end point of the movement trajectory, a first movement vector from the starting point to the end point is constructed. The direction of the first movement vector is from the starting point to the end point, and the magnitude of the first movement vector is the distance value of the line segment from the starting point to the end point.
[0062] Step S304, determining a first movement parameter of the virtual character according to the target vector, and controlling the movement of the virtual character according to the first movement parameter; wherein the target vector includes the first movement vector or a movement vector obtained by summing the first movement vector and the second movement vector corresponding to the previous detection period.
[0063] Specifically, the direction of the target vector is determined as the moving direction of the virtual character; the moving speed of the virtual character is determined according to the size of the target vector; and the movement of the virtual character is controlled according to the moving direction and the moving speed.
[0064] The above-mentioned moving speed determination process can be carried out in the following manner: for example, a pixel-speed mapping relationship is pre-stored in the server or terminal device, and the size of the target vector is converted according to the preset pixel-speed mapping relationship to obtain the moving speed of the virtual character.
[0065] Of course, the moving speed cannot increase infinitely as the moving distance of the external input device increases. Therefore, an upper limit of the moving speed is also set in the embodiment of the present application, that is, a preset maximum moving speed. When the speed obtained after converting the size of the target vector according to the preset pixel and speed mapping relationship is greater than the preset maximum moving speed, the maximum moving speed is determined as the moving speed of the virtual character.
[0066] The above step S304 actually includes two ways of controlling the movement of the character. In this embodiment, the external input device is illustrated by taking a mouse as an example. The mouse has corresponding preset buttons, movement buttons. For example, the movement button can be a pre-set left button, or right button, etc.
[0067] (1) Controlling the movement of the virtual character according to the first movement vector.
[0068] In this method, the movement of the character is controlled only according to the first movement vector of the mouse in the current detection period. For example, the size of the movement vector in the first detection period is the distance between the position P1 when the mouse movement key is pressed and the current mouse position P2, which is 30 pixels, and the direction of the movement vector is the direction of P2 relative to P1, such as Figure 4 As shown, if the moving vector in the second detection period is 40 pixels in the positive direction of the Y axis, the virtual character will move upward at a speed of 40 cm / s. The above pixel and speed mapping relationship can be set differently according to the actual game situation.
[0069] (2) A third movement vector is obtained by performing a sum operation on the first movement vector and the second movement vector corresponding to the previous detection period, and the movement of the virtual character is controlled according to the third movement vector.
[0070] In this way, the movement control of the virtual character is determined based on the movement vectors corresponding to the current detection period and the previous detection period, that is, the final movement control effect is the superposition of the two movement control effects.
[0071] Taking the above example as an example, for example, the size of the movement vector in the first detection period (previous detection period) is the distance between the position P1 when the mouse movement key is pressed and the current mouse position P2, which is 30 pixels, and the direction of the movement vector is the direction of P2 relative to P1, such as Figure 4The positive direction of the X axis is shown, and the moving vector of the second detection period (current detection period) is 40 pixels in the positive direction of the Y axis. Then, the sum of the above two vectors is calculated to obtain the third moving vector of (30 2 +40 2 ), which is 50 pixels. The direction can also be accurately calculated, which is roughly the direction in the first quadrant of the XY coordinates. Therefore, the virtual character will move to the upper right corner at a speed of 50 cm / s.
[0072] It should be noted that the embodiments of the present application include but are not limited to the above-mentioned possible movement control methods, and there may also be other methods of controlling the movement of the character according to the movement of the external input device.
[0073] After the above-mentioned step of responding to the first operation of the external input device and controlling the movement of the virtual character according to the movement of the external input device, if the player performs an end operation on the above-mentioned first operation, for example, releasing the movement key in the case of long pressing the movement key, or clicking the movement key again in the case of single-clicking the movement key, the first operation can be ended. At this time, the server will respond to the end operation of the first operation and restore the perspective of controlling the virtual character according to the movement of the external input device.
[0074] For example, after the first operation is completed, if the player controls the mouse to move to the left, the perspective of the virtual character will be to the left. If the player controls the mouse to move to the right, the perspective of the virtual character will be to the right.
[0075] After the first operation is completed, in addition to controlling the perspective of the virtual character by moving the external input device, the movement of the virtual character can also be controlled in a preset manner. The embodiment of the present application provides the following two specific implementation methods for controlling the movement of the virtual character in a preset manner:
[0076] Method 1: In response to the end operation of the first operation, the virtual character is maintained to continue moving in the game scene according to the first movement parameter.
[0077] For example, the movement mode corresponding to the first operation is to move rightward at a speed of 30 cm / s. After the first operation is completed, the player controls the mouse to move leftward so that the perspective of the virtual character is to look leftward. In this case, although the perspective of the virtual character becomes leftward, it still automatically moves rightward at a speed of 30 cm / s. This mode is an automatic movement with the world coordinate system as the reference system and is not affected by the perspective.
[0078] Mode 2: In response to the end operation of the first operation, the perspective and movement of the virtual character are simultaneously controlled according to the movement of the external input device after the first operation ends.
[0079] Specifically, the second movement parameter of the virtual character is determined according to the movement of the external input device after the first operation is completed, and the virtual character is controlled to move in the game scene according to the second movement parameter. At the same time, according to the movement of the external input device after the first operation is completed, the perspective of the virtual character is controlled to change accordingly.
[0080] The second movement parameter includes the moving direction of the virtual character. For example, the movement mode corresponding to the first operation is to move rightward at a speed of 30 cm / s. After the first operation, the player controls the mouse to move leftward so that the perspective of the virtual character is to look leftward. In this case, not only the perspective of the virtual character becomes leftward, but the virtual character also moves leftward at a speed of 30 cm / s. This mode is an automatic movement with the virtual character itself as the reference system. In this mode, the movement of the mouse can simultaneously control the perspective of the virtual character and its target moving direction.
[0081] In order to improve the game experience of players, the above two implementation methods can be selected by players according to their own wishes.
[0082] In the process of the above-mentioned automatic movement of the virtual character, the embodiment of the present application can also stop the movement of the virtual character in the following manner: in response to a second operation of the external input device, stop the movement of the virtual character. The second operation here includes: a long press operation of a designated key with a pressing time greater than a second preset time, or a preset number of clicks on the designated key; the designated key may include: a preset key or preset control of the above-mentioned external input device, or may also be other keys.
[0083] The first and second operations mentioned above have the following good combinations:
[0084] (1) First operation: to start, long press the movement key; to end, release the movement key; Second operation: single click the movement key;
[0085] (2) First operation: To start, single-click the move key; To end, single-click the move key; Second operation: double-click the move key;
[0086] (3) First operation: To start, click the movement key; To end, click the movement key; Second operation: Long press the movement key;
[0087] (4) First operation: to start, double-click the movement key; to end, double-click the movement key; second operation: long press the movement key;
[0088] (5) First operation: to start, long press the movement key; to end, release the movement key; Second operation: single click the specified key;
[0089] (6) First operation: to start, click the move key; to end, click the move key; second operation: click the specified key.
[0090] Of course, there are other combinations. The above ones are relatively easier to operate and help increase players' interest in the game.
[0091] After stopping the movement of the virtual character, the movement of the virtual character can be controlled again by the first operation. There are two implementation methods, which are similar to the two methods in the above step S304:
[0092] One is to directly control the movement of the virtual character through the movement of the external input device this time. For example, in the last first operation, the external input device moved upward by 100 pixels, and the character moved forward at a speed of 1m / s. After the first operation is completed, the character still moves forward automatically at a speed of 1m / s. When the first operation is performed again and the external input device is moved downward by 50 pixels, the character moves backward at a speed of 0.5m / s. Figure 5 As shown, the first mouse movement is from P1 to P2, and the second time is from P2 to P3. Since only the current movement is considered, the character movement is controlled according to the vector from P2 to P3.
[0093] Another method is to superimpose the current mouse movement with the last mouse movement to control the movement of the virtual character together. For example, in the last first operation, the mouse moved 100 pixels upward, and the character moved forward at a speed of 1m / s. After the first operation, the character still automatically moves forward at a speed of 1m / s. When the first operation is performed again and the mouse moves 50 pixels downward, the character moves forward at a speed of 0.5m / s. Figure 6 As shown, the first mouse movement is from P1 to P2, and the second time is from P2 to P3. Since the current movement and the last movement are taken into consideration, the vector from P1 to P2 and the vector from P2 to P3 are summed to obtain the vector from P1 to P3, and the character movement is controlled according to the vector from P1 to P3.
[0094] The above two automatic re-control movement methods can be selected by the player.
[0095] In order to improve the intuitiveness of the movement of the external input device when the player is playing the game, the embodiment of the present application can also help the player use the one-handed operation function through the UI auxiliary display. For example, in response to the first operation on the external input device, a character movement control is displayed in the graphical user interface; the character movement control is used to display the movement trajectory corresponding to the movement of the external input device, such as Figure 7 shown.
[0096] In an optional embodiment, the above-mentioned game is configured with a one-handed operation assist function. Before performing the first operation on the external input device, the one-handed operation assist function needs to be turned on. In another embodiment, the player can also turn on or off the above-mentioned one-handed operation assist function through the setting operation in the game page. The embodiment of the present application may also include the following steps: before the above-mentioned step of responding to the first operation of the external input device, perform the following steps: in response to the turning-on operation of the one-handed operation assist function, set the one-handed operation assist function to the turned-on state.
[0097] The process of enabling the one-handed operation assistive function can be achieved in a variety of ways. For example, the game's settings menu provides an option to enable or disable the one-handed operation assistive function. Players can click on the option to enable the one-handed operation assistive function in the settings menu to enable the one-handed operation assistive function. Alternatively, the game is configured with a shortcut key for enabling the one-handed operation assistive function, and players can also start the one-handed operation assistive function by clicking the shortcut key.
[0098] The method further includes: in response to a closing operation of the one-handed operation auxiliary function, setting the one-handed operation auxiliary function to an off state; and in response to a movement operation on an external input device, controlling the perspective of the virtual character according to the movement of the external input device. Thus, the one-handed operation auxiliary function is closed, and the function of the external input device to control the perspective of the character is restored.
[0099] The embodiment of the present application provides a solution that allows players to flexibly control the movement and perspective of a character in a shooting game by operating an external input device with one hand. By performing a first operation, the movement of the virtual character, including the movement direction and movement speed, can be controlled by the movement of the external input device. After the first operation is completed, the virtual character can also maintain the previous direction and speed and continue to move automatically, while the external input device resumes the function of controlling the perspective. During the automatic movement process, the first operation can be performed again to control the movement of the character again, and the second operation can be used to stop the automatic movement of the virtual character. While controlling the movement of the character, the UI auxiliary display can also be used to help the player better use the one-handed operation auxiliary function.
[0100] Based on the above method embodiment, the embodiment of the present application also provides a device for controlling a game character, which provides a graphical user interface of the game through a terminal device, and the display content of the graphical user interface at least partially includes a game scene and a virtual character, and the terminal device includes an external input device, see Figure 8As shown, the device includes: a perspective control module 82, which is used to control the perspective of the virtual character to change accordingly in response to a movement instruction of an external input device; a character movement control module 84, which is used to respond to a first operation on the external input device, determine a first movement parameter of the virtual character according to the movement of the external input device; and control the movement of the virtual character in the game scene according to the first movement parameter; a function recovery module 86, which is used to respond to the end operation of the first operation and restore the perspective control of the virtual character by the external input device according to the movement.
[0101] In another possible embodiment, the external input device provides a preset button or a preset control, and the first operation includes: a long press operation on the preset button or preset control with a pressing time greater than a first preset time, or a preset number of click operations on the preset button or preset control.
[0102] See also Fig. 9 The structural block diagram of another game character control device shown may include, in addition to a viewing angle control module 902 , a character movement control module 904 and a function recovery module 906 similar to the previous embodiment, a control display module 908 .
[0103] The control display module 908 is used to display a character movement control in a graphical user interface in response to a first operation on an external input device; the character movement control is used to display a movement track corresponding to the movement of the external input device.
[0104] The above-mentioned character movement control module 904 is also used to control the movement of the virtual character according to a preset first method in response to the end operation of the first operation; wherein the first method includes: maintaining the virtual character to continue moving in the game scene according to the first movement parameter; or, controlling the perspective and movement of the virtual character at the same time according to the movement of the external input device after the first operation is completed.
[0105] In another possible implementation, the character movement control module 904 is also used to determine a second movement parameter of the virtual character according to the movement of an external input device after the first operation is completed, control the movement of the virtual character in the game scene according to the second movement parameter, and control the perspective of the virtual character to change accordingly according to the movement of the external input device after the first operation is completed.
[0106] In another possible implementation, the character movement control module 904 is further configured to stop the movement of the virtual character in response to a second operation of an external input device.
[0107] In another possible implementation, the second operation includes: a long press operation on the designated key with a pressing duration greater than a second preset duration, or a click operation on the designated key for a preset number of times; the designated key includes: a preset button or a preset control of an external input device.
[0108] In another possible implementation, the character movement control module 904 is further used to determine a movement trajectory corresponding to the movement of an external input device within a current detection period; control the movement of the virtual character according to the movement trajectory; the movement trajectory includes the movement direction and movement speed of the virtual character at multiple time points.
[0109] In another possible implementation, the character movement control module 904 is further configured to amplify the movement trajectory according to a preset ratio; determine the amplified movement trajectory as the target movement route of the virtual character; and control the virtual character to move according to the target movement route.
[0110] In another possible implementation, the character movement control module 904 is also used to determine a first movement vector corresponding to the movement of an external input device within a current detection period; determine a first movement parameter of the virtual character based on a target vector; the target vector includes the first movement vector or a movement vector obtained by summing the first movement vector and a second movement vector corresponding to a previous detection period.
[0111] In another possible implementation, the character movement control module 904 is further used to detect a movement trajectory corresponding to the movement of the external input device within the current detection period; and construct a first movement vector from the starting point to the end point according to the starting point and the end point of the movement trajectory.
[0112] In another possible implementation, the character movement control module 904 is further configured to determine the direction of the target vector as the movement direction of the virtual character; and determine the movement speed of the virtual character according to the size of the target vector.
[0113] In another possible implementation, the character movement control module 904 is further configured to convert the size of the target vector according to a preset pixel-to-speed mapping relationship to obtain a converted speed; and use the converted speed as the movement speed of the virtual character.
[0114] In another possible implementation, the character movement control module 904 is further configured to determine whether the converted speed exceeds a preset maximum movement speed; if so, the maximum movement speed is determined as the movement speed of the virtual character.
[0115] In another possible embodiment, the above-mentioned device also includes: a function control module, which is also used to set the one-handed operation assistance function to an on state in response to an on operation of the one-handed operation assistance function; and to set the one-handed operation assistance function to an off state in response to an off operation of the one-handed operation assistance function; the above-mentioned perspective control module 902 is also used to respond to a movement operation on an external input device, and control the perspective of the virtual character according to the movement of the external input device.
[0116] The control device for a game character provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned game character control method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the control device for a game character, reference may be made to the corresponding contents in the aforementioned game character control method embodiment.
[0117] The present application also provides an electronic device, such as Fig.10 As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 101 and a memory 100, the memory 100 stores computer executable instructions that can be executed by the processor 101, and the processor 101 executes the computer executable instructions to implement the above-mentioned game character control method.
[0118] exist Fig.10 In the illustrated embodiment, the electronic device further includes a bus 102 and a communication interface 103 , wherein the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0119] Among them, the memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 102 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0120] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined and performed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 101 reads the information in the memory and completes the steps of the game character control method of the above-mentioned embodiment in combination with its hardware.
[0121] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned game character control method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.
[0122] The computer program product of the game character control method, device and electronic device provided in the embodiments of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0123] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0124] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0125] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0126] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for controlling a game character, It is characterized in that A graphical user interface of a game is provided through a terminal device, wherein the display content of the graphical user interface at least partially includes a game scene and a virtual character, and the terminal device includes an external input device. The method includes: In response to a movement operation on the external input device, controlling the perspective of the virtual character according to the movement of the external input device; In response to a first operation on the external input device, determining a first movement parameter of the virtual character according to the movement of the external input device; and controlling the virtual character to move in the game scene according to the first movement parameter; In response to an end operation of the first operation, the viewing angle control of the virtual character by the external input device according to the movement is restored.
2. The method according to claim 1, It is characterized in that The external input device provides a preset button or a preset control, and the first operation includes: a long press operation on the preset button or the preset control with a pressing time greater than a first preset time, or a click operation on the preset button or the preset control for a preset number of times.
3. The method according to claim 1, It is characterized in that The method further comprises: In response to the end operation of the first operation, the movement of the virtual character is controlled according to a preset first method; wherein the first method includes: maintaining the virtual character to continue moving in the game scene according to the first movement parameter; or, simultaneously controlling the perspective and movement of the virtual character according to the movement of the external input device after the first operation ends.
4. The method according to claim 3, It is characterized in that The step of simultaneously controlling the perspective and movement of the virtual character according to the movement of the external input device after the first operation is completed comprises: Determine a second movement parameter of the virtual character based on the movement of the external input device after the first operation is completed, control the virtual character to move in the game scene based on the second movement parameter, and control the perspective of the virtual character to change accordingly based on the movement of the external input device after the first operation is completed.
5. The method according to claim 3, It is characterized in that The method further comprises: In response to a second operation of the external input device, the movement of the virtual character is stopped.
6. The method according to claim 5, It is characterized in that The second operation includes: a long press operation on the designated key with a pressing duration greater than a second preset duration, or a click operation on the designated key for a preset number of times; the designated key includes: a preset button or a preset control of the external input device.
7. The method according to claim 1, It is characterized in that The first movement parameter includes: movement direction and movement speed; The step of determining a first movement parameter of the virtual character according to the movement of the external input device, and controlling the virtual character to move in the game scene according to the first movement parameter comprises: Determine a movement trajectory corresponding to the movement of the external input device within a current detection period; The movement of the virtual character is controlled according to the movement trajectory; the movement trajectory includes the movement direction and movement speed of the virtual character at multiple time points.
8. The method according to claim 7, It is characterized in that The step of controlling the movement of the virtual character according to the movement trajectory comprises: Enlarging the moving track according to a preset ratio; Determining the amplified movement trajectory as the target movement route of the virtual character; The virtual character is controlled to move along the target moving route.
9. The method according to claim 1, It is characterized in that The first movement parameter includes a movement direction and a movement speed; The step of determining a first movement parameter of the virtual character according to the movement of the external input device comprises: Determine a first movement vector corresponding to the movement of the external input device within a current detection period; A first movement parameter of the virtual character is determined according to a target vector; the target vector includes the first movement vector or a movement vector obtained by summing the first movement vector and a second movement vector corresponding to a previous detection period.
10. The method according to claim 9, It is characterized in that The step of determining that the movement of the external input device in the current detection period corresponds to a first movement vector comprises: Detecting a movement trajectory corresponding to the movement of the external input device within a current detection period; According to the starting point and the end point of the movement trajectory, a first movement vector from the starting point to the end point is constructed.
11. The method according to claim 9, It is characterized in that The step of determining a first movement parameter of the virtual character according to the target vector comprises: Determining the direction of the target vector as the moving direction of the virtual character; The moving speed of the virtual character is determined according to the size of the target vector.
12. The method according to claim 11, It is characterized in that The step of determining the moving speed of the virtual character according to the size of the target vector comprises: Converting the size of the target vector according to a preset pixel-to-speed mapping relationship to obtain a converted speed; The converted speed is used as the moving speed of the virtual character.
13. The method according to claim 12, It is characterized in that The step of determining the moving speed of the virtual character according to the size of the target vector further includes: Determine whether the converted speed exceeds the preset maximum moving speed; If yes, the maximum moving speed is determined as the moving speed of the virtual character.
14. The method according to claim 1, It is characterized in that The method further comprises: In response to a first operation on the external input device, a character movement control is displayed in the graphical user interface; the character movement control is used to display a movement trajectory corresponding to the movement of the external input device.
15. The method according to claim 1, It is characterized in that The game is configured with a one-handed operation auxiliary function, and before the step of responding to the first operation of the external input device, the method further includes: In response to the activation operation of the one-handed operation auxiliary function, the one-handed operation auxiliary function is set to an activated state.
16. The method according to claim 15, It is characterized in that The method further comprises: In response to a closing operation of the one-handed operation auxiliary function, setting the one-handed operation auxiliary function to a closed state; In response to a movement operation on the external input device, the viewing angle of the virtual character is controlled according to the movement of the external input device.
17. A control device for a game character, It is characterized in that A graphical user interface of a game is provided through a terminal device, wherein the display content of the graphical user interface at least partially includes a game scene and a virtual character, the game is configured with a one-handed operation auxiliary function, the terminal device includes an external input device, and the apparatus includes: A viewing angle control module, configured to respond to a movement operation on the external input device and control the viewing angle of the virtual character according to the movement of the external input device; A character movement control module, configured to respond to a first operation on the external input device, determine a first movement parameter of the virtual character according to the movement of the external input device, and control the virtual character to move in the game scene according to the first movement parameter; The function recovery module is used to restore the viewing angle control of the virtual character by the external input device according to the movement in response to the end operation of the first operation.
18. An electronic device, It is characterized in that The invention comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 16.
19. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 16.
