Control Method, Device, Electronic Device and Storage Medium of a Game

By using graphical user interface and haptic feedback technology in the game, we can detect obstacles around virtual characters in real time and prompt users to adjust the movement direction, which solves the problem of manual adjustment of paths when virtual characters are found, and improves operation efficiency and user experience.

CN113663333BActive Publication Date: 2025-05-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110976432.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2025-05-30
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

In the game, if a virtual character encounters an inaccessible situation when looking for a path, the player needs to manually adjust the movement path, which leads to inconvenient operation and inefficient efficiency.

Method used

The terminal device provides a graphical user interface, in response to the touch sliding operation of the mobile control, obtain the relative position relationship between the current position of the touch point and the origin position of the mobile control, and control the movement of the virtual character. At the same time, it detects whether there are obstacles around the virtual character in real time, and prompts the user to adjust the movement direction through tactile feedback when the obstacle is detected.

Benefits of technology

By detecting obstacles in real time and providing tactile feedback, users can promptly understand the road conditions ahead, reduce ineffective operations, and improve operational efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113663333B_ABST
    Figure CN113663333B_ABST
Patent Text Reader

Abstract

The present application provides a control method, device, electronic device and storage medium for a game. The method provides a graphical user interface including a movement control through a terminal device, and the content displayed on the graphical user interface at least partially includes a game scene of the game, and the game scene includes virtual characters. The method includes: in response to a touch sliding operation on the movement control, obtaining a first relative position relationship between the current position of the touch point of the touch sliding operation on the graphical user interface and the origin position of the movement control, and controlling the virtual character to move in the game scene in the movement direction determined by the first relative position relationship; in response to the movement of the virtual character in the game scene, if there is an obstacle within a preset search range centered on the current position of the virtual character, determining a target position on the graphical user interface based on the current position of the touch point; and performing haptic feedback at the target position. The method of the present application improves the game operation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to game technologies, and in particular, to a control method, apparatus, electronic device, and storage medium for a game. Background Art

[0002] Pathfinding is a function in online games. Through pathfinding, a virtual character can be controlled to move from the current position to the destination, thereby completing tasks in the game.

[0003] Pathfinding includes manual pathfinding and automatic pathfinding. Manual pathfinding is that the player determines the movement path of the virtual character according to their own thinking and manually controls the virtual character to move along the movement path. Automatic pathfinding is that the computer automatically plans a movement path that can reach the end point according to the pathfinding algorithm and the starting point and end point selected by the player, and automatically controls the virtual character to move along the movement path.

[0004] During the above pathfinding process, if an impassable situation is encountered, the player needs to manually adjust the movement path of the virtual character, resulting in inconvenient operation and low operation efficiency. Summary of the Invention

[0005] This application provides a control method, apparatus, electronic device, and storage medium for a game, which are used to solve the problem that when the virtual character in the game is pathfinding, if an impassable situation is encountered, the player needs to manually adjust the movement path of the virtual character, resulting in inconvenient operation and low operation efficiency.

[0006] In a first aspect, this application provides a control method for a game. A graphical user interface is provided through a terminal device. The graphical user interface further includes a movement control. At least part of the content displayed on the graphical user interface includes the game scene of the game, and the game scene includes a virtual character. The method includes: in response to a touch and slide operation on the movement control, obtaining a first relative position relationship between the current position of the touch point of the touch and slide operation on the graphical user interface and the origin position of the movement control, and controlling the virtual character to move in the game scene in the movement direction determined by the first relative position relationship; in response to the movement of the virtual character in the game scene, determining whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene; if there is an obstacle within the preset search range centered on the current position of the virtual character, determining a target position on the graphical user interface based on the current position of the touch point; and performing haptic feedback at the target position.

[0007] In a second aspect, the present application provides a control device for a game. A graphical user interface is provided through a terminal device. The graphical user interface further includes a movement control. At least part of the content displayed on the graphical user interface includes a game scene of the game. The game scene includes virtual characters. The device includes: a control module, configured to, in response to a touch and slide operation on the movement control, obtain a first relative position relationship between the current position of a touch point of the touch and slide operation on the graphical user interface and the origin position of the movement control, and control the virtual character to move in the game scene in a movement direction determined by the first relative position relationship; a first determination module, configured to, in response to the movement of the virtual character in the game scene, determine whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene; a second determination module, if there is an obstacle within the preset search range centered on the current position of the virtual character, determine a target position on the graphical user interface based on the current position of the touch point; and a haptic feedback module, configured to perform haptic feedback at the target position.

[0008] In a third aspect, the present application provides an electronic device, including: a memory, a processor;

[0009] a memory for storing instructions executable by the processor;

[0010] wherein, the processor is configured to implement the method as described in the first aspect.

[0011] In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method as described in the first aspect when executed by a processor.

[0012] In a fifth aspect, the present application provides a computer program product including a computer program, which implements the method as described in the first aspect when executed by a processor.

[0013] The control method, device, electronic device, and storage medium for a game provided by this application obtain the first relative position relationship between the current position of the touch point of the touch and slide operation on the graphical user interface and the origin position of the mobile control in response to the touch and slide operation on the mobile control. During the process of controlling the virtual character to move in the game scene in the moving direction determined by the first relative position relationship, in response to the movement of the virtual character in the game scene, it is determined whether there are obstacles within a preset search range centered on the current position of the virtual character in the game scene. If there are obstacles within the preset search range centered on the current position of the virtual character in the game scene, a target position is determined on the graphical user interface based on the current position of the touch point, and haptic feedback is performed at the target position. Since during the movement of the virtual character, it is detected in real time whether there are obstacles around the virtual character, and in the case of detecting obstacles, haptic feedback is performed based on the touch point, and the user is prompted through haptic feedback, so that the user can understand the road conditions ahead in advance, thereby adjusting the moving direction of the virtual character in a timely manner, and improving the operation efficiency. Description of the Drawings

[0014] The drawings here are incorporated into the specification and form a part of this specification, showing the embodiments that conform to this application, and are used together with the specification to explain the principles of this application.

[0015] Figure 1 A schematic diagram of a graphical user interface provided by an embodiment of this application;

[0016] Figure 2 The flowchart of the control method for the game provided by an embodiment of this application Figure 1 ;

[0017] Figure 3 A schematic diagram of the relationship between the direction of the target position relative to the center point of the preset control and the direction of the obstacle relative to the virtual character provided by an embodiment of this application;

[0018] Figure 4 A schematic diagram of the preset search range provided by an embodiment of this application;

[0019] Figure 5 A schematic diagram of a target position provided by an embodiment of this application;

[0020] Figure 6 Another schematic diagram of a target position provided by an embodiment of this application;

[0021] Figure 7 The flowchart of the control method for the game provided by an embodiment of this application Figure 2 ;

[0022] Figure 8Flowchart of the game control method provided by the embodiment of the present application Figure 3 ;

[0023] Figure 9 Schematic diagram of the first preset length provided by the embodiment of the present application Figure 1 ;

[0024] Figure 10 Schematic diagram of the first preset length provided by the embodiment of the present application Figure 2 ;

[0025] Figure 11 Schematic diagram of the second preset length provided by the embodiment of the present application Figure 1 ;

[0026] Figure 12 Schematic diagram of the second preset length provided by the embodiment of the present application Figure 2 ;

[0027] Figure 13 Trend chart of the change in the friction degree of the preset control provided by the embodiment of the present application;

[0028] Figure 14 Effect diagram of the change in the friction degree of the preset control provided by the embodiment of the present application;

[0029] Figure 15 Schematic structural diagram of the game control device provided by the embodiment of the present application;

[0030] Figure 16 Schematic structural diagram of the electronic device provided by the embodiment of the present application.

[0031] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be given later. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners

[0032] Here, exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0033] In a game, a means of purposefully guiding players to carry out game activities and giving players virtual items used in the game is a game task. Among them, game tasks can include: killing monsters, collecting virtual items, etc.

[0034] When a player executes a game task, they need to search for a target object. Taking game tasks such as killing monsters and collecting items as an example, the player controls a virtual character through a terminal device to start from the current position and search for monsters or items along the path in the game scene. The process of determining the path for the virtual character to move is called pathfinding, which includes manual pathfinding and automatic pathfinding. The following will introduce pathfinding in combination with the accompanying drawings:

[0035] Figure 1 It is a schematic diagram of a graphical user interface provided by an embodiment of the present application. As Figure 1 shown, the method provided by the embodiment of the present application can be applied to the terminal device 11, and the terminal device 11 can be a device such as a smart phone or a tablet computer.

[0036] A game application 12 can run on the terminal device 11, and the graphical user interface 13 of the terminal device 11 can display the game scene 13 and the movement control 14 of the game application 12; among them, the game scene 13 includes a virtual character 131 and a non-player character (NPC) 132, and the non-player character can be the above-mentioned monsters, items, etc.

[0037] Among them, the movement control 14 is a control for controlling the movement of the virtual character. For example, a virtual joystick, and the virtual joystick includes direction buttons of "up", "down", "left", and "right".

[0038] In the manual pathfinding scenario, the player can control the virtual character to move in the directions of "up", "down", "left", and "right" by operating the direction buttons to search for the target object. Usually, the user combines visual observation of the game scene and makes judgments based on their own thinking to determine the movement direction of the virtual character, and then controls the movement of the virtual character through the movement control. However, in automatic pathfinding, dead ends are often encountered, or if the volume of the equipment equipped by the virtual character is large, it will also get stuck with the surrounding scenery, or get stuck when turning a corner. At this time, the user needs to operate the movement control to make the virtual character turn back from the dead end, and this part of the operation is actually an invalid operation. In this way, the game operation efficiency will be low.

[0039] In the automatic pathfinding scenario, the user can specify a destination or select an NPC in the game map. Then, the shortest path can be automatically planned, and the virtual character can be automatically controlled to move along the shortest path to the destination or the selected NPC.

[0040] In the automatic pathfinding scenario, due to the long running distance of the map, many surrounding scenery, and the relatively large volume of the equipment on the virtual character, it is very easy to get stuck with the surrounding scenery or at the corner. From the user's perspective, it means that the virtual character in the game screen stops moving at a certain position, while the feet may still be performing the running action. At this time, the user also needs to manually operate to adjust the moving direction of the virtual character. Since it is automatic pathfinding and the user does not know in advance how the virtual character reaches the current stuck position, the user needs to open the map to view the historical path. This is cumbersome for the user and has low operation efficiency, resulting in a poor user experience.

[0041] In view of the above technical problems, the inventors of the present application propose the following technical concept: In the game scenario, detect the obstacles that may exist in the moving direction of the virtual character in advance, and when an obstacle is detected, remind the user to adjust the moving direction of the virtual character, so as to reduce ineffective operations. Currently, most reminder methods in the game include voice, visual, etc. reminders, and voice reminders or visual reminders may interrupt the progress of the game, resulting in a poor user experience. Therefore, the present application proposes a reminder method through haptic feedback to remind the user tactilely.

[0042] The following uses specific embodiments to elaborate in detail on the technical solution of the present application and how the technical solution of the present application solves the above technical problems. These specific embodiments below can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0043] Figure 2 The flow of the game control method provided by the embodiments of the present application Figure 1 As Figure 2 shown, the game control method includes the following steps:

[0044] S201. In response to a touch sliding operation on the movement control, obtain the first relative position relationship between the current position of the touch point of the touch sliding operation on the graphical user interface and the origin position of the movement control, and control the virtual character to move in the game scene in the movement direction determined by the first relative position relationship.

[0045] The execution subject of the method in this embodiment can be a terminal device as Figure 1 shown.

[0046] In an alternative embodiment, the touch point acting on the graphical user interface can be controlled and implemented through the contact point of a finger, a stylus, or any touch medium with the screen of the terminal device presenting the graphical user interface. The current position of the touch point can be freely controlled through the touch operation of the player on the graphical user interface, and the current position of the touch point can be displayed in the upper left corner, the upper right corner, or any other position in the graphical user interface, and this exemplary embodiment does not limit this.

[0047] In this embodiment, the origin position of the movement control can be the center point position of the movement control. When a touch sliding operation occurs on the graphical user interface, obtain the current position of the touch point of the touch sliding operation; and determine the first relative position relationship according to the current position of the touch point of the touch sliding operation and the position of the center point of the movement control; and determine the movement direction of the virtual character according to the first relative position relationship; and control the virtual character to move in the determined movement direction in the game scene according to the movement direction of the virtual character.

[0048] Among them, with the center point of the movement control as the origin, the touch point of the touch sliding operation can be any touch point within a 360-degree range centered on the origin. The direction of the current position of the touch point of the touch sliding operation relative to the position of the center point of the movement control can be understood as the first relative position relationship. In some alternative embodiments, the first relative position relationship may further include the distance between the current position of the touch point of the touch sliding operation and the position of the center point of the movement control.

[0049] And determining the movement direction of the virtual character according to the first relative position relationship specifically includes: determining the movement direction of the virtual character according to the first relative position relationship and a preset first correspondence; wherein, the first correspondence is used to represent the mapping relationship between the sliding direction of the touch sliding operation (that is, the relative position relationship between the current position of the touch point and the origin position of the movement control) and the movement direction of the virtual character, and determine the movement direction of the virtual character. Among them, the first correspondence can include the following two different embodiments:

[0050] In some alternative embodiments, the first correspondence includes: the direction of the current position of the touch point of the touch sliding operation relative to the origin position of the movement control is the same as the movement direction of the virtual character.

[0051] For example, if the current position of the touch point of the touch sliding operation is located in the upper left direction of the origin position of the movement control, then control the virtual character to move in the upper left direction of the current position of the virtual character.

[0052] If the current position of the touch point of the touch sliding operation is located in the upper right direction of the origin position of the movement control, then control the virtual character to move in the upper right direction of the current position of the virtual character.

[0053] If the current position of the touch point of the touch and slide operation is located in the lower left direction of the origin position of the moving control, then control the virtual character to move in the lower left direction of the current position of the virtual character.

[0054] If the current position of the touch point of the touch and slide operation is located in the lower right direction of the origin position of the moving control, then control the virtual character to move in the lower right direction of the current position of the virtual character.

[0055] For the convenience of the reader's understanding, the following will illustrate this step in conjunction with the accompanying drawings:

[0056] Figure 3 It is a schematic diagram of the mapping relationship provided by the embodiment of the present application. As Figure 3 shown, in the game scene, an axis X1O1Y1 is established with the current position of the virtual character as the origin. In addition, in the graphical user interface, an axis X2O2Y2 is established with the center point of the moving control as the origin. Among them, the four regions formed by the horizontal axis and the vertical axis in the coordinate axis are divided into four quadrants. Taking the coordinate axis X2O2Y2 as an example, the upper right is the first quadrant (that is, the region formed by the positive half-axis of X2 and the positive half-axis of Y2), the upper left is the second quadrant (that is, the region formed by the negative half-axis of X2 and the positive half-axis of Y2), the lower left is the third quadrant (that is, the region formed by the negative half-axis of X2 and the negative half-axis of Y2), and the lower right is the fourth quadrant (that is, the region formed by the positive half-axis of X2 and the negative half-axis of Y2).

[0057] Then, if the direction of the current position of the touch point of the touch and slide operation relative to the origin position of the moving control is within the second quadrant of the coordinate axis X2O2Y2, and the included angle between the current position of the touch point of the touch and slide operation and the negative half-axis of X2 is 45 degrees. Then the moving direction of the virtual character is in the first quadrant of the coordinate axis X1O1Y1, and the direction with an included angle of 45 degrees from the negative half-axis of X1.

[0058] It should be noted that the above coordinate axes are not visible in the game and do not constitute a limitation to the present application. It is an exemplary illustration for the convenience of the reader's understanding.

[0059] In some other alternative embodiments, the first corresponding relationship includes: the direction of the current position of the touch point of the touch and slide operation relative to the origin position of the moving control is not the same as the moving direction of the virtual character.

[0060] For example, in a skydiving game, if the current position of the touch point of the touch and slide operation is located directly above the origin position of the moving control, then control the virtual character to move directly downward from the current position of the virtual character; if the current position of the touch point of the touch and slide operation is located directly below the origin position of the moving control, then control the virtual character to move directly upward from the current position of the virtual character.

[0061] S202. In response to the movement of the virtual character in the game scene, determine whether there are obstacles within a preset search range centered on the current position of the virtual character in the game scene.

[0062] In this step, during the movement of the virtual character, it is determined in real time whether there are obstacles in the surrounding environment in the moving direction of the virtual character based on its current position.

[0063] Specifically, this step is to determine whether there are obstacles within a preset search range centered on the current position of the virtual character in the game scene and extending in the current moving direction.

[0064] In an alternative embodiment, the preset search range may be a circular area centered on the current position of the virtual character in the game scene, that is, around the virtual character.

[0065] In another alternative embodiment, the preset search range may be a sector area centered on the current position of the virtual character in the game scene and extending in the current moving direction, with a preset length as the radius and a central angle of 180 degrees for the sector area.

[0066] Figure 4 This is a schematic diagram of the preset search range for the embodiments of the present application. As Figure 4 shown, point A2 represents the current position of the virtual character, the direction of the arrow represents the current moving direction of the virtual character, the preset length is R2, then the sector area with point A2 as the center, R2 as the radius, and a central angle of 180 degrees is the preset search range.

[0067] S203. If there are obstacles within the preset search range centered on the current position of the virtual character, determine a target position on the graphical user interface based on the current position of the touch point.

[0068] Among them, the determination of the target position includes at least the following two embodiments:

[0069] In some alternative embodiments, if there are obstacles within the preset search range centered on the current position of the virtual character, the current position of the touch point is determined as the target position.

[0070] In this embodiment, when a long - press operation is performed on the virtual joystick on the graphical user interface to control the movement of the virtual character, a contact area is formed between the finger and the graphical user interface, and this contact area is the target position.

[0071] Figure 5 This is a schematic diagram of a target position provided by the embodiments of the present application. As Figure 5As shown in the figure, when a finger performs a long - press operation on the graphical user interface and forms a contact area (the area within the dashed circle in the figure) 51, the contact area 51 is taken as the target position in this embodiment.

[0072] In some other alternative embodiments, if there is an obstacle within a preset search range centered on the current position of the virtual character, a preset area range centered on the current position of the touch point is determined as the target position.

[0073] In this embodiment, when sliding the virtual joystick on the graphical user interface to control the movement of the virtual character, the current position of the touch point and a preset area range in a preset direction relative to the current position of the touch point can be determined as the target position.

[0074] Figure 6 This is a schematic diagram of another target position provided by the embodiment of the present application. As Figure 6 shown, assume that in the game, when the finger slides in the upper - left direction, it controls the virtual character to move in the upper - left direction. When an obstacle is detected in the upper - left direction of the virtual character, the target position 61 can be determined within the current touch - point position and a preset area range in the upper - left direction of the current touch - point position (i.e., the area shown by several hollow circles in the figure).

[0075] S204. Perform haptic feedback at the target position.

[0076] The terminal device of this embodiment is a device based on a haptic - feedback conductive layer. Among them, the haptic feedback includes frictional haptic feedback and / or vibration haptic feedback. Frictional haptic feedback enables the user's finger to feel a real frictional touch on the touch screen of the terminal device, and vibration haptic feedback enables the user's hand to feel vibration.

[0077] In this embodiment, the user can be prompted by separate frictional haptic or vibration haptic, or by a combination of frictional haptic and vibration haptic.

[0078] In this embodiment, in response to a touch sliding operation on a mobile control, the first relative position relationship between the current position of the touch point of the touch sliding operation on the graphical user interface and the origin position of the mobile control is obtained. During the process of controlling the virtual character to move in the game scene in the moving direction determined by the first relative position relationship, in response to the movement of the virtual character in the game scene, it is determined whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene. If there is an obstacle within the preset search range centered on the current position of the virtual character in the game scene, a target position is determined on the graphical user interface based on the current position of the touch point, and haptic feedback is performed at the target position. Since during the movement of the virtual character, it is detected in real time whether there is an obstacle around the virtual character, and in the case of detecting an obstacle, haptic feedback is performed based on the touch point, and the user is prompted by means of haptic feedback. The user can pre-understand the road conditions ahead, so as to timely adjust the moving direction of the virtual character, improving the operation efficiency.

[0079] Figure 7 is the flowchart of the game control method provided by the embodiment of the present application Figure 2 As Figure 7 shown, step S303 specifically includes:

[0080] S701. If there is an obstacle within a preset search range centered on the current position of the virtual character, determine the second relative position relationship between the position of the obstacle and the current position of the virtual character;

[0081] S702. Determine the target position according to the current position of the touch point and the second relative position relationship.

[0082] Specifically, determining the target position according to the current position of the touch point and the second relative position relationship includes:

[0083] a1. Transform the second relative position relationship into a third relative position relationship in the target coordinate system, and the target coordinate system is the graphical user interface coordinate system where the current position of the touch point is located.

[0084] Among them, the second relative position relationship may include at least the following two implementation manners:

[0085] In the first alternative implementation, the second relative position relationship includes a first direction, which is the direction of the obstacle relative to the current position of the virtual character; the third relative position relationship includes a second direction, which is the sliding direction of the touch sliding operation. Then step a1 specifically includes: determining the second direction according to the first direction and a preset second correspondence; wherein, the second correspondence is used to represent the mapping relationship between the sliding direction of the touch sliding operation and the direction of the position of the obstacle relative to the current position of the virtual character. When the touch sliding operation slides in the second direction, the virtual character can be controlled to move in the direction of the obstacle.

[0086] Among them, the second correspondence can include the following two different implementation manners:

[0087] In some alternative implementations, the second correspondence includes: the first direction is the same as the second direction.

[0088] For example, if the position of the obstacle is in the upper left direction of the current position of the virtual character, then the touch sliding operation is in the upper left direction of the current touch position; if the position of the obstacle is in the upper right direction of the current position of the virtual character, then the touch sliding operation is in the upper right direction of the current touch position; if the position of the obstacle is in the lower left direction of the current position of the virtual character, then the touch sliding operation is in the lower left direction of the current touch position; if the position of the obstacle is in the lower right direction of the current position of the virtual character, then the touch sliding operation is in the lower right direction of the current touch position.

[0089] In some other alternative implementations, the second correspondence includes: the first direction is not the same as the second direction. For example, the first direction and the second direction are opposite directions.

[0090] Still taking a skydiving game as an example, if the sliding direction of the touch sliding operation is directly above the current touch position, then the direction of the position of the obstacle relative to the current position of the virtual character is directly below; if the sliding direction of the touch sliding operation is directly below the current touch position, then the direction of the position of the obstacle relative to the current position of the virtual character is directly above.

[0091] In a second alternative embodiment, the second relative position relationship may further include a first distance, which is the distance of the obstacle relative to the current position of the virtual character, that is, the straight-line distance between the position of the obstacle and the current position of the virtual character; the third relative position relationship may further include a second distance, which is the sliding distance of the touch sliding operation. Then step a1 further includes: determining the second distance according to the first distance and a preset third correspondence; wherein, the third correspondence is used to represent the ratio between the sliding distance of the touch sliding operation and the distance of the position of the obstacle relative to the current position of the virtual character. When the touch sliding operation slides a second distance in the second direction, the virtual character will collide with the obstacle.

[0092] It should be noted that, since the area range of the touch sliding operation in the game is small, the ratio in the third correspondence can be set to be less than 1.

[0093] It should be noted that the second relative position relationship may only include the first direction, may only include the first distance, or may include both the first direction and the first distance.

[0094] a2. In the target coordinate system, determine an offset centered on the current position of the touch point according to the third relative position relationship.

[0095] a3. Determine the target position according to the current position of the touch point and the offset.

[0096] Based on the embodiment of step a1, the offset in step a2 may also include the following two different embodiments:

[0097] In an alternative embodiment, the offset includes an offset direction, then the second direction can be determined as the offset direction, that is, the offset direction of the offset centered on the current position of the touch point in this step a2 is the same as the second direction.

[0098] For example, if the second direction is the upper left direction of the current touch position, the target position includes the current position of the touch point and the area of a preset distance in the upper left direction of the current position of the touch point. Exemplarily, the area of the preset distance in the upper left direction may be a sector area centered on the current position of the touch point, with a predetermined distance length as the radius, the sector area has the straight line where the second direction is located as the center line, and the central angle of the sector area may be 180 degrees.

[0099] In another alternative embodiment, the offset further includes an offset distance, then the second distance can be determined as the offset distance.

[0100] Based on the example in the above first alternative embodiment, it can be understood that the predetermined distance length in the example of the above first alternative embodiment is the second distance.

[0101] Figure 8 The flowchart of the game control method provided by the embodiment of the present application Figure 3 As Figure 8 shown, the game control method includes the following steps:

[0102] S801: Launch multiple rays from the current position of the virtual character as the starting point within a preset search range, and the length of each ray in the multiple rays is equal to the preset length.

[0103] As introduced in the above embodiment, the preset search range can be a circular area centered on the current position of the virtual character. Then, in step S801, multiple rays are launched in the game scene from the current position of the virtual character as the starting point in all 360-degree directions around the virtual character.

[0104] When the preset search range is a sector area centered on the current position of the virtual character in the game scene in the current moving direction and with a radius equal to the preset length, then in step S801, multiple rays are launched in the current moving direction of the virtual character in the game scene.

[0105] Among them, the preset length includes a first preset length and / or a second preset length; the first preset length is determined according to the height of the virtual character; the second preset length is determined according to the width of the equipment worn by the virtual character.

[0106] The first preset length is used to determine the minimum height that can be passed on the forward path of the virtual character. For example, assume that the virtual character has no equipment, and there are obstacles such as branches and caves on the forward movement path of the virtual character. Then, the distance between the obstacle and the feet of the virtual character should be greater than the height of the virtual character. In this way, it can be ensured that the virtual character can pass in the height direction. If the virtual character has equipment, the distance between the branch, cave and the feet of the virtual character wearing the equipment should be greater than the height of the virtual character wearing the equipment.

[0107] Figure 9 Schematic diagram of the first preset length provided by the embodiment of the present application Figure 1 As Figure 9 shown, taking the ground where the current position of the virtual character 61 is located as a reference, the height of the virtual character 61 compared to the ground 62 is h1, and the minimum height of the surrounding scenery 63 compared to the ground 62 is h2. Then, when h2>h1, the surrounding scenery 63 does not hinder the movement of the virtual character.

[0108] Figure 10 Schematic diagram of the first preset length provided by the embodiment of the present application Figure 2 As Figure 10As shown in the figure, taking the ground where the current position of the virtual character 61 is located as a reference, after the virtual character 61 wears the helmet 64, the height of the virtual character wearing the helmet relative to the ground 62 is h3, and the minimum height of the surrounding scenery 63 relative to the ground 62 is h2. Then, when h2 ≤ h3, the surrounding scenery hinders the movement of the virtual character. When h2 > h3, the surrounding scenery does not hinder the movement of the virtual character.

[0109] Similarly, the second preset length is used to determine the minimum passable width on the forward path of the virtual character. For example, assuming that there are obstacles such as a canyon on the forward movement path of the virtual character, the width of the canyon should be greater than half of the sum of the width of the virtual character and the width of the equipment. In this way, it can be ensured that the virtual character can pass in the width direction.

[0110] Figure 11 Schematic diagram of the second preset length provided by the embodiment of the present application Figure 1 As Figure 11 shown, the width of the body of the virtual character 71 is w1, and the shortest distance between the edge of the surrounding scenery 72 close to the virtual character and the center of the body of the virtual character is w2. Then, when w2 > w1 / 2, the surrounding scenery does not hinder the movement of the virtual character.

[0111] Figure 12 Schematic diagram of the second preset length provided by the embodiment of the present application Figure 2 As Figure 12 shown, the width of the body of the virtual character 71 is w1, the width of the armor of the virtual character is w3, and the shortest distance between the edge of the surrounding scenery 73 close to the virtual character and the center of the body of the virtual character is w2. Then, when w2 > w3 / 2, the surrounding scenery does not hinder the movement of the virtual character.

[0112] S802: If the reflected rays of at least some of the multiple rays are received, it is determined that there are obstacles in the preset search range centered on the current position of the virtual character in the game scene.

[0113] Exemplarily, if there is an object in the preset search range in the game scene, the object will reflect the emitted rays to form reflected rays, and the length of the emitted rays is the preset length, which is used to represent the minimum distance at which the virtual character will not collide with surrounding objects during movement. Then, if the reflected rays of at least some of the multiple rays are received, it can be determined that there are obstacles in the preset search range centered on the current position of the virtual character in the game scene.

[0114] Based on the above embodiments, if the terminal device is a terminal device with frictional haptic feedback, then performing haptic feedback at the target position includes: performing frictional haptic feedback at the target position with a first frictional degree; or, performing frictional haptic feedback at the target position according to a preset frictional degree variation rule, where the frictional degree at the target position is negatively correlated with the distance between the virtual character and the obstacle.

[0115] Among them, performing frictional haptic feedback at the target position with a first frictional degree can be understood as performing frictional haptic feedback at the target position with a fixed frictional degree. The frictional resistance at the target position is a static frictional resistance, that is, a trend resistance is reflected at the target position, and the roughness felt by the user's finger is a constant frictional degree and will not change with time.

[0116] And performing frictional haptic feedback at the target position according to a preset frictional degree variation rule is to perform frictional haptic feedback at the target position with a frictional degree that changes with time. The frictional resistance at the target position is a dynamic frictional resistance, that is, the roughness felt by the user's finger will change with time. That is to say, when the user controls the movement of the virtual character through a touch and slide operation, when the user's finger slides in the offset direction of the offset amount on the graphical user interface, the closer the virtual character is to the obstacle, the greater the frictional degree at the target position, and the stronger the roughness felt by the user's finger. When the virtual character moves away from the obstacle, the frictional length at the target position becomes smaller, and the roughness felt by the user's finger becomes weaker. Among them, the frictional degree variation rule includes linear variation, non-linear variation or mutation.

[0117] Figure 13 It is a trend graph of the change in the frictional degree of the mobile control provided by the embodiment of the present application.

[0118] Figure 14 It is an effect diagram of the change in the frictional degree of the mobile control provided by the embodiment of the present application.

[0119] As Figure 13 and Figure 14 shown, it can be seen that Figure 14 on the left side of the arrow in, in the effect diagram of the frictional force of the preset control at time t1, the frictional degree is f1, and f1 = 0, that is, the preset control at time t1 is in a smooth state. Figure 14 on the right side of the arrow in, in the effect diagram of the frictional force of the preset control at time t2, the frictional degree is f2, and f2 > 0, that is, the preset control at time t1 is in a rough state. The user can feel the roughness through finger touch.

[0120] Based on the above embodiments, the haptic feedback is implemented by a haptic feedback component provided inside the terminal device. The haptic feedback component includes a plurality of haptic feedback units, and each haptic feedback unit has a degree of friction.

[0121] The plurality of haptic feedback units are shown in Figure 14 in a granular pattern, and the variation law of the degree of friction includes the variation law of the number of haptic feedback units and / or the variation law of the degree of friction of each haptic feedback unit among the plurality of haptic feedback units.

[0122] Among them, the variation law of the degree of friction of each haptic feedback unit can be linear, non-linear or abrupt.

[0123] The variation law of the number of haptic feedback units includes gradually decreasing and gradually increasing. Please continue to refer to Figure 13 , then Figure 13 at time t3 in

[0124] Based on the above embodiments, the pattern of the target position can also be controlled according to the target position, and the pattern is used to prompt the position where the haptic feedback is performed.

[0125] Then, based on the current position of the touch point being the target position, a pattern can be displayed within a circular area centered on the current position of the touch point with a preset distance as the radius, or within an annular area centered on the current position of the touch point with a preset distance as the radius. The area range corresponding to the inner ring of the annular area should include the contact area corresponding to the touch point. For example, in Figure 5 on the basis of Figure 5 outside the contact area 51 in

[0126] an annular area with the circle corresponding to the contact area 51 as the inner ring is determined, and a pattern is displayed within this annular area. Figure 6 Based on determining the target position according to the current position of the touch point and the offset, a pattern can be displayed within the area range indicated by the offset. For example, in

[0127] Optionally, the pattern includes an annular shape, a circular shape or a strip shape, etc. The variation law of the degree of friction includes linear variation, non-linear variation or abrupt change. Among them, the non-linear variation can be an exponential variation, and the abrupt change can be a step jump.

[0128] In the automatic pathfinding scenario, since the user is usually in an idle state after setting the automatic pathfinding, the frictional tactile feedback at the target location cannot timely alert the user. Therefore, after the tactile feedback at the target location, the method of this embodiment may further include: if there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene after a preset time has elapsed, re-plan the path for the virtual character according to the pathfinding algorithm; control the virtual character to move according to the re-planned path. That is to say, if the time for the frictional tactile feedback at the target location exceeds the preset time and there is still an obstacle within the preset search range centered on the current position of the virtual character in the game scene, re-plan the path for the virtual character according to the pathfinding algorithm; control the virtual character to move according to the re-planned path. In this way, the user can return to the right track automatically without opening the map.

[0129] Optionally, the pathfinding algorithm includes the width-optimal search algorithm, the greedy algorithm, the Dijkstra algorithm, the A* (A-star) search algorithm, and the B* (B-star) search algorithm.

[0130] Based on the above method embodiment, Figure 15 is a schematic structural diagram of a control device for a game provided by an embodiment of the present application. As Figure 15 shown, the control device for the game provides a graphical user interface through a terminal device. The graphical user interface further includes a movement control. At least part of the content displayed on the graphical user interface includes the game scene of the game, and the game scene includes a virtual character. The device includes: a control module 150, a first determination module 151, a second determination module 152, and a tactile feedback module 153;

[0131] Optionally, when the second determination module 152 determines a target position on the graphical user interface based on the current position of the touch point when there is an obstacle within a preset search range centered on the current position of the virtual character, it specifically includes: if there is an obstacle within a preset search range centered on the current position of the virtual character, determine the current position of the touch point as the target position.

[0132] Optionally, when the second determination module 152 determines a target position on the graphical user interface based on the current position of the touch point when there is an obstacle within a preset search range centered on the current position of the virtual character, it specifically includes: if there is an obstacle within a preset search range centered on the current position of the virtual character, determine the second relative position relationship between the position of the obstacle and the current position of the virtual character; determine the target position according to the current position of the touch point and the second relative position relationship.

[0133] Optionally, the second determination module 152 determines the target position according to the current position of the touch point and the second relative position relationship, specifically including: transforming the second relative position relationship into a third relative position relationship in a target coordinate system, where the target coordinate system is the graphical user interface coordinate system where the current position of the touch point is located; in the target coordinate system, determining an offset centered on the current position of the touch point according to the third relative position relationship; and determining the target position according to the current position of the touch point and the offset.

[0134] Optionally, the first determination module 151 determines whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene, specifically including: determining whether there is an obstacle within a preset search range centered on the current position of the virtual character in the current moving direction in the game scene.

[0135] Optionally, the first determination module 151 determines whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene, specifically including: emitting a plurality of rays from the current position of the virtual character into the preset search range, where the length of each ray in the plurality of rays is equal to a preset length; if reflected rays of at least some of the plurality of rays are received, determining that there is an obstacle within the preset search range centered on the current position of the virtual character in the game scene.

[0136] Optionally, the preset length includes a first preset length and / or a second preset length; the first preset length is determined according to the height of the virtual character; the second preset length is determined according to the width of the equipment of the virtual character.

[0137] Optionally, the preset search range is a fan-shaped area centered on the current position of the virtual character in the game scene in the current moving direction and with the preset length as the radius, and the central angle of the fan-shaped area is 180 degrees.

[0138] Optionally, if the terminal device is a terminal device with frictional haptic feedback, then the haptic feedback module 153 performs haptic feedback at the target position, specifically including: performing frictional haptic feedback at the target position with a first frictional degree; or performing frictional haptic feedback at the target position according to a preset frictional degree change rule, where the frictional degree at the target position is negatively correlated with the distance between the virtual character and the obstacle.

[0139] Optionally, the device further includes: a display module 154, configured to display a pattern according to the target position, and the pattern is used to prompt the position where the haptic feedback is performed.

[0140] Optionally, the law of change of the friction degree includes linear change, non-linear change or mutation.

[0141] Optionally, the device further includes: a path rule module 155, configured to re-plan a path for the virtual character according to a path finding algorithm if there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene after a preset time; and a control module 156, configured to control the virtual character to move along the re-planned path.

[0142] The control device of the game provided by the embodiment of the present application can be used to execute the technical solution of the game control method in the above embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here.

[0143] It should be noted that it should be understood that the division of each module of the above device is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software called by a processing element; they can also all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the second determination module 152 can be a separately established processing element, or can be integrated in a certain chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a certain processing element of the above device to perform the function of the second determination module 152. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or can be independently implemented. Here, the processing element can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the integrated logic circuit in the hardware of the processor element or the instruction in the form of software.

[0144] Figure 16 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 16 shown, the electronic device may include: a transceiver 161, a processor 162, and a memory 163.

[0145] The processor 162 executes the computer execution instructions stored in the memory, so that the processor 162 executes the solution in the above embodiment. The processor 162 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 gate or transistor logic devices, discrete hardware components.

[0146] The memory 163 is connected to the processor 162 via the system bus and completes the communication therebetween. The memory 163 is used to store computer program instructions.

[0147] The transceiver 161 can be used to receive operation instructions.

[0148] The system bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to implement the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include a Random Access Memory (RAM), and may also include a non-volatile memory.

[0149] The electronic device provided by the embodiment of the present application can be the terminal device in the above embodiment.

[0150] The embodiment of the present application also provides a chip for running instructions. The chip is used to execute the technical solution of the game control method in the above embodiment.

[0151] The embodiment of the present application also provides a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions are run on a computer, the computer executes the technical solution of the game control method in the above embodiment.

[0152] The embodiment of the present application also provides a computer program product. The computer program product includes a computer program which is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, the technical solution of the game control method in the above embodiment can be implemented.

[0153] The game control method in the embodiment of the present application can run on a terminal device or a cloud interaction system.

[0154] Among them, the cloud interaction system includes a cloud server and user equipment and is used to run cloud applications. The cloud applications run separately.

[0155] In an optional implementation, cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating entity of the game program and the entity presenting the game screen are separated, the storage and operation of the object selection method are completed on the cloud gaming server, and the cloud gaming client is used for receiving and sending data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a television, a computer, a handheld computer, etc.; but the terminal device for processing game data is a cloud gaming server in the cloud. When playing the game, the user operates the cloud gaming client to send an operation instruction to the cloud gaming server. The cloud gaming server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.

[0156] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0157] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A control method for a game, characterized in that, a graphical user interface is provided by a terminal device, the graphical user interface includes a movement control, the content displayed on the graphical user interface at least partially includes the game scene of the game, the game scene includes virtual characters, the terminal device is a terminal device with frictional haptic feedback, and the method includes: In response to a touch and slide operation on the movement control, obtain a first relative position relationship between the current position of the touch point of the touch and slide operation on the graphical user interface and the origin position of the movement control, and determine the movement direction of the virtual character according to the first relative position relationship and a preset first correspondence relationship. The first correspondence relationship is used to represent the mapping relationship between the slide direction of the touch and slide operation and the movement direction of the virtual character; control the virtual character to move in the game scene in the movement direction; In response to the movement of the virtual character in the game scene, determine whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene; If there is an obstacle within the preset search range centered on the current position of the virtual character, determine the current position of the touch point as the target position on the graphical user interface; or determine a second relative position relationship between the position of the obstacle and the current position of the virtual character, and determine the target position according to the current position of the touch point and the second relative position relationship; Perform frictional haptic feedback at the target position according to a preset friction degree change rule, wherein the friction degree at the target position is negatively correlated with the distance between the virtual character and the obstacle.

2. The method according to claim 1, characterized in that, the determining the target position according to the current position of the touch point and the second relative position relationship includes: transform the second relative position relationship into a third relative position relationship in a target coordinate system, wherein the target coordinate system is the graphical user interface coordinate system where the current position of the touch point is located; in the target coordinate system, determine an offset centered on the current position of the touch point according to the third relative position relationship; determine the target position according to the current position of the touch point and the offset.

3. The method according to claim 1, characterized in that, the determining whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene includes: determine whether there is an obstacle within a preset search range centered on the current position of the virtual character in the current movement direction in the game scene.

4. The method according to any one of claims 1-3, characterized in that, the determining whether there is an obstacle within a preset search range centered on the current position of the virtual character in the game scene includes: emit a plurality of rays from the current position of the virtual character into the preset search range, and the length of each ray in the plurality of rays is equal to a preset length; If the reflected rays of at least some of the multiple rays are received, it is determined that there is an obstacle within a preset search range centered at the current position of the virtual character in the game scene.

5. The method according to claim 4, wherein, the preset length includes a first preset length and / or a second preset length; the first preset length is determined according to the height of the virtual character; the second preset length is determined according to the width of the equipment of the virtual character.

6. The method according to claim 4, wherein, the preset search range is a sector area centered at the current position of the virtual character in the game scene in the current moving direction and with the preset length as the radius, and the central angle of the sector area is 180 degrees.

7. The method according to any one of claims 1-3, wherein, the method further includes: displaying a pattern according to the target position, and the pattern is used to prompt the position for tactile feedback.

8. The method according to any one of claims 1-3, wherein, the law of change of the friction degree includes linear change, non-linear change or mutation.

9. The method according to any one of claims 1-3, wherein, after performing tactile feedback at the target position, the method further includes: if there is an obstacle within a preset search range centered at the current position of the virtual character in the game scene after a preset time has passed, re-planning the path of the virtual character according to a pathfinding algorithm; controlling the virtual character to move according to the re-planned path.

10. A control device for a game, wherein, a graphical user interface is provided through a terminal device, the graphical user interface further includes a movement control, the content displayed on the graphical user interface at least partially includes the game scene of the game, the game scene includes a virtual character, the terminal device is a terminal device with frictional tactile feedback, and the device includes: a control module, configured to, in response to a touch and slide operation on the movement control, obtain a first relative position relationship between the current position of the touch point of the touch and slide operation on the graphical user interface and the origin position of the movement control, and determine the movement direction of the virtual character according to the first relative position relationship and a preset first correspondence relationship, where the first correspondence relationship is used to represent the mapping relationship between the slide direction of the touch and slide operation and the movement direction of the virtual character, and control the virtual character to move in the game scene in the movement direction; a first determination module, configured to, in response to the movement of the virtual character in the game scene, determine whether there is an obstacle within a preset search range centered at the current position of the virtual character in the game scene; A second determination module, if there is an obstacle within a preset search range centered on the current position of the virtual character, determines the current position of the touch point as the target position on the graphical user interface; or determines a second relative position relationship between the position of the obstacle and the current position of the virtual character, and determines the target position according to the current position of the touch point and the second relative position relationship. A haptic feedback module for performing frictional haptic feedback at the target position according to a preset friction degree change rule, wherein the friction degree at the target position is negatively correlated with the distance between the virtual character and the obstacle.

11. An electronic device characterized in that it includes: a memory and a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the method according to any one of claims 1-9.

12. A computer-readable storage medium characterized in that the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Information processing method, information processing device, electronic device and storage medium

    CN107789830A

  • Method for adjusting lens visual angle in game and electronic equipment

    CN111888762A

  • Human-computer interaction perception processing method and device, and electronic equipment

    CN112221118A