Handle and terminal device interaction method and device, equipment and storage medium
By setting specific buttons and joysticks on the controller, the perspective mode switching can be achieved, which solves the problem that the joystick can only control the direction of the view in console 3D games and improves the user experience.
Patent Information
- Application Number
- CN202211733788.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In console 3D games, the joystick on the controller can only control the direction of the view, resulting in differences in operation compared to PC and mobile games, and a poor user experience.
By setting specific buttons and joysticks on the controller, the view mode can be switched between view direction control mode and view position control mode, and the view direction or position movement of the game page can be controlled by specific sliding operations.
This enhances the user experience, allowing the joystick to control both the direction and position of the view, reducing the operational differences between console 3D games and PC and mobile games.
Smart Images

Figure CN116440491B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game interaction, and more particularly to a method, apparatus, device, and storage medium for interaction between a game controller and a terminal device. Background Technology
[0002] With the continuous development of science and technology, 3D (3D) games, which utilize spatial stereoscopic computing technology for operation, have seen significant growth due to their strong visual effects and excellent immersion. For example, battle royale shooting games—such as PUBG—have gained widespread popularity and recognition among players due to their accessibility to all ages, high level of creativity, openness, derivative potential, playability, interactivity, and visual appeal. In 3D games, the game's perspective (the virtual character's viewpoint) can be arbitrarily changed, enabling a 360-degree omnidirectional visual effect. Currently, in PC, mobile, and console 3D games, the PC mouse and the mobile thumb control the player's viewpoint position. For example, two mouse positions on a table correspond to two specific viewpoints; similarly, when a finger is held down on a mobile phone, different finger positions on the screen correspond to two specific viewpoints. However, console 3D games require physical controllers, and the joysticks on these controllers only correspond to the direction of viewpoint movement. This difference in controls between console 3D games and PC / mobile games results in a poorer user experience. Summary of the Invention
[0003] The main objective of this invention is to solve the problem that existing joysticks in console 3D games can only control the direction of the view.
[0004] The first aspect of this invention provides a method for interaction between a gamepad and a terminal device. The gamepad includes a joystick and several buttons. A graphical user interface is provided through the terminal device. The graphical user interface includes a game interface for a virtual game, in which a target virtual character is displayed. The interaction method includes:
[0005] In response to a press operation on a specific key among the plurality of keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes a view direction control mode and a view position control mode.
[0006] When the switched perspective mode is the perspective direction control mode, the game page is controlled to move in the perspective direction in response to the first sliding operation of the joystick.
[0007] When the switched perspective mode is perspective position control mode, the game page is controlled to move its perspective position in response to the second sliding operation of the joystick.
[0008] A second aspect of the present invention provides an interaction device between a gamepad and a terminal device. The gamepad includes a joystick and several buttons, and the terminal device provides a graphical user interface, the graphical user interface including a game interface for a virtual game, the game interface displaying a target virtual character. The interaction device between the gamepad and the terminal device includes:
[0009] The mode switching module is used to switch the view mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the several keys. The view mode includes a view direction control mode and a view position control mode.
[0010] The direction control module is used to control the game page to move the view direction in response to the first sliding operation of the joystick when the switched view mode is the view direction control mode.
[0011] The position control module is used to control the game page to move its view position in response to a second sliding operation on the joystick when the switched view mode is the view position control mode.
[0012] A third aspect of the present invention provides an interaction device for a controller and a terminal device, comprising: a memory and a plurality of processors, wherein the memory stores instructions, and the memory and the plurality of processors are interconnected via a circuit; the plurality of processors invoke the instructions in the memory to cause the interaction device for the controller and the terminal device to perform the steps of the above-described interaction method for the controller and the terminal device.
[0013] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the steps of the above-described method for interacting with a handheld device and a terminal device.
[0014] The aforementioned interaction method, device, equipment, and storage medium between the controller and the terminal device include a controller equipped with a joystick and several buttons. The terminal device provides a graphical user interface (GUI), which includes a virtual game interface displaying a target virtual character. In response to pressing a specific button among the buttons, the view mode of the target virtual character in the game interface is switched. The view mode includes a view direction control mode and a view position control mode. When the switched view mode is the view direction control mode, a first sliding operation on the joystick controls the movement of the game page's view direction. When the switched view mode is the view position control mode, a second sliding operation on the joystick controls the movement of the game page's view position. In this method, the view mode in the game is switched via specific buttons, and the joystick can control both the view direction and view position. Each position of the joystick corresponds to a view position, improving the user experience.
[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0016] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the first embodiment of the interaction method between the handle and the terminal device in this invention;
[0018] Figure 2 This is a schematic diagram of a second embodiment of the interaction method between the handle and the terminal device in this invention.
[0019] Figure 3 This is a schematic diagram of one embodiment of the interaction device between the handle and the terminal device in this invention;
[0020] Figure 4 This is a schematic diagram of another embodiment of the interaction device between the handle and the terminal device in this invention;
[0021] Figure 5 This is a schematic diagram of one embodiment of the interaction device between the handle and the terminal device in this invention;
[0022] Figure 6 This is a schematic diagram of a first type of display interaction area provided in an embodiment of the present invention;
[0023] Figure 7 This is a schematic diagram of a second type of display interaction area provided in an embodiment of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or devices.
[0026] In existing technologies, in PC, mobile, and console 3D games, the PC mouse and the mobile thumb control the player's viewpoint. For example, the mouse cursor at two different positions on a table corresponds to two distinct viewpoints. Similarly, when a finger is pressed and held on a mobile phone, different positions of the finger on the screen also correspond to two distinct viewpoints. However, in console 3D games, a physical gamepad is required. The joystick on the gamepad only corresponds to the direction of viewpoint movement, resulting in differences in controls between console 3D games and PC / mobile games, leading to a poorer user experience.
[0027] Based on the above, the present invention provides a method, apparatus, and system for interaction between a controller and a terminal device, which can be applied to scenarios involving interaction between a controller and a terminal device.
[0028] In one embodiment of this disclosure, the interaction method between the controller and the terminal device can run on a local terminal device or a server. When the interaction method between the controller and the terminal device runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0029] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separate. The storage and execution of the interaction method between the controller and the terminal device are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. During gameplay, the player uses the controller to operate the client device and send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0030] In an alternative implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the screen. Users can operate on the interface using input devices such as a touchscreen, mouse, keyboard, or gamepad.
[0031] In one possible implementation, embodiments of the present invention provide a method for interaction between a controller and a terminal device, which provides a graphical user interface including a game interface of a virtual game through the terminal device. The terminal device can be a local terminal device (e.g., a mobile terminal, a computer, a game console, etc.) as mentioned above, or a client device in the cloud interaction system mentioned above.
[0032] To facilitate understanding of this embodiment, a method for interaction between a controller and a terminal device disclosed in this embodiment of the invention will first be described in detail, such as... Figure 1 As shown, the controller includes a joystick and several buttons. The interaction method between the controller and the terminal device involves the terminal device providing a graphical user interface (GUI). The GUI includes a game interface for a virtual game, displaying a target virtual character. This method includes the following steps:
[0033] 101. In response to a press operation on a specific key among a plurality of said keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes a view direction control mode and a view position control mode.
[0034] In one embodiment of the present invention, the physical gamepad generally includes a joystick and buttons. The joystick and buttons can perform different operations in the game. For example, in FPS (First-person shooting game) and some RPG (Role-playing game), the joystick can control the position or view of the virtual character. For example, a physical gamepad may have two joysticks, namely a left joystick and a right joystick, which can be used to control the position and view of the virtual character respectively. In addition, in this embodiment, there may also be a single joystick. In this case, the joystick mainly controls the view. For example, in some real-time 360-degree all-around shooting games, the virtual character can play the game without moving its position, simply by controlling the view. In addition, when there is only one gamepad, the position control and view control of the virtual character can also be switched through other specific buttons.
[0035] Specifically, a physical controller typically includes several buttons. For example, in FPS games, pressing buttons on a virtual controller is required to perform functions such as shooting, reloading, and activating medkits. Generally, one button maps to one function. Among these, the button used to switch perspective modes is considered a specific button. In this embodiment, the specific button can be preset. For example, the specific button for switching perspective modes can be preset to a regular button on the physical controller panel, or it can be preset to the left and right shoulder buttons on the physical controller. The specific preset can be based on the player's experience. When the player needs to switch perspective modes, they can achieve the switching by pressing the corresponding specific button.
[0036] In one embodiment of the present invention, the pressing operation includes a short press operation and a long press operation; when the pressing operation is a short press operation, the step of switching the view mode of the target virtual character in the game interface in response to a pressing operation of a specific key among the plurality of keys includes: generating a mode switching command in response to a short press operation of a specific key among the plurality of keys; when the current view mode of the target virtual character is a view direction control mode, converting the view mode to a view position control mode according to the mode switching command; when the current view mode of the target virtual character is a view position control mode, converting the view mode to a view direction control mode according to the mode switching command.
[0037] Specifically, the view mode can be switched through various pressing methods. For example, in this embodiment, the view mode can be switched by short presses. Players only need to press the corresponding specific button, regardless of the duration, to generate a mode switching command and switch the view mode. Since players only need to press the specific button, they generally won't press it for a long time to use their fingers to press other buttons. Therefore, in this situation, the pressing operation is mainly a short press. After generating the mode switching command, the system determines the next view mode to switch to based on the current view mode. When the target virtual character's current view mode is the view direction control mode, the view mode is switched to the view position control mode according to the mode switching command; when the target virtual character's current view mode is the view position control mode, the view mode is switched to the view direction control mode according to the mode switching command.
[0038] In one embodiment of the present invention, when the pressing operation is a long press operation, the step of switching the perspective mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the plurality of keys includes: generating a first mode switching instruction in response to the long press operation of a specific key among the plurality of keys; generating a second mode switching instruction in response to the end of the long press operation of the specific key; and switching the perspective mode of the target virtual character in the game interface according to the first mode switching instruction or the second mode switching instruction.
[0039] Specifically, the view mode can be switched through various pressing methods. For example, in this embodiment, the view mode is switched by a long press. The system switches the view mode based on the start and end of the player's press of the specific button. For instance, since the press operation is a long press, the player will press the specific button for a long time. During the start and end of the press, the current view mode is maintained, and the view mode is switched only at the start and end of the press operation. For example, the view mode when pressing a specific button is set to the view position control mode. When the press operation ends, that is, when the specific button is not pressed, the view mode is switched. After pressing a button, the view mode switches to view direction control mode. That is, when the player initially starts playing and hasn't pressed any specific button, the view mode is view direction control mode. When the player needs to control the view position, pressing that specific button generates a first mode switching command, switching the view mode to view position control mode. When the player completes certain actions and no longer needs view position control but needs view direction control, ending the pressing of that specific button generates a second mode switching command, switching the view mode back to view direction control mode. Alternatively, the view mode can also be set to view direction control mode when a specific button is pressed; this invention is not limited to this.
[0040] 102. When the switched view mode is the view direction control mode, in response to the first sliding operation of the joystick, the game page is controlled to move the view direction.
[0041] In one embodiment of the present invention, the first sliding operation includes a movement operation. When the first sliding operation is a movement operation, controlling the game page to move in the view direction in response to the first sliding operation on the joystick includes: in response to a movement operation on the joystick moving from an initial position in the joystick area along a first direction to a first position in the joystick area, controlling the game interface to move in the view direction based on the deviation angle of the first direction relative to a first reference direction and the movement distance in the first direction.
[0042] In one embodiment of the present invention, the first sliding operation further includes a combination of a moving operation and a rotating operation. When the first sliding operation is a combination of a moving operation and a rotating operation, after controlling the viewpoint direction of the game interface to move according to the deviation angle of the first direction relative to the first reference direction and the moving distance in the first direction, the operation further includes: responding to a rotating operation for rotating the joystick from a first position in the joystick area, during the joystick rotation, controlling the viewpoint direction of the game interface to move according to the rotation angle and rotation direction of the rotating operation.
[0043] Specifically, the joystick of a physical gamepad is generally fixed in an initial position, which is typically the center point of the joystick area controllable by the remote control. After the player finishes operating the joystick, it returns to this initial position. In this embodiment, when the view mode is in view direction control mode, movement, rotation, or a combination of both can be performed from any position within the joystick area. When the player uses the joystick to move, they move from the initial position along a first direction towards a first position within the joystick area. The system controls the game interface to move the view direction based on the deviation angle of the first direction relative to a first reference direction and the distance moved along the first direction. When a rotation operation is performed, the system controls the game interface to move the view direction based on the rotation angle and direction of the rotation operation during the joystick rotation.
[0044] 103. When the switched perspective mode is perspective position control mode, in response to the second sliding operation of the joystick, the perspective position of the game page is moved.
[0045] In one embodiment of the present invention, when entering the view position control mode, the view direction is fixed, and the view position is adjusted in that view direction. Specifically, the view position can be understood as the crosshair position in FPS games and as the focus position of the field of view in RPG games. When the view direction is fixed, that is, the screen in the game interface is basically fixed, the position of the joystick corresponds to each position in the screen, and each position of the joystick has a corresponding view position. The view position is moved according to the player's sliding operation of the joystick, thereby realizing the control of the view position.
[0046] In this embodiment, a graphical user interface (GUI) is provided through a terminal device. The GUI includes a game interface for a virtual game, displaying a target virtual character. In response to pressing a specific button among a plurality of buttons, the view mode of the target virtual character in the game interface is switched. The view mode includes a view direction control mode and a view position control mode. When the switched view mode is the view direction control mode, in response to a first sliding operation on the joystick, the game page is controlled to move in view direction. When the switched view mode is the view position control mode, in response to a second sliding operation on the joystick, the game page is controlled to move in view position. In this method, the game's view mode is switched via a specific button, and the joystick can control both view direction and view position. Each position of the joystick corresponds to a view position, improving the user experience.
[0047] Please see Figure 2The method for interacting between the controller and the terminal device includes a joystick and several buttons mounted on the controller. A graphical user interface (GUI) is provided by the terminal device, comprising a game interface for a virtual game displaying a target virtual character. A second embodiment of the method for interacting between the controller and the terminal device in this invention includes:
[0048] 201. In response to a press operation on a specific key among several keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes view direction control mode and view position control mode.
[0049] 202. When the switched view mode is the view direction control mode, the game page is controlled to move the view direction in response to the first sliding operation of the joystick.
[0050] 203. When the switched view mode is view position control mode, lock the current view direction of the game page;
[0051] 204. In the virtual game, generate a cone-shaped region with the ray at the current viewpoint as the center line;
[0052] In one embodiment of the present invention, generating a cone-shaped region in the virtual game with a ray at the current viewpoint as the center line includes: emitting a ray in the virtual game with the current viewpoint as the center and directly in front of the game page; obtaining the size of the joystick's range, and generating a cone-shaped region with the ray as the center line based on the range size.
[0053] Specifically, in the virtual game, a ray is emitted from the current viewpoint and directly in front of the game page, forming a cone-shaped area. This cone-shaped area can be either circular or square-pyramidal. The size of the cone-shaped area mainly depends on the range of motion of the joystick on the controller; the greater the range of motion, the larger the cone-shaped area. In this embodiment, taking a circular cone-shaped area as an example, when the cone-shaped area is circular, the bottom of the cone-shaped area is as follows: Figure 6 As shown, this is a circular area, which is the same as the joystick's range.
[0054] 205. In response to a second sliding operation on the joystick, control the cone-shaped area on the game screen to move the view position.
[0055] In one embodiment of the present invention, controlling the game page to move its viewpoint in response to a second sliding operation on the joystick includes: controlling a cone-shaped region in the game page to move its viewpoint in response to a second sliding operation on the joystick.
[0056] Specifically, such as Figure 7 As shown, when the joystick is in its initial position, which is joystick position A, the corresponding view position in the game interface is view position A. When the player slides the joystick to joystick position B or joystick position C, since each joystick position has a corresponding view position, the game screen will slide the current view position to view position B or view position C.
[0057] Furthermore, the step of controlling the viewpoint position movement of the cone-shaped area in the game page in response to the second sliding operation on the joystick includes: generating a sliding trajectory during the second sliding operation in response to the second sliding operation on the joystick; generating control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory; and controlling the viewpoint position in the game page to move in the cone-shaped area based on the control data.
[0058] Furthermore, the step of generating control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory includes: calculating the sliding angle and sliding distance of the sliding trajectory during the sliding process; obtaining a preset mapping ratio between the joystick and the terminal device when the joystick performs a sliding operation; and generating control data for the viewpoint position based on the sliding angle, the sliding distance, and the mapping ratio.
[0059] Furthermore, before generating the control data for the viewing position based on the sliding angle and sliding distance of the sliding trajectory, the method further includes: dividing the sliding of each rotation direction on the joystick area into multiple sliding units; obtaining the resolution information of the terminal device; and generating the mapping ratio between the joystick and the terminal device when the joystick performs a sliding operation based on the sliding units and the resolution information.
[0060] Furthermore, the calculation of the sliding angle and sliding distance of the sliding trajectory during the sliding process includes: obtaining the sampling frequency of the sliding trajectory during the sliding process, and sampling the sliding trajectory based on the sampling frequency to obtain multiple sliding sampling points of the sliding trajectory; taking the previous sliding sampling point obtained by sampling as the starting point and the next sliding sampling point as the ending point, respectively, and calculating the sliding angle and sliding distance between the starting point and the ending point.
[0061] This embodiment, based on the previous embodiment, details the process of controlling the game page's view position movement in response to a second sliding operation on the joystick when the view mode is view position control mode. When the view mode is view position control mode, the current view direction of the game page is locked. A cone-shaped region is generated in the virtual game with the ray at the current view position as its center line. The view position of this cone-shaped region in the game page is moved in response to the second sliding operation on the joystick. In this method, the game's view mode is switched via a specific button. The joystick can control both the view direction and view position, and each joystick position corresponds to a view position, improving the user experience.
[0062] The interaction method between the controller and the terminal device in this embodiment of the invention has been described above. The interaction device between the controller and the terminal device in this embodiment of the invention is described below. The controller includes a joystick and several buttons. The interaction device provides a graphical user interface through the terminal device. The graphical user interface includes a game interface for a virtual game, and the game interface displays a target virtual character. Please refer to [link to relevant documentation]. Figure 3 One embodiment of the interaction device between the handle and the terminal device in this invention includes:
[0063] The mode switching module 301 is used to switch the view mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the plurality of keys. The view mode includes a view direction control mode and a view position control mode.
[0064] The direction control module 302 is used to control the game page to move the view direction in response to the first sliding operation of the joystick when the switched view mode is the view direction control mode.
[0065] The position control module 303 is used to control the game page to move its view position in response to a second sliding operation on the joystick when the switched view mode is the view position control mode.
[0066] In this embodiment of the invention, the interaction device between the controller and the terminal device operates the aforementioned interaction method. The interaction device provides a graphical user interface (GUI) through the terminal device. The GUI includes a virtual game interface displaying a target virtual character. In response to pressing a specific button among a plurality of buttons, the view mode of the target virtual character in the game interface is switched. The view mode includes a view direction control mode and a view position control mode. When the switched view mode is the view direction control mode, in response to a first sliding operation on the joystick, the game page is controlled to move in view direction. When the switched view mode is the view position control mode, in response to a second sliding operation on the joystick, the game page is controlled to move in view position. In this method, the game's view mode is switched via a specific button. The joystick can control both view direction and view position, with each joystick position corresponding to a view position, thus improving the user experience.
[0067] Please see Figure 4 A second embodiment of the interaction device between the handle and the terminal device in this invention includes:
[0068] The mode switching module 301 is used to switch the view mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the plurality of keys. The view mode includes a view direction control mode and a view position control mode.
[0069] The direction control module 302 is used to control the game page to move the view direction in response to the first sliding operation of the joystick when the switched view mode is the view direction control mode.
[0070] The position control module 303 is used to control the game page to move its view position in response to a second sliding operation on the joystick when the switched view mode is the view position control mode.
[0071] In this embodiment, the pressing operation includes a short press and a long press; when the pressing operation is a short press, the mode switching module 301 is specifically used for:
[0072] In response to a short press operation on a specific key among the plurality of said keys, a mode switching command is generated;
[0073] When the target virtual character's current view mode is view direction control mode, the view mode is switched to view position control mode according to the mode switching command;
[0074] When the target virtual character's current view mode is view position control mode, the view mode is switched to view direction control mode according to the mode switching command.
[0075] In this embodiment, when the pressing operation is a long press operation, the mode switching module 301 is specifically used for:
[0076] In response to a long press operation on a specific key among the plurality of keys, a first mode switching command is generated;
[0077] In response to the end of the long press operation of the specific button, a second mode switching command is generated;
[0078] The perspective mode of the target virtual character in the game interface is switched according to the first mode switching instruction or the second mode switching instruction.
[0079] In this embodiment, the first sliding operation includes a moving operation. When the first sliding operation is a moving operation, the direction control module 302 is specifically used for:
[0080] In response to a movement operation in which the joystick moves from an initial position in the joystick area to a first position in the joystick area along a first direction, the game interface is controlled to move its viewpoint direction based on the deviation angle of the first direction relative to a first reference direction and the movement distance in the first direction.
[0081] In this embodiment, the first sliding operation further includes a combination of a moving operation and a rotating operation. When the first sliding operation is a combination of a moving operation and a rotating operation, the direction control module 302 is specifically further used for:
[0082] In response to a rotation operation that starts from a first position in the joystick area, during the rotation of the joystick, the game interface is controlled to move the view direction according to the rotation angle and rotation direction of the rotation operation.
[0083] In this embodiment, the interaction device between the handle and the terminal device further includes a cone-shaped region generation module 304. When the viewing mode is the viewing position control mode, the cone-shaped region generation module 304 is specifically used for:
[0084] Lock the current view direction of the game page;
[0085] In the virtual game, a cone-shaped region is generated with the ray at the current viewpoint position as the center line.
[0086] In this embodiment, the cone-shaped region generation module 304 is further used for:
[0087] In the virtual game, a ray is emitted from the current viewpoint position, directly in front of the game page;
[0088] Obtain the size of the joystick's range, and based on the size of the range, generate a cone-shaped region with the ray as the center line.
[0089] In this embodiment, the position control module 303 is specifically used for:
[0090] In response to a second sliding operation on the joystick, the viewpoint position of the cone-shaped area in the game screen is moved.
[0091] In this embodiment, the position control module 303 includes:
[0092] The trajectory generation unit 3031 generates a sliding trajectory during the second sliding operation in response to a second sliding operation on the joystick;
[0093] The control data generation unit 3032 is used to generate control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory.
[0094] The motion control unit 3033 is used to control the movement of the viewpoint position in the game page within the cone-shaped region based on the control data.
[0095] In this embodiment, the control data generation unit 3032 is specifically used for:
[0096] Calculate the sliding angle and sliding distance of the sliding trajectory during the sliding process;
[0097] Obtain the preset mapping ratio between the joystick and the terminal device when the joystick is used for sliding operation;
[0098] Control data for the viewpoint position is generated based on the sliding angle, the sliding distance, and the mapping ratio.
[0099] In this embodiment, the position control module 303 further includes a proportional generation unit 3034, which is specifically used for:
[0100] The sliding in each rotation direction on the rocker area of the rocker is divided into multiple sliding units;
[0101] The resolution information of the terminal device is obtained, and based on the sliding unit and the resolution information, a mapping ratio between the joystick and the terminal device is generated when the joystick performs a sliding operation.
[0102] In this embodiment, the control data generation unit 3032 is further configured to:
[0103] The sampling frequency of the sliding trajectory during the sliding process is obtained, and the sliding trajectory is sampled based on the sampling frequency to obtain multiple sliding sampling points of the sliding trajectory;
[0104] Using the previous sliding sampling point as the starting point and the next sliding sampling point as the ending point, calculate the sliding angle and sliding distance between the starting point and the ending point.
[0105] This embodiment, based on the previous embodiment, describes in detail the specific functions of each module and the unit composition of some modules. Through the above modules and the units in the modules, the game's perspective mode can be switched by a specific button, and the joystick can control the perspective direction and position. Each position of the joystick corresponds to a perspective position, thus improving the user experience.
[0106] above Figure 3 and Figure 4 The interaction device between the controller and the terminal device in this embodiment of the invention is described in detail from the perspective of modular functional entities. The interaction device between the controller and the terminal device in this embodiment of the invention is described in detail below from the perspective of hardware processing.
[0107] Figure 5 This is a schematic diagram of the structure of an interactive device 500 for a gamepad and a terminal device according to an embodiment of the present invention. The interactive device 500 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the interactive device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 to execute a series of instruction operations in the storage media 530 on the interactive device 500 to achieve the following steps:
[0108] In response to a press operation on a specific key among the plurality of keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes a view direction control mode and a view position control mode.
[0109] When the switched perspective mode is the perspective direction control mode, the game page is controlled to move in the perspective direction in response to the first sliding operation of the joystick.
[0110] When the switched perspective mode is perspective position control mode, the game page is controlled to move its perspective position in response to the second sliding operation of the joystick.
[0111] When the pressing operation is a short press, the above-mentioned response to pressing a specific key among the plurality of keys, switching the view mode of the target virtual character in the game interface includes:
[0112] In response to a short press operation on a specific key among the plurality of said keys, a mode switching command is generated;
[0113] When the target virtual character's current view mode is view direction control mode, the view mode is switched to view position control mode according to the mode switching command;
[0114] When the target virtual character's current view mode is view position control mode, the view mode is switched to view direction control mode according to the mode switching command.
[0115] When the press operation is a long press operation, the above-mentioned response to the press operation of a specific key among the plurality of keys, switching the view mode of the target virtual character in the game interface includes:
[0116] In response to a long press operation on a specific key among the plurality of keys, a first mode switching command is generated;
[0117] In response to the end of the long press operation of the specific button, a second mode switching command is generated;
[0118] The perspective mode of the target virtual character in the game interface is switched according to the first mode switching instruction or the second mode switching instruction.
[0119] The aforementioned first sliding operation includes a movement operation. When the first sliding operation is a movement operation, controlling the game page to move its viewpoint in response to the first sliding operation on the joystick includes:
[0120] In response to a movement operation in which the joystick moves from an initial position in the joystick area to a first position in the joystick area along a first direction, the game interface is controlled to move its viewpoint direction based on the deviation angle of the first direction relative to a first reference direction, the movement distance in the first direction, and the movement distance in the first direction.
[0121] The first sliding operation further includes a combination of movement and rotation operations. When the first sliding operation is a combination of movement and rotation operations, after controlling the viewpoint direction of the game interface to move according to the deviation angle of the first direction relative to the first reference direction and the movement distance in the first direction, it further includes:
[0122] In response to a rotation operation that starts from a first position in the joystick area, during the rotation of the joystick, the game interface is controlled to move the view direction according to the rotation angle and rotation direction of the rotation operation.
[0123] When the view mode is a view position control mode, before controlling the game page to move its view position in response to the second sliding operation on the joystick, the method further includes:
[0124] Lock the current view direction of the game page;
[0125] In the virtual game, a cone-shaped region is generated with the ray at the current viewpoint position as the center line.
[0126] The aforementioned generation of a cone-shaped region in the virtual game, centered on a ray at the current viewpoint, includes:
[0127] In the virtual game, a ray is emitted from the current viewpoint position, directly in front of the game page;
[0128] Obtain the size of the joystick's range, and based on the size of the range, generate a cone-shaped region with the ray as the center line.
[0129] The above-mentioned response to the second sliding operation of the joystick, controlling the game page to move the view position includes:
[0130] In response to a second sliding operation on the joystick, the viewpoint position of the cone-shaped area in the game screen is moved.
[0131] The above-mentioned response to the second sliding operation of the joystick, controlling the cone-shaped area in the game page to move the view position includes:
[0132] In response to a second sliding operation on the joystick, a sliding trajectory is generated during the second sliding operation.
[0133] Based on the sliding angle and sliding distance of the sliding trajectory, control data for the viewpoint position is generated;
[0134] Based on the control data, the viewpoint position on the game page is moved within the cone-shaped region.
[0135] The control data for generating the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory includes:
[0136] Calculate the sliding angle and sliding distance of the sliding trajectory during the sliding process;
[0137] Obtain the preset mapping ratio between the joystick and the terminal device when the joystick is used for sliding operation;
[0138] Control data for the viewpoint position is generated based on the sliding angle, the sliding distance, and the mapping ratio.
[0139] Before generating the control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory, the method further includes:
[0140] The sliding in each rotation direction on the rocker area of the rocker is divided into multiple sliding units;
[0141] The resolution information of the terminal device is obtained, and based on the sliding unit and the resolution information, a mapping ratio between the joystick and the terminal device is generated when the joystick performs a sliding operation.
[0142] The above calculation of the sliding angle and sliding distance of the sliding trajectory during the sliding process includes:
[0143] The sampling frequency of the sliding trajectory during the sliding process is obtained, and the sliding trajectory is sampled based on the sampling frequency to obtain multiple sliding sampling points of the sliding trajectory;
[0144] Using the previous sliding sampling point as the starting point and the next sliding sampling point as the ending point, calculate the sliding angle and sliding distance between the starting point and the ending point.
[0145] The interaction device 500 between the gamepad and the terminal device may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated interaction device structure between the handle and the terminal device does not constitute a limitation on the interaction device between the handle and the terminal device provided by the present invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0146] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the following steps:
[0147] In response to a press operation on a specific key among the plurality of keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes a view direction control mode and a view position control mode.
[0148] When the switched perspective mode is the perspective direction control mode, the game page is controlled to move in the perspective direction in response to the first sliding operation of the joystick.
[0149] When the switched perspective mode is perspective position control mode, the game page is controlled to move its perspective position in response to the second sliding operation of the joystick.
[0150] When the pressing operation is a short press, the above-mentioned response to pressing a specific key among the plurality of keys, switching the view mode of the target virtual character in the game interface includes:
[0151] In response to a short press operation on a specific key among the plurality of said keys, a mode switching command is generated;
[0152] When the target virtual character's current view mode is view direction control mode, the view mode is switched to view position control mode according to the mode switching command;
[0153] When the target virtual character's current view mode is view position control mode, the view mode is switched to view direction control mode according to the mode switching command.
[0154] When the press operation is a long press operation, the above-mentioned response to the press operation of a specific key among the plurality of keys, switching the view mode of the target virtual character in the game interface includes:
[0155] In response to a long press operation on a specific key among the plurality of keys, a first mode switching command is generated;
[0156] In response to the end of the long press operation of the specific button, a second mode switching command is generated;
[0157] The perspective mode of the target virtual character in the game interface is switched according to the first mode switching instruction or the second mode switching instruction.
[0158] The aforementioned first sliding operation includes a movement operation. When the first sliding operation is a movement operation, controlling the game page to move its viewpoint in response to the first sliding operation on the joystick includes:
[0159] In response to a movement operation in which the joystick moves from an initial position in the joystick area to a first position in the joystick area along a first direction, the game interface is controlled to move its viewpoint direction based on the deviation angle of the first direction relative to a first reference direction, the movement distance in the first direction, and the movement distance in the first direction.
[0160] The first sliding operation further includes a combination of movement and rotation operations. When the first sliding operation is a combination of movement and rotation operations, after controlling the viewpoint direction of the game interface to move according to the deviation angle of the first direction relative to the first reference direction and the movement distance in the first direction, it further includes:
[0161] In response to a rotation operation that starts from a first position in the joystick area, during the rotation of the joystick, the game interface is controlled to move the view direction according to the rotation angle and rotation direction of the rotation operation.
[0162] When the view mode is a view position control mode, before controlling the game page to move its view position in response to the second sliding operation on the joystick, the method further includes:
[0163] Lock the current view direction of the game page;
[0164] In the virtual game, a cone-shaped region is generated with the ray at the current viewpoint position as the center line.
[0165] The aforementioned generation of a cone-shaped region in the virtual game, centered on a ray at the current viewpoint, includes:
[0166] In the virtual game, a ray is emitted from the current viewpoint position, directly in front of the game page;
[0167] Obtain the size of the joystick's range, and based on the size of the range, generate a cone-shaped region with the ray as the center line.
[0168] The above-mentioned response to the second sliding operation of the joystick, controlling the game page to move the view position includes:
[0169] In response to a second sliding operation on the joystick, the viewpoint position of the cone-shaped area in the game screen is moved.
[0170] The above-mentioned response to the second sliding operation of the joystick, controlling the cone-shaped area in the game page to move the view position includes:
[0171] In response to a second sliding operation on the joystick, a sliding trajectory is generated during the second sliding operation.
[0172] Based on the sliding angle and sliding distance of the sliding trajectory, control data for the viewpoint position is generated;
[0173] Based on the control data, the viewpoint position on the game page is moved within the cone-shaped region.
[0174] The control data for generating the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory includes:
[0175] Calculate the sliding angle and sliding distance of the sliding trajectory during the sliding process;
[0176] Obtain the preset mapping ratio between the joystick and the terminal device when the joystick is used for sliding operation;
[0177] Control data for the viewpoint position is generated based on the sliding angle, the sliding distance, and the mapping ratio.
[0178] Before generating the control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory, the method further includes:
[0179] The sliding in each rotation direction on the rocker area of the rocker is divided into multiple sliding units;
[0180] The resolution information of the terminal device is obtained, and based on the sliding unit and the resolution information, a mapping ratio between the joystick and the terminal device is generated when the joystick performs a sliding operation.
[0181] The above calculation of the sliding angle and sliding distance of the sliding trajectory during the sliding process includes:
[0182] The sampling frequency of the sliding trajectory during the sliding process is obtained, and the sliding trajectory is sampled based on the sampling frequency to obtain multiple sliding sampling points of the sliding trajectory;
[0183] Using the previous sliding sampling point as the starting point and the next sliding sampling point as the ending point, calculate the sliding angle and sliding distance between the starting point and the ending point.
[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0185] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0186] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for interaction between a gamepad and a terminal device, the gamepad including a joystick and several buttons, and the terminal device providing a graphical user interface, the graphical user interface including a game interface of a virtual game, the game interface displaying a target virtual character, characterized in that, The interaction method includes: In response to a press operation on a specific key among the plurality of keys, the view mode of the target virtual character in the game interface is switched, wherein the view mode includes a view direction control mode and a view position control mode. When the switched perspective mode is the perspective direction control mode, the game interface is controlled to move the perspective direction in response to the first sliding operation of the joystick. When the switched perspective mode is the perspective position control mode, the game interface is controlled to move its perspective position in response to the second sliding operation of the joystick. The step of controlling the view position movement of the game interface in response to the second sliding operation on the joystick includes: generating a sliding trajectory during the second sliding operation in response to the second sliding operation on the joystick; generating control data for the view position based on the sliding angle and sliding distance of the sliding trajectory; and controlling the view position movement in the game interface based on the control data.
2. The interaction method according to claim 1, characterized in that, The pressing operation includes a short press and a long press; when the pressing operation is a short press, switching the view mode of the target virtual character in the game interface in response to a pressing operation on a specific key among the plurality of keys includes: In response to a short press operation on a specific key among the plurality of said keys, a mode switching command is generated; When the target virtual character's current view mode is view direction control mode, the view mode is switched to view position control mode according to the mode switching command; When the target virtual character's current view mode is view position control mode, the view mode is switched to view direction control mode according to the mode switching command.
3. The interaction method according to claim 2, characterized in that, When the pressing operation is a long press operation, the switching of the view mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the plurality of keys includes: In response to a long press operation on a specific key among the plurality of keys, a first mode switching command is generated; In response to the end of the long press operation of the specific button, a second mode switching command is generated; The perspective mode of the target virtual character in the game interface is switched according to the first mode switching instruction or the second mode switching instruction.
4. The interaction method according to claim 1, characterized in that, The first sliding operation includes a movement operation. When the first sliding operation is a movement operation, controlling the game interface to move the view direction in response to the first sliding operation on the joystick includes: In response to a movement operation in which the joystick moves from an initial position in the joystick area to a first position in the joystick area along a first direction, the game interface is controlled to move its viewpoint direction based on the deviation angle of the first direction relative to a first reference direction, the movement distance in the first direction, and the movement distance in the first direction.
5. The interaction method according to claim 4, characterized in that, The first sliding operation further includes a combination of movement and rotation operations. When the first sliding operation is a combination of movement and rotation operations, after controlling the viewpoint direction of the game interface to move according to the deviation angle of the first direction relative to the first reference direction and the movement distance in the first direction, it further includes: In response to a rotation operation that starts from a first position in the joystick area, during the rotation of the joystick, the game interface is controlled to move the view direction according to the rotation angle and rotation direction of the rotation operation.
6. The interaction method according to claim 1, characterized in that, When the switched perspective mode is the perspective position control mode, before controlling the game interface to move the perspective position in response to the second sliding operation on the joystick, the method further includes: Lock the current view direction of the game interface; In the virtual game, a cone-shaped region is generated with the ray at the current viewpoint position as the center line.
7. The interaction method according to claim 6, characterized in that, The process of generating a cone-shaped region in the virtual game, with the ray at the current viewpoint as the center line, includes: In the virtual game, a ray is emitted from the current viewpoint position, directly in front of the game interface; Obtain the size of the joystick's range, and based on the size of the range, generate a cone-shaped region with the ray as the center line.
8. The interaction method according to claim 6 or 7, characterized in that, The control of the viewpoint position movement in the game interface based on the control data includes: Based on the control data, the viewpoint position in the game interface is moved within the cone-shaped region.
9. The interaction method according to claim 1, characterized in that, The step of generating the control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory includes: Calculate the sliding angle and sliding distance of the sliding trajectory during the sliding process; Obtain the preset mapping ratio between the joystick and the terminal device when the joystick is used for sliding operation; Control data for the viewpoint position is generated based on the sliding angle, the sliding distance, and the mapping ratio.
10. The interaction method according to claim 9, characterized in that, Before generating the control data for the viewpoint position based on the sliding angle and sliding distance of the sliding trajectory, the method further includes: The sliding in each rotation direction on the rocker area of the rocker is divided into multiple sliding units; The resolution information of the terminal device is obtained, and based on the sliding unit and the resolution information, a mapping ratio between the joystick and the terminal device is generated when the joystick performs a sliding operation.
11. The interaction method according to claim 9, characterized in that, The calculation of the sliding angle and sliding distance of the sliding trajectory during the sliding process includes: The sampling frequency of the sliding trajectory during the sliding process is obtained, and the sliding trajectory is sampled based on the sampling frequency to obtain multiple sliding sampling points of the sliding trajectory; Using the previous sliding sampling point as the starting point and the next sliding sampling point as the ending point, calculate the sliding angle and sliding distance between the starting point and the ending point.
12. An interaction device between a handle and a terminal device, characterized in that, The controller includes a joystick and several buttons, and provides a graphical user interface (GUI) via a terminal device. The GUI includes a virtual game interface displaying a target virtual character. The interactive device includes: The mode switching module is used to switch the view mode of the target virtual character in the game interface in response to the pressing operation of a specific key among the several keys. The view mode includes a view direction control mode and a view position control mode. The direction control module is used to control the game interface to move the view direction in response to the first sliding operation of the joystick when the switched view mode is the view direction control mode. The position control module is used to control the game interface to move the view position in response to the second sliding operation of the joystick when the switched view mode is the view position control mode. The step of controlling the view position movement of the game interface in response to the second sliding operation on the joystick includes: generating a sliding trajectory during the second sliding operation in response to the second sliding operation on the joystick; generating control data for the view position based on the sliding angle and sliding distance of the sliding trajectory; and controlling the view position movement in the game interface based on the control data.
13. An interactive device for a handle and a terminal device, characterized in that, The interaction device between the handle and the terminal device includes: a memory and several processors, wherein the memory stores instructions; The plurality of processors invoke the instructions in the memory to cause the interaction device between the handle and the terminal device to perform the steps of the interaction method as described in any one of claims 1-11.
14. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the steps of the interaction method as described in any one of claims 1-11.
Citation Information
Patent Citations
Visual angle adjusting method and device, storage medium and electronic device
CN108211342A
Game virtual character control method and device, storage medium and electronic equipment
CN112245908A