Control layout method and apparatus, and computer device and storage medium
By displaying the current control layout and trigger position in mobile games, and automatically switching to a layout that suits the player's habits, the problem of low control layout efficiency is solved, improving the player's success rate and experience.
Patent Information
- Application Number
- PCT/CN2025/090071
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-25
- Filing Date
- 2025-04-21
- Publication Date
- 2026-01-02
AI Technical Summary
In mobile games, due to the different number and positions of controls and the different operating habits of players, there are frequent cases of unsuccessful clicks and erroneous clicks. Existing methods for adjusting the layout of controls are inefficient.
This paper provides a control layout method that displays the current layout and trigger position, responds to layout switching operations, and switches the control layout to a layout that conforms to the player's habits based on the trigger position, thereby reducing accidental touches and improving layout efficiency.
By intuitively displaying the results of player actions and accidental touches, the system automatically adjusts the control layout to suit player habits, reducing accidental touches and improving player experience and human-computer interaction rate.
Smart Images

Figure CN2025090071_02012026_PF_FP_ABST
Abstract
Description
Control layout method and device, computer device, and storage medium
[0001] The present application claims priority to the Chinese Patent Application No. 202410836278.6, filed on June 25, 2024, and entitled "Control Layout Method, Device, Computer Device, and Storage Medium", the entire contents of which are incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the technical field of computers, and in particular to a control layout method, device, computer device, and storage medium. BACKGROUND
[0003] With the development of computer technology, mobile games are becoming more and more abundant. Mobile games mainly rely on controls on the screen for interaction. Since the number of controls for each game is different, the size and position of the controls are different, and the operation habits of players are also different. During the game, players are prone to unsuccessful clicking, incorrect clicking, and the like. How to adjust the layout of controls (e.g., buttons) to adapt to the operation habits of players is a focus of research in the field. SUMMARY
[0004] The embodiments of the present application provide a control layout method, device, computer device, and storage medium, which not only helps to reduce the occurrence of object mis-touching, but also is simple to operate and can improve the layout efficiency of controls. The technical solution is as follows:
[0005] In one aspect, a control layout method is provided, which is executed by a computer device, and the method comprises:
[0006] displaying a first layout and at least two trigger positions, the first layout being a current layout of controls in a virtual game, and each trigger position being a position at which the controls are triggered by an object;
[0007] switching the first layout to a second layout in response to a layout switching operation, the second layout being a layout of the controls in the virtual game determined based on the at least two trigger positions;
[0008] displaying the controls in the virtual game based on the second layout in response to an application operation on the second layout.
[0009] In another aspect, a control layout device is provided, which comprises:
[0010] a first display module configured to display a first layout and at least two trigger positions, the first layout being a current layout of controls in a virtual game, and each trigger position being a position at which the controls are triggered by an object;
[0011] The switching module is configured to switch the first layout to a second layout in response to a layout switching operation, the second layout being a layout of the control in the virtual game determined based on the at least two trigger positions.
[0012] The second display module is configured to display the control in the virtual game based on the second layout in response to an application operation on the second layout.
[0013] In another aspect, a computer device is provided, which includes a processor and a memory, the memory being configured to store at least one piece of computer program, the at least one piece of computer program being loaded and executed by the processor to enable the computer device to implement the control layout method in the embodiments of the present application.
[0014] In another aspect, a non-volatile computer readable storage medium is provided, which stores at least one piece of computer program, the at least one piece of computer program being loaded and executed by a processor to enable a computer to implement the control layout method in the embodiments of the present application.
[0015] In another aspect, a computer program product is provided, which includes a computer program, the computer program code being stored in a non-volatile computer readable storage medium, a processor of a computer device reading the computer program from the non-volatile computer readable storage medium, the processor executing the computer program to enable the computer device to implement the control layout method in the embodiments of the present application.
[0016] The embodiments of the present application provide a control layout method, in the process of setting a control layout in a virtual game, a first layout of the control and a plurality of trigger positions of an object can be displayed, since the first layout reflects a current layout of the control in the virtual game and the plurality of trigger positions reflect trigger conditions of the object to the control, the first layout and the plurality of trigger positions are displayed simultaneously, so that the object can intuitively know successful trigger and mis-trigger conditions of the object to the control in the virtual game, that is, the object can know operation results of the object to the control; when the mis-trigger conditions are more in the operation results, the first layout can be switched to a second layout, since the second layout is determined based on the plurality of trigger positions, positions of the control in the second layout are more consistent with the trigger positions of the object, that is, more consistent with operation habits of the object, after the second layout is applied, the object is facilitated to reduce mis-trigger conditions, so as to improve game experience of the object, and further improve human-computer interaction rate; and by displaying the second layout and the plurality of trigger positions, the object can be intuitively shown the consistent conditions between the second layout and the operation habits of the object (that is, layout effects after switching), without manually adjusting the layout of the control, the current layout of the control in the virtual game can be directly replaced by the layout consistent with the operation habits of the object, and the layout efficiency of the control in the virtual game is improved. BRIEF DESCRIPTION OF DRAWINGS
[0017] FIG. 1 is a schematic diagram of an implementation environment of a control layout method according to an embodiment of the present application;
[0018] FIG. 2 is a flowchart of a control layout method according to an embodiment of the present application;
[0019] FIG. 3 is a flowchart of another control layout method according to an embodiment of the present application;
[0020] FIG. 4 is a schematic diagram of an anchor point range according to an embodiment of the present application;
[0021] FIG. 5 is a schematic diagram of a reference point according to an embodiment of the present application;
[0022] FIG. 6 is a schematic diagram of a screen adaptation according to an embodiment of the present application;
[0023] FIG. 7 is a schematic diagram of adjusting a control size according to an embodiment of the present application;
[0024] FIG. 8 is a schematic diagram of a detection range according to an embodiment of the present application;
[0025] FIG. 9 is a schematic diagram of a battle interface according to an embodiment of the present application;
[0026] FIG. 10 is a schematic diagram of determining a mis-touch ratio according to an embodiment of the present application;
[0027] FIG. 11 is a schematic diagram of a first display position according to an embodiment of the present application;
[0028] FIG. 12 is a schematic diagram of a third display position according to an embodiment of the present application;
[0029] FIG. 13 is a flowchart of determining a second layout according to an embodiment of the present application;
[0030] FIG. 14 is a schematic diagram of switching a layout according to an embodiment of the present application;
[0031] FIG. 15 is a schematic diagram of adjusting a control when the control is selected according to an embodiment of the present application;
[0032] FIG. 16 is a flowchart of switching a layout according to an embodiment of the present application;
[0033] FIG. 17 is a schematic diagram of applying a second layout according to an embodiment of the present application;
[0034] FIG. 18 is a block diagram of a control layout apparatus according to an embodiment of the present application;
[0035] FIG. 19 is a structural block diagram of a terminal according to an embodiment of the present application;
[0036] FIG. 20 is a structural diagram of a server according to an embodiment of the present application. DETAILED DESCRIPTION
[0037] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0038] In the present application, the terms "first", "second", and the like are used to distinguish the same or similar items with substantially the same function and action, and it should be understood that there is no logical or time sequence relationship between "first", "second", and "nth", and the number and execution order are not limited.
[0039] In the present application, the term "at least one" means one or more, and the term "multiple" means two or more. In some embodiments, "multiple" can also be referred to as "at least two".
[0040] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions. For example, the triggering positions involved in the present application are obtained under sufficient authorization.
[0041] At present, the layout of adjustment controls (such as buttons) is usually provided with custom functions. That is, the player adjusts the controls in the game according to his own operation habits. However, during the adjustment process, the player can only rely on his own subjective impression to repeatedly adjust, which is time-consuming and laborious, and needs to be tried several times to adapt to better solve the situation of unsuccessful clicking, wrong clicking, etc., which is low in efficiency.
[0042] The control layout method provided in the embodiments of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. First, taking the computer device as a terminal as an example, the implementation environment of the control layout method provided in the embodiments of the present application will be introduced, and FIG. 1 is a schematic diagram of an implementation environment of a control layout method according to an embodiment of the present application. Referring to FIG. 1, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.
[0043] In some embodiments, the terminal 101 is a smartphone, a tablet, a notebook, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle terminal, etc., but is not limited thereto. The terminal 101 is installed and runs an application supporting a virtual match. The application can be any one of a first-person shooting game (FPS), a third-person shooting game, a multiplayer online battle arena game (MOBA), a virtual reality application, a three-dimensional map program, or a multiplayer gun battle type survival game. Illustratively, the terminal 101 is a terminal used by a user to operate a virtual object located in a virtual scene of a virtual match to perform an activity, which includes but is not limited to at least one of adjusting a body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, and throwing. Illustratively, the virtual object is a virtual character, such as a simulated character role or an animation character role.
[0044] Those skilled in the art can know that the number of the terminal 101 can be more or less. For example, the terminal 101 can be only one, or the terminal 101 can be dozens or hundreds, or more. The number and type of the terminal 101 are not limited in the embodiments of the present application.
[0045] In some embodiments, the server 102 is a standalone physical server, can also be a server cluster or a distributed system composed of multiple physical servers, and can also be a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (Content Delivery Network), big data, and artificial intelligence platform. The server 102 is used to provide background services for the application supporting the virtual match. In some embodiments, the server 102 undertakes the main computing work, and the terminal 101 undertakes the secondary computing work; or the server 102 undertakes the secondary computing work, and the terminal 101 undertakes the main computing work; or the server 102 and the terminal 101 adopt a distributed computing architecture for collaborative computing.
[0046] FIG. 2 is a flowchart of a control layout method according to an embodiment of the present application, which can be executed by a computer device, which can be a terminal or a server. In other words, the control layout method can be executed by a terminal, a server, or both. In the embodiment of the present application, the control layout method is executed by a terminal, which includes the following steps 201 to 203:
[0047] 201. The terminal displays a first layout and at least two trigger positions, the first layout being a current layout of controls in a virtual match, and each trigger position being a position at which a control is triggered by an object.
[0048] In the embodiment of the present application, the virtual match includes at least one control. The object can participate in the virtual match through the at least one control. For example, in the virtual match, the object can control a virtual object in the virtual match to perform various activities such as walking, running, jumping, driving, and shooting through the at least one control in the virtual match.
[0049] In some embodiments, the terminal displays the first layout and the at least two trigger positions in the following manner: the terminal displays a control setting interface of the virtual match, and the control setting interface displays the first layout and the at least two trigger positions. In some embodiments, the at least two trigger positions can also be referred to as multiple trigger positions, that is, the control setting interface displays the first layout and the multiple trigger positions.
[0050] In the embodiment of the present application, the control setting interface is used to set the layout of the controls in the virtual match. For any control in the virtual match, the control setting interface can be used to set the display position of the control in the virtual match, the size of the control, and the transparency of the control, and the present application does not limit the same. The object can adjust the layout of the controls in the virtual match through the control setting interface.
[0051] For example, in response to a setting operation on the controls in the virtual match, the terminal displays the control setting interface of the virtual match, and the control setting interface displays the first layout and the at least two trigger positions. The control setting interface includes the current layout of the controls in the virtual match (i.e., the first layout) and the multiple trigger positions of the object for the controls in the virtual match. The controls displayed in the control setting interface are the same as the controls in the virtual match in terms of position, shape, and transparency. The multiple trigger positions can be displayed in the form of a dot, a triangle, or a square, and the present application does not limit the display form of the trigger position.
[0052] For any trigger position, the trigger position can be located on the control (i.e., there is an overlap between the trigger position and the control) or outside the control (i.e., there is no overlap between the trigger position and the control). If the trigger position is located on the control, it can indicate that the object accurately triggers the control; if the trigger position is located outside the control, it can indicate that the object mistakenly triggers the control. In this application, the "mistaken triggering" of any control refers to the case that the object does not successfully trigger the control, i.e., the object wants to trigger the control but does not successfully trigger the control due to the incorrect trigger position. By displaying the first layout and the plurality of trigger positions, the object can be intuitively shown the trigger situation of the object itself for the control in the virtual game.
[0053] It should be noted that the first layout and the at least two trigger positions are for each of the at least one control in the virtual game, i.e., for each of the at least one control in the virtual game, there is a corresponding first layout and at least two trigger positions. In other words, the terminal displaying the first layout and the at least two trigger positions means that the terminal displays the first layout and the at least two trigger positions corresponding to each of the at least one control in the virtual game. The first layout corresponding to any control is the current layout of the any control, and the at least two trigger positions corresponding to any control are the positions of the any control triggered by the object. The layout display, layout switching and layout application of each of the at least one control are the same, and the "control" appearing alone in the embodiments of the present application can be understood as any control of the at least one control in the virtual game unless otherwise specified.
[0054] It should be further noted that the at least one control in the virtual game mentioned in the embodiments of the present application refers to the control in the virtual game that supports adjusting the layout, i.e., the control in the virtual game that has at least two trigger positions. The virtual game can also include other controls in addition to the at least one control, and the other controls do not support adjusting the layout. While displaying the first layout and the at least two trigger positions corresponding to each of the at least one control, the layout of the other controls can also be displayed, and the layout of the other controls will not be switched by the layout switching operation.
[0055] 202. In response to the layout switching operation, the terminal switches the first layout to a second layout, and the second layout is the layout of the control in the virtual game determined based on the at least two trigger positions.
[0056] In the embodiments of the present application, when there is less overlap between the position of the control in the first layout and the at least two trigger positions, it indicates that the deviation between the position of the object operation (triggering) and the position of the control in the first layout is large, i.e., the first layout does not conform to the operation habit of the object. In this case, the object can switch the first layout to another layout.
[0057] In the embodiment of the present application, the terminal can determine the second layout based on the at least two trigger positions of the object for the control in the virtual game. Since the second layout is determined based on the at least two trigger positions, the positions of the control in the second layout are more consistent with the trigger positions of the object, that is, more consistent with the operation habits of the object. When the object switches the layout of the control in the virtual game, the terminal can switch the first layout to the second layout. That is, in the case where the layout switching operation is triggered, the terminal hides the first layout and displays the second layout in the control setting interface. At this time, the second layout and the at least two trigger positions are displayed in the control setting interface. By displaying the second layout and the multiple trigger positions, the terminal can intuitively show the object the consistent situation between the second layout and the operation habits of the object.
[0058] It should be noted that the second layout is also for each of the at least one control in the virtual game, that is, for each of the at least one control in the virtual game, there is a corresponding first layout, at least two trigger positions and a second layout. The second layout corresponding to any control is determined based on the at least two trigger positions corresponding to any control. In response to the layout switching operation, the terminal switches the first layout corresponding to each of the at least one control in the virtual game to the second layout corresponding to each of the control, respectively.
[0059] 203、In response to the application operation of the second layout, the terminal displays the control in the virtual game based on the second layout.
[0060] In the embodiment of the present application, in the case where the second layout is applied, the terminal adjusts the first layout in the virtual game to the second layout. That is, in the virtual game, the terminal displays the control at the position indicated by the second layout.
[0061] The control layout method provided in the embodiments of the present application can display (for example, in a control setting interface of the virtual match) the first layout of the control and the plurality of trigger positions of the object in the process of setting the control layout in the virtual match. Since the first layout reflects the current layout of the control in the virtual match and the plurality of trigger positions reflect the triggering conditions of the object for the control, the simultaneous display of the first layout and the plurality of trigger positions can intuitively show the successful triggering and the mis-triggering of the object for the control in the virtual match, that is, the object can know the operation result of the control. When the mis-triggering is more in the operation result, the first layout can be switched to the second layout. Since the second layout is determined based on the plurality of trigger positions, the position of the control in the second layout is more consistent with the trigger position of the object, that is, more consistent with the operation habit of the object. After the second layout is applied, the mis-triggering of the object can be reduced, thereby facilitating the match experience of the object and improving the human-computer interaction rate. Moreover, the display of the second layout and the plurality of trigger positions can intuitively show the object the consistency between the second layout and the operation habit of the object (that is, the layout effect after the switching), so that the current layout of the control in the virtual match can be directly replaced by the layout consistent with the operation habit of the object without manual adjustment of the object, thereby improving the layout efficiency of the control in the virtual match.
[0062] FIG. 3 is a flowchart of another control layout method according to an embodiment of the present application. In the embodiment of the present application, the control layout method is taken as an example performed by a terminal. The control layout method includes the following steps 301 to 304.
[0063] 301. The terminal acquires a first layout of a control in a virtual match and at least two trigger positions of an object. The first layout is the current layout of the control in the virtual match. Each trigger position is a position at which the control is triggered by the object.
[0064] In the embodiments of the present application, there can be one control, two controls or a plurality of controls in the virtual match, and the number of the controls in the virtual match is not limited in the embodiments of the present application. Different controls have different functions. For example, control 1 in the virtual match is used to control the movement of a virtual object in the virtual match, control 2 is used to control the shooting of the virtual object, and control 3 is used to control the crouching of the virtual object. For any control in the virtual match, the terminal can determine the display position of the control in the screen of the terminal (that is, the first layout of the control) according to the initial coordinates of the control, the size of the screen of the terminal, the anchor point range of the control, the size of the control, the reference point of the control and the screen adaptation parameter.
[0065] First, the initial coordinate of the control refers to the coordinate of the center point of the control stored in advance. The initial coordinate of the control is a coordinate preconfigured by a developer of the virtual match. The initial coordinates of various controls in the virtual match are coordinates of the various controls set in the same coordinate system.
[0066] Second, the size of the screen of the terminal refers to the size of the screen currently displaying the virtual match, including the length and width of the screen.
[0067] Third, the anchor range of the control is used to indicate the display position of the control in the screen. The anchor range belongs to a parameter of an engine supporting the virtual match. The engine supporting the virtual match can be UE4 (Unreal Engine 4) or UE5, and the like, and the embodiments of the present application do not limit this.
[0068] For example, FIG. 4 is a schematic diagram of an anchor range according to an embodiment of the present application. Referring to FIG. 4, for any control, there are a total of 9 anchor ranges available for the control to select. Each anchor range corresponds to a screen part. That is, the screen of the terminal can be divided into 9 parts. The anchor range and the screen part correspond to each other. The value of the anchor range (X, Y) is located in the interval [0, 1], and the values are all discrete. When X = 0, Y = 0, the anchor range is range 1, and the control is located in the screen part corresponding to range 1 (such as the upper left corner of the screen in the horizontal screen state); when X = 0.5, Y = 0.5, the anchor range is range 5, and the control is located in the screen part corresponding to range 5 (such as the center of the screen in the horizontal screen state); when X = 1, Y = 1, the anchor range is range 9, and the control is located in the screen part corresponding to range 9 (such as the lower right corner of the screen in the horizontal screen state). The number of anchor ranges (or screen parts) is not limited in the embodiments of the present application. The value of the anchor range (X, Y) is related to the number of anchor ranges. The more the number of anchor ranges, the more the value of the anchor range (X, Y).
[0069] Fourth, the size of the control refers to the display size of the control on the screen.
[0070] Fifthly, the reference point of a control refers to the alignment point of the control. The terminal can perform various alignment operations according to the reference point of the control. Alternatively, the screen part (or position) where the reference point of the control is located can be regarded as the screen part (or position) where the control is located. In other words, for any control, the terminal can display the control in the screen part corresponding to the anchor point range, and it is enough that the reference point of the control is located in the screen part corresponding to the anchor point range. Alternatively, the terminal can also align the display positions of multiple controls according to the reference points of the multiple controls, and the present application does not limit this. The coordinates of the reference point of the control are coordinates in the unit coordinate system where the control is located, and the value range is [0, 1]. The unit coordinate system where the control is located is a coordinate system in which the length of the control in the horizontal direction and the length of the control in the vertical direction are both regarded as 1 unit length. The origin of the unit coordinate system where the control is located can be set according to requirements. For example, for the case where the shape of the control is a rectangle, the upper left corner of the control can be regarded as the origin, or the lower right corner of the control can be regarded as the origin, or the center point of the control can be regarded as the origin. For the case where the shape of the control is a circle, the center point of the control can be regarded as the origin.
[0071] For example, FIG. 5 is a schematic diagram of a reference point provided by an embodiment of the present application. Referring to FIG. 5, when the coordinates (X, Y) of the reference point of the control are both 0, it indicates that the reference point of the control is the point at the upper left corner of the control, which can be seen from (a) in FIG. 5. When the coordinates (X, Y) of the reference point of the control are both 0.5, it indicates that the reference point of the control is the center point of the control, which can be seen from (b) in FIG. 5. When the coordinates (X, Y) of the reference point of the control are both 1, it indicates that the reference point of the control is the point at the lower right corner of the control, which can be seen from (c) in FIG. 5.
[0072] Sixthly, the screen adaptation parameter refers to the size of the UI (User Interface) of the virtual match from the edge of the screen. The screen adaptation parameter is used to adjust the size of the UI of the virtual match to adapt to the screen of the current terminal.
[0073] Exemplarily, the screen of the terminal corresponds to a two-dimensional coordinate system having an X axis and a Y axis, one of the X axis and the Y axis is parallel to the horizontal direction of the screen, and the other is parallel to the vertical direction of the screen. The size of the UI of the virtual game includes the size of the UI of the virtual game in the X axis direction and the size of the UI of the virtual game in the Y axis direction. The screen adaptation parameter can be used only to adjust the size of the UI of the virtual game in the X axis direction, only to adjust the size of the UI of the virtual game in the Y axis direction, or to adjust the size of the UI of the virtual game in the X axis direction and the size of the UI of the virtual game in the Y axis direction. In some embodiments, taking a mobile terminal as an example, the X axis can be the axis in the length direction in the horizontal screen state, and the Y axis can be the axis in the width direction in the horizontal screen state. In this case, the size of the UI of the virtual game in the X axis direction can also be referred to as the length of the UI of the virtual game, and the size of the UI of the virtual game in the Y axis direction can also be referred to as the width of the UI of the virtual game.
[0074] For example, FIG. 6 is a schematic diagram of screen adaptation provided by an embodiment of the present application. Referring to FIG. 6, the screen adaptation parameter (shown as "special-shaped screen adaptation" in FIG. 6) is used only to adjust the length (X axis) of the interface in the horizontal screen state, that is, only to adjust the length of the UI of the virtual game. When the screen adaptation parameter is 0, the UI elements in the virtual game are not indented on the left and right sides of the screen (in the horizontal screen state), as shown in (a) of FIG. 6. When the screen adaptation parameter is 100, the UI elements in the virtual game are indented by 100 pixels (px) on both sides of the screen, as shown in (b) of FIG. 6. The UI elements in the virtual game include any displayed elements such as the interface and controls of the virtual game.
[0075] In some embodiments, the display position of the control in the screen of the terminal refers to the display position of the center point of the control in the screen of the terminal (referred to as the display position of the center point of the control). The display position of the center point of the control can be represented by the coordinates of the display position of the center point of the control. The screen of the terminal corresponds to a two-dimensional coordinate system having an X axis and a Y axis, and the coordinates of the display position of the center point of the control include the X axis coordinate of the display position of the center point of the control and the Y axis coordinate of the display position of the center point of the control.
[0076] In some embodiments, the terminal can calculate the display position of each control in the screen of the virtual game by the following formula one.
[0077] Formula one: CenterX = PosX + ScreenX * AnchorsX + SizeX * (0.5 - AlignmentX) + 2 * (0.5 - AnchorsX) * UIAdjust CenterY = PosY + ScreenY * AnchorsY + SizeY * (0.5 - AlignmentY)
[0078] wherein, CenterX and CenterY are used to represent the coordinates of the display position of the control, CenterX represents the X-axis coordinate of the display position of the center point of the control, and CenterY represents the Y-axis coordinate of the display position of the center point of the control; PosX and PosY are used to represent the results of normalizing the initial coordinates of the control, and PosX and PosY can be stored in a log, for example; ScreenX and ScreenY are used to represent the size of the screen of the terminal; AnchorsX and AnchorsY are used to represent the anchor point range of the control, and the value range of AnchorsX and AnchorsY is [0, 1]; SizeX and SizeY are used to represent the size of the control; AlignmentX and AlignmentY are used to represent the coordinates of the reference point of the control, and the value range of AlignmentX and AlignmentY is [0, 1]; and UIAdjust is used to represent a screen adaptation parameter, and UIAdjust is only used to adjust the size of the UI of the virtual game in the X-axis direction.
[0079] In the embodiment of the present application, the terminal obtains at least two trigger positions of the object for the control in the virtual game. The at least two trigger positions can be positions triggered by the object in the historical virtual game, or can be positions triggered by the object in the current virtual game, and the present application does not limit this.
[0080] In some embodiments, for any control, the terminal can obtain at least two trigger positions of the control based on a detection range of the control. The detection range is used to detect whether the operation triggered by the object is an operation on the control. The at least two trigger positions of the control are located in the detection range. That is, for any control in the virtual game, if the trigger position of the object is located in the detection range of the control, the terminal determines that the operation corresponding to the trigger position is an operation on the control. If the trigger position of the object is located outside the detection range of the control, the terminal determines that the operation corresponding to the trigger position is not an operation on the control. The scheme provided in the embodiments of the present application only determines the operation as the operation on the control when the trigger position is located in the detection range of the control, thereby avoiding determining the operation deviating from the control as the operation on the control. Since the operation deviating from the control is likely to be an operation on other controls rather than the control, the above manner can accurately determine the operation (trigger) of the object on the control, thereby facilitating the terminal to provide the object with a layout more in line with the operation habit of the object.
[0081] Exemplarily, the detection range of the control is positively correlated with the display size of the control. The larger the display size of the control is, the larger the detection range of the control is. The smaller the display size of the control is, the smaller the detection range of the control is. The display size of the control can be determined based on a reference size of the control and a scaling multiple of the control. The reference size of the control is a pre-set size of the control. The scaling multiple of the control is a scaling multiple of the reference size of the control, which can be customized by the object, and the embodiments of the present application do not limit the scaling multiple.
[0082] For example, FIG. 7 is a schematic diagram of adjusting the size of a control according to an embodiment of the present application. Referring to FIG. 7, a control setting interface can be used to adjust the size of the control. The terminal displays a control adjustment panel 701 and the control in the virtual game in the control setting interface. When the control 702 is selected, the terminal displays the scaling control 703 and the scaling multiple of the control 702 in the control adjustment panel 701. Referring to (a) in FIG. 7, the scaling multiple of the current control 702 is 100%. That is, the display size of the current control 702 is the reference size. In response to a right swipe operation on the scaling control 703, the terminal increases the scaling multiple to 250%. Then, the terminal displays the control 702 enlarged by 250% in the control setting interface 701, which can be seen from (b) in FIG. 7.
[0083] In some embodiments, the terminal can determine the detection range of the control by the following implementation manner: determining a response range of the control based on the display size of the control; and determining the detection range of the control based on the response range of the control.
[0084] The display size of the control refers to the display size of the control in the first layout, and is used to indicate the size of the control in the first layout. The display size of the control is not limited in the present application. For example, the display size of the control can be represented by the radius of the control if the shape of the control is a circle, or by the length and width of the control if the shape of the control is a rectangle.
[0085] The response range of the control refers to the area range that the control can perceive and respond to when the object interacts with the control. That is, the control will respond only when the trigger position of the object is in the response range. The present application does not limit the implementation of determining the response range of the control based on the display size of the control. For example, the implementation of determining the response range of the control based on the display size of the control can be that the display area where the control is located is determined based on the display size of the control, and the range covered by the display area where the control is located is taken as the response range of the control. For example, the implementation of determining the response range of the control based on the display size of the control can also be that the display area where the control is located is determined based on the display size of the control, and the minimum rectangular range covering the display area is taken as the response range of the control.
[0086] In some embodiments, the detection range of the control is positively correlated with the response range of the control. In other words, the larger the response range of the control is, the larger the detection range of the control is, and the smaller the response range of the control is, the smaller the detection range of the control is.
[0087] In some embodiments, the center of the detection range of the control, the center of the response range of the control, and the center of the control coincide. The size of the detection range of the control is greater than the size of the response range of the control, and the size of the response range of the control is not less than the display size of the control.
[0088] In some embodiments, the detection range of the control has the same shape as the response range of the control, and the distance between the boundary of the detection range of the control and the corresponding boundary of the response range of the control is a reference distance. The detection range of the control can be determined according to the response range of the control and the reference distance. The reference distance can be set according to experience or adjusted flexibly according to the application scenario, which is not limited in the present application. For example, the reference distance can be 24px.
[0089] In some embodiments, the terminal can calculate the detection range of the control by the following formula two.
[0090] Formula two: Range = Size * Scale + SizeAdd
[0091] wherein Range is used to represent the detection range of the control; Size is used to represent the reference size of the control; Size*Scale is used to represent the response range of the control determined based on the display size of the control; Scale is used to represent the scale of the control; and SizeAdd is used to represent the difference between the response range and the detection range of the control, which is a constant, and SizeAdd can be 24px, which is not limited in the embodiments of the present application. Illustratively, the difference between the response range and the detection range of the control refers to the distance between the boundary of the response range and the corresponding boundary of the detection range, that is, SizeAdd refers to the reference distance mentioned above.
[0092] For example, FIG. 8 is a schematic diagram of a detection range according to an embodiment of the present application. Referring to FIG. 8, the black dashed box is used to represent the response range of the control 801. Only when the trigger position of the object is located in the response range, the control 801 will respond. The black solid box is used to represent the detection range of the control 801. The center of the detection range, the center of the response range and the center of the control 801 coincide. The size of the detection range is greater than the size of the response range. The difference between the boundary of the detection range and the boundary of the response range is SizeAdd / 2, that is, 12px.
[0093] For any control in the virtual game, the terminal determines the trigger position of the object for the control based on the detection range of the control. That is, the terminal takes the trigger position in the detection range of the control as the trigger position of the object for the control.
[0094] 302. The terminal displays the first layout and the at least two trigger positions.
[0095] Illustratively, the implementation manner in which the terminal displays the first layout and the at least two trigger positions can be that the terminal displays a control setting interface of the virtual game, and the control setting interface displays the first layout and the at least two trigger positions.
[0096] In the embodiments of the present application, the terminal displays the control setting interface based on the first layout of the control in the virtual game and the at least two trigger positions of the object for the control. The object can set the layout of the control in the virtual game through the control setting interface.
[0097] Exemplarily, the object can set the layout of the control in the virtual game before the virtual game starts, or the object can also set the layout of the control in the virtual game during the process of the virtual game, and the embodiment of the application does not limit the timing of the object setting the layout of the control. Correspondingly, the terminal can display the first layout and the at least two trigger positions before the virtual game starts. Alternatively, the terminal can also display the first layout and the at least two trigger positions during the process of the virtual game, and the embodiment of the application does not limit the display timing of the first layout and the at least two trigger positions.
[0098] Exemplarily, for the case of displaying the first layout and the at least two trigger positions through the control setting interface, the terminal can display the control setting interface before the virtual game starts. Alternatively, the terminal can also display the control setting interface during the process of the virtual game, and the embodiment of the application does not limit the display timing of the control setting interface.
[0099] In the embodiment of the application, the terminal can display the first layout and the at least two trigger positions at any timing in response to the operation of the object, so that the object can randomly set the layout of the control in the virtual game. Alternatively, the terminal can also display the first layout and the at least two trigger positions according to the operation of the object, so that the object sets the layout of the control in the virtual game when the object has more false touch operations. The embodiment of the application does not limit the display condition of the first layout and the at least two trigger positions.
[0100] In some embodiments, the terminal can display the first layout and the at least two trigger positions in response to the operation of the object. Correspondingly, the process of the terminal displaying the first layout and the at least two trigger positions includes that the terminal displays the first layout and the at least two trigger positions in response to the setting operation of the control in the virtual game, and the setting operation is used to set the layout of the control in the virtual game.
[0101] The setting operation of the control in the virtual game is an operation initiated by the object to set the layout of the control in the virtual game, in this case, the process of displaying the first layout and the at least two trigger positions is controlled by the object, which has a high degree of matching with the subjective will of the object and a good display effect.
[0102] In the exemplary embodiment, the method further includes: displaying a first setting control in a preparation interface of the virtual game, and the first setting control is used to set the layout of the control in the virtual game. In this case, the setting operation of the control in the virtual game includes a trigger operation of the first setting control, that is, the first layout and the at least two trigger positions are displayed in response to the trigger operation of the first setting control.
[0103] Exemplarily, for the case that the first layout and the at least two trigger positions are displayed through the control setting interface, the terminal displays the control setting interface before the virtual match starts. Accordingly, the process in which the terminal displays the control setting interface of the virtual match includes: in the preparation interface of the virtual match, the terminal displays the first setting control. The first setting control is used to set the layout of the control in the virtual match. Then, in response to the trigger operation on the first setting control, the terminal displays the control setting interface.
[0104] The preparation interface can be a lobby interface of the virtual match or a settlement interface of the last virtual match, and the embodiments of the present application do not limit this. Before any virtual match starts, the terminal obtains the trigger positions of the object for the control in the historical virtual match before the virtual match, and then the terminal displays the trigger positions of the object for the control in the historical virtual match in the control setting interface. For example, before each virtual match starts, the terminal obtains the trigger positions of the object for the control in the last virtual match and displays them in the control setting interface, so that the layout of the control in the virtual match can be based on the trigger positions of the object for the control in the historical virtual match, so as to make the control layout conform to the operation habit of the object. The scheme provided in the embodiments of the present application can display the trigger of the object for the control in the historical virtual match in the control setting interface before each virtual match starts, so that the operation of the object for the control can be intuitively displayed, and the layout of the control can be based on the operation of the object, so as to make the layout of the control in the virtual match to be performed conform to the operation habit of the object, thereby reducing the misoperation of the object and improving the match experience of the object.
[0105] For example, FIG. 9 is a schematic diagram of a preparation interface according to an embodiment of the present application. Referring to FIG. 9, the first setting control 901 and the prompt information 902 are displayed in the preparation interface. The prompt information 902 is "here you can quickly enter the control setting interface", which is used to prompt that the object can directly enter the control setting interface by clicking the first setting control 901. The display position of the first setting control 901 is not limited in the embodiments of the present application. The virtual object 903 selected by the object and the start control 904 can also be displayed in the preparation interface. In the case that the start control 904 is triggered, the terminal can display the virtual scene of the virtual match.
[0106] In the exemplary embodiments, the method further includes: displaying a second setting control in the virtual scene of the virtual match, and the second setting control is used to set the layout of the control in the virtual match. In this case, the setting operation on the control in the virtual match includes the trigger operation on the second setting control, that is, in response to the trigger operation on the second setting control, the first layout and the at least two trigger positions are displayed.
[0107] Exemplarily, for the case that the first layout and the at least two trigger positions are displayed through the control setting interface, the terminal displays the control setting interface in the process of the virtual game. Accordingly, the process in which the terminal displays the control setting interface of the virtual game includes: in the virtual scene of the virtual game, the terminal displays a second setting control. The second setting control is used to set the layout of the control in the virtual game. In response to the trigger operation on the second setting control, the terminal displays the control setting interface.
[0108] That is, in the process of any virtual game, the terminal acquires the trigger positions of the object in the virtual game for the control, and then displays the trigger positions of the object in the virtual game for the control in the control setting interface. The display position of the second setting control is not limited in the embodiments of the present application. The scheme provided in the embodiments of the present application can display the trigger of the object for the control in the control setting interface in the process of each virtual game, so that the operation of the object for the control can be intuitively displayed, and the layout of the control in the virtual game can be set according to the operation of the object, so as to make the layout of the control in the virtual game meet the operation habit of the object, reduce the mis-touch of the object, and thus improve the game experience of the object.
[0109] In the exemplary embodiments, the setting operation of the control in the virtual game can also be that the object generates a specific operation in the handle, and the specific operation is used to indicate the layout of the control in the virtual game. The specific operation can be set according to experience or flexibly adjusted according to application scenarios, which is not limited in the embodiments of the present application. The handle is a controller used by the object to perform human-computer interaction with the terminal, and the object can control the virtual object to move in the virtual environment through the joystick, the key, the trigger and other components in the handle. Exemplarily, the specific operation can be an operation of pressing a specific key in the handle, an operation of pressing multiple keys in the handle at the same time, or an operation of pressing multiple keys in the handle in a specific order, etc.
[0110] In the exemplary embodiments, the setting operation of the control in the virtual game can also be that the object issues a layout setting voice or makes a layout setting gesture. The layout setting voice is a voice used to set the layout of the control in the virtual game, and the layout setting gesture is a gesture used to set the layout of the control in the virtual game. The layout setting voice and the layout setting gesture can be set according to experience or flexibly adjusted according to application scenarios, which is not limited in the embodiments of the present application.
[0111] In some embodiments, the terminal can display the first layout and the at least two trigger positions according to an operation condition of the object. Accordingly, the process in which the terminal displays the first layout and the at least two trigger positions includes that the terminal determines an operation failure level of the object based on the at least two trigger positions. The operation failure level is used to represent a possibility of the object touching the control by mistake. Then, the terminal displays the first layout and the at least two trigger positions in a case where the operation failure level of the object meets a failure condition.
[0112] Exemplarily, for a case where the first layout and the at least two trigger positions are displayed through the control setting interface, the control setting interface is displayed in a case where the operation failure level of the object meets the failure condition.
[0113] The operation failure level of the object is higher, the greater the possibility of the object touching the control by mistake is. The failure condition can be that the operation failure level of the object reaches a preset level, which is not limited by the embodiments of the present application. The scheme provided by the embodiments of the present application determines the possibility of the object touching the control by mistake according to the trigger positions of the object for the control, and displays the control setting interface in a case where the possibility of the object touching the control by mistake is high, so as to set the layout of the control through the control setting interface, so that the layout of the control in the virtual game conforms to the operation habit of the object, which is beneficial to reducing the case where the object touches by mistake, thereby facilitating to improve the game experience of the object.
[0114] In some embodiments, in the process of determining the operation failure level of the object, the terminal can determine a number of target positions in the at least two trigger positions based on a response range of the control. The target position is a trigger position located outside the response range. The target position is used to represent the trigger position when the control is touched by mistake. Then, the terminal determines the operation failure level of the object based on a total number of the at least two trigger positions and the number of the target positions. The scheme provided by the embodiments of the present application determines the positions (i.e., the target positions) that are not successfully triggered in the multiple trigger positions of the control through the response range of the control, so that the number of the target positions can accurately reflect the number of times of touching by mistake in the multiple times of triggering the control by the object, thereby being able to accurately determine the possibility of the object touching the control by mistake, that is, to improve the accuracy of the operation failure level.
[0115] In the process of determining the operation failure level of the object based on the total number of the at least two trigger positions and the number of the target positions, the terminal can determine the proportion of the target positions in the at least two trigger positions based on the total number of the at least two trigger positions and the number of the target positions. Then, the terminal determines the risk score of the control based on the proportion of the target positions in the at least two trigger positions. The risk score is used to represent the possibility of the control being mistakenly triggered. Then, the terminal determines the operation failure level of the object based on the risk score of the control. The operation failure level is proportional to the risk score. The scheme provided in the embodiments of the present application can accurately reflect the probability of the object mistakenly triggering the control in multiple triggers of the control, so as to accurately determine the possibility of the control being mistakenly triggered, and then accurately determine the possibility of the object mistakenly triggering the control, and improve the accuracy of the operation failure level.
[0116] Exemplarily, the proportion of the target positions of the control in the at least two trigger positions can be regarded as the mistaken trigger proportion of the control. The proportion of the target positions of the control in the at least two trigger positions refers to the ratio of the number of the target positions to the total number of the at least two trigger positions.
[0117] Exemplarily, the risk score of the control is proportional to the mistaken trigger proportion of the control, that is, the higher the mistaken trigger proportion of the control, the higher the risk score of the control, that is, the higher the possibility of the control being mistakenly triggered. There can be a corresponding relationship between the risk score of the control and the mistaken trigger proportion of the control. Then, after calculating the mistaken trigger proportion of the control, the terminal can determine the corresponding risk score from the corresponding relationship. The manner of determining the risk score is not limited in the embodiments of the present application. In some embodiments, the risk score can also be referred to as a risk score.
[0118] For example, FIG. 10 is a schematic diagram of determining the mistaken trigger proportion according to an embodiment of the present application. Referring to FIG. 10, the black dashed box is used to represent the response range of the control 1001. The black solid box is used to represent the detection range of the control 1001. The multiple trigger positions (black dots) in the black solid box are the trigger positions of the object to the control 1001. The trigger positions (black dots) in the black dashed box are the positions of the object successfully triggering the control 1001. The trigger positions (black dots) between the black solid box and the black dashed box are the positions (i.e., the target positions) of the object mistakenly triggering the control 1001. As shown in FIG. 10, there are 3 trigger positions in the black dashed box, and there are 2 trigger positions between the black solid box and the black dashed box, so the mistaken trigger proportion of the control 1001 is 2 / (3+2)=40%.
[0119] If the risk score rule of the control is: when the mis-touch ratio >= 50%, the risk score of the control is 15, which belongs to high mis-touch risk; when 50% > mis-touch ratio >= 35%, the risk score of the control is 5, which belongs to medium mis-touch risk; when 35% > mis-touch ratio >= 20%, the risk score of the control is 3, which belongs to low mis-touch risk; and when the mis-touch ratio < 20%, the risk score of the control is 0, which belongs to non-mis-touch risk. Then the risk score of the control 1001 shown in FIG. 10 is 5, which belongs to medium mis-touch risk.
[0120] In the case where there is only one control in the virtual game, the terminal can determine the operation failure level of the object based on the risk score of the control. The implementation manner of the present application embodiment for determining the operation failure level of the object based on the risk score of the control is not limited, as long as the operation failure level of the object is proportional to the risk score. Illustratively, the risk score of the control is taken as the operation failure level of the object. Illustratively, the product of the risk score of the control and a reference coefficient is taken as the operation failure level of the object, and the reference coefficient can be any positive number.
[0121] In the case where there are multiple controls in the virtual game, the terminal can determine the operation failure level of the object based on the risk scores of the multiple controls. Illustratively, the implementation manner of determining the operation failure level of the object based on the risk scores of the multiple controls can be: taking the sum of the risk scores of the multiple controls as the operation failure level of the object; or taking the weighted sum of the risk scores of the multiple controls as the operation failure level of the object. The weight corresponding to the risk score of each control can be set according to experience, or can be flexibly adjusted according to the application scenario. For example, the weight corresponding to the risk score of the control is proportional to the display size of the control, that is, the larger the display size of the control, the greater the role of the risk score of the control in determining the operation failure level of the object, so that the operation failure judgment process pays more attention to the situation that the control with large display size is mis-touched, and the reliability of the operation failure judgment result is improved.
[0122] For example, there are three controls, control 1, control 2 and control 3, in the virtual game. The mis-touch ratio of control 1 >= 20% and < 35%, and the risk score of control 1 is 3; the mis-touch ratio of control 2 >= 50%, and the risk score of control 2 is 15; and the mis-touch ratio of control 3 < 20%, and the risk score of control 3 is 0. Then the terminal sums the risk scores of all controls in the virtual game, and obtains that the operation failure level of the object is 18. Assuming that the failure condition is that the operation failure level of the object reaches a preset level, and the preset level is 15, since the operation failure level of the object 18 exceeds the preset level 15 (failure condition), in this case, the terminal can display the first layout and at least two trigger positions, for example, display the first layout and at least two trigger positions through the control setting interface.
[0123] Exemplarily, based on the total number of the at least two trigger positions and the number of the target positions, the implementation manner of determining the operation failure level of the object can also be: determining a mis-touch proportion of the control based on the total number of the at least two trigger positions and the number of the target positions; and determining the operation failure level of the object according to the mis-touch proportion of the control and a corresponding relationship between the mis-touch proportion and the failure level. The corresponding relationship between the mis-touch proportion and the failure level can be set according to experience or flexibly adjusted according to an application scenario, and the embodiments of the present application do not limit this, as long as the failure level is proportional to the mis-touch proportion.
[0124] In the case where there is only one control in the virtual game, the terminal can determine, according to the corresponding relationship between the mis-touch proportion and the failure level, a failure level corresponding to the mis-touch proportion of the control, and take the failure level as the operation failure level of the object.
[0125] In the case where there are multiple controls in the virtual game, the terminal can determine, according to the corresponding relationship between the mis-touch proportion and the failure level, a failure level corresponding to the mis-touch proportion of each control respectively; and determine the operation failure level of the object based on the failure level corresponding to the mis-touch proportion of each control respectively. Exemplarily, a sum or a weighted sum of the failure levels corresponding to the mis-touch proportion of each control respectively is taken as the operation failure level of the object. Exemplarily, an average value of the failure levels corresponding to the mis-touch proportion of each control respectively is taken as the operation failure level of the object.
[0126] Exemplarily, for the case where the first layout and the at least two trigger positions are displayed through the control setting interface, when the operation failure level of the object meets the failure condition, the terminal can directly jump to the control setting interface. This manner can improve the display efficiency of the control setting interface, so as to timely set the control layout. Alternatively, when the operation failure level of the object meets the failure condition, the terminal can display a setting control (the first setting control or the second setting control) to remind the object that the control layout in the virtual game can be set through the setting control. In response to a trigger operation on the setting control, the terminal displays the control setting interface. Compared with the scheme of directly jumping to the control setting interface, this manner pays more attention to the intention of the object.
[0127] 303、In response to the layout switching operation, the terminal switches the first layout to a second layout, and the second layout is a layout of the control in the virtual game determined based on the at least two trigger positions.
[0128] The layout switching operation is used to instruct the layout of the switching control. Embodiments of the present application do not limit the type of the layout switching operation. Illustratively, the layout switching operation can include a triggering operation on the switching control, and the switching control can be displayed in the control setting interface. Illustratively, the layout switching operation can also include the object issuing a layout switching voice, the layout switching voice being a voice used to instruct the layout of the switching control. Illustratively, the layout switching operation can also include the object making a layout switching gesture, the layout switching gesture being a gesture used to instruct the layout of the switching control. The layout switching voice and the layout switching gesture can be set according to the application or flexibly adjusted according to the application scenario, and embodiments of the present application do not limit this.
[0129] Illustratively, in response to the layout switching operation, the terminal switches the first layout to the second layout in the following manner: in response to the layout switching operation, the terminal switches the first layout to the second layout in the control setting interface, and the second layout is the layout of the control in the virtual match determined based on the at least two triggering positions of the object.
[0130] In embodiments of the present application, the terminal can determine the second layout based on the at least two triggering positions of the object when the object triggers the layout switching operation. Alternatively, the terminal can also determine the second layout based on the at least two triggering positions of the object before the object triggers the layout switching operation; after the object triggers the layout switching operation, the terminal can directly display the second layout, for example, directly display the second layout in the control setting interface. Embodiments of the present application do not limit the timing of determining the second layout.
[0131] In embodiments of the present application, the terminal can determine the second layout based on only the at least two triggering positions of the object. Alternatively, the terminal can also determine the second layout based on the at least two triggering positions of the object and the first layout. Embodiments of the present application do not limit the manner of determining the second layout.
[0132] In some embodiments, the terminal determines the second layout based on the at least two trigger positions of the object. Accordingly, the process of determining the second layout by the terminal includes: for any control in the virtual game, the terminal averages the at least two trigger positions of the control to obtain a display position of the control. Exemplarily, each trigger position of the control corresponds to a coordinate, and averaging the at least two trigger positions of the control means averaging the coordinates of the at least two trigger positions of the control. The display position is the display position of the control in the virtual game in the second layout. The display positions of the controls in the virtual game constitute the second layout. Exemplarily, the display position of the control can refer to the display position of the center point of the control. The scheme provided by the embodiments of the present application can reflect the overall situation of the object triggering the control by the average position of the multiple trigger positions, and the display position of the control is the average position of the multiple trigger positions, so that the position of the control in the second layout is more in line with the operation habit of the object, so as to reduce the mis-triggering of the object after the second layout is applied, thereby facilitating the improvement of the game experience of the object.
[0133] In some embodiments, the terminal determines the second layout based on the at least two trigger positions of the object and the first layout. Accordingly, the process of determining the second layout by the terminal includes: for any control in the virtual game, the terminal determines a first display position of the control based on the at least two trigger positions of the control. Then, the terminal determines the second layout based on the first display position and the first layout. Exemplarily, the first display position can be the average position of the at least two trigger positions. For the case that the at least two trigger positions are all trigger positions when the control is mis-triggered, the first display position is the display position when the control is mis-triggered; for the case that the at least two trigger positions are all trigger positions when the control is successfully triggered, the first display position is the display position when the control is successfully triggered; for the case that the at least two trigger positions include trigger positions when the control is mis-triggered and trigger positions when the control is successfully triggered, the first display position is the average position between the display position when the control is mis-triggered and the display position when the control is successfully triggered. The scheme provided by the embodiments of the present application adjusts the first layout to the second layout according to the trigger positions of the object to the control, so that the adjusted second layout is more in line with the operation habit of the object, so as to reduce the mis-triggering of the object after the second layout is applied, thereby facilitating the improvement of the game experience of the object.
[0134] In an example embodiment, if a distance between the first display position of the control and the second display position of the control reaches a distance threshold, the terminal averages the first display position and the second display position to obtain a third display position. The second display position is the display position of the control in the first layout. The third display position is the display position of the control in the second layout. The distance threshold can be set according to experience or flexibly adjusted according to application scenarios, and the example embodiments of the present application do not limit this. The implementation process of averaging the first display position and the second display position to obtain the third display position can include: averaging the coordinates of the first display position and the coordinates of the second display position to obtain average coordinates, and taking the position corresponding to the average coordinates as the third display position.
[0135] In an example embodiment, if the distance between the first display position of the control and the second display position of the control does not reach the distance threshold, the terminal takes the first layout as the second layout.
[0136] The scheme provided by the example embodiments of the present application can reflect the position of the object triggering the control based on the first display position determined based on multiple trigger positions, and in the case that the gap between the position of the object triggering the control and the current position of the control (the position in the first layout) is large, the current position of the control is adjusted based on the position of the object triggering the control, so that the second layout after adjustment is more in line with the operation habits of the object, so as to facilitate reducing the case of the object triggering by mistake after applying the second layout, thereby facilitating improving the game experience of the object; in the case that the gap between the position of the object triggering the control and the current position of the control (the position in the first layout) is small, it is indicated that the position of the object triggering the control basically fits the current position of the control, and adjustment is not required, thereby saving running consumption.
[0137] For example, the terminal can calculate the first display position by Formula Three.
[0138] Formula Three:
[0139] In the formula, AvrTouchPos represents the first display position, TouchPos[i] represents the i-th trigger position, and n represents the number of at least two trigger positions.
[0140] For example, FIG. 11 is a schematic diagram of a first display position according to an example embodiment of the present application. Referring to FIG. 11, there are four trigger positions (black dots) in the detection range (black solid line box) of the control 1101. The terminal averages the coordinates of the four trigger positions to obtain the coordinates of the first display position, which can be seen from the white dot in FIG. 11.
[0141] Then, the terminal can calculate the third display position (the display position of the control in the second layout) by the following Formula Four.
[0142] Formula Four: TargerPos = (AvrTouchPos + Center) / 2
[0143] Wherein, TargerPos is used to represent the third display position; AvrTouchPos is used to represent the first display position (the average position of at least two trigger positions); Center is used to represent the second display position (the display position of the control in the first layout, that is, the position of the center point of the control in the first layout).
[0144] For example, FIG. 12 is a schematic diagram of a third display position according to an embodiment of the present application. Referring to FIG. 12, the center of the dashed circle in (a) is the first display position 1202, which is the trigger position of the object for the control 1201, that is, the display position of the control 1201 from the perspective of the trigger. The position of the control 1201 in the first layout is shown by the solid circle, which can be represented by the second display position 1203. The terminal averages the first display position 1202 and the second display position 1203 to obtain the third display position 1204. That is, the display position of the control 1201 in the second layout. Referring to (b), the center of the dashed circle in (b) is the third display position 1204, which is the finally calculated display position of the control.
[0145] In some embodiments, in the case where the distance between the second display position and the third display position reaches a reference threshold, the first layout is switched to the second layout in response to the layout switching operation, the second display position is the display position of the control in the first layout, and the third display position is the display position of the control in the second layout. After switching the first layout to the second layout, the terminal adjusts the display position of the control from the second display position to the third display position. That is, when the gap between the finally calculated display position of the control and the current display position of the control is large, the layout (such as the display position) of the control is adjusted, and when the gap is small, no adjustment is needed, which can save running consumption.
[0146] That is, the terminal adjusts the display position of the control only in the case that VectorLength(TargerPos-POS) > ValidLength. TargerPos is used to represent the third display position; POS is used to represent the second display position; VectorLength(TargerPos-POS) is used to represent the distance between the second display position and the third display position; and ValidLength is used to represent a reference threshold value, which can be 5px, and the distance threshold value is not limited in the embodiments of the present application. The reference threshold value can be the same as or different from the distance threshold value. This method can be regarded as a de-bouncing algorithm, which is used to reduce or eliminate the negative effects caused by frequent user operations or device shaking. That is, when the difference between the second display position and the third display position is less than the reference threshold value, the difference is regarded as not affecting the actual operation of the object, and thus the position of the control does not need to be adjusted.
[0147] In order to more clearly describe the determination method of the second layout in the present application, the determination method of the second layout is further described below in combination with the drawings. FIG. 13 is a flowchart of determining a second layout according to an embodiment of the present application. Referring to FIG. 13, the terminal obtains control data in a first layout (current layout) in a virtual match. The control data can include initial coordinates of the control, an anchor point range of the control, a size of the control, a reference point of the control, and a screen adaptation parameter, and the like. Then, the terminal calculates a display position of the control in the first layout (i.e., a second display position) based on the size of the screen and the control data. Then, the terminal calculates a detection range of the control based on the second display position of the control. Then, the terminal obtains a plurality of trigger positions of an object with respect to the control based on the detection range of the control. Then, the terminal determines a position of the control being triggered based on the plurality of trigger positions, i.e., a first display position. Then, the terminal adjusts the second display position according to the first display position to obtain a third display position (i.e., a second layout). The above-mentioned second layout can also be determined by the server, and the execution subject of calculating the second layout is not limited in the embodiments of the present application.
[0148] In the embodiments of the present application, in the case that the object switches the layout, the terminal switches the first layout to the second layout, for example, the terminal switches the first layout to the second layout in the control setting interface. That is, the terminal hides the first layout and displays the second layout in the control setting interface.
[0149] In some embodiments, in response to the layout switching operation, the terminal displays a layout viewing control. Illustratively, the terminal displays a layout viewing control in the following manner: the terminal displays a control adjustment panel in the control setting interface. The layout viewing control is displayed in the control adjustment panel. The layout viewing control is used to show the new layout of the controls in the virtual game based on the trigger position of the object. Then, in response to a first trigger operation on the layout viewing control, the first layout is switched to the second layout. Illustratively, the first layout in the control setting interface is switched to the second layout. The embodiments of the present application provide the following scheme: since the second layout is determined based on multiple trigger positions, the positions of the controls in the second layout are more consistent with the trigger positions of the object, that is, more consistent with the operation habits of the object. In the case of the layout switching operation, the second layout can intuitively show the object the consistency between the second layout and the operation habits of the object (i.e., the layout effect after switching). The object does not need to manually adjust the layout of the controls, but can directly replace the current layout of the controls in the virtual game with a layout that is consistent with the operation habits of the object, thereby improving the layout efficiency of the controls in the virtual game.
[0150] In some embodiments, in response to a second trigger operation on the layout viewing control, the terminal restores the second layout to the first layout. Illustratively, the second layout in the control setting interface is restored to the first layout. The embodiments of the present application do not limit the first trigger operation and the second trigger operation. The first trigger operation and the second trigger operation are two different operations on the layout viewing control. Illustratively, the first trigger operation refers to the operation of selecting the layout viewing control, and the second trigger operation refers to the operation of deselecting the layout viewing control.
[0151] The embodiments of the present application provide the following scheme: by triggering the first trigger operation and the second trigger operation on the layout viewing control, the object can view the first layout and the second layout at any time, thereby being able to compare the difference before and after the layout switching and more intuitively show the effect after the layout switching.
[0152] For example, FIG. 14 is a schematic diagram of switching a layout according to an embodiment of the present application. Referring to (a) in FIG. 14, the terminal displays a first layout of virtual game control and a plurality of trigger positions (black dots) in the control setting interface. The terminal can also display a prompt information box 1401 in the control setting interface. The prompt information in the prompt information box 1401 is used to prompt the object to exist a mis-triggering control situation, to guide the object to switch the layout of the control. The prompt information box 1401 displays a third setting control 1402 and a switching control 1403. In response to a trigger operation on the switching control 1403, the terminal displays a control adjustment panel 1404 in the control setting interface, which can be seen from (b) in FIG. 14. The control adjustment panel 1404 displays a layout viewing control 1405. Then, in response to a selection operation on the layout viewing control 1405, the terminal switches the first layout in the control setting interface to a second layout, which can be seen from (c) in FIG. 14. By comparing the first layout and the second layout, it can be found that the display positions of the control 1406, the control 1407 and the control 1408 have changed, and the display positions of the remaining controls remain unchanged. In the case that the layout viewing control 1405 is deselected, the terminal switches the second layout in the control setting interface to the first layout, that is, from (c) to (b). In response to a trigger operation on the third setting control 1402, the terminal displays only the first layout in the control setting interface, without displaying the plurality of trigger positions. Similar to (b), the difference is that the plurality of trigger positions are not displayed in the control setting interface at this time. Moreover, the terminal can still display the control adjustment panel 1404 shown in (b), so that the terminal can continue to prompt the viewing entrance of the new layout (the second layout), to facilitate the subsequent use of the object.
[0153] In some embodiments, on the basis of the second layout, the object can also manually adjust the layout of the control. Accordingly, for the control in the second layout, in the case that the control is selected, in response to an adjustment operation on the control, the terminal obtains a third layout. Then, the terminal displays the third layout, for example, the terminal displays the third layout in the control setting interface. The scheme provided by the embodiments of the present application is based on the second layout determined by the trigger position of the object, and the object can still further adjust the position of the control in combination with the subjective impression of its own operation, to meet the intention of the object, so that the layout of the control in the virtual game is controllable, and it is beneficial to make more accurate layout.
[0154] In some embodiments, the object can select the control by triggering the control. In some embodiments, in the case that the control is selected, the control can be highlighted. The implementation manner of highlighting the control is not limited by the embodiments of the present application, and exemplary implementation manners of highlighting the control can include: highlighting the control, thickening the border of the control, flashing the control, etc.
[0155] In a case where the control is selected, the control is in an adjustable state, and the object can adjust the control, so that the terminal acquires the adjustment operation on the control. Exemplarily, the object can adjust at least one of the display position, the transparency, the size, and the like of the control.
[0156] For example, still referring to FIG. 14, the position adjustment control 1409 is displayed in the control adjustment panel 1404. The position adjustment control 1409 includes four parts, i.e., up, down, left, and right, which are respectively used to control the movement of the control in the corresponding direction.
[0157] In some embodiments, for the control in the second layout, in a case where the control is adjusted, the terminal displays the recovery control of the control. Exemplarily, the terminal displays the recovery control of the control in the control setting interface. The recovery control is used to restore the control to the case indicated by the second layout. In response to the triggering operation on the recovery control, the terminal switches the third layout to the second layout. Exemplarily, the terminal switches the third layout to the second layout in the control setting interface. The scheme provided in the embodiments of the present application can display the recovery control corresponding to the control when the object further adjusts the layout of the control. If the object is not satisfied with the result of the adjustment, the recovery control can be used to restore the control to the case of the second layout, which is simple to operate and does not need to repeat the adjustment.
[0158] The display position of the recovery control is not limited in the embodiments of the present application. Exemplarily, the recovery control can be displayed in the surrounding area of the adjusted control, so as to intuitively reflect the association between the recovery control and the adjusted control. Exemplarily, the triggering operation on the recovery control can be a single click operation, a double click operation, a long press operation, and the like.
[0159] FIG. 15 shows a schematic diagram of adjusting the control in a case where the control is selected, according to an embodiment of the present application. As shown in (a) of FIG. 15, after the control 1501 is selected, the control 1501 is highlighted. If the object increases the size of the control 1501, as shown in (b) of FIG. 15, the recovery control 1502 corresponding to the control 1501 is displayed. In response to the triggering operation on the recovery control 1502, as shown in (c) of FIG. 15, the control 1501 is restored to the case of the second layout.
[0160] To describe the process of switching the layout of the control more clearly, the process of switching the layout of the control is further described below with reference to the accompanying drawings. FIG. 16 is a flowchart of switching the layout according to an embodiment of the present application. Referring to FIG. 16, the object enters the virtual game, and performs various operations through the control in the virtual game. The terminal can cache a plurality of operation data (such as the latest 50 pieces of operation data) of the object. The operation data includes the trigger position when the object triggers the control. After the virtual game ends, the terminal displays the lobby interface of the virtual game. Then, the terminal calculates the risk score of each control in the virtual game according to the operation data of the object. Then, the terminal accumulates the risk scores of all the controls in the virtual game to obtain a total score (i.e., the operation failure level of the object). Then, the terminal determines whether the total score exceeds the risk threshold. In the case where the total score exceeds the risk threshold, the terminal adds the mis-touch guide mark to the object. When the object starts the next virtual game, the terminal detects whether the mis-touch guide mark exists. In the case where the mis-touch guide mark exists, the terminal can display the setting control of the layout in the lobby interface to guide the object to enter the control setting interface to set (switch or adjust) the layout of the control.
[0161] 304、in response to the application operation on the second layout, the terminal displays the control in the virtual game based on the second layout.
[0162] The application operation on the second layout is used to indicate that the control is displayed in the virtual game using the second layout. The application operation on the second layout can be set according to experience, or can be flexibly adjusted according to the application scenario, which is not limited in the embodiments of the present application. Exemplarily, the application operation on the second layout can include the trigger operation of applying the control to the layout in the case where the second layout is displayed, and the layout application control can be displayed in the control setting interface. Exemplarily, the application operation on the second layout can also include that the object generates the layout application voice or the object makes the layout application gesture in the case where the second layout is displayed, the layout application voice is a voice used to indicate that the control is displayed in the virtual game using the second layout, and the layout application gesture is a gesture used to indicate that the control is displayed in the virtual game using the second layout. The layout application voice and the layout application gesture can be set according to experience, or can be flexibly adjusted according to the application scenario, which is not limited in the embodiments of the present application.
[0163] In the embodiments of the present application, in the case where the second layout is applied, the terminal adjusts the first layout in the virtual game to the second layout. That is, in the virtual game, the terminal displays the control at the position indicated by the second layout. In addition, the terminal displays the control by using the display mode indicated by the second layout, and the display mode indicated by the second layout can include but is not limited to the display size of the control, the transparency of the control, and the like.
[0164] FIG. 17 shows a diagram of applying the second layout according to an embodiment of the present application. As shown in (a) of FIG. 17, the layout application control 1701 is displayed in the control setting interface. If the object triggers the layout application control 1701 while the second layout is displayed, the terminal displays the controls in the virtual game based on the second layout, as shown in (b) of FIG. 17.
[0165] The control layout method provided by the embodiments of the present application can display (e.g., in the control setting interface of the virtual game) the first layout of the controls and the multiple trigger positions of the object in the process of setting the layout of the controls in the virtual game. Since the first layout reflects the current layout of the controls in the virtual game and the multiple trigger positions reflect the triggering of the controls by the object, the simultaneous display of the first layout and the multiple trigger positions can intuitively show the successful triggering and the mis-triggering of the controls by the object in the virtual game, i.e., the object can know the operation result of the controls. When the mis-triggering is more in the operation result, the first layout can be switched to the second layout. Since the second layout is determined based on the multiple trigger positions, the positions of the controls in the second layout are more consistent with the trigger positions of the object, i.e., more consistent with the operation habits of the object. After the second layout is applied, the mis-triggering of the object can be reduced, thereby improving the game experience of the object and the human-computer interaction rate. Moreover, the second layout and the multiple trigger positions are displayed, so that the object can intuitively know the consistency between the second layout and the operation habits of the object (i.e., the layout effect after the switching), and the object can directly replace the current layout of the controls in the virtual game with the layout consistent with the operation habits of the object without manually adjusting the layout of the controls, thereby improving the layout efficiency of the controls in the virtual game.
[0166] FIG. 18 is a block diagram of a control layout device according to an embodiment of the present application. The control layout device is used to execute the steps of the control layout method described above. As shown in FIG. 18, the control layout device includes:
[0167] A first display module 1801 is configured to display the first layout and the at least two trigger positions. The first layout is the current layout of the controls in the virtual game. Each trigger position is the position of the controls triggered by the object.
[0168] A switching module 1802 is configured to switch the first layout to the second layout in response to a layout switching operation. The second layout is the layout of the controls in the virtual game determined based on the at least two trigger positions.
[0169] A second display module 1803 is configured to display the controls in the virtual game based on the second layout in response to an application operation of the second layout.
[0170] In some embodiments, the first display module 1801 is configured to display the first layout and the at least two trigger positions in response to a setting operation on the virtual game control, the setting operation being used to set the layout of the virtual game control.
[0171] In some embodiments, the first display module 1801 is further configured to display a first setting control in a preparation interface of the virtual game, the first setting control being used to set the layout of the virtual game control.
[0172] The setting operation includes a trigger operation on the first setting control.
[0173] In some embodiments, the first display module 1801 is further configured to display a second setting control in a virtual scene of the virtual game, the second setting control being used to set the layout of the virtual game control.
[0174] The setting operation includes a trigger operation on the second setting control.
[0175] In some embodiments, the first display module 1801 includes:
[0176] A determination unit is configured to determine an operation failure level of the object based on the at least two trigger positions, the operation failure level being used to represent a possibility of the object triggering the control by mistake.
[0177] A first display unit is configured to display the first layout and the at least two trigger positions in a case where the operation failure level of the object meets a failure condition.
[0178] In some embodiments, the determination unit is configured to determine a number of target positions in the at least two trigger positions based on a response range of the control, the target positions being trigger positions located outside the response range, the target positions being used to represent trigger positions when the control is triggered by mistake; and determine the operation failure level of the object based on a total number of the at least two trigger positions and the number of the target positions.
[0179] In some embodiments, the determination unit is configured to determine a proportion of the target positions in the at least two trigger positions based on the total number of the at least two trigger positions and the number of the target positions; determine a risk score of the control based on the proportion of the target positions in the at least two trigger positions, the risk score being used to represent the possibility of the control being triggered by mistake; and determine the operation failure level of the object based on the risk score of the control, the operation failure level being directly proportional to the risk score.
[0180] In some embodiments, the apparatus further includes:
[0181] An acquisition module is configured to acquire the at least two trigger positions of the control based on a detection range of the control, the detection range being used to detect whether an operation triggered by the object is an operation on the control, the at least two trigger positions of the control being located in the detection range.
[0182] In some embodiments, the detection range of the control is positively correlated with the response range of the control.
[0183] In some embodiments, the apparatus further includes:
[0184] a first determining module configured to determine a first display position of the control based on the at least two trigger positions;
[0185] a second determining module configured to determine a second layout based on the first display position and the first layout.
[0186] In some embodiments, the second determining module is configured to, if a distance between the first display position of the control and a second display position of the control reaches a distance threshold, average the first display position and the second display position to obtain a third display position, the second display position being a display position of the control in the first layout, and the third display position being a display position of the control in the second layout.
[0187] In some embodiments, the switching module 1802 is configured to, in response to the layout switching operation, switch the first layout to the second layout if a distance between the second display position and the third display position reaches a reference threshold, the second display position being a display position of the control in the first layout, and the third display position being a display position of the control in the second layout.
[0188] In some embodiments, the switching module 1802 is configured to, in response to the layout switching operation, display a layout viewing control, the layout viewing control being used to show a new layout of the control in a virtual game determined based on the trigger positions of the object; and in response to a first trigger operation on the layout viewing control, switch the first layout to the second layout.
[0189] In some embodiments, the apparatus further includes:
[0190] a restoring module configured to, in response to a second trigger operation on the layout viewing control, restore the second layout to the first layout.
[0191] In some embodiments, the apparatus further includes:
[0192] an adjusting module configured to, for the control in the second layout, in response to an adjusting operation on the control if the control is selected, obtain a third layout;
[0193] the first display module 1801 is further configured to display the third layout.
[0194] In some embodiments, the first display module 1801 is further configured to, for the control in the second layout, display a restoring control of the control if the control is adjusted, the restoring control being used to restore the control to a state indicated by the second layout;
[0195] The switching module 1802 is further configured to switch the third layout to the second layout in response to the triggering operation on the recovery control.
[0196] The control layout apparatus provided by the embodiments of the present application can display (for example, in the control setting interface of the virtual match) the first layout of the control and the plurality of triggering positions of the object in the process of setting the control layout in the virtual match. Since the first layout reflects the current layout of the control in the virtual match and the plurality of triggering positions reflect the triggering conditions of the object for the control, the simultaneous display of the first layout and the plurality of triggering positions can intuitively show the successful triggering and the false triggering of the object for the control in the virtual match, that is, the object can know the operation result of the control. When the false triggering is more in the operation result, the first layout can be switched to the second layout. Since the second layout is determined based on the plurality of triggering positions, the positions of the control in the second layout are more consistent with the triggering positions of the object, that is, more consistent with the operation habits of the object. After the application of the second layout, it is beneficial to reduce the false triggering of the object, thereby facilitating the match experience of the object and improving the human-computer interaction rate. Moreover, the display of the second layout and the plurality of triggering positions can intuitively show the object the consistency (that is, the layout effect after the switching) between the second layout and the operation habits of the object, so that the current layout of the control in the virtual match can be directly replaced by the layout consistent with the operation habits of the object without manual adjustment of the object, thereby improving the layout efficiency of the control in the virtual match.
[0197] It should be noted that the control layout apparatus provided by the above embodiments is only used as an example for the division of the above functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above functions. In addition, the control layout apparatus and the control layout method provided by the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.
[0198] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can be used as an execution subject to implement the technical solutions provided by the embodiments of the present application. When the computer device is configured as a server, the server can be used as an execution subject to implement the technical solutions provided by the embodiments of the present application. The technical solutions provided by the present application can also be implemented through the interaction between the terminal and the server, and the embodiments of the present application do not limit this.
[0199] FIG. 19 is a structural block diagram of a terminal 1900 according to an embodiment of the present application. The terminal 1900 can be a portable mobile terminal such as a smartphone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a notebook computer, or a desktop computer. The terminal 1900 can also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.
[0200] Generally, the terminal 1900 includes a processor 1901 and a memory 1902.
[0201] The processor 1901 can include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1901 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1901 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1901 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content to be displayed on a display screen. In some embodiments, the processor 1901 can further include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.
[0202] The memory 1902 can include one or more computer-readable storage media. The computer-readable storage media can be non-transitory. The memory 1902 can also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices. In some embodiments, the non-transitory computer-readable storage media of the memory 1902 is used to store at least one computer program for being executed by the processor 1901 to enable the terminal 1900 to implement the control layout method provided by the method embodiments of the present application. In some embodiments, the non-transitory computer-readable storage media can also be referred to as non-volatile computer-readable storage media.
[0203] In some embodiments, the terminal 1900 can also optionally include a display screen 1905.
[0204] The display screen 1905 is used to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. When the display screen 1905 is a touch display screen, the display screen 1905 also has the ability to collect touch signals on or above the surface of the display screen 1905. The touch signals can be input as control signals to the processor 1901 for processing. At this time, the display screen 1905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1905 can be one, arranged on the front panel of the terminal 1900; in other embodiments, the display screen 1905 can be at least two, arranged on different surfaces of the terminal 1900 or in a folding design; in other embodiments, the display screen 1905 can be a flexible display screen, arranged on a curved surface or a folding surface of the terminal 1900. Even, the display screen 1905 can also be arranged in an irregular shape other than a rectangle, i.e., a special-shaped screen. The display screen 1905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. In some embodiments, the first layout, the trigger position, the second layout, etc. involved in the method embodiments of the present application are displayed by the display screen 1905.
[0205] Those skilled in the art can understand that the structure shown in FIG. 19 does not constitute a limitation on the terminal 1900, and can include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0206] FIG. 20 is a structural schematic diagram of a server according to an embodiment of the present application. The server 2000 can have a large difference in configuration or performance, and can include one or more processors (Central Processing Units, CPUs) 2001 and one or more memories 2002. The memory 2002 stores at least one computer program, which is loaded and executed by the processor 2001, so that the server 2000 implements the control layout method provided by the above-mentioned various method embodiments. Of course, the server can also have a wired or wireless network interface, a keyboard, an input and output interface, and other components for implementing device functions, which are not described here.
[0207] The embodiments of the present application also provide a non-volatile computer readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor of a computer device, so that the computer device implements the operations performed by the computer device in the control layout method of the above-mentioned embodiments. For example, the non-volatile computer readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0208] In some embodiments, the computer program related to the embodiments of the present application can be deployed to execute on one computer device, or on multiple computer devices located in one place, or on multiple computer devices distributed in multiple places and interconnected through a communication network, which can constitute a blockchain system.
[0209] The embodiments of the present application also provide a computer program product, which includes a computer program stored in a non-volatile computer readable storage medium. The processor of a computer device reads the computer program from the non-volatile computer readable storage medium, and executes the computer program, so that the computer device executes the control layout method provided in the above-mentioned various optional implementation manners.
[0210] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete, and the program can be stored in a non-volatile computer readable storage medium, and the above-mentioned storage medium can be a Read-Only Memory, a magnetic disk or an optical disk, etc.
[0211] The above description is only optional embodiments of the present application, and is not used to limit the present application. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method of control layout, wherein, The method is executed by a computer device, and the method comprises: displaying a first layout and at least two trigger positions, the first layout being a current layout of a control in a virtual game, and each trigger position being a position at which the control is triggered by an object; in response to a layout switching operation, switching the first layout to a second layout, the second layout being a layout of the control in the virtual game determined based on the at least two trigger positions; in response to an application operation on the second layout, displaying the control in the virtual game based on the second layout.
2. The method of claim 1, wherein, The display of the first layout and the at least two trigger positions comprises: in response to a setting operation on the control in the virtual game, displaying the first layout and the at least two trigger positions, the setting operation being used to set the layout of the control in the virtual game.
3. The method of claim 2, wherein, The method further comprises: in a preparation interface of the virtual game, displaying a first setting control, the first setting control being used to set the layout of the control in the virtual game; the setting operation comprises a trigger operation on the first setting control.
4. The method of claim 2, wherein, The method further comprises: in a virtual scene of the virtual game, displaying a second setting control, the second setting control being used to set the layout of the control in the virtual game; the setting operation comprises a trigger operation on the second setting control.
5. The method according to any one of claims 1 to 4, wherein, The display of the first layout and the at least two trigger positions comprises: based on the at least two trigger positions, determining an operation failure level of the object, the operation failure level being used to represent a possibility that the object mistakenly triggers the control; in a case where the operation failure level of the object meets a failure condition, displaying the first layout and the at least two trigger positions.
6. The method of claim 5, wherein, The determination of the operation failure level of the object based on the at least two trigger positions comprises: based on a response range of the control, determining a number of target positions in the at least two trigger positions, the target positions being trigger positions located outside the response range, the target positions being used to represent trigger positions when the control is mistakenly triggered; based on a total number of the at least two trigger positions and the number of the target positions, determining the operation failure level of the object.
7. The method of claim 6, wherein, The determination of the operation failure level of the object based on the total number of the at least two trigger positions and the number of the target positions comprises: based on the total number of the at least two trigger positions and the number of the target positions, determining a proportion of the target positions in the at least two trigger positions; based on the proportion of the target positions in the at least two trigger positions, determining a risk score of the control, the risk score being used to represent a possibility that the control is mistakenly triggered; based on the risk score of the control, determining the operation failure level of the object, the operation failure level being directly proportional to the risk score.
8. The method according to any one of claims 1 to 7, wherein, The method further comprises: based on a detection range of the control, obtaining at least two trigger positions of the control, the detection range being used to detect whether an operation triggered by the object is an operation on the control, and the at least two trigger positions of the control being located within the detection range.
9. The method of claim 8, wherein, The detection range of the control is positively correlated with the response range of the control.
10. The method according to any one of claims 1 to 9, wherein, The method further includes: determining a first display position of the control based on the at least two trigger positions; determining the second layout based on the first display position and the first layout.
11. The method of claim 10, wherein, The determining the second layout based on the first display position and the first layout includes: if a distance between the first display position of the control and a second display position of the control reaches a distance threshold, averaging the first display position and the second display position to obtain a third display position, the second display position being a display position of the control in the first layout, and the third display position being a display position of the control in the second layout.
12. The method of any one of claims 1 to 11, wherein, The switching the first layout to the second layout in response to the layout switching operation includes: in a case where a distance between a second display position and a third display position reaches a reference threshold, switching the first layout to the second layout in response to the layout switching operation, the second display position being a display position of the control in the first layout, and the third display position being a display position of the control in the second layout.
13. The method of any one of claims 1 to 12, wherein, The switching the first layout to the second layout in response to the layout switching operation includes: displaying a layout viewing control in response to a layout switching operation, the layout viewing control being used to show a new layout of the control in the virtual game based on the trigger positions of the object; switching the first layout to the second layout in response to a first trigger operation on the layout viewing control.
14. The method of claim 13, wherein, The method further includes: restoring the second layout to the first layout in response to a second trigger operation on the layout viewing control.
15. The method of any one of claims 1 to 14, wherein, The method further includes: for the control in the second layout, in a case where the control is selected, obtaining a third layout in response to an adjustment operation on the control; displaying the third layout.
16. The method of claim 15, wherein, The method further includes: for the control in the second layout, in a case where the control is adjusted, displaying a recovery control of the control, the recovery control being used to restore the control to a state indicated by the second layout; switching the third layout to the second layout in response to a trigger operation on the recovery control.
17. A control layout apparatus, wherein, The apparatus includes: a first display module configured to display a first layout and at least two trigger positions, the first layout being a current layout of a control in a virtual game, each trigger position being a position at which the control is triggered by an object; a switching module configured to switch the first layout to a second layout in response to a layout switching operation, the second layout being a layout of the control in the virtual game determined based on the at least two trigger positions; a second display module configured to display the control in the virtual game based on the second layout in response to an application operation on the second layout.
18. A computer device, wherein, The computer device comprises a processor and a memory, the memory is used to store at least one computer program, the at least one computer program is loaded and executed by the processor, so that the computer device realizes the control layout method in any one of claims 1 to 16.
19. A non-transitory computer readable storage medium, wherein, The non-volatile computer readable storage medium is used to store at least one computer program, the at least one computer program is loaded and executed by the processor, so that the computer realizes the control layout method in any one of claims 1 to 16.
20. A computer program product comprising a computer program, wherein, The computer program is loaded and executed by the processor, so that the computer realizes the control layout method in any one of claims 1 to 16.
Citation Information
Patent Citations
Control layout method, terminal and computer readable storage medium
CN109753327A
Game interface optimization method, computer equipment and storage medium
CN109908580A
Control attribute adjusting method and device, processor and electronic device
CN113262471A
Layout method and device of controls in game, equipment and storage medium
CN114849228A
Control response area adjusting method and device, storage medium and electronic equipment
CN115525204A