Game control method, device and electronic device
The gyroscope and light sensor of the terminal device detect flipping and occlusion status, and automatically control the status of the virtual character, solving the problem of cumbersome interaction methods in mobile games and improving the player experience.
Patent Information
- Application Number
- CN202111107585.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-22
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2041-09-22
AI Technical Summary
In mobile games, players need to click virtual buttons to change the status of their virtual characters, which makes the interaction cumbersome and affects the experience.
Detect device flipping and screen occlusion status through the gyroscope and light sensor of the terminal device, automatically control the virtual character to enter or exit the ready state, and avoid finger click operations.
It simplifies the way players interact with the game, improves the game experience, and reduces operational complexity.
Smart Images

Figure CN113797547B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a game control method, device and electronic equipment. Background Art
[0002] Team play is a common way of playing in mobile games. Generally, the virtual character controlled by the captain player initiates a team invitation, and the virtual characters controlled by other players accept the invitation. The virtual character controlled by the captain player can invite the virtual characters controlled by other players to a room or team to form a team.
[0003] After each virtual character enters the room or team, the player can change the state of the virtual character controlled by the player, such as adjusting the virtual character to a ready state. When all virtual characters in the room or team are in a ready state or the virtual character controlled by the team leader is in a ready state, all virtual characters in the room or team can enter the game scene to engage in game battles.
[0004] However, mobile game players generally change the state of virtual characters by clicking virtual buttons on a graphical user interface. This interaction method, which requires players to click the screen with their fingers, is rather cumbersome and provides players with a poor experience. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a game control method, device and electronic device, which do not require players to click on the screen with their fingers, and the interaction method is relatively simple, which can improve the player's experience.
[0006] In a first aspect, an embodiment of the present invention provides a game control method, which provides a graphical user interface of the game through a terminal device, and the method includes: when a virtual character in the game is detected to be in a ready state to enter a virtual scene of the game, in response to a trigger instruction to enter the virtual scene of the game, controlling the virtual character to enter the virtual scene; and, in response to detecting that the terminal device is flipped and determining that the screen of the terminal device is blocked, controlling the virtual character to exit the ready state.
[0007] In an optional embodiment of the present invention, the method further includes: providing a first control through a graphical user interface; and in response to a touch operation on the first control, setting the virtual character to a ready state for entering a virtual scene of the game.
[0008] In an optional embodiment of the present invention, when the virtual character is set to a ready state for entering a virtual scene of a game, the method further comprises: performing game battle matching for the virtual character.
[0009] In an optional embodiment of the present invention, when the virtual character is set to a ready state for entering a virtual scene of a game, the method further includes: switching the first control to a second control; and responding to a touch operation on the second control to control the virtual character to exit the ready state.
[0010] In an optional embodiment of the present invention, the method further includes: when all virtual characters in the game room where the virtual characters are located are in a ready state and a game start confirmation message sent by the owner of the game room is received, game match matching is performed for the game room.
[0011] In an optional embodiment of the present invention, the above method further includes: when a message indicating a successful game match is detected, generating a trigger instruction for entering a virtual scene of the game.
[0012] In an optional embodiment of the present invention, the terminal device includes a gyroscope and a light sensor, and the method further includes: the method further includes: detecting whether the terminal device is flipped by the gyroscope; detecting whether the screen of the terminal device is blocked by the light sensor.
[0013] In an optional embodiment of the present invention, the above-mentioned step of detecting whether the terminal device is flipped by a gyroscope includes: detecting the flip angle of the terminal device by a gyroscope; if the flip angle is within a preset angle range, the terminal device is flipped; if the flip angle is not within the angle range, the terminal device is not flipped.
[0014] In an optional embodiment of the present invention, the orientation of the light sensor is the same as the orientation of the screen of the terminal device, and the step of detecting whether the screen of the terminal device is blocked by the light sensor includes: determining the amount of light entering the terminal device by the light sensor; if the amount of light entering is greater than a preset intensity threshold, the screen of the terminal device is not blocked; if the amount of light entering is less than or equal to the intensity threshold, the screen of the terminal device is blocked.
[0015] In a second aspect, an embodiment of the present invention further provides a game control device, which provides a graphical user interface of the game through a terminal device, and the device includes: a virtual scene entry module, which is used to control the virtual character in the game to enter the virtual scene in response to a trigger instruction to enter the virtual scene of the game when it is detected that the virtual character in the game is in a ready state to enter the virtual scene of the game; and a ready state exit module, which is used to control the virtual character to exit the ready state in response to detecting that the terminal device is flipped and determining that the screen of the terminal device is blocked.
[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the above-mentioned game control method.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the above-mentioned game control method.
[0018] The embodiments of the present invention bring the following beneficial effects:
[0019] The embodiments of the present invention provide a game control method, device and electronic device, which can control a virtual character to exit a ready state when a terminal device detects that the terminal device is flipped and determines that the screen of the terminal device is blocked. In this way, the player can control the virtual character to exit the ready state by flipping the terminal device and blocking the screen of the terminal device. The player does not need to click the screen of the terminal device with his fingers to change the state of the virtual character. The interaction method is relatively simple, which can improve the player's experience.
[0020] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0021] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of a graphical user interface provided by an embodiment of the present invention;
[0025] Figure 3 A flowchart of a game control method provided by an embodiment of the present invention;
[0026] Figure 4 A flowchart of another game control method provided by an embodiment of the present invention;
[0027] Figure 5A schematic diagram of the structure of a game control device provided by an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of the structure of another game control device provided by an embodiment of the present invention;
[0029] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] At present, mobile game players generally change the state of virtual characters by clicking virtual buttons on a graphical user interface. This interactive method, which requires players to click the screen with their fingers, is rather cumbersome and provides players with a poor experience.
[0032] First, the nouns involved in this application are introduced:
[0033] (1) Virtual scene
[0034] Also known as a game scene, the game system can provide a virtual game scene that is displayed (or provided) when the application is running on a terminal device or server. Optionally, the game scene is a simulation environment of the real world, or a semi-simulation and semi-fictional virtual environment, or a purely fictional virtual environment. The game scene is any one of a two-dimensional virtual scene and a three-dimensional virtual scene. The virtual environment can be the sky, land, ocean, etc., wherein the land includes environmental elements such as deserts and cities. Among them, the game scene is a scene of complete game logic of virtual characters such as user control.
[0035] A virtual character refers to a dynamic object that can be controlled in a virtual scene. Optionally, the dynamic object can be a virtual person, a virtual animal, etc. Among them, the virtual person includes anime characters, game characters, etc. The virtual character is a character controlled by a player through an input device, or an artificial intelligence (AI) set in a virtual environment battle through training, or a non-player character (NPC) set in a virtual scene battle. Optionally, the virtual character is a virtual character competing in a virtual scene. Optionally, the number of virtual characters in the virtual scene battle is preset, or is dynamically determined according to the number of clients joining the battle, and the embodiment of the present application does not limit this. In a possible implementation, the user can control the virtual character to move in the virtual scene, for example, control the virtual character to run, jump, crawl, etc., and can also control the virtual character to use the skills, virtual props, etc. provided by the application to fight with other virtual characters.
[0036] The game scene may include a battle preparation scene and a battle scene. The battle scene is the game scene after the virtual character starts the game and enters the battle. The battle preparation scene is generally the scene before the game starts. In the battle preparation scene, the player can make some battle preparations, such as changing the equipment and props carried; adjusting the costumes of the virtual character, etc. In the battle preparation scene, if the player has completed the battle preparation operations, the virtual character can be controlled to enter the preparation state.
[0037] When all virtual characters in the room or team are in the ready state or the virtual character controlled by the team leader is in the ready state, all virtual characters in the room or team can enter the game scene from the battle preparation scene to engage in game battles.
[0038] (2) Player Character
[0039] A player character is a virtual character that can be controlled by the player and moves around in the game environment. In some electronic games, it can also be called a shikigami character or a hero character. A player character can be at least one of the following forms: a virtual person, a virtual animal, an anime character, a virtual vehicle, etc.
[0040] (3) Game interface
[0041] The game interface (equivalent to the graphical user interface of the game) refers to the interface corresponding to the application provided or displayed through the graphical user interface, which includes a UI interface (User Interface) and a game screen for players to interact. In an optional embodiment, the UI interface may include game controls (such as skill controls, movement controls, function controls, etc.), indicators (such as direction indicators, role indicators, etc.), information display areas (such as the number of kills, match time, etc.), or game setting controls (such as system settings, stores, gold coins, etc.). In an optional embodiment, the game screen is a display screen corresponding to the virtual scene displayed by the terminal device, and the game screen may include virtual characters such as game characters, NPC characters (Non-Player Characters), and AI (Artificial Intelligence) characters that execute game logic in the virtual scene.
[0042] Based on this, an embodiment of the present invention provides a game control method, device and electronic device. This technology can be applied to mobile phones, tablet computers, computers, servers and other devices that can realize human-computer interaction, and is particularly suitable for mobile game scenarios.
[0043] To facilitate understanding of this embodiment, a game control method disclosed in an embodiment of the present invention is first introduced in detail.
[0044] In one embodiment of the present disclosure, the information processing method in the game can be run on a terminal device or a server. The terminal device can be a local terminal device. When the information processing method in the game is run 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.
[0045] In an optional implementation, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the information processing method in the game are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for information processing is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0046] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0047] In a possible implementation, an embodiment of the present invention provides an information processing method in a game, providing a graphical user interface through a terminal device, wherein the terminal device may be the local terminal device mentioned above, or may be a client device in the cloud interaction system mentioned above. A graphical user interface is provided through the terminal device, and the graphical user interface includes at least a portion of the game scene and a player character and other virtual objects in the same game; as in the above embodiment, the player can control the player character to attack other virtual objects.
[0048] See also Figure 1A schematic diagram of an implementation environment shown. The implementation environment may include: a first terminal device, a game server, and a second terminal device. The first terminal device and the second terminal device communicate with the server respectively to achieve data communication. In this embodiment, the first terminal device and the second terminal device are respectively installed with a client for executing the information processing method in the game provided by the present application, and the game server is a server end for executing the information processing method in the game provided by the present application. Through the client, the first terminal device and the second terminal device can communicate with the game server respectively.
[0049] Taking the first terminal device as an example, the first terminal device establishes communication with the game server by running the client. In an optional implementation, the server establishes a game match according to the game request of the client. Among them, the parameters of the game match can be determined according to the parameters in the received game request, for example, the parameters of the game match may include the number of people participating in the game match, the level of the characters participating in the game match, etc. When the first terminal device receives the response of the server, the virtual scene corresponding to the game match is displayed through the graphical user interface of the first terminal device. In an optional implementation, the server determines a target game match for the client from multiple established game matches according to the game request of the client, and when the first terminal device receives the response of the server, the virtual scene corresponding to the game match is displayed through the graphical user interface of the first terminal device. The first terminal device is a device controlled by the first user, and the virtual object displayed in the graphical user interface of the first terminal device is the player character controlled by the first user. The first user inputs an operation instruction through the graphical user interface to control the player character to perform corresponding operations in the virtual scene.
[0050] Taking the second terminal device as an example, the second terminal device establishes communication with the game server by running the client. In an optional implementation, the server establishes a game match according to the game request of the client. Among them, the parameters of the game match can be determined according to the parameters in the received game request, for example, the parameters of the game match may include the number of people participating in the game match, the level of the characters participating in the game match, etc. When the second terminal device receives the response of the server, the virtual scene corresponding to the game match is displayed through the graphical user interface of the second terminal device. In an optional implementation, the server determines a target game match for the client from multiple established game matches according to the game request of the client, and when the second terminal device receives the response of the server, the virtual scene corresponding to the game match is displayed through the graphical user interface of the second terminal device. The second terminal device is a device controlled by the second user, and the virtual object displayed in the graphical user interface of the second terminal device is the player character controlled by the second user. The second user inputs an operation instruction through the graphical user interface to control the player character to perform corresponding operations in the virtual scene.
[0051] The server performs data calculation based on the game data reported by the first terminal device and the second terminal device, and synchronizes the calculated game data to the first terminal device and the second terminal device, so that the first terminal device and the second terminal device control the rendering of corresponding virtual scenes and / or virtual objects in the graphical user interface according to the synchronization data sent by the server.
[0052] In this embodiment, the virtual object controlled by the first terminal device and the virtual object controlled by the second terminal device are virtual objects in the same game match. The virtual object controlled by the first terminal device and the virtual object controlled by the second terminal device may have the same role attributes or different role attributes.
[0053] It should be noted that the virtual objects in the current game may include two or more virtual objects, and different virtual objects may correspond to different terminal devices. That is to say, in the current game, there are more than two terminal devices that send and synchronize game data with the game server respectively.
[0054] The present embodiment provides a method for controlling a game, providing a graphical user interface of the game through a terminal device, wherein the display content of the graphical user interface includes a virtual scene and a virtual character controlled by the terminal device. The terminal device in the present embodiment may be a mobile communication device, such as a mobile phone, a tablet computer, a game console with a mobile communication function, etc. The terminal device in the present embodiment may include a gyroscope and a light sensor; wherein the gyroscope may detect whether the terminal device is rotating and determine the angle of rotation; the light sensor may collect the amount of incoming light and determine whether the light sensor is covered accordingly. That is, if the amount of incoming light collected by the light sensor is small, the light sensor is covered; if the amount of incoming light collected by the light sensor is large, the light sensor is not covered.
[0055] The game of this embodiment can be an MMO, RPG game, etc. In this embodiment, players can prepare for the game through the graphical user interface of the game, for example, forming a team. After completing the preparation, the virtual characters included in the graphical user interface can be matched against each other, and after the match is successful, they enter the virtual scene to fight.
[0056] See also Figure 2 A schematic diagram of a graphical user interface is shown in FIG. Figure 2The graphical user interface in the game includes four virtual characters ABCD, among which virtual character A can be controlled by a player through a terminal device, and virtual characters BCD can be controlled by other players through other terminal devices. It should be noted that the graphical user interface must at least include the virtual character controlled by the terminal device, and may or may not include other virtual characters controlled by other terminal devices, and the number of other virtual characters is not limited.
[0057] If the player's graphical user interface only includes the virtual character controlled by the player's terminal device, then the graphical user interface can be an interface for single-player game matching; if the player's graphical user interface includes the virtual character controlled by the player's terminal device and other virtual characters controlled by other terminal devices of other players, then the graphical user interface can be an interface for multiplayer game matching.
[0058] Based on the above description, see Figure 3 The flowchart of a game control method shown in FIG. 1 is a flowchart of a game control method, wherein the game control method provides a graphical user interface of the game through a terminal device, and the graphical user interface includes a game screen. The method includes the following steps:
[0059] Step S302, when it is detected that the virtual character in the game is in a ready state to enter the virtual scene of the game, in response to a trigger instruction to enter the virtual scene of the game, the virtual character is controlled to enter the virtual scene.
[0060] When the virtual character controlled by the player is in a virtual scene preparation state to enter the game, the virtual character can enter the virtual scene or exit the preparation state. If the virtual character is in the preparation state, it means that the virtual character is ready to enter the battle, and can respond to the trigger instruction of entering the virtual scene of the game, control the virtual character to match the game, and enter the virtual scene of the game to fight after the match is successful.
[0061] In addition to the virtual character controlled by the game player, the virtual scene of the game may also include other virtual characters controlled by other game players, wherein these other virtual characters may be teammates or opponents of the virtual character controlled by the player.
[0062] Specifically, the player can click on the designated control of the terminal device to put the virtual character into a ready state; the player can also put the virtual character into a ready state by flipping the terminal device.
[0063] After the virtual character enters the ready state, the game battle match can be carried out. The trigger instruction of the virtual scene of the game can be a command triggered when the game battle match is successful, or a command triggered when the virtual scene of the game is generated. The terminal device responds to the above trigger instruction and can control the virtual character to enter the virtual scene. The player can control the virtual character to fight in the virtual scene.
[0064] Step S304, in response to detecting that the terminal device is flipped over and determining that the screen of the terminal device is blocked, controlling the virtual character to exit the ready state.
[0065] The two steps of "responding to detecting that the terminal device is flipped over" and "responding to a trigger instruction for entering a virtual scene of the game" in this embodiment are both under the condition of "the virtual character processing the ready state of the virtual scene to be entered", that is, when it is detected that the virtual character in the game is in the ready state for entering the virtual scene to be entered, in response to the trigger instruction for entering the virtual scene of the game, the virtual character is controlled to enter the virtual scene; and, when it is detected that the virtual character in the game is in the ready state for entering the virtual scene to be entered, in response to detecting that the terminal device is flipped over and determining that the screen of the terminal device is blocked, the virtual character is controlled to exit the ready state.
[0066] That is, when the virtual character is in a state of preparation to enter a virtual scene, that is, the virtual character is ready but has not been successfully matched, it can be monitored whether the terminal device is flipped and whether the screen is blocked.
[0067] The player can rotate the terminal device by turning the operation, and the terminal device can determine the rotation angle through the gyroscope. If the rotation angle of the terminal device is within a certain range, it can be considered that the terminal device has flipped. For example: if the terminal device rotates 160°-200° along the Z axis, it can be considered that the terminal device has flipped.
[0068] The terminal device can also determine whether the screen of the terminal device is blocked through the light sensor. The light sensor is generally in the same plane as the mobile phone screen and faces the same direction. If the screen is blocked, the light sensor will also be blocked, and the amount of light collected by the light sensor will also be relatively low. Whether the screen is blocked can be determined based on the amount of light collected by the light sensor.
[0069] When it is determined that the terminal device is flipped and the screen of the terminal device is blocked, the terminal device can control the virtual character to exit the ready state. After the virtual character exits the ready state, the terminal device does not respond to the triggering instruction of the virtual scene of the game and does not control the virtual character to enter the virtual scene.
[0070] An embodiment of the present invention provides a method for controlling a game, in which a virtual character can be controlled to exit a ready state when a terminal device detects that the terminal device is flipped and determines that the screen of the terminal device is blocked. In this method, a player can control the virtual character to exit the ready state by flipping the terminal device and blocking the screen of the terminal device. The player does not need to click the screen of the terminal device with a finger to change the state of the virtual character. The interaction method is relatively simple, which can improve the player's experience.
[0071] like Figure 4 The flowchart of another game control method in the optional embodiment shown is a flowchart of another game control method in the optional embodiment. The game control method in the optional embodiment includes the following steps:
[0072] Step S402, when it is detected that the virtual character in the game is in a ready state to enter the virtual scene of the game, in response to a trigger instruction to enter the virtual scene of the game, the virtual character is controlled to enter the virtual scene.
[0073] Specifically, in this embodiment, the player can make the virtual character enter the ready state by clicking the control, for example: providing a first control through a graphical user interface; responding to the touch operation on the first control, setting the virtual character to the ready state of the virtual scene to enter the game.
[0074] The first control may be a virtual button, and the graphical user interface may display the first control. The player may set the virtual character to a ready state for entering a virtual scene of the game by performing a touch operation on the first control. The touch operation on the first control may be: single click, double click, or long press.
[0075] In addition, after the virtual character enters the preparation state, the terminal device may display a control for “cancel preparation” for the virtual character, which may be referred to as a “cancel preparation” control.
[0076] If the virtual character clicks the "cancel prepare" control to cancel the prepare state, the terminal device can change the "cancel prepare" control to the "prepare" control in the game graphical user interface. The "cancel prepare" control and the "prepare" control can include patterns, text, etc.
[0077] Furthermore, when the virtual character is set to a ready state for a virtual scene to be entered into a game, the method further includes: performing game battle matching for the virtual character. If the virtual character enters the ready state, it can be considered that the virtual character is ready for battle, and at this time the terminal device can control the battle matching of the virtual character, for example: performing game battle matching for the virtual character.
[0078] It should be noted that the virtual character can be matched individually or in a team. For example, when the virtual character is in a team game, when all the virtual characters in the game room are in a ready state and the team leader sends a game start message, the game room is matched.
[0079] When the virtual characters are in a team game, all the virtual characters in the game room are in a ready state, and when the terminal device receives a game start confirmation message sent by the owner of the game room, it can be considered that all the virtual characters in the above game room are ready for battle. At this time, all the virtual characters in the above game room can be teamed up and matched. After the matching is successful, all the virtual characters in the above game room enter the virtual scene to play the game.
[0080] For example: Assume that the number of players in a game team can be 5, and the game room can contain up to 5 virtual characters. If the game room contains 5 virtual characters and all 5 virtual characters are in a ready state, and the room owner also sends a game start confirmation message, the above 5 virtual characters can be set as teammates and matched with 5 opponents in the game. If the game room contains 3 virtual characters and all 3 virtual characters are in a ready state, and the room owner also sends a game start confirmation message, the above 3 virtual characters can be set as teammates and matched with 2 teammates and 5 opponents in the game.
[0081] The trigger instruction for entering the virtual scene of the game can be an instruction triggered when the game battle is successfully matched. Therefore, the above method also includes: when a message of successful game battle matching is detected, generating a trigger instruction for entering the virtual scene of the game. If a message of successful game battle matching is detected, the above trigger instruction can be generated.
[0082] Step S404: Detect whether the terminal device is flipped by using a gyroscope, and detect whether the screen of the terminal device is blocked by using a light sensor.
[0083] In this embodiment, the gyroscope can be used to detect the direction and angle of rotation of the terminal device. Generally speaking, if the terminal device rotates along the Z axis and the rotation angle is close to 180 degrees, it can be considered that the terminal device is flipped. Therefore, whether the terminal device is flipped can be detected in the following manner: the flip angle of the terminal device is detected by the gyroscope; if the flip angle meets the preset angle range, the terminal device is flipped; if the flip angle does not meet the angle range, the terminal device is not flipped.
[0084] In this embodiment, the terminal device can first determine the flip angle of the terminal device, where the flip angle can include the yaw angle, the pitch angle, and the roll angle. In this embodiment, a preset angle range can be set for the flip angle, and only when the specified flip angle meets the angle range, can the terminal device be considered to have flipped. For example: the angle range is set to the flip angle of the pitch angle between 100°-200°. If the gyroscope detects the flip angle of the terminal device and the flip angle of the pitch angle is 160°, the terminal device is considered to have flipped.
[0085] In this embodiment, the orientation of the light sensor can be the same as the orientation of the screen of the terminal device. For example, the light sensor can be set above, below, or behind the screen of the terminal device. Therefore, as long as the screen of the terminal device is blocked, the light sensor will also be blocked. Whether the screen of the terminal device is blocked can be determined by the amount of light received by the light sensor. For example, the amount of light received by the terminal device is determined by the light sensor; if the amount of light received is greater than a preset intensity threshold, the screen of the terminal device is not blocked; if the amount of light received is less than or equal to the intensity threshold, the screen of the terminal device is blocked.
[0086] Step S406, in response to detecting that the terminal device is flipped over and determining that the screen of the terminal device is blocked, controlling the virtual character to exit the ready state.
[0087] If the terminal device detects that the terminal device is flipped and the screen of the terminal device is blocked, the virtual character can be controlled to exit the ready state. At this time, the terminal device will not respond to the trigger instruction to enter the virtual scene of the game, nor will it control the virtual character to enter the virtual scene.
[0088] Among them, when the virtual character is set to a ready state for entering a virtual scene of the game, the player can also control the virtual character to exit the ready state by clicking the control, for example: switching the first control to the second control; responding to the touch operation on the second control, controlling the virtual character to exit the ready state.
[0089] The player can set the virtual character to exit the ready state by performing a touch operation on the second control, wherein the touch operation on the second control can be: single click, double click, long press.
[0090] After the terminal device exits the virtual character from the ready state, the player can put the virtual character back into the ready state by clicking the control or flipping the terminal device. For example: switching the second control to the first control; responding to the touch operation on the first control, controlling the virtual character to enter the ready state. Another example: responding to detecting that the terminal device is flipped and determining that the screen of the terminal device is not blocked, controlling the virtual character to enter the ready state.
[0091] Among them, the method of clicking the control and the method of detecting that the terminal device is flipped and the screen of the terminal device is not blocked have been described above and will not be repeated here.
[0092] In summary, the above method provided by the embodiment of the present invention, in addition to the way that players control virtual characters by clicking on the controls of the terminal device, adds a new interaction method to give players more choices: through the gyroscope and light sensor of the terminal device, the gyroscope is called to identify the user's rotation operation, and the light sensor is used to identify whether the mobile phone screen is blocked. The player only needs to flip the terminal device, and does not need to use a finger to click on the screen of the terminal device to change the state of the virtual character, so that the virtual character enters or exits the ready state. Therefore, the player does not need to use a finger to click on the screen of the terminal device, and the interaction method is relatively simple, which can improve the player's experience. In addition, the terminal device generally includes a gyroscope and a light sensor, which is convenient for popularization and has strong practicality.
[0093] Corresponding to the above method embodiment, the embodiment of the present invention provides a game control device, which provides a graphical user interface of the game through a terminal device, such as Figure 5 A schematic diagram of the structure of a game control device is shown, and the game control device includes:
[0094] A virtual scene entry module 51 is used to control the virtual character to enter the virtual scene in response to a trigger instruction to enter the virtual scene of the game when it is detected that the virtual character in the game is in a ready state to enter the virtual scene of the game; and
[0095] The ready state exit module 52 is used to control the virtual character to exit the ready state in response to detecting that the terminal device is turned over and determining that the screen of the terminal device is blocked.
[0096] A game control device provided by an embodiment of the present invention can control a virtual character to exit a ready state when a terminal device detects that the terminal device is flipped and determines that the screen of the terminal device is blocked. In this manner, a player can control the virtual character to exit a ready state by flipping the terminal device and blocking the screen of the terminal device. The player does not need to click the screen of the terminal device with a finger to change the state of the virtual character. The interaction method is relatively simple, which can improve the player's experience.
[0097] See also Figure 6 A structural schematic diagram of another game control device is shown, wherein the game control device also includes: a first control touch module 61, connected to the virtual scene entry module 51; the first control touch module 61 is used to provide a first control through a graphical user interface; in response to a touch operation on the first control, the virtual character is set to a ready state for entering a virtual scene of the game.
[0098] like Figure 6 As shown, when the virtual character is set to a ready state for entering a virtual scene of the game, the control device of the game also includes: a single-player game matching module 62, which is connected to the virtual scene entry module 51; the single-player game matching module 62 is used to perform game battle matching for the virtual character.
[0099] like Figure 6 As shown, when the virtual character is set to a ready state for entering a virtual scene of the game, the control device of the game also includes: a second control touch module 63, connected to the ready state exit module 52; the second control touch module 63 is used to switch the first control to the second control; respond to the touch operation on the second control, and control the virtual character to exit the ready state.
[0100] like Figure 6 As shown, the control device of the game also includes: a multiplayer game matching module 64, which is connected to the virtual scene entry module 51; the multiplayer game matching module 64 is used to perform game battle matching for the game room when all virtual characters in the game room where the virtual characters are located are in a ready state and a game start confirmation message sent by the owner of the game room is received.
[0101] like Figure 6 As shown, the game control device also includes: a trigger instruction generation module 65, which is connected to the virtual scene entry module 51; the trigger instruction generation module 65 is used to generate a trigger instruction for entering the virtual scene of the game when a message of successful game battle matching is detected.
[0102] like Figure 6 As shown, the control device of the game also includes: a terminal device detection module 66, a virtual scene entry module 51, a terminal device detection module 66 and a ready state exit module 52 are connected in sequence; the terminal device detection module 66 is used to detect whether the terminal device is flipped through a gyroscope; and detect whether the screen of the terminal device is blocked through a light sensor.
[0103] The terminal device detection module is used to detect the flip angle of the terminal device through a gyroscope; if the flip angle meets the preset angle range, the terminal device flips; if the flip angle does not meet the angle range, the terminal device does not flip.
[0104] The direction of the light sensor is the same as that of the screen of the terminal device. The terminal device detection module is used to determine the amount of light entering the terminal device through the light sensor; if the amount of light entering is greater than a preset intensity threshold, the screen of the terminal device is not blocked; if the amount of light entering is less than or equal to the intensity threshold, the screen of the terminal device is blocked.
[0105] The game control device provided in the embodiment of the present invention has the same technical features as the game control method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects.
[0106] The embodiment of the present invention also provides an electronic device for running the control method of the above game; see Figure 7 A structural schematic diagram of an electronic device is shown, which includes a memory 100 and a processor 101, wherein the memory 100 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 101 to implement the control method of the above-mentioned game.
[0107] Further, Figure 7 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .
[0108] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0109] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.
[0110] An embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the control method of the above-mentioned game. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0111] The game control method, device and computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and / or device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0113] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0114] If the function is implemented in the form of 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, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0115] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0116] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A game control method, characterized in that: Providing a graphical user interface of the game through a terminal device, the method comprising: When it is detected that the virtual character in the game is in a ready state to enter a virtual scene of the game, in response to a trigger instruction to enter the virtual scene of the game, the virtual character is controlled to enter the virtual scene; and When the virtual character is in a ready state to enter a virtual scene but has not yet been matched successfully, in response to detecting that the terminal device is flipped and determining that the screen of the terminal device is blocked, the virtual character is controlled to exit the ready state.
2. The method according to claim 1, characterized in that: The method further comprises: providing a first control via the graphical user interface; In response to the touch operation on the first control, the virtual character is set to a ready state for entering a virtual scene of the game.
3. The method according to claim 2, characterized in that When the virtual character is set to a ready state to enter a virtual scene of the game, the method further comprises: Game battle matching is performed for the virtual character.
4. The method according to claim 2, characterized in that: When the virtual character is set to a ready state to enter a virtual scene of the game, the method further comprises: Switching the first control to a second control; In response to a touch operation on the second control, the virtual character is controlled to exit the ready state.
5. The method according to claim 2, characterized in that: The method further comprises: When all virtual characters in the game room where the virtual character is located are in the ready state and a game start confirmation message sent by the owner of the game room is received, game battle matching is performed for the game room.
6. The method according to claim 1, characterized in that The method further comprises: when a message indicating successful game match is detected, generating a trigger instruction for entering a virtual scene of the game.
7. The method according to claim 1, characterized in that The terminal device includes a gyroscope and a light sensor, and the method further includes: Detecting whether the terminal device flips over by the gyroscope; The light sensor is used to detect whether the screen of the terminal device is blocked.
8. The method according to claim 7, characterized in that The step of detecting whether the terminal device flips over by the gyroscope comprises: Detecting the flip angle of the terminal device by using the gyroscope; If the flip angle meets the preset angle range, the terminal device flips; If the flip angle does not conform to the angle range, the terminal device is not flipped.
9. The method according to claim 7, characterized in that: The direction of the light sensor is the same as the direction of the screen of the terminal device, and the step of detecting whether the screen of the terminal device is blocked by the light sensor includes: Determining the amount of light entering the terminal device by using the light sensor; If the amount of incoming light is greater than a preset intensity threshold, the screen of the terminal device is not blocked; If the amount of incoming light is less than or equal to the intensity threshold, the screen of the terminal device is blocked.
10. A game control device, characterized in that: Providing a graphical user interface of the game through a terminal device, the apparatus comprises: a virtual scene entry module, for controlling the virtual character in the game to enter the virtual scene in response to a trigger instruction for entering the virtual scene of the game when it is detected that the virtual character in the game is in a ready state to enter the virtual scene of the game; and The preparation state exit module is used to control the virtual character to exit the preparation state in response to detecting that the terminal device is flipped and determining that the screen of the terminal device is blocked when the virtual character is in the preparation state to enter the virtual scene but has not yet matched successfully.
11. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the game control method according to any one of claims 1 to 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 called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the game control method described in any one of claims 1 to 9.
