A method and device for controlling displacement of a virtual character
By dividing multiple touch response areas in the game interface, combining the touch operation speed and direction, the problems of complexity of player displacement operation and large number of controls in the existing technology are solved, and efficient control of multiple displacement operations of virtual characters is achieved. Improves operational efficiency and sense of control.
Patent Information
- Application Number
- CN202110729018.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-06-29
AI Technical Summary
In the existing game, it is difficult to achieve complex position movements such as walking, running, jumping and crouching at the same time, resulting in a large number of controls, low utilization of screen operation space, and poor operation efficiency and control sense.
By providing a virtual rocker area in the game interface, dividing multiple touch response areas, determining the operation type according to the speed and direction of the touch operation, and determining the specific movement type in combination with the target response area, multiple displacement operations of the virtual character are realized.
Without adding controls, players' touch-control operation distinction between virtual rockers is enriched, and multiple functions are combined, which reduces the occupancy rate of screen space and improves operation efficiency and control sense.
Smart Images

Figure CN113398573B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a method for controlling the displacement of a virtual character and a device for controlling the displacement of a virtual character. Background Art
[0002] At present, in games that support open scenes, controls similar to displacement joysticks have become standard features of the game. The displacement joystick is used to control the action switching of the game player's character. Especially in competitive games with strong operations, displacement operations account for a large proportion of the overall operations.
[0003] The displacement joystick operates the player's displacement in existing real-time combat game types, such as MOBA (Multiplayer Online Battle Arena Games), RPG (Role-playing game), and other games, specifically controlling the game player's character to continuously walk, run, squat or jump, so that the player character adapts to the game environment in the current game scene and realizes exploration and interaction in the game.
[0004] In the prior art, regarding the operation method of player displacement in the game, it is mainly achieved through a hybrid method of pure buttons and joystick buttons, because it is difficult to simultaneously realize complex displacement actions such as walking, running, jumping and crouching with only a single control. However, this method may require a large number of controls for more complex displacement actions, resulting in low utilization of the screen operation space. Summary of the invention
[0005] In view of the above problems, embodiments of the present invention are proposed to provide a method for controlling the displacement of a virtual character and a corresponding device for controlling the displacement of a virtual character that overcome the above problems or at least partially solve the above problems.
[0006] In order to solve the above problems, an embodiment of the present invention discloses a method for controlling the displacement of a virtual character, the method comprising:
[0007] Providing a virtual joystick area on the game interface, wherein the virtual joystick area includes a plurality of divided touch response areas;
[0008] In response to a touch operation applied to the virtual joystick area, determining a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation;
[0009] According to the target touch response area acted upon by the touch operation, a target movement type in the touch operation type is determined, so as to control the virtual character to move accordingly according to the target movement type.
[0010] Optionally, determining the touch operation type of the touch operation based on the touch speed and touch direction of the touch operation includes:
[0011] When the touch operation is a first touch operation whose touch speed does not exceed a preset speed threshold, determining that the touch operation type is an operation type for controlling the virtual character to perform normal walking;
[0012] And / or, when the touch operation is a second touch operation in which the touch speed exceeds a preset speed threshold and the touch direction is radial, the touch operation type is determined to be an operation type for controlling a virtual character to perform a special movement.
[0013] Optionally, the plurality of touch response areas in the virtual joystick area are divided according to different preset distances; and determining the target movement type in the touch operation type according to the target touch response area acted upon by the touch operation includes:
[0014] Acquire a center point of the multiple touch response areas divided according to different preset distances, and determine a relative distance or a relative circumference of the touch operation relative to the center point;
[0015] According to the relative distance or relative circumference relative to the center point, the target touch response area on which the touch operation acts is determined, so as to determine the target movement type based on the determined target touch response area; wherein, for the same touch operation type, different touch response areas on which the touch operation acts correspond to different movement types.
[0016] Optionally, the touch operation includes a first touch operation; and determining, according to the relative distance relative to the center point, a first target touch response area on which the touch operation acts, includes:
[0017] Calculate the circumference length of each touch response area according to each preset distance;
[0018] Determining the length of a touch circle based on a touch start point and a touch end point of the first touch operation;
[0019] A target touch response area is determined from the multiple touch response areas according to a size relationship between the touch circumference length and a plurality of circumference lengths.
[0020] Optionally, the touch operation includes a second touch operation; and determining, according to the relative circumference relative to the center point, a target touch response area on which the touch operation acts, includes:
[0021] determining a touch distance based on a touch start point and a touch end point of the second touch operation;
[0022] According to the magnitude relationship between the touch distance and a plurality of preset distances, a target touch response area is determined from the plurality of touch response areas.
[0023] Optionally, the touch operation further includes a double-click operation and / or a long press operation, and the method further includes:
[0024] In response to a double-click operation and / or a long-press operation on the virtual joystick area, a target movement type is determined according to the double-click operation and / or the long-press operation, so as to control the virtual character to move accordingly according to the target movement type.
[0025] Optionally, the method further comprises:
[0026] In response to multiple touch operations acting on the virtual joystick area, determine a touch order of the multiple touch operations; wherein the touch order of the multiple touch operations includes any combination order of the first touch operation and / or the second touch operation and / or the double-click operation and / or the long press operation;
[0027] The touch operation type and the target movement type in the touch operation type are determined according to the touch sequence of the multiple touch operations, so as to control the virtual character to move accordingly according to the target movement type.
[0028] The embodiment of the present invention further discloses a displacement control device for a virtual character, the device comprising:
[0029] A virtual joystick area providing module, used to provide a virtual joystick area on the game interface, wherein the virtual joystick area includes a plurality of divided touch response areas;
[0030] An operation type determination module, configured to respond to a touch operation applied to a virtual joystick area and determine a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation;
[0031] The first virtual character movement module is used to determine a target movement type in the touch operation type according to a target touch response area acted on by the touch operation, so as to control the virtual character to move accordingly according to the target movement type.
[0032] Optionally, the operation type determination module includes:
[0033] A first operation type determination submodule, configured to determine, when the touch operation is a first touch operation whose touch speed does not exceed a preset speed threshold, that the touch operation type is an operation type for controlling the virtual character to perform normal walking;
[0034] The second operation type determination submodule is used to determine that the touch operation type is an operation type for controlling a virtual character to perform a special movement when the touch operation is a second touch operation in which the touch speed exceeds a preset speed threshold and the touch direction is radial.
[0035] Optionally, the plurality of touch response areas in the virtual joystick area are divided according to different preset distances; and the first virtual character movement module includes:
[0036] A relative information determination submodule, used to obtain the center point of the multiple touch response areas divided according to different preset distances, and determine the relative distance or relative circumference of the touch operation relative to the center point;
[0037] The target movement type determination submodule is used to determine the target touch response area where the touch operation acts according to the relative distance or relative circumference relative to the center point, so as to determine the target movement type based on the determined target touch response area; wherein, for the same touch operation type, different touch response areas where the touch operation acts correspond to different movement types.
[0038] Optionally, the touch operation includes a first touch operation; and the target movement type determination submodule includes:
[0039] A circumference length calculation unit, used to calculate the circumference length of each touch response area according to each preset distance;
[0040] a touch circle length determining unit, configured to determine the touch circle length based on a touch start point and a touch end point of the first touch operation;
[0041] The first target touch response area determination unit is used to determine a target touch response area from the multiple touch response areas according to a size relationship between the touch circumference length and multiple circumference lengths.
[0042] Optionally, the touch operation includes a second touch operation; and the target movement type determination submodule includes:
[0043] a touch distance determining unit, configured to determine the touch distance based on a touch start point and a touch end point of the second touch operation;
[0044] The second target touch response area determination unit is configured to determine a target touch response area from the multiple touch response areas according to a magnitude relationship between the touch distance and a plurality of preset distances.
[0045] Optionally, the touch operation further includes a double-click operation and / or a long press operation, and the device further includes:
[0046] The second virtual character movement module is used to respond to a double-click operation and / or a long press operation on the virtual joystick area, and determine a target movement type according to the double-click operation and / or the long press operation to control the virtual character to move accordingly according to the target movement type.
[0047] Optionally, the device further comprises:
[0048] In response to multiple touch operations acting on the virtual joystick area, determine a touch order of the multiple touch operations; wherein the touch order of the multiple touch operations includes any combination order of the first touch operation and / or the second touch operation and / or the double-click operation and / or the long press operation;
[0049] The third virtual character movement module is used to determine the touch operation type and the target movement type in the touch operation type according to the touch sequence of the multiple touch operations, so as to control the virtual character to move accordingly according to the target movement type.
[0050] An embodiment of the present invention further discloses an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of any one of the methods for controlling the displacement of a virtual character are implemented.
[0051] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods for controlling the displacement of a virtual character are implemented.
[0052] The embodiments of the present invention include the following advantages:
[0053] In an embodiment of the present invention, in response to a touch operation acting on a virtual joystick area, the touch operation type of the touch operation is first determined based on the touch speed and touch direction of the touch operation, and then the target movement type in the touch operation type is further determined according to the target touch response area acted on by the touch operation, so that the virtual character in the game interface can be controlled to move accordingly according to the determined target movement type. By combining the touch operation type of the touch operation and the acted touch response area, the movement control of the current virtual character is jointly determined, and from the two dimensions of the touch operation type and the acted touch response area, the player's differentiation of the touch operation of the virtual joystick is enriched, and multiple functional operations are achieved without increasing the number of controls, thereby reducing the occupancy rate of the screen space. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of steps of an embodiment of a method for controlling displacement of a virtual character of the present invention;
[0055] Figure 2 is a flowchart of another embodiment of a method for controlling displacement of a virtual character of the present invention;
[0056] Figure 3A-3B is a schematic diagram of a first touch operation and a second touch operation in an embodiment of the present invention;
[0057] Figures 4A-4K is a schematic diagram of different displacement operations in an embodiment of the present invention;
[0058] Figure 5 is a structural block diagram of an embodiment of a displacement control device for a virtual character of the present invention;
[0059] Figure 6 It is a structural block diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0060] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] The operation mode of player displacement in the game can be mainly realized by a combination of pure buttons and joystick buttons. Combining the above two implementation methods, the following describes three player displacement operation modes in the prior art:
[0062] The first displacement operation mode is to realize displacement control through buttons. Actions such as walking, running, jumping and crouching all have corresponding function buttons.
[0063] However, in this way, if complex displacement actions need to be implemented, a large number of controls are required, and a single control operation corresponds to a corresponding displacement operation. The efficiency of a single control operation is low, and the utilization rate of the screen operation space is low; the degree of freedom of walking and running operations is low, and the character turning is mainly achieved through lens rotation, which leads to a poor sense of control over the virtual character; and the displacement operation occupies two input points, which inevitably interrupts other operations, making the overall operation not smooth.
[0064] The second displacement operation method can be a mixture of joysticks and buttons, where the joystick controls walking and running, and the buttons control jumping and crouching.
[0065] However, in this mode, the left screen has relatively fewer functions, complex displacements require full occupation of two input points, and the control operation efficiency is low; and actions such as jumping and crouching still require corresponding function buttons, and the utilization rate of the screen operation space is low; and when controlling the virtual game character to attack over obstacles, the left screen cannot provide complex displacement operations, and the main operating burden is concentrated on the right hand, making it difficult to simultaneously perform operations in three or more dimensions.
[0066] The third type of displacement operation can be a mixture of joysticks and buttons, where the joystick controls walking, running and jumping, and the button controls crouching.
[0067] However, in this way, the interactive functions of the compound controls have not been fully developed, and the control operation efficiency is average; the jumping accuracy that can be controlled by the joystick is limited, and fast sliding can only control one type of jump; and complex displacements involving crouching still require two input points, which will inevitably interrupt other operations.
[0068] Based on the problems existing in the above-mentioned prior art, in order to meet the requirements of simplifying the operating process, balancing speed and accuracy, improving space utilization and comprehensively improving the sense of control, one of the core ideas of the embodiments of the present invention is to propose, from two dimensions, the touch operation type and the touch response area acted on, that for touch operations of the same touch operation type, the movement types determined for the virtual character are different in different touch response areas, thereby enriching the player's distinction of the touch operation of the virtual joystick, realizing the combination of multiple functional operations without increasing the controls, and reducing the occupancy of the screen space.
[0069] The displacement control method of the virtual character of the embodiment of the present invention can be run on a terminal device. The terminal device can be a local terminal device. When the displacement control method of the virtual character is run on a server, the displacement control method of the virtual character can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system can include a server and a client device.
[0070] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the displacement control method of the virtual character are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for performing the displacement control method of the virtual character is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0071] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed and run by a conventional electronic device. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0072] It should be noted that the terminal can be the local terminal device mentioned above, or the client device in the cloud interaction system mentioned above. The operating system of the terminal can include Android, IOS, Windows Phone, Windows, etc., which can usually support the operation of various game applications.
[0073] By running the game application on the terminal and rendering it on the display of the mobile terminal, a graphical user interface is obtained. The content displayed by the graphical user interface at least partially includes a part or all of the game scene. The specific shape of the game scene can be a square or other shapes (for example, a circle, etc.).
[0074] Specifically, the game scene may include at least one virtual character, which may be a game virtual character controlled by a player through a mobile terminal, and may be presented through a graphical user interface, and the presented content may include all of the virtual character, or may be a portion of the virtual character. For example, in a third-person perspective game, the content presented by the graphical user interface may include all of the virtual character, or, in a first-person perspective game, the content presented by the graphical user interface may include a portion or part of the virtual character. In addition, the game scene may also include a game virtual character controlled by an enemy player in the game, or may be a non-practicing character (NPC) pre-set by a game developer in a specific game scene.
[0075] Reference Figure 1 , shows a flow chart of a method for controlling the displacement of a virtual character according to an embodiment of the present invention, which may specifically include the following steps:
[0076] Step 101, providing a virtual joystick area on the game interface; the virtual joystick area includes a plurality of divided touch response areas;
[0077] In an embodiment of the present invention, the control of the virtual character in the game can be achieved through a virtual joystick control provided by the game interface. The virtual joystick control may refer to a displacement joystick, which can be used to control the virtual character to switch between actions such as walking, running, jumping and crouching. At this time, a virtual joystick area for switching virtual character actions can be provided to the user in the game interface.
[0078] In one embodiment of the present invention, in order to be able to combine the operation of multiple functions without increasing the number of controls, the virtual joystick area provided by the game interface can be divided into multiple touch response areas, so as to combine the touch operation with the target touch response area to jointly determine the function of the current virtual joystick control.
[0079] It should be noted that, for the virtual joystick area provided on the game interface, the way of displaying the virtual joystick area can be to directly display the displacement joystick after entering the game scene, or it can be based on the user's touch display for displaying multiple touch icons provided by the game interface; the display of multiple divided touch response areas can be set based on different game scenes, which is not limited by the embodiments of the present invention.
[0080] Step 102, in response to a touch operation applied to the virtual joystick area, determining a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation;
[0081] Specifically, the function of the current virtual joystick control can be jointly determined from two dimensions: the touch operation type of the touch operation and the touch response area acted on.
[0082] In the first dimension, the touch operation type of the touch operation can be determined based on the touch speed and touch direction of the touch operation. The touch operation type may refer to the control type of the virtual character by the current touch operation. Relative to the movement control of the virtual character, it can be divided into whether the current touch operation is a touch operation type for the normal walking of the virtual character, or a touch operation type for the special movement of the virtual character, such as controlling the virtual character to leap, fly, crouch, etc., thereby enriching the player's differentiation of the touch operation of the virtual joystick based on the touch speed and touch direction.
[0083] Step 103 : determining a target movement type in the touch operation type according to the target touch response area to which the touch operation acts, so as to control the virtual character to move accordingly according to the target movement type.
[0084] After the touch operation type of the current touch operation is determined based on the touch speed and touch direction of the touch operation, the function of the current virtual joystick can be further determined from another dimension on this basis, so as to control the virtual character to move accordingly based on the determined function.
[0085] In another dimension, the virtual joystick area provided by the game interface includes multiple touch response areas. For touch operations of the same touch operation type, the movement types determined for the virtual character may be different when occurring in different touch response areas. At this time, the target touch response area on which the touch operation acts can be determined, so that on the basis of determining the touch operation type, the target movement type for controlling the movement of the virtual character can be further determined, that is, the function of the current virtual joystick control is jointly determined by combining the touch operation and the target touch response area on which it acts.
[0086] Among them, the target movement type may refer to a more detailed control under the touch operation type. For example, assuming that the determined touch operation type is a touch operation type for normal walking of a virtual character, it can be further refined into silent walking, normal walking, brisk walking and other movement types under this touch operation type. At this time, the corresponding target movement type can be determined according to the target response touch area.
[0087] It should be noted that while controlling the displacement of the virtual character to implement different controls, the game field of view picture based on the virtual character can be displayed on the game interface, and this embodiment of the present invention does not limit this.
[0088] In an embodiment of the present invention, in response to a touch operation acting on a virtual joystick area, the touch operation type of the touch operation is first determined based on the touch speed and touch direction of the touch operation, and then the target movement type in the touch operation type is further determined according to the target touch response area acted on by the touch operation, so that the virtual character in the game interface can be controlled to move accordingly according to the determined target movement type. By combining the touch operation type of the touch operation and the acted touch response area, the movement control of the current virtual character is jointly determined, and from the two dimensions of the touch operation type and the acted touch response area, the player's differentiation of the touch operation of the virtual joystick is enriched, and multiple functional operations are achieved without increasing the number of controls, thereby reducing the occupancy rate of the screen space.
[0089] Reference Figure 2 , shows a flow chart of another embodiment of a method for controlling the displacement of a virtual character of the present invention, which may specifically include the following steps:
[0090] Step 201, in response to a touch operation applied to a virtual joystick area, determining a touch operation type based on a touch speed and a touch direction of a first touch operation and / or a second touch operation;
[0091] In one embodiment of the present invention, the function of the current virtual joystick control is determined by combining the touch operation and the target touch response area. First, the touch operation acting on the virtual area can be responded to, and the current touch operation type can be determined based on the touch operation.
[0092] In actual applications, the touch speed and touch direction of the touch operation can be obtained. In one case, when the touch speed of the touch operation does not exceed the preset speed threshold, the current touch operation can be determined to be the first touch operation, and the touch operation type corresponding to the first touch operation can be the operation type used to control the virtual character to perform normal walking.
[0093] Specifically, Figure 3A As shown, when the terminal detects a touch operation performed by a user on the terminal screen, the touch vector of the touch operation can be obtained, which may include the touch time, touch distance, touch speed and touch direction of the touch operation, wherein the touch time of the touch operation may be the time period between the touch start point and the touch end point of the touch operation, the touch distance may be the length of the touch path between the touch start point and the touch end point of the touch operation, the touch speed may be determined by the touch distance and touch time of the touch operation, the touch direction may be determined by the touch path from the touch start point to the touch end point, and if the touch speed of the touch operation does not exceed the preset speed threshold, the detected touch operation may be a touch process of pressing down on the terminal screen - sliding... - sliding - lifting, i.e., the first touch operation. In order to further distinguish it from the second touch operation, in addition to the touch speed not exceeding the preset speed threshold, the direction of the first touch operation may also be a circular direction.
[0094] In another case, when the touch speed of the touch operation exceeds a preset speed threshold and the touch direction is radial, it can be determined that the current touch operation is a second touch operation, and the touch operation type corresponding to the second touch operation can be used to control the virtual character to perform special movements, such as an operation type other than walking.
[0095] Specifically, Figure 3B As shown, if the touch speed of the touch operation exceeds the preset speed threshold and the touch direction is radial, since the touch speed of the touch operation exceeds the preset speed threshold, the sliding of the screen terminal between pressing and lifting can be ignored, and the detected touch operation can be a press-and-lift touch process for the terminal screen, that is, the second touch operation.
[0096] Step 202: determining a target movement type according to a target touch response area affected by the first touch operation and / or the second touch operation.
[0097] In one embodiment of the present invention, after determining the touch operation type of the current touch operation based on the touch speed and touch direction of the touch operation, the function of the current virtual joystick, that is, the target movement type for controlling the virtual character, can be further determined on this basis, so as to control the virtual character to move accordingly according to the determined target movement type.
[0098] Among them, the multiple touch response areas located in the virtual joystick area provided by the game interface can be divided according to different preset distances, and the divided multiple touch response areas can have the same center point. The position of the center point can be determined based on the user's touch operation on the virtual joystick area to achieve non-fixed following of the touch response area. It can also be pre-set based on the current game scene. This is not limited by the embodiments of the present invention; and the number of preset distances is not limited by the embodiments of the present invention.
[0099] In the embodiment of the present invention, for the same touch operation type, different touch response areas affected by the touch operation correspond to different movement types. In this case, a target response touch area may be determined to determine the target movement type.
[0100] Specifically, the center point of multiple touch response areas divided according to different preset distances can be taken to determine the relative distance or relative circumference of the touch operation relative to the center point; then, the target touch response area on which the touch operation acts can be determined based on the relative distance or relative circumference relative to the center point, so as to determine the target movement type based on the determined target touch response area.
[0101] As an example, the provided virtual joystick area can be a constructed circular joystick interface, and the multiple divided touch response areas can be concentric circles or concentric rings with the same center divided by a preset distance with the center of the circular joystick interface as the center.
[0102] In practical applications, the method for determining the target response touch area of the touch operation can be determined in combination with the touch direction characteristics of the touch operation.
[0103] In the first case, if the touch operation on the circular joystick interface is a first touch operation in which the touch speed does not exceed the preset speed threshold and the touch direction is in a circular direction, the determination of the target response touch area can be based on the circular characteristics of the touch direction being in a circular direction.
[0104] Specifically, the circumference length of each touch response area can be calculated based on each preset distance, and then the touch circumference length is determined based on the touch start point and the touch end point of the first touch operation, and then the target touch response area is determined from multiple touch response areas based on the size relationship between the touch circumference length and multiple circumference lengths. It should be noted that the touch circumference length may refer to the circumference of the circle where the arc formed by the touch start point and the touch end point is located. The arc may not form a complete circle, and the touch track between the touch start point and the touch end point may not be a standard arc.
[0105] In this case, after determining the target response touch area based on the circular characteristics, the target movement type corresponding to the current first touch operation can be determined.
[0106] As an example, Figure 4A As shown, according to the size relationship between the touch circle length and multiple circle lengths, the current target response touch area is determined to be area range 1. At this time, the target movement type for the virtual character can be determined to be control displacement mode 1, for example, controlling the virtual character to walk silently.
[0107] As another example, Figure 4B As shown, according to the size relationship between the touch circle length and multiple circle lengths, the current target response touch area is determined to be area range 2. At this time, the target movement type for the virtual character can be determined to be control displacement mode 2, for example, controlling the virtual character to walk normally.
[0108] As another example, Figure 4C As shown, according to the size relationship between the touch circle length and multiple circle lengths, the current target response touch area is determined to be area range 3. At this time, the target movement type for the virtual character can be determined to be control displacement mode 3, for example, controlling the virtual character to run fast.
[0109] In the second case, if the touch operation on the circular joystick interface is a second touch operation in which the touch speed exceeds the preset speed threshold and the touch direction is radial, the determination of the target response touch area can be determined based on the radial characteristic that the touch direction is radial.
[0110] Specifically, the touch distance may be determined based on the touch start point and the touch end point of the second touch operation, and then the target touch response area may be determined from the multiple touch response areas according to the size relationship between the touch distance and multiple preset distances.
[0111] In this case, after determining the target response touch area based on the radial characteristics, the target movement type corresponding to the current second touch operation can be determined.
[0112] As an example, Figure 4DAs shown, according to the size relationship between the touch distance and multiple preset distances, the current target response touch area is determined to be area range 1. At this time, the target movement type for the virtual character can be determined to be control displacement mode 4, such as controlling the virtual character to perform a short-distance light jump.
[0113] As another example, Figure 4E As shown, the current target response touch area is determined to be area range 2 according to the size relationship between the touch distance and multiple preset distances. At this time, the target movement type for the virtual character can be determined to be control displacement mode 5, for example, controlling the virtual character to perform a long distance jump.
[0114] As another example, Figure 4F As shown, the current target response touch area is determined to be area range 3 according to the size relationship between the touch distance and multiple preset distances. At this time, the target movement type for the virtual character can be determined to be control displacement mode 6, such as controlling the virtual character to fly at low altitude.
[0115] It should be noted that the three points A, B, and C shown in the figure represent input points located on the sides of the screen. The embodiment of the present invention does not involve a description of the input points. This input point is only used as an example of the right control of the game interface provided by the terminal.
[0116] In a preferred embodiment, the touch operation may include not only the aforementioned first touch operation and second touch operation of sliding the screen, but also a double-click operation and / or a long press operation. In this case, a direct response may be given to the double-click operation and / or the long press operation on the virtual joystick area, and the target movement type may be determined according to the double-click operation and / or the long press operation so as to control the virtual character to move accordingly according to the target movement type.
[0117] As an example, Figure 4G As shown, by double-clicking the joystick at the center of the divided multiple touch response areas, it can be determined that the target movement type for the virtual character is the control displacement mode 7, such as controlling the virtual character to perform a crouching operation.
[0118] As another example, Figure 4H As shown, by long pressing the joystick at the center of the divided multiple touch response areas, the target movement type for the virtual character can be determined to be the control displacement mode 8, such as controlling the virtual character to lie down.
[0119] In a preferred embodiment, the touch operation may include multiple touch operations, such as a first touch operation and a second touch operation for sliding the screen, a double-click operation, and a long press operation. At this time, it is possible to respond to multiple touch operations acting on the virtual joystick area, determine the touch order of the multiple touch operations, and determine the touch operation type and the target movement type in the touch operation type according to the touch order of the multiple touch operations, so as to control the virtual character to move accordingly according to the target movement type.
[0120] The touch sequence of the multiple touch operations may include any combination sequence of the first touch operation and / or the second touch operation and / or the double-click operation and / or the long press operation, which is not limited in the embodiment of the present invention.
[0121] As an example, Fig. 4I As shown, double-click the joystick at the center position of the multiple divided touch response areas and perform the first touch operation on the touch response area. At this time, after determining that the current target response touch area is area range 1, area range 2, or area range 3 based on the size relationship between the touch circle length and the multiple circle lengths, the target movement type for the virtual character can be determined, for example, controlling the virtual character to quickly switch to crouching displacement or dodge displacement in a standing state.
[0122] As another example, Figure 4J As shown, double-click the joystick at the center of the multiple divided touch response areas and perform a second touch operation on the touch response area. At this time, after determining that the current target response touch area is area range 1, area range 2, or area range 3 based on the size relationship between the touch distance and multiple preset distances, the target movement type for the virtual character can be determined, for example, controlling the virtual character to quickly switch from a standing state to a crouching state, and then jump, etc.
[0123] As another example, Figure 4K As shown, double-click the joystick at the center position of the multiple divided touch response areas and perform a first touch operation on the touch response area, and then perform a second touch operation. After determining that the current target response touch area is area range 1, area range 2, or area range 3, the target movement type for the virtual character can be determined, for example, controlling the virtual character to quickly switch from a standing state to a crouching state, and then move, then jump, and then move and then jump, etc.
[0124] It should be noted that, for different touch operations, the touch operation types corresponding to different touch operations, and the movement types corresponding to different touch response areas acted on by different touch operations, the target function achieved by the virtual joystick can be changed according to needs; and the specific division of the virtual joystick area can also be determined according to needs; and the method proposed in the embodiment of the present invention of jointly determining the joystick function by combining the touch operation type of the touch operation and the touch response area acted on can be applied not only to game scenes for controlling the movement of virtual characters, but also to other game scenes that require joystick control, such as game scenes for controlling virtual characters to shoot targets or game scenes for controlling virtual characters to carry tools, etc., and the embodiments of the present invention are not limited to this.
[0125] In an embodiment of the present invention, the player's differentiation of touch operations on the virtual joystick is enriched from the two dimensions of touch operation type and the touch response area acted upon. The movement control of the current virtual character is jointly determined by combining the touch operation type of the touch operation and the touch response area acted upon. Multiple functional operations are compounded without increasing the number of controls, so that a single joystick control can realize complex compound displacement operations, thereby improving the operating efficiency of the joystick control and reducing the number of joystick controls for realizing multiple functional operations in the prior art. By freeing up the interactive input points on the right side of the screen, the player is supported to perform operations in more dimensions at the same time while reducing the burden on the right hand, and the occupancy rate of the screen space is also reduced.
[0126] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0127] Reference Figure 5 , shows a structural block diagram of an embodiment of a displacement control device for a virtual character of the present invention, which may specifically include the following modules:
[0128] A virtual joystick area providing module 501 is used to provide a virtual joystick area on the game interface, wherein the virtual joystick area includes a plurality of divided touch response areas;
[0129] An operation type determination module 502, configured to respond to a touch operation applied to a virtual joystick region and determine a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation;
[0130] The first virtual character movement module 503 is used to determine a target movement type in the touch operation type according to a target touch response area acted on by the touch operation, so as to control the virtual character to move accordingly according to the target movement type.
[0131] In one embodiment of the present invention, the operation type determination module 502 may include the following submodules:
[0132] A first operation type determination submodule, configured to determine, when the touch operation is a first touch operation whose touch speed does not exceed a preset speed threshold, that the touch operation type is an operation type for controlling the virtual character to perform normal walking;
[0133] The second operation type determination submodule is used to determine that the touch operation type is an operation type for controlling a virtual character to perform a special movement when the touch operation is a second touch operation in which the touch speed exceeds a preset speed threshold and the touch direction is radial.
[0134] In an embodiment of the present invention, the plurality of touch response areas in the virtual joystick area are divided according to different preset distances; the first virtual character moving module 503 may include the following submodules:
[0135] A relative information determination submodule, used to obtain the center point of the multiple touch response areas divided according to different preset distances, and determine the relative distance or relative circumference of the touch operation relative to the center point;
[0136] The target movement type determination submodule is used to determine the target touch response area where the touch operation acts according to the relative distance or relative circumference relative to the center point, so as to determine the target movement type based on the determined target touch response area; wherein, for the same touch operation type, different touch response areas where the touch operation acts correspond to different movement types.
[0137] In an embodiment of the present invention, the touch operation includes a first touch operation; the target movement type determination submodule may include the following units:
[0138] A circumference length calculation unit, used to calculate the circumference length of each touch response area according to each preset distance;
[0139] a touch circle length determining unit, configured to determine the touch circle length based on a touch start point and a touch end point of the first touch operation;
[0140] The first target touch response area determination unit is used to determine a target touch response area from the multiple touch response areas according to a size relationship between the touch circumference length and multiple circumference lengths.
[0141] In an embodiment of the present invention, the touch operation includes a second touch operation; the target movement type determination submodule may include the following units:
[0142] a touch distance determining unit, configured to determine the touch distance based on a touch start point and a touch end point of the second touch operation;
[0143] The second target touch response area determination unit is configured to determine a target touch response area from the multiple touch response areas according to a magnitude relationship between the touch distance and a plurality of preset distances.
[0144] In an embodiment of the present invention, the touch operation further includes a double-click operation and / or a long-press operation, and the device may further include the following modules:
[0145] The second virtual character movement module is used to respond to a double-click operation and / or a long press operation on the virtual joystick area, and determine a target movement type according to the double-click operation and / or the long press operation to control the virtual character to move accordingly according to the target movement type.
[0146] In one embodiment of the present invention, the device may further include the following modules:
[0147] In response to multiple touch operations acting on the virtual joystick area, determine a touch order of the multiple touch operations; wherein the touch order of the multiple touch operations includes any combination order of the first touch operation and / or the second touch operation and / or the double-click operation and / or the long press operation;
[0148] The third virtual character movement module is used to determine the touch operation type and the target movement type in the touch operation type according to the touch sequence of the multiple touch operations, so as to control the virtual character to move accordingly according to the target movement type.
[0149] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0150] An embodiment of the present invention further provides an electronic device, including:
[0151] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, each process of the above-mentioned virtual character displacement control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0152] Reference Figure 6, shows a structural block diagram of a computer-readable storage medium of an embodiment of the present invention, and the computer-readable storage medium 601 can store a computer program, wherein the computer program can be executed by a processor to implement the various processes of the above-mentioned virtual character displacement control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0153] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0154] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0155] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0158] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0159] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0160] The above is a detailed introduction to a virtual character displacement control method and a virtual character displacement control device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for controlling the displacement of a virtual character, characterized in that: The method comprises: Providing a virtual joystick area on the game interface, wherein the virtual joystick area includes a plurality of divided touch response areas; In response to a touch operation applied to a virtual joystick area, determining a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation; wherein the touch direction includes a circumferential direction; According to the target touch response area acted by the touch operation, the target movement type in the touch operation type is determined so as to control the virtual character to move accordingly according to the target movement type; wherein the target movement type is used to indicate the refined control under the touch operation type; for the same touch operation type, different touch response areas acted by the touch operation correspond to different movement types.
2. The method according to claim 1, characterized in that: The determining the touch operation type of the touch operation based on the touch speed and the touch direction of the touch operation includes: When the touch operation is a first touch operation whose touch speed does not exceed a preset speed threshold, determining that the touch operation type is an operation type for controlling the virtual character to perform normal walking; And / or, when the touch operation is a second touch operation in which the touch speed exceeds a preset speed threshold and the touch direction is radial, the touch operation type is determined to be an operation type for controlling a virtual character to perform a special movement.
3. The method according to claim 1, characterized in that The multiple touch response areas in the virtual joystick area are divided according to different preset distances; and the target movement type in the touch operation type is determined according to the target touch response area of the touch operation, including: Acquire a center point of the multiple touch response areas divided according to different preset distances, and determine a relative distance or a relative circumference of the touch operation relative to the center point; A target touch response area on which the touch operation acts is determined according to the relative distance or the relative circumference relative to the center point, so as to determine the target movement type based on the determined target touch response area.
4. The method according to claim 3, characterized in that: The touch operation includes a first touch operation; and determining a first target touch response area of the touch operation according to the relative distance relative to the center point includes: Calculate the circumference length of each touch response area according to each preset distance; Determining the length of a touch circle based on a touch start point and a touch end point of the first touch operation; A target touch response area is determined from the multiple touch response areas according to a size relationship between the touch circumference length and a plurality of circumference lengths.
5. The method according to claim 3, characterized in that: The touch operation includes a second touch operation; and determining a target touch response area of the touch operation according to the relative circumference relative to the center point includes: determining a touch distance based on a touch start point and a touch end point of the second touch operation; According to the magnitude relationship between the touch distance and a plurality of preset distances, a target touch response area is determined from the plurality of touch response areas.
6. The method according to claim 2, characterized in that The touch operation further includes a double-click operation and / or a long-press operation, and the method further includes: In response to a double-click operation and / or a long-press operation on the virtual joystick area, a target movement type is determined according to the double-click operation and / or the long-press operation, so as to control the virtual character to move accordingly according to the target movement type.
7. The method according to claim 6, characterized in that The method further comprises: In response to multiple touch operations acting on the virtual joystick area, determine a touch order of the multiple touch operations; wherein the touch order of the multiple touch operations includes any combination order of the first touch operation and / or the second touch operation and / or the double-click operation and / or the long press operation; The touch operation type and the target movement type in the touch operation type are determined according to the touch sequence of the multiple touch operations, so as to control the virtual character to move accordingly according to the target movement type.
8. A displacement control device for a virtual character, characterized in that: The device comprises: A virtual joystick area providing module, used to provide a virtual joystick area on the game interface, wherein the virtual joystick area includes a plurality of divided touch response areas; An operation type determination module, configured to respond to a touch operation applied to a virtual joystick area and determine a touch operation type of the touch operation based on a touch speed and a touch direction of the touch operation; wherein the touch direction includes a circumferential direction; A target movement type determination module is used to determine the target movement type in the touch operation type according to the target touch response area acted upon by the touch operation, so as to control the virtual character to move accordingly according to the target movement type; wherein the target movement type is used to indicate the detailed control under the touch operation type; for the same touch operation type, different touch response areas acted upon by the touch operation correspond to different movement types.
9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the method for controlling the displacement of a virtual character as claimed in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for controlling the displacement of a virtual character as claimed in any one of claims 1 to 7 are implemented.
