Game control method and device and electronic equipment

文档序号:1968387 发布日期:2021-12-17 浏览:17次 中文

阅读说明:本技术 游戏的控制方法、装置和电子设备 (Game control method and device and electronic equipment ) 是由 麦冠强 于 2021-09-22 设计创作,主要内容包括:本发明提供了一种游戏的控制方法、装置和电子设备。其中,通过终端设备提供游戏的图形用户界面,该方法包括:当检测到游戏中的虚拟角色处于待进入游戏的虚拟场景的准备状态时,响应于进入游戏的虚拟场景的触发指令,控制虚拟角色进入虚拟场景;响应于检测到终端设备发生翻转,且确定终端设备的屏幕被遮挡,控制虚拟角色退出准备状态。该方式中,玩家可以通过翻转终端设备并且遮挡终端设备的屏幕的方式,由终端设备控制虚拟角色退出准备状态,不需要玩家使用手指点击终端设备的屏幕即可改变虚拟角色的状态,交互方式较为简单,可以提高玩家的体验感。(The invention provides a game control method and device and electronic equipment. Wherein, the graphical user interface of the game is provided through the terminal equipment, the method comprises the following steps: when detecting that the virtual character in the game is in a preparation state of a virtual scene to be entered into the game, responding to a trigger instruction of the virtual scene to be entered into the game, and controlling the virtual character to enter the virtual scene; and controlling the virtual character to exit the preparation state in response to detecting that the terminal equipment is turned over and determining that the screen of the terminal equipment is shielded. In the mode, the player can control the virtual character to exit from the preparation state by the terminal equipment in a mode of turning over the terminal equipment and shielding the screen of the terminal equipment, the state of the virtual character can be changed without clicking the screen of the terminal equipment by fingers of the player, the interaction mode is simple, and the experience of the player can be improved.)

1. A method of controlling a game, wherein a graphical user interface of the game is provided by a terminal device, the method comprising:

when detecting that a virtual character in the game is in a preparation state of a virtual scene to be entered into the game, responding to a trigger instruction of entering the virtual scene of the game, and controlling the virtual character to enter the virtual scene; and the number of the first and second groups,

and controlling the virtual role to exit the preparation state in response to detecting that the terminal equipment is turned over and determining that the screen of the terminal equipment is blocked.

2. The method of claim 1, further comprising:

providing a first control through the graphical user interface;

and responding to the touch operation aiming at the first control, and setting the virtual character to be in a preparation state of a virtual scene of the game.

3. The method of claim 2, wherein setting the virtual character to be ready to enter a virtual scene of the game, the method further comprises:

and performing game match matching aiming at the virtual character.

4. The method of claim 2, wherein setting the virtual character to be ready to enter a virtual scene of the game, the method further comprises:

switching the first control to a second control;

and responding to the touch operation aiming at the second control, and controlling the virtual role to exit the preparation state.

5. The method of claim 2, further comprising:

and when all the virtual characters in the game room where the virtual characters are located are in the preparation state and a game start confirmation message sent by a homeowner of the game room is received, performing game match matching aiming at the game room.

6. The method of claim 1, further comprising: and when the message that the match of the game match is successful is detected, generating a trigger instruction for entering a virtual scene of the game.

7. The method of claim 1, wherein the terminal device comprises a gyroscope and a light sensor, the method further comprising:

detecting whether the terminal equipment is turned over or not through the gyroscope;

and detecting whether the screen of the terminal equipment is shielded or not through the light sensor.

8. The method of claim 7, wherein the step of detecting whether the terminal device is turned over by the gyroscope comprises:

detecting the turning angle of the terminal equipment through the gyroscope;

if the overturning angle accords with a preset angle range, the terminal equipment is overturned;

and if the turning angle does not accord with the angle range, the terminal equipment is not turned.

9. The method according to claim 7, wherein the light sensor is oriented in the same direction as the screen of the terminal device, and the step of detecting whether the screen of the terminal device is blocked by the light sensor comprises:

determining the light inlet quantity of the terminal equipment through the light sensor;

if the light incoming amount is larger than a preset intensity threshold value, the screen of the terminal equipment is not shielded;

and if the light incoming quantity is smaller than or equal to the intensity threshold value, the screen of the terminal equipment is shielded.

10. An apparatus for controlling a game, wherein a graphical user interface of the game is provided through a terminal device, the apparatus comprising:

the virtual scene entering module is used for responding to a trigger instruction for entering the virtual scene of the game and controlling the virtual character to enter the virtual scene when detecting that the virtual character in the game is in a preparation state of the virtual scene to be entered into the game; and the number of the first and second groups,

and the preparation state exit module is used for controlling the virtual role to exit the preparation state in response to the fact that the terminal equipment is detected to turn over and the fact that the screen of the terminal equipment is shielded is determined.

11. An electronic device comprising a processor and a memory, said memory storing computer-executable instructions executable by said processor, said processor executing said computer-executable instructions to implement the steps of a method of controlling a game according to any one of claims 1 to 9.

12. A computer-readable storage medium storing computer-executable instructions which, when invoked and executed by a processor, cause the processor to carry out the steps of the method of controlling a game according to any one of claims 1 to 9.

Technical Field

The present invention relates to the field of game technologies, and in particular, to a game control method and apparatus, and an electronic device.

Background

The team formation game in the mobile phone game is a common game mode, and generally, a virtual character controlled by a captain player initiates a team formation invitation, and virtual characters controlled by other players accept the invitation. The captain player-controlled virtual character may invite other player-controlled virtual characters to a room or team for team formation.

After each virtual character enters a room or team, the player may change the state of the virtual character it controls, e.g., adjust the virtual character to a ready state. When all the virtual characters in the room or the team are in a ready state or the virtual character controlled by the team leader player is in a ready state, all the virtual characters in the room or the team can enter a game scene to play a game battle.

However, for a mobile game player, the state of a virtual character is generally changed by clicking a virtual button of a graphical user interface, and this interaction method requiring the player to click a screen with a finger is cumbersome, and the experience of the player is poor.

Disclosure of Invention

In view of this, the present invention provides a game control method, device and electronic device, which do not require a player to click a screen with a finger, have a simple interaction manner, and can improve the experience of the player.

In a first aspect, an embodiment of the present invention provides a method for controlling a game, where a graphical user interface of the game is provided by a terminal device, and the method includes: when detecting that the virtual character in the game is in a preparation state of a virtual scene to be entered into the game, responding to a trigger instruction of the virtual scene to be entered into the game, and controlling the virtual character to enter the virtual scene; and controlling the virtual character to exit the preparation state in response to detecting that the terminal equipment is turned over and determining that the screen of the terminal equipment is shielded.

In an optional embodiment of the present invention, the method further includes: providing a first control through a graphical user interface; and responding to the touch operation aiming at the first control, and setting the virtual character to be in a preparation state of a virtual scene of the game.

In an optional embodiment of the present invention, when the virtual character is set to be in a ready state of a virtual scene of the game, the method further includes: and performing game match matching aiming at the virtual character.

In an optional embodiment of the present invention, when the virtual character is set to be in a ready state of a virtual scene of the game, the method further includes: switching the first control to a second control; and responding to the touch operation aiming at the second control, and controlling the virtual character to exit the preparation state.

In an optional embodiment of the present invention, the method further includes: and when all the virtual characters in the game room where the virtual characters are located are in the preparation state and a game starting confirmation message sent by a homeowner of the game room is received, performing game match matching aiming at the game room.

In an optional embodiment of the present invention, the method further includes: and when the message that the match of the game match is successful is detected, generating a trigger instruction for entering a virtual scene of the game.

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 comprises the following steps: detecting whether the terminal equipment is turned over or not through a gyroscope; whether a screen of the terminal equipment is shielded or not is detected through the light sensor.

In an optional embodiment of the present invention, the step of detecting whether the terminal device is turned over by using a gyroscope includes: detecting the turning angle of the terminal equipment through a gyroscope; if the overturning angle accords with the preset angle range, the terminal equipment is overturned; if the turning angle does not accord with the angle range, the terminal equipment is not turned.

In an optional embodiment of the present invention, an orientation of the light sensor is the same as an orientation of a 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 light inlet quantity of the terminal equipment through a light sensor; if the light incoming amount is larger than a preset intensity threshold value, the screen of the terminal equipment is not shielded; if the light entering amount is less than or equal to the intensity threshold value, the screen of the terminal equipment is blocked.

In a second aspect, an embodiment of the present invention further provides a device for controlling a game, where a graphical user interface of the game is provided through a terminal device, and the device includes: the virtual scene entering module is used for responding to a trigger instruction of a virtual scene entering the game and controlling the virtual character to enter the virtual scene when detecting that the virtual character in the game is in a preparation state of the virtual scene to be entered into the game; and the preparation state exit module is used for controlling the virtual role to exit the preparation state in response to the fact that the terminal equipment is detected to turn over and the fact that the screen of the terminal equipment is shielded is determined.

In a third aspect, an embodiment of the present invention further provides an electronic device, which includes a processor and a memory, where 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 control method for a game described above.

In a fourth aspect, embodiments of the present invention also provide a computer-readable storage medium, which stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions cause the processor to implement the steps of the control method of the game described above.

The embodiment of the invention has the following beneficial effects:

according to the game control method and device and the electronic equipment provided by the embodiment of the invention, when the terminal equipment detects that the terminal equipment is turned over and the screen of the terminal equipment is determined to be shielded, the virtual character can be controlled to exit from the preparation state. In the mode, the player can control the virtual character to exit from the preparation state by the terminal equipment in a mode of turning over the terminal equipment and shielding the screen of the terminal equipment, the state of the virtual character can be changed without clicking the screen of the terminal equipment by fingers of the player, the interaction mode is simple, and the experience of the player can be improved.

Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.

In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.

FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the invention;

FIG. 2 is a schematic diagram of a graphical user interface provided by an embodiment of the present invention;

FIG. 3 is a flow chart of a method for controlling a game according to an embodiment of the present invention;

FIG. 4 is a flow chart of another game control method according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of a game control device according to an embodiment of the present invention;

FIG. 6 is a schematic structural diagram of a control device for another game according to an embodiment of the present invention;

fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

To make the objects, 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, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

At present, a mobile phone game player generally changes the state of a virtual character by clicking a virtual button of a graphical user interface, and the interaction mode that the player clicks a screen by using a finger is complicated, so that the experience of the player is poor.

First, the present application is directed to the nouns:

(1) virtual scene

Also referred to as game scenes, the game system may provide a virtual game scene that the application program displays (or provides) when running on the terminal device or server. Optionally, the game scene is a simulated environment of the real world, or a semi-simulated 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, and the virtual environment can be sky, land, sea and the like, wherein the land comprises environmental elements such as deserts, cities and the like. The game scene is a scene of complete game logic of virtual characters such as user control.

A virtual character refers to a dynamic object that can be controlled in a virtual scene. Alternatively, the dynamic object may be a virtual character, a virtual animal, or the like. The virtual character includes an animation character, a game character, and the like. The virtual Character is a Character controlled by a Player through an input device, or an Artificial Intelligence (AI) set in a virtual environment match-up through training, or a Non-Player Character (NPC) set in a virtual scene match-up. Optionally, the virtual character is a virtual character that competes in a virtual scene. Optionally, the number of virtual characters in the virtual scene match is preset, or is dynamically determined according to the number of clients participating in the match, which is not limited in the embodiment of the present application. In one possible implementation, the user can control the virtual character to move within the virtual scene, e.g., control the virtual character to run, jump, crawl, etc., and also control the virtual character to fight other virtual characters using skills, virtual props, etc., provided by the application.

The game scenario may include a combat readiness scenario and a combat scenario. Wherein, the battle scene is a game scene after the virtual character starts the game and enters the battle. The battle preparation scenario is generally a scenario before the game starts, in which the player may perform some battle preparation, such as: changing the carried equipment and props; adjusting the fashion of the virtual character, etc. In the battle preparation scene, if the player has finished the battle preparation operation, the virtual character can be controlled to enter the preparation state.

When all the virtual characters in the room or the team are in a ready state or the virtual characters controlled by the team leader are in a ready state, all the virtual characters in the room or the team can enter a game scene from a battle preparation scene, so that the game battle can be carried out.

(2) Player character

The player character refers to a virtual character which can be controlled by a player to move in a game environment, and can also be called a god character or a hero character in some electronic games. The player character may be at least one of different forms of a virtual character, a virtual animal, an animation character, a virtual vehicle, and the like.

(3) Game interface

The game Interface (corresponding to a graphical User Interface of a game) refers to an Interface corresponding to an application program provided or displayed through the graphical User Interface, and the Interface includes a User Interface (UI) and a game screen for a player to interact with each other. In alternative embodiments, game controls (e.g., skill controls, movement controls, functionality controls, etc.), indicators (e.g., directional indicators, character indicators, etc.), information presentation areas (e.g., number of clicks, game play time, etc.), or game setting controls (e.g., system settings, stores, coins, etc.) may be included in the UI interface. In an optional embodiment, the game screen is a display screen corresponding to a virtual scene displayed by the terminal device, and the game screen may include virtual characters such as a game Character, an NPC Character (Non-Player Character), and an AI (Artificial Intelligence) Character that perform game logic in the virtual scene.

Based on this, the game control method, the game control device and the electronic device provided by the embodiment of the invention can be applied to devices which can realize human-computer interaction, such as a mobile phone, a tablet computer, a server and the like, and are particularly suitable for a mobile phone game scene.

For the understanding of the present embodiment, a detailed description will be given to a game control method disclosed in the present embodiment.

The information processing method in the game in one embodiment of the disclosure can be operated on a terminal device or a server. The terminal device may be a local terminal device. When the information processing method in the game runs on the server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system comprises the server and the client device.

In an optional embodiment, various cloud applications may be run under the cloud interaction system, for example: and (5) cloud games. Taking a cloud game as an example, a cloud game refers to a game mode based on cloud computing. In the running mode of the cloud game, the running main body of the game program and the game picture presenting main body are separated, the storage and the running of the information processing method in the game are completed on a cloud game server, and the client device is used for receiving and sending data and presenting the game picture, for example, the client device can be a display device with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; however, the terminal device performing the information processing is a cloud game server in the cloud. When a game is played, a 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, data such as game pictures and the like are encoded and compressed, the data are returned to the client device through a network, and finally the data are decoded through the client device and the game pictures are output.

In an alternative 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 for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.

In a possible implementation manner, an embodiment of the present invention provides an information processing method in a game, where a graphical user interface is provided through a terminal device, where the terminal device may be the aforementioned local terminal device, and may also be the aforementioned client device in a cloud interaction system. Providing a graphical user interface by the terminal device, the graphical user interface including at least a portion of the game scene and the player character and other virtual objects in the same game play pair; as with the previous embodiments, the player may control the player character to attack other virtual objects.

See fig. 1 for a schematic illustration of one implementation environment. The implementation environment may include: the game server comprises a first terminal device, a game server and a second terminal device. The first terminal device and the second terminal device are respectively communicated with the server to realize data communication. In the present embodiment, the first terminal device and the second terminal device are respectively equipped with a client terminal that executes the in-game information processing method provided by the present application, and the game server is a server terminal that executes the in-game information processing method provided by the present application. And the first terminal equipment and the second terminal equipment can respectively communicate with the game server through the client.

Taking the first terminal device as an example, the first terminal device establishes communication with the game server by running the client. In an alternative embodiment, the server establishes the game pair based on the game request from the client. The parameters of the game play can be determined according to the parameters in the received game request, for example, the parameters of the game play can include the number of people participating in the game play, the level of characters participating in the game play, and the like. And when the first terminal equipment receives the response of the server, displaying the virtual scene corresponding to the game play through the graphical user interface of the first terminal equipment. In an optional implementation manner, the server determines a target game play for the client from a plurality of established game plays according to a game request of the client, and when the first terminal device receives a response of the server, displays a virtual scene corresponding to the game play through a graphical user interface of the first terminal device. The first terminal device is controlled by a first user, the virtual object displayed in the graphical user interface of the first terminal device is a player character controlled by the first user, and the first user inputs an operation instruction through the graphical user interface so as to control the player character to execute corresponding operation in a virtual scene.

Taking the second terminal device as an example, the second terminal device establishes communication with the game server by operating the client. In an alternative embodiment, the server establishes the game pair based on the game request from the client. The parameters of the game play can be determined according to the parameters in the received game request, for example, the parameters of the game play can include the number of people participating in the game play, the level of characters participating in the game play, and the like. And when the second terminal equipment receives the response of the server, displaying the virtual scene corresponding to the game play through the graphical user interface of the second terminal equipment. In an optional implementation manner, the server determines a target game play for the client from a plurality of established game plays according to a game request of the client, and when the second terminal device receives a response from the server, displays a virtual scene corresponding to the game play through a graphical user interface of the second terminal device. The second terminal device is controlled by a second user, the virtual object displayed in the graphical user interface of the second terminal device is a player character controlled by the second user, and the second user inputs an operation instruction through the graphical user interface so as to control the player character to execute corresponding operation in the virtual scene.

The server performs data calculation according to 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 rendering of a corresponding virtual scene and/or a corresponding virtual object in a graphical user interface according to the synchronization data issued by the server.

In the present 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 play. The virtual object controlled by the first terminal device and the virtual object controlled by the second terminal device may have the same role attribute or different role attributes.

It should be noted that the virtual objects in the current game play may include two or more virtual objects, and different virtual objects may correspond to different terminal devices, that is, in the current game play, there are two or more terminal devices that respectively perform game data transmission and synchronization with the game server.

The embodiment provides a game control method, wherein a terminal device provides a graphical user interface of a game, and the display content of the graphical user interface comprises a virtual scene and a virtual character controlled by the terminal device. The terminal device in this embodiment may be a mobile communication device, for example: mobile phones, tablet computers, game consoles with mobile communication functions, and the like. The terminal device in this embodiment may include a gyroscope and a light sensor; the gyroscope can detect whether the terminal equipment rotates or not and determine the rotating angle; the light sensor can collect the light entering amount and judge whether the light sensor is covered or not according to the light entering amount. That is, if the amount of light collected by the light sensor is small, the light sensor is covered; if the light sensor collects a large amount of incident light, the light sensor is not covered.

The game of this embodiment may be an MMO game, an RPG game, etc., and in this embodiment, the player may perform game preparation work through a game graphical user interface, for example: the players form a team. After the preparation work is finished, the virtual characters contained in the graphical user interface can be matched in a battle mode, and the virtual characters enter a virtual scene to fight after the battle matching is successful.

Referring to a schematic diagram of a graphical user interface shown in fig. 2, the graphical user interface in fig. 2 includes 4 virtual characters ABCD, wherein the virtual character a can be controlled by a player through a terminal device, and the virtual character BCD can be controlled by other players through other terminal devices. It should be noted that, the graphical user interface at least includes the virtual character controlled by the terminal device, and may include other virtual characters controlled by other terminal devices, and the number of the other virtual characters is not limited.

If the graphical user interface of the player only contains the virtual character controlled by the terminal equipment of the player, the graphical user interface can be an interface matched with a single game; the graphical user interface of a player may be a multiplayer game matching interface if the graphical user interface contains a virtual character controlled by the player's terminal device and other virtual characters controlled by other player's other terminal devices.

Based on the above description, referring to the flowchart of a control method of a game shown in fig. 3, the control method of the game provides a graphical user interface of the game through a terminal device, the graphical user interface includes a game screen, the method includes the following steps:

step S302, when detecting that the virtual character in the game is in a preparation state of a virtual scene to be entered into the game, responding to a trigger instruction of the virtual scene to be entered into the game, and controlling the virtual character to enter the virtual scene.

When a player-controlled virtual character is in a virtual scene ready state to enter a game, the virtual character may enter a virtual scene or exit the ready state. If the virtual character is in the ready state, the virtual character is ready to enter combat, the triggering instruction of the virtual scene entering the game can be responded at the moment, the virtual character is controlled to carry out game fight matching, and the virtual scene entering the game is combated after the match is successful.

In addition to the virtual character controlled by the game player, the virtual scene of the game may include other virtual characters controlled by other game players, where the other virtual characters may be teammates or opponents of the virtual character controlled by the player.

Specifically, the player can click a designated control of the terminal device to enable the virtual character to enter a preparation state; the player can also put the virtual character into a ready state by turning over the terminal device.

The virtual character can be matched with the game battle after entering the preparation state, and the triggering instruction of the virtual scene of the game can be an instruction triggered when the game battle is successfully matched or an instruction triggered when the virtual scene of the game is generated. The terminal equipment responds to the trigger instruction, the virtual character can be controlled to enter a virtual scene, and the player can control the virtual character to fight in the virtual scene.

And step S304, in response to the fact that the terminal equipment is detected to turn over and the screen of the terminal equipment is determined to be shielded, controlling the virtual role to exit from the preparation state.

In this embodiment, both the step of "responding to the detection of the terminal device turning" and the step of "responding to the trigger instruction of the virtual scene entering the game" are under the condition that the virtual character processes the preparation state of the virtual scene to be entered, that is, when the virtual character in the game is detected to be in the preparation state of the virtual scene to be entered into the game, the virtual character is controlled to enter the virtual scene in response to the trigger instruction of the virtual scene entering the game; and when detecting that the virtual character in the game is in a ready state of a virtual scene to enter the game, controlling the virtual character to exit the ready state in response to detecting that the terminal equipment is turned over and determining that the screen of the terminal equipment is blocked.

That is, when the virtual character is in a ready state to enter the virtual scene, that is, the virtual character is ready, but the matching is not successful, whether the terminal device is turned over or not and whether the screen is blocked or not can be monitored.

The player can rotate the terminal device through the rotating operation, the terminal device can determine the rotating angle through the gyroscope, and if the rotating angle of the terminal device conforms to a certain range, the terminal device can be considered to be turned over, for example: the terminal equipment rotates 160-200 degrees along the Z axis, and the terminal equipment can be considered to be overturned.

The terminal equipment can also determine whether the screen of the terminal equipment is shielded or not through a light sensor, wherein the light sensor is generally in the same plane with the mobile phone screen, and the orientation of the light sensor is consistent. If the screen is shielded, the light sensor is also shielded, the light quantity collected by the light sensor is also lower, and whether the screen is shielded can be determined according to the light quantity collected by the light sensor.

When the terminal equipment is determined to turn over and the screen of the terminal equipment is shielded, the terminal equipment can control the virtual character to exit from the preparation state, and after the virtual character exits from the preparation state, the terminal equipment does not respond to the trigger instruction of the virtual scene of the game and does not control the virtual character to enter the virtual scene.

According to the game control method provided by the embodiment of the invention, when the terminal equipment detects that the terminal equipment is turned over and determines that the screen of the terminal equipment is shielded, the virtual character can be controlled to exit from the preparation state. In the mode, the player can control the virtual character to exit from the preparation state by the terminal equipment in a mode of turning over the terminal equipment and shielding the screen of the terminal equipment, the state of the virtual character can be changed without clicking the screen of the terminal equipment by fingers of the player, the interaction mode is simple, and the experience of the player can be improved.

As shown in fig. 4, a flow chart of another game control method in an alternative embodiment, the game control method in the alternative embodiment includes the steps of:

step S402, when detecting that the virtual character in the game is in the preparation state of the virtual scene to be entered into the game, responding to the trigger instruction of the virtual scene to be entered into the game, and controlling the virtual character to enter the virtual scene.

Specifically, in this embodiment, the player may make the virtual character enter the preparation state by clicking the control, for example: providing a first control through a graphical user interface; and responding to the touch operation aiming at the first control, and setting the virtual character to be in a preparation state of a virtual scene of the game.

The first control may be a virtual key and the graphical user interface may display the first control. The player can set the virtual character to be in a ready state of a virtual scene of the game through touch operation on the first control. The touch operation for the first control may be: single click, double click, long press.

In addition, after the virtual character enters the ready state, the terminal device may display a control for "canceling ready", which may be referred to as a "canceling ready" control, for the virtual character.

If the virtual character clicks the cancel preparation control after that, the preparation state is cancelled, and the terminal device can change the cancel preparation control into the prepare control in the game graphic user interface. The "cancel prepare" control and the "prepare" control may contain patterns, text, and the like.

Further, when the virtual character is set to be in a preparation state of a virtual scene of the game, the method further includes: and performing game match matching aiming at the virtual character. If the virtual character enters the ready state, the virtual character can be considered to be ready for fighting, and the terminal device can control the virtual character to match fighting, for example: and performing game match matching aiming at the virtual character.

It should be noted here that the virtual characters may perform battle matching alone or may perform battle matching in a team. For example: when the virtual characters are in a team game, when all the virtual characters in a game room are in a ready state and a team leader sends a game starting message, the battle matching is carried out on the game room.

When the virtual characters are in a team game, all the virtual characters in the game room are in a ready state, and the terminal device receives a game start confirmation message sent by a homeowner of the game room, the terminal device can consider that all the virtual characters in the game room are ready for fighting, at this time, team matching can be performed on all the virtual characters in the game room, and after the match is successful, all the virtual characters in the game room enter a virtual scene to perform the game.

For example: assuming that the number of teams in the game can be 5, the game room can contain up to 5 virtual characters. If 5 virtual characters are included in the game room and all of the 5 virtual characters are in a ready state, and the homeowner of the game room also sends a game start confirmation message, the 5 virtual characters may be set as teammates for which 5 opponents of the game are matched. If 3 virtual characters are included in the game room and all the 3 virtual characters are in a ready state, and the homeowner also sends a game start confirmation message, the 3 virtual characters may be set as teammates for which 2 teammates and 5 opponents of the game are matched.

The triggering instruction entering the virtual scene of the game may be an instruction triggered when the game battle matching is successful, and therefore, the method further includes: and when the message that the match of the game match is successful is detected, generating a trigger instruction for entering a virtual scene of the game. If a message that the match of the game match is successful is detected, the trigger instruction can be generated.

And S404, detecting whether the terminal equipment is overturned through the gyroscope, and detecting whether a screen of the terminal equipment is shielded through the light sensor.

In this embodiment, the direction and the angle of the terminal device rotation may be detected through the gyroscope, and generally, if the direction of the terminal device rotation is along the Z axis, and the rotation angle is close to 180 degrees, the terminal device may be considered to be turned over. Therefore, whether the terminal device is turned over can be detected by the following method: detecting the turning angle of the terminal equipment through a gyroscope; if the overturning angle accords with the preset angle range, the terminal equipment is overturned; if the turning angle does not accord with the angle range, the terminal equipment is not turned.

In this embodiment, the terminal device may determine a turning angle of the terminal device, where the turning angle may include a yaw angle, a pitch angle, and a roll angle. In this embodiment, a preset angle range may be set for the turning angle, and only when the specified turning angle meets the angle range, it may be considered that the terminal device is turned. For example: and setting the turning angle of the pitch angle as the angle range between 100 and 200 degrees, and if the turning angle of the pitch angle is 160 degrees in the turning angle of the gyroscope detection terminal equipment, determining that the terminal equipment is turned.

The light sensor may be oriented in the same direction as the screen of the terminal device, for example, the light sensor may be disposed above, below or behind the screen in the terminal device. Therefore, as long as the screen of the terminal device is shielded, the light sensor is also shielded. Whether the screen of the terminal device is blocked can be determined by the light entering amount collected by the light sensor, for example: determining the light inlet quantity of the terminal equipment through a light sensor; if the light incoming amount is larger than a preset intensity threshold value, the screen of the terminal equipment is not shielded; if the light entering amount is less than or equal to the intensity threshold value, the screen of the terminal equipment is blocked.

Step S406, in response to detecting that the terminal device is turned over and determining that the screen of the terminal device is shielded, controlling the virtual character to exit the preparation state.

If the terminal device detects that the terminal device is turned over and the screen of the terminal device is shielded, the virtual character can be controlled to exit the preparation state, and the terminal device cannot respond to a trigger instruction of entering a virtual scene of a game and cannot control the virtual character to enter the virtual scene.

When the virtual character is set to be in the ready state of the 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 a second control; and responding to the touch operation aiming at the second control, and controlling the virtual character to exit the preparation state.

The player can cause the virtual character to set the exit preparation state through touch operation of the second control. The touch operation for the second control may be: single click, double click, long press.

After the terminal device exits the virtual character from the ready state, the player can make the virtual character enter the ready state again by clicking the control or turning over the terminal device. For example: switching the second control to the first control; and responding to the touch operation aiming at the first control, and controlling the virtual character to enter a preparation state. Another example is: and controlling the virtual character to enter a preparation state in response to detecting that the terminal equipment is turned over and determining that the screen of the terminal equipment is not shielded.

The manner of clicking the control, and the manner of detecting that the terminal device is turned over and the screen of the terminal device is not shielded have been described above, and are not described herein again.

To sum up, the method provided by the embodiment of the present invention adds a new interaction method to the player, in addition to the method in which the player clicks the control of the terminal device to control the virtual character, so that the player can be given more choices: through terminal equipment's gyroscope and optical line sensors, transfer the rotation operation that the gyroscope discerned the user, utilize optical line sensors to discern whether the cell-phone screen is sheltered from, the player only need overturn terminal equipment, need not use the finger to click terminal equipment's screen and just can change virtual character's state, make virtual character get into or withdraw from the ready state, consequently, do not need the player to use the finger to click the screen of end equipment, the interactive mode is comparatively simple, can improve player's experience and feel. In addition, the terminal equipment generally comprises a gyroscope and a light sensor, so that the terminal equipment is convenient to popularize and high in practicability.

Corresponding to the above method embodiment, an embodiment of the present invention provides a game control apparatus, which provides a graphical user interface of a game through a terminal device, and as shown in fig. 5, the game control apparatus includes:

a virtual scene entering module 51, configured to, when it is detected that a virtual character in a game is in a ready state of a virtual scene to be entered into the game, respond to a trigger instruction of the virtual scene to be entered into the game, and control the virtual character to enter the virtual scene; and the number of the first and second groups,

and the ready state exit module 52 is configured to, in response to detecting that the terminal device is turned over and determining that the screen of the terminal device is blocked, control the virtual character to exit the ready state.

According to the game control device provided by the embodiment of the invention, when the terminal equipment detects that the terminal equipment is turned over and determines that the screen of the terminal equipment is shielded, the virtual character can be controlled to exit from the preparation state. In the mode, the player can control the virtual character to exit from the preparation state by the terminal equipment in a mode of turning over the terminal equipment and shielding the screen of the terminal equipment, the state of the virtual character can be changed without clicking the screen of the terminal equipment by fingers of the player, the interaction mode is simple, and the experience of the player can be improved.

Referring to fig. 6, a schematic structural diagram of another game control device is shown, the game control device further includes: a first control touch module 61 connected to the virtual scene entry module 51; a first control touch module 61, configured to provide a first control through a graphical user interface; and responding to the touch operation aiming at the first control, and setting the virtual character to be in a preparation state of a virtual scene of the game.

As shown in fig. 6, when the virtual character is set to be in a ready state of a virtual scene of the game, the control device of the game further includes: the single-player game matching module 62 is connected with the virtual scene entering module 51; and the single-player game matching module 62 is used for performing game match matching on the virtual characters.

As shown in fig. 6, when the virtual character is set to be in a ready state of a virtual scene of the game, the control device of the game further includes: the second control touch module 63 is connected with the ready state exit module 52; a second control touch module 63, configured to switch the first control to a second control; and responding to the touch operation aiming at the second control, and controlling the virtual character to exit the preparation state.

As shown in fig. 6, the game control device further includes: a multiplayer game matching module 64 connected with the virtual scene entry module 51; and a multiplayer game matching module 64, configured to match a game match for the game room when all the virtual characters in the game room where the virtual character is located are in a ready state and a game start confirmation message sent by the homeowner of the game room is received.

As shown in fig. 6, the game control device further includes: a trigger instruction generation module 65 connected to the virtual scene entry module 51; and the trigger instruction generating module 65 is configured to generate a trigger instruction for entering a virtual scene of the game when detecting that the match of the game match is successful.

As shown in fig. 6, the game control device further includes: the terminal device detection module 66, the virtual scene entering module 51, the terminal device detection module 66 and the preparation state exiting module 52 are connected in sequence; the terminal device detection module 66 is used for detecting whether the terminal device is turned over through the gyroscope; whether a screen of the terminal equipment is shielded or not is detected through the light sensor.

The terminal equipment detection module is used for detecting the turnover angle of the terminal equipment through a gyroscope; if the overturning angle accords with the preset angle range, the terminal equipment is overturned; if the turning angle does not accord with the angle range, the terminal equipment is not turned.

The orientation of the light sensor is the same as that of a screen of the terminal equipment, and the terminal equipment detection module is used for determining the light incoming amount of the terminal equipment through the light sensor; if the light incoming amount is larger than a preset intensity threshold value, the screen of the terminal equipment is not shielded; if the light entering amount is less than or equal to the intensity threshold value, the screen of the terminal equipment is blocked.

The game control device provided by the embodiment of the invention has the same technical characteristics as the game control method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.

The embodiment of the invention also provides electronic equipment, which is used for running the control method of the game; referring to fig. 7, the electronic device includes a memory 100 and a processor 101, where 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 game.

Further, the electronic device shown in fig. 7 further includes a bus 102 and a communication interface 103, and the processor 101, the communication interface 103, and the memory 100 are connected through the bus 102.

The Memory 100 may include a high-speed Random Access Memory (RAM) and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system 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, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 7, but this does not indicate only one bus or one type of bus.

The processor 101 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 101. The Processor 101 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. 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 foregoing embodiment in combination with the hardware thereof.

The embodiment of the present invention further provides a computer-readable storage medium, where 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 cause the processor to implement the control method for the game.

The game control method and apparatus and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and/or the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.

In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:对象处理方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类