Method and device for switching states in game

文档序号:866361 发布日期:2021-03-19 浏览:12次 中文

阅读说明:本技术 游戏中状态切换方法及装置 (Method and device for switching states in game ) 是由 武秋凝 李伟 于 2020-12-24 设计创作,主要内容包括:本发明实施例提供一种游戏中状态切换方法及装置,涉及计算机技术领域。通过终端提供图形用户界面,该图形用户界面包括游戏画面,所述终端处于第一姿态,所述游戏画面的状态为第一状态,然后,响应于所述终端由所述第一姿态切换为第二姿态的姿态切换操作,将所述游戏画面的状态由第一状态切换为第二状态。以此实现在游戏中,让玩家能够快捷、准确切换状态。(The embodiment of the invention provides a method and a device for switching states in a game, and relates to the technical field of computers. Providing a graphical user interface through a terminal, wherein the graphical user interface comprises a game picture, the terminal is in a first posture, the state of the game picture is in a first state, and then responding to posture switching operation of switching the terminal from the first posture to a second posture, and the state of the game picture is switched from the first state to a second state. Therefore, the player can quickly and accurately switch the states in the game.)

1. An in-game state switching method is characterized in that a terminal provides a graphical user interface, the graphical user interface comprises a game picture, the terminal is in a first posture, and the state of the game picture is a first state, and the method comprises the following steps:

and responding to the posture switching operation of the terminal for switching from the first posture to the second posture, and switching the state of the game picture from the first state to the second state.

2. The method of claim 1, wherein the first pose is a landscape screen pose and the second pose is a portrait screen pose; or the first posture is a vertical screen posture, and the second state is a horizontal screen posture.

3. The method according to claim 2, wherein prior to the step of switching the state of the game screen from the first state to the second state in response to a posture switching operation of the terminal from the first posture to the second posture, the method further comprises:

determining a target rotation angle of the current posture of the terminal relative to a reference posture of the first posture;

and when the target rotation angle is larger than a first preset threshold value, determining that the terminal is switched from the first posture to the second posture.

4. The method according to claim 3, wherein before the step of determining that the terminal is switched from the first posture to the second posture when the target rotation angle is greater than a preset threshold, the method further comprises:

and when the target rotation angle is larger than a second preset threshold value, displaying a state switching animation in the game picture, wherein the second preset threshold value is smaller than the first preset threshold value.

5. The method of claim 1, wherein the state of the game screen comprises a state of a target virtual object in the game screen.

6. The method of claim 5, wherein the state of the game screen further comprises a control for controlling the target virtual object.

7. The method of claim 6, wherein the first state corresponds to a first set of controls controlling the target virtual object, the first set of controls being directed to the terminal layout for the first pose; the second state corresponds to a second set of controls that control the target virtual object, the second set of controls being for the terminal layout of the second pose.

8. The method of claim 1, wherein the state of the game view comprises a game perspective.

9. The method of claim 8, wherein the game perspective includes a general perspective, a perspective, a first person perspective, and a third person perspective; the first state and the second state are any two of the above game views.

10. The method of claim 1, wherein the gui further comprises a switch mode control, and the step of switching the state of the game screen from the first state to the second state comprises:

determining whether the switching mode control is in a first mode;

and if the switching mode control is in the first mode, switching the state of the game picture from the first state to the second state.

11. The method according to claim 1, wherein the step of switching the state of the game screen from the first state to the second state in response to a posture switching operation of the terminal from the first posture to the second posture includes:

and in response to the gesture switching operation of switching the terminal from the first gesture to the second gesture, switching the state of the game picture from the first state to the second state when determining that the terminal returns to the first gesture again.

12. An in-game state switching apparatus, wherein a graphical user interface is provided by a terminal, the graphical user interface includes a game screen, the terminal is in a first posture, and a state of the game screen is a first state, the apparatus comprising:

and the switching module is used for responding to the posture switching operation of switching the first posture of the terminal into the second posture, and switching the state of the game picture from the first state into the second state.

13. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 11 when executing the computer program.

14. A computer readable storage medium having stored thereon machine executable instructions which, when invoked and executed by a processor, cause the processor to execute the method of any of claims 1 to 11.

Technical Field

The invention relates to the technical field of computers, in particular to a method and a device for switching states in games.

Background

In some hand games, the game character has a plurality of forms or states, and the operation mode and the playing method are different in different states.

How to switch the state of a game character in such a game, one existing solution is: switching is performed by clicking a game character state button in the screen.

In a Transformers research boxes game, the technical scheme for switching the role state is as follows: when the current state of the role is mechanical dinosaur, clicking a role state switching button below a screen, and switching the role from a dinosaur form to an armored car form; in a similar way, when the current state of the role is in the armored car state, the role state switching button is clicked, and the role is switched from the armored car state to the dinosaur state.

Although the above technical solution for switching the character state in the transforms research boxes game has only one step of operation, in the game process, because the attention of the player is concentrated on the screen body, the character state switching button at the edge may be blocked by the finger, and in the case of many other keys, some players may not accurately memorize and click the state switching button.

Further, click interactions in a hand game are very common, and it is still difficult to give a feeling of substitution and freshness to a player by switching character states using a click interaction method.

Disclosure of Invention

The invention aims to provide a method and a device for switching states in a game, which are used for relieving the technical problem of complex operation in the prior art.

In a first aspect, an embodiment of the present invention provides a method for switching states in a game, where a terminal provides a graphical user interface, the graphical user interface includes a game screen, the terminal is in a first posture, and a state of the game screen is a first state, and the method includes:

and responding to the posture switching operation of the terminal for switching from the first posture to the second posture, and switching the state of the game picture from the first state to the second state.

In an alternative embodiment, the first posture is a landscape screen posture, and the second posture is a portrait screen posture; or the first posture is a vertical screen posture, and the second state is a horizontal screen posture.

In an optional embodiment, before the step of switching the state of the game screen from the first state to the second state in response to a posture switching operation of the terminal from the first posture to the second posture, the method further comprises:

determining a target rotation angle of the current posture of the terminal relative to a reference posture of the first posture;

and when the target rotation angle is larger than a first preset threshold value, determining that the terminal is switched from the first posture to the second posture.

In an optional embodiment, before the step of determining that the terminal is switched from the first posture to the second posture when the target rotation angle is greater than a preset threshold, the method further includes:

and when the target rotation angle is larger than a second preset threshold value, displaying a state switching animation in the game picture, wherein the second preset threshold value is smaller than the first preset threshold value.

In an alternative embodiment, the state of the game screen comprises a state of a target virtual object in the game screen.

In an alternative embodiment, the state of the game screen further comprises a control for controlling the target virtual object.

In an alternative embodiment, the first state corresponds to a first set of controls controlling the target virtual object, the first set of controls being directed to the terminal layout for the first pose; the second state corresponds to a second set of controls that control the target virtual object, the second set of controls being for the terminal layout of the second pose.

In an alternative embodiment, the state of the game screen comprises a game perspective.

In an alternative embodiment, the game perspective includes a normal perspective, a perspective, a first person perspective, and a third person perspective; the first state and the second state are any two of the above game views.

In an optional embodiment, the graphical user interface further includes a switching manner control, and the step of switching the state of the game screen from the first state to the second state includes:

determining whether the switching mode control is in a first mode;

and if the switching mode control is in the first mode, switching the state of the game picture from the first state to the second state.

In an alternative embodiment, the step of switching the state of the game screen from the first state to the second state in response to a posture switching operation of the terminal from the first posture to the second posture includes:

and in response to the gesture switching operation of switching the terminal from the first gesture to the second gesture, switching the state of the game picture from the first state to the second state when determining that the terminal returns to the first gesture again.

In a second aspect, an embodiment of the present invention provides an in-game state switching apparatus, which provides a graphical user interface through a terminal, where the graphical user interface includes a game screen, the terminal is in a first posture, and a state of the game screen is a first state, and the apparatus includes:

and the switching module is used for responding to the posture switching operation of switching the first posture of the terminal into the second posture, and switching the state of the game picture from the first state into the second state.

In an alternative embodiment, the method further comprises: the determining module is used for determining a target rotation angle of the current posture of the terminal relative to a reference posture of the first posture; and when the target rotation angle is larger than a first preset threshold value, determining that the terminal is switched from the first posture to the second posture.

In an alternative embodiment, the determining module is further configured to: and when the target rotation angle is larger than a second preset threshold value, displaying the state switching animation in the game picture, wherein the second preset threshold value is smaller than the first preset threshold value.

In an alternative embodiment, the state of the game screen includes a state of a target virtual object in the game screen.

In an alternative embodiment, the state of the game screen further includes controls for controlling the target virtual object.

In an alternative embodiment, the first state corresponds to a first set of controls controlling the target virtual object, the first set of controls being directed to a terminal layout of the first pose; the second state corresponds to a second set of controls controlling the target virtual object, the second set of controls being for a terminal layout of a second pose.

In an alternative embodiment, the state of the game screen includes a game perspective.

In an alternative embodiment, the game perspective includes a normal perspective, a perspective, a first person perspective, and a third person perspective; the first state and the second state are any two of the above-described game views.

In an optional embodiment, the switching module is specifically configured to: determining whether the switching mode control is in a first mode; and if the switching mode control is in the first mode, switching the state of the game picture from the first state to the second state.

In an optional embodiment, the switching module is specifically configured to: and in response to the posture switching operation of the terminal for switching from the first posture to the second posture, switching the state of the game picture from the first state to the second state when the terminal is determined to return to the first posture again.

In a third aspect, an embodiment of the present invention provides a computer device, where the computer device includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the steps of the method in any one of the foregoing embodiments when executing the computer program.

In a fourth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon machine executable instructions, which, when invoked and executed by a processor, cause the processor to perform the method of any of the preceding embodiments.

The embodiment of the invention provides a method and a device for switching states in a game, wherein a terminal provides a graphical user interface, the graphical user interface comprises a game picture, the terminal is in a first posture, the state of the game picture is in the first state, and then the state of the game picture is switched from the first state to the second state in response to the posture switching operation of switching the terminal from the first posture to the second posture. Therefore, the player can quickly and accurately switch the states in the game.

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 shows a graphical user interface diagram of a touch terminal;

FIG. 2 is a schematic diagram illustrating an application scenario provided by an embodiment of the present application;

fig. 3 shows a schematic structural diagram of a mobile phone provided in an embodiment of the present application;

fig. 4 is a schematic view illustrating a usage scenario of a touch terminal according to an embodiment of the present application;

FIG. 5 is a schematic flow chart illustrating a method for switching states in a game according to an embodiment of the present disclosure;

FIG. 6 is a diagram illustrating an example of an in-game state switch according to an embodiment of the present disclosure;

fig. 7 is a schematic structural diagram of an in-game state switching device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.

Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the 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.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

At present, state switching is a common playing method in games, and an existing operating method for state switching is to give a button control, and a player clicks a button to perform state switching, as shown in fig. 1. However, when the interface content is more, more controls cannot be loaded, which results in a problem that limited interface resources occupy more. And under the condition that the priority of the state switching function is lower, a function button is added into the interface in a hard mode, so that the interface is extremely crowded, and the quality sense is reduced.

Based on this, the embodiment of the application provides a method and a device for switching states in a game and a computer device, and the technical problem that limited interface resources occupy more resources in the prior art can be solved through the method.

The in-game state switching method in the embodiment of the application can be applied to various types of computer equipment, such as a touch terminal and a non-touch terminal. The touch terminal can comprise a touch screen and a processor, wherein the touch screen is used for presenting a graphical user interface and receiving operation aiming at the graphical user interface.

In some embodiments, when the touch terminal operates the graphical user interface, the graphical user interface may be used to operate content local to the touch terminal, and may also be used to operate content of the peer server.

For example, as shown in fig. 2, fig. 2 is a schematic view of an application scenario provided in the embodiment of the present application. The application scenario may include a touch terminal (e.g., a cell phone 202) and a server 201, and the touch terminal may communicate with the server 201 through a wired network or a wireless network. The touch terminal is used for operating a virtual desktop, and can interact with the server 201 through the virtual desktop to implement operation on content in the server 201.

The touch terminal of the present embodiment is described by taking the mobile phone 202 as an example. The handset 202 includes a Radio Frequency (RF) circuit 210, a memory 220, a touch screen 230, a processor 240, and the like. Those skilled in the art will appreciate that the handset configuration shown in fig. 3 is not intended to be limiting and may include more or fewer components than those shown, or may combine certain components, or split certain components, or arranged in different components. Those skilled in the art will appreciate that the touch screen 230 belongs to a User Interface (UI) and that the cell phone 202 may include fewer or more User interfaces than shown.

The RF circuitry 210 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Message Service (SMS), and the like.

The memory 220 may be used for storing software programs and modules, and the processor 240 executes various functional applications and data processing of the mobile phone 202 by operating the software programs and modules stored in the memory 220. The memory 220 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the cellular phone 202, and the like. Further, the memory 220 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.

The touch screen 230 may be used to display a graphical user interface and receive user operations with respect to the graphical user interface. A particular touch screen 230 may include a display panel and a touch panel. The Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may collect contact or non-contact operations of a user on or near the touch panel (for example, as shown in fig. 4, operations of the user on or near the touch panel using any suitable object or accessory such as a finger 403, a stylus pen, etc.), and generate preset operation instructions. In addition, the touch panel may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction and gesture of a user, detects signals brought by touch operation and transmits the signals to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into information that can be processed by the processor, sends the information to the processor 240, and receives and executes commands sent from the processor 240. In addition, the touch panel may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, a surface acoustic wave, and the like, and may also be implemented by any technology developed in the future. Further, the touch panel may cover the display panel, a user may operate on or near the touch panel covered on the display panel according to a graphical user interface displayed by the display panel, the touch panel detects an operation thereon or nearby and transmits the operation to the processor 240 to determine a user input, and the processor 240 provides a corresponding visual output on the display panel in response to the user input. In addition, the touch panel and the display panel can be realized as two independent components or can be integrated.

The processor 240 is a control center of the mobile phone 202, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone 202 and processes data by operating or executing software programs and/or modules stored in the memory 220 and calling data stored in the memory 220, thereby performing overall monitoring of the mobile phone.

Some embodiments of the invention are described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.

Fig. 5 is a schematic flow chart of a method for switching states in a game according to an embodiment of the present invention. As shown in fig. 5, the method may include the steps of:

s510, providing a graphical user interface through the terminal, wherein the graphical user interface comprises a game picture, the terminal is in a first posture, and the state of the game picture is a first state.

The terminal comprises a terminal body, a terminal, a game control module and a game control module, wherein the terminal body is provided with a graphical user interface, the graphical user interface can be a graphical user interface corresponding to the game, which is provided by the terminal after the terminal starts the game, and based on the graphical user interface, a user can interact with the terminal or the game running in the terminal, so that the user can control the terminal or the game running in the terminal, and the terminal or the game responds to the control of the user.

After the terminal runs the game, a game picture corresponding to the game can be displayed in a graphical user interface. The game screen may correspond to an image of a game scene, controls for controlling the game, and other game-related information. The image of the game scene may include an image of an environment in the game, an image of a virtual object, and the like, the environment in the game may refer to a map of the game, some attachments on the map, and the like, the attachments may include ornaments, buildings, vegetation, and the like, and the virtual object may refer to a virtual article, a virtual animal, a virtual character, and the like related to the game process.

In an embodiment of the present invention, the state of the game screen may refer to the state of the game screen and/or the state of a control of the game. The details will be described later with reference to specific examples, and will not be described herein.

The attitude of the terminal may be determined based on a sensor, for example, the attitude of the terminal may be determined by an acceleration sensor, and the acceleration sensor may also adopt a 6-axis acceleration sensor.

The pose of the terminal in embodiments of the present invention may be divided by a range of pose values. For example, the range of the attitude value may be a range of a change indicating a designated attitude value, which may be an angle of rotation in the vertical direction or an angle of rotation in the horizontal direction, or the like, and when the change in the attitude value reaches the range of the attitude value, it is considered that the state is switched. The range of the attitude value may also be set according to the magnitude of the attitude value, for example, the attitude value may be an included angle between a vertical direction and a horizontal direction of the terminal, and different included angle ranges refer to different attitudes. And S520, responding to the posture switching operation of the terminal for switching from the first posture to the second posture, and switching the state of the game picture from the first state to the second state.

As one example, the first pose is a landscape screen pose and the second pose is a portrait screen pose; or the first posture is a vertical screen posture, and the second state is a horizontal screen posture. The landscape orientation may mean that the angle between the vertical direction and the horizontal direction of the terminal is smaller than a first specified value, which may be determined according to actual needs, for example, 30 °. The vertical screen posture may mean that an included angle between the vertical direction and the horizontal direction of the terminal is greater than a second specified value, and the second specified value may be determined according to actual needs, for example, 60 °.

In some embodiments, the switching logic between states and gestures may include a variety of implementations.

As an example, the first posture may be bound with a first state, and the second posture may be bound with a second state, in which case, the states of the game screen may be all the first state whenever the terminal is in the first posture, and the states of the game screen may be all the second state whenever the terminal is in the second posture.

As another example, a switching order of the states may be set in advance, and when the posture of the terminal changes, the state of the game screen is switched in accordance with the preset switching order every time the posture changes. For example, the switching order of the states of the game screen is a first state, a second state and a third state, the terminal can be switched between the first posture and the second posture, when the terminal is in the first posture, the game screen corresponding to the first state can be displayed, when the terminal is switched from the first state to the second state, the game screen corresponding to the second state can be switched to be displayed according to a preset switching order, when the terminal is switched from the second state to the first state, the game screen corresponding to the third state can be switched to be displayed according to the preset switching order, and so on, the switching can be performed in a circular manner.

It should be noted that, in the embodiment of the present invention, there may be a plurality of corresponding gestures of the terminal, and the first gesture and the second gesture may specify two or any two of the plurality of gestures of the terminal; the state of the game screen may include a plurality of states, and the first state and the second state may specify two states or any two states among the plurality of states of the game screen.

The embodiment of the invention provides a graphical user interface through a terminal, wherein the graphical user interface comprises a game picture, the terminal is in a first posture, the state of the game picture is in a first state, and then, the state of the game picture is switched from the first state to a second state in response to the posture switching operation of switching the terminal from the first posture to the second posture. Therefore, in the game, the change between the states of the game pictures is controlled through the posture change of the terminal, so that the player can quickly and accurately switch the states, the limited space in the screen can be saved to display more valuable contents, and the user experience is improved.

In some embodiments, the determination manner of the terminal posture switching may include multiple manners, and as an example, before step S520, the method may further determine that the terminal posture switching occurs by:

step a), determining a target rotation angle of the current posture of the terminal relative to a reference posture of the first posture;

and b), when the target rotation angle is larger than a first preset threshold value, determining that the terminal is switched from the first posture to the second posture.

For the step a), the current posture of the terminal may be a currently detected posture, the posture of the terminal may be detected in real time, and a degree of change of the current posture relative to the reference posture, that is, the target rotation angle, may be determined in real time.

The reference posture of the first posture may be determined according to actual needs, for example, the first posture is a landscape posture, and then the reference posture of the first posture may refer to a posture corresponding to a case where a vertical direction of the terminal is parallel to a horizontal direction. For another example, the first posture may be a vertical screen state, and then the reference posture of the first posture may refer to a posture corresponding to a case where the vertical direction of the terminal is perpendicular to the horizontal direction.

For the step b), the first preset threshold may be determined according to actual needs, for example, the first preset threshold may be 60 degrees. For example, when the first posture is in the landscape state, when it is detected that the included angle between the vertical direction and the horizontal direction of the terminal is greater than 60 degrees, it may be considered that the posture has been switched. When the first posture is in a vertical screen state, when the included angle between the vertical direction and the horizontal direction of the terminal is detected to be less than 30 degrees, the posture is considered to be switched.

As an example, as shown in fig. 6, when a player holds a mobile phone in a landscape mode during a game, the character state is an initial state a. When the player wants to control the character to change from the initial state A to the second state B, the mobile phone needs to be rotated by 90 degrees, and the way of holding the mobile phone is changed from a horizontal screen to a vertical screen. If the mobile phone needs to be switched back to the initial state A again, the mobile phone needs to be rotated by 90 degrees again, and the mode of holding the mobile phone is changed from a vertical screen to a horizontal screen. The player switches the role state by changing the mode of holding the mobile phone, and after the horizontal and vertical screen switching is carried out, the role state switching is finished, and the player can continue to continue the game operation in the state.

Compared with the starting point pressing interaction, the interaction mode of switching the horizontal and vertical screens has the feeling of 'state change', and the player can link the operation with the switching of the role states more easily. The gesture of rotating the mobile phone screen is not complicated, and compared with a common hand-game interaction mode, the interaction mode is more interesting and more interesting. Some can not be more suitable for vertical screens, some can not be more suitable for horizontal screens, and the interaction mode of converting the horizontal and vertical screens can contact two scenes of the horizontal and vertical screens in the same game, which is favorable for enriching and expanding the game playing method.

In addition, when switching the state, a switching process animation may be further displayed so as to reduce a sense of anxiety due to a switching time difference, and as an example, before the step b), the method may further include the steps of: and when the target rotation angle is larger than a second preset threshold value, displaying the state switching animation in the game picture, wherein the second preset threshold value is smaller than the first preset threshold value.

The second preset threshold may be, for example, 45 degrees according to actual needs. For example, when the first posture is in a landscape state, when it is detected that an included angle between the vertical direction and the horizontal direction of the terminal is greater than 45 degrees, a state switching animation may be displayed, when it is detected that the included angle between the vertical direction and the horizontal direction of the terminal is greater than 60 degrees, it is considered that the posture is switched, and then the second state is displayed, or when it is detected that the included angle between the vertical direction and the horizontal direction of the terminal is less than 30 degrees, it is considered that the posture is not switched, and then the first state is displayed. When the first posture is in a vertical screen state, when the included angle between the vertical direction and the horizontal direction of the terminal is detected to be smaller than 45 degrees, the state switching animation can be displayed, when the included angle between the vertical direction and the horizontal direction of the terminal is detected to be smaller than 30 degrees, the posture is considered to be switched, the second state is displayed, or when the included angle between the vertical direction and the horizontal direction of the terminal is detected to be larger than 60 degrees, the posture is considered not to be switched, and the first state is displayed.

In one embodiment, when the posture of the terminal is switched, a specified state among a plurality of states in the game screen may be switched. For example, the state of the game screen may include a state of a target virtual object in the game screen. When the posture of the terminal is switched, the state of the target virtual object can be switched, and the state of the target virtual object can comprise the display state, the control state, the form and the like of the target virtual object. For example, the target virtual object may correspond to a plurality of forms, and the target virtual object may be controlled to be switched between the plurality of forms by the posture of the terminal.

As another example, the state of the game screen may also include controls for controlling the target virtual object. The control method for the target virtual object may also be changed in applicability due to a change in the posture of the terminal. For another example, when the posture of the terminal changes, the form of the target virtual object and the control controlling the target virtual object are both switched.

As one example, the first state corresponds to a first set of controls controlling the target virtual object, the first set of controls being for a terminal layout of a first pose; the second state corresponds to a second set of controls controlling the target virtual object, the second set of controls being for a terminal layout of a second pose.

Because the screen of the terminal is generally not in the shape of a regular polygon or a circle, the mode of holding the terminal is generally changed after the gestures are switched, so that different control layouts are set for different gestures, so that the terminal is more suitable for corresponding holding operations, and the user experience is higher. In addition, if the form of the target virtual object is changed, the control logic corresponding to the target virtual object with different forms is different, so that the different controls can be arranged to adapt to the difference. The control logic for the target virtual object may refer to logic for controlling the motion of the target virtual object, logic for controlling the release skill of the target virtual object, and so on.

In some embodiments, the state of the game screen includes a game perspective. The game visual angle comprises a common visual angle, a perspective visual angle, a first person visual angle and a third person visual angle; the first state and the second state are any two of the above-described game views.

Due to the display of the screen shape of the terminal, after the posture is switched, the visual angle of the game can be changed to better adapt to the screen, so that different visual angles of the game can be set for different postures.

In addition, the change of the game visual angle can also bring the change of the playing method, so that the change of the game playing method can be realized through the change of the terminal posture, and the user experience is improved.

In some embodiments, the switching manner of the game screen may include multiple manners, the switching manner of controlling the state of the game screen through switching the posture of the terminal may be an optional manner, the switching manner of the game screen may be configured in advance, or may be set during the game process, the setting process may be set on a setting interface of the game, or may be set through a switching manner control set in a graphical user interface, at this time, the switching manner control may not be located in a core region, and the core region may refer to a region where the grip posture is easy to operate. As an example, the graphical user interface further includes a switching manner control, and based on this, the step S520 may be specifically implemented by the following steps: determining whether the switching mode control is in a first mode; and if the switching mode control is in the first mode, switching the state of the game picture from the first state to the second state. Wherein the first mode is used for indicating the switching mode of the game picture as controlling the switching of the state of the game picture through the switching of the posture of the terminal. The switching manner control may also correspond to other modes such as a second mode, for example, the second mode may be switching of the state of the game screen controlled by the control.

In some embodiments, the plurality of states of the game screen may be applicable only to a specified gesture of the terminal, which may be the first gesture. For example, regardless of how the state of the game screen is switched, the game screen is only for the terminal in the landscape state. In this case, the switching of the state of the game screen may be controlled by switching the posture of the terminal. For example, when the posture change of the terminal reaches a preset condition, the state switching is triggered, and when the terminal returns to the original posture (the first posture), the state of the game screen is switched, based on which, the step S520 can be specifically realized by the following steps: and in response to the posture switching operation of the terminal for switching from the first posture to the second posture, switching the state of the game picture from the first state to the second state when the terminal is determined to return to the first posture again.

As an example, when a player holds a mobile phone in a landscape mode in a game, the state of the character is a first state A. When a player wants to control the role to change from the initial state A to the second state B, the mobile phone needs to be rotated by 60-120 degrees, the mode of holding the mobile phone is changed from the horizontal screen to the vertical screen, then the mobile phone is rotated, and the mode of holding the mobile phone is changed from the vertical screen to the vertical screen. If the mobile phone needs to be switched back to the initial state A again, the mobile phone needs to be rotated by 60-120 degrees, the mode of holding the mobile phone is changed from the horizontal screen to the vertical screen, then the mobile phone is rotated back, and the mode of holding the mobile phone is changed from the vertical screen to the vertical screen.

Fig. 7 is a schematic structural diagram of a state switching device in a game according to an embodiment of the present invention. As shown in fig. 7, the apparatus may include:

and a switching module 701, configured to switch the state of the game screen from the first state to the second state in response to a posture switching operation of the terminal from the first posture to the second posture.

In some embodiments, the first pose is a landscape screen pose and the second pose is a portrait screen pose; or the first posture is a vertical screen posture, and the second state is a horizontal screen posture.

In some embodiments, further comprising:

the determining module is used for determining a target rotation angle of the current posture of the terminal relative to a reference posture of the first posture; and when the target rotation angle is larger than a first preset threshold value, determining that the terminal is switched from the first posture to the second posture.

In some embodiments, the determining module is further to: and when the target rotation angle is larger than a second preset threshold value, displaying the state switching animation in the game picture, wherein the second preset threshold value is smaller than the first preset threshold value.

In some embodiments, the state of the game screen includes a state of a target virtual object in the game screen.

In some embodiments, the state of the game screen further includes controls for controlling the target virtual object.

In some embodiments, the first state corresponds to a first set of controls controlling the target virtual object, the first set of controls being for a terminal layout of a first pose; the second state corresponds to a second set of controls controlling the target virtual object, the second set of controls being for a terminal layout of a second pose.

In some embodiments, the state of the game screen includes a game perspective.

In some embodiments, the gaming perspectives include a normal perspective, a perspective, a first person perspective, and a third person perspective; the first state and the second state are any two of the above-described game views.

In some embodiments, the switching module is specifically configured to:

determining whether the switching mode control is in a first mode;

and if the switching mode control is in the first mode, switching the state of the game picture from the first state to the second state.

In some embodiments, the switching module is specifically configured to:

and in response to the posture switching operation of the terminal for switching from the first posture to the second posture, switching the state of the game picture from the first state to the second state when the terminal is determined to return to the first posture again.

The in-game state switching device provided by the embodiment of the application has the same technical characteristics as the in-game state switching method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.

Corresponding to the method for switching the in-game state, an embodiment of the present application further provides a computer-readable storage medium, where a machine executable instruction is stored in the computer-readable storage medium, and when the machine executable instruction is called and executed by a processor, the computer executable instruction causes the processor to execute the steps of the method for switching the in-game state.

The in-game state switching device provided by the embodiment of the application can be specific hardware on the device, or software or firmware installed on the device, and the like. The device provided by the embodiment of the present application has the same implementation principle and technical effect as the foregoing method embodiments, and for the sake of brief description, reference may be made to the corresponding contents in the foregoing method embodiments where no part of the device embodiments is mentioned. It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the foregoing systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of one logic function, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

In addition, functional units in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

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 application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device to execute all or part of the steps of the movement control method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus once an item is defined in one figure, it need not be further defined and explained in subsequent figures, and moreover, the terms "first", "second", "third", etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.

Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the technical solutions of the present application, and the scope of the present application is not limited thereto, although the present application is described in detail with reference to the foregoing examples, 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 disclosed in the present application; such modifications, changes or substitutions do not depart from the scope of the embodiments of the present application. Are intended to be covered by the scope of the present application.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏中的数据处理方法、装置以及电子终端

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!

技术分类