Display control method, device and electronic equipment of control
By determining the target space area based on the shooting parameters of the virtual camera in the game and setting the display rules for the controls, the problem of control occlusion was solved, and the game experience was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-03-31
- Publication Date
- 2026-06-09
AI Technical Summary
In games, the way scene layer controls and HUD layer controls are displayed may obscure important controls, causing players to miss important information and affecting the gaming experience.
The terminal device provides a graphical user interface, determines the target space area based on the shooting parameters of the virtual camera, and controls the display of the controls to be displayed according to the control display rules of the area, including occlusion relationships, and sets different control display levels and rules to avoid important controls being occluded.
This effectively prevents important controls from being obscured, ensuring that players do not miss important information, which helps them make reasonable game strategies and improves the gaming experience.
Smart Images

Figure CN116549964B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, and electronic device for displaying and controlling controls. Background Technology
[0002] In games, both scene-layer controls and HUD (Head-Up Display) layer controls are typically set up simultaneously. Scene-layer controls are attached to a specific location within the game scene, and their display rules are similar to those of models within the game scene; for example, the occlusion relationship between controls is determined by their distance from the virtual camera. HUD-layer controls are displayed in relatively fixed positions on the game interface, above the scene image. The display rules for HUD-layer controls are usually pre-defined, such as determining the occlusion relationship between controls based on their importance. Furthermore, HUD-layer controls may also obscure scene-layer controls. Therefore, this display method can potentially cause important controls to be obscured, leading players to miss crucial information and negatively impacting the gaming experience. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, device and electronic device for displaying controls, so as to avoid important controls in the area being obscured, prevent players from missing important information, help players make reasonable game strategies and improve the game experience.
[0004] In a first aspect, embodiments of the present invention provide a method for displaying controls, which provides a graphical user interface through a terminal device; the graphical user interface displays a scene of a game scene; the scene is captured by a virtual camera in the game scene; the method includes: determining a target spatial region from the game scene based on the shooting parameters of the virtual camera; wherein the shooting parameters include: the position of the virtual camera in the game scene and the orientation of the virtual camera; at least a portion of the content in the target spatial region is displayed in the scene; determining controls to be displayed located in the target spatial region; and controlling the display of the controls to be displayed based on preset control display rules for the target spatial region; wherein the control display rules include at least: the occlusion relationship between the controls to be displayed.
[0005] Secondly, embodiments of the present invention provide a control display control device, which provides a graphical user interface through a terminal device; the graphical user interface displays a scene of a game scene; the scene is captured by a virtual camera in the game scene; the device includes: a region determination module, used to determine a target space region from the game scene based on the shooting parameters of the virtual camera; wherein the shooting parameters include: the position of the virtual camera in the game scene and the orientation of the virtual camera; at least a portion of the content in the target space region is displayed in the scene; a control determination module, used to determine the controls to be displayed located in the target space region; and a display control module, used to control the display of the controls to be displayed based on preset control display rules for the target space region; wherein the control display rules include at least: the occlusion relationship between the controls to be displayed.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned display control method of the control.
[0007] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the display control method of the aforementioned control.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] The aforementioned control display method, device, and electronic device provide a graphical user interface (GUI) through a terminal device. The GUI displays a scene of a game scenario. The scene is captured by a virtual camera within the game scene. Based on the virtual camera's shooting parameters, a target spatial region is determined from the game scene. These parameters include the virtual camera's position and orientation within the game scene. At least a portion of the content within the target spatial region is displayed in the scene. Controls to be displayed within the target spatial region are determined. Based on preset control display rules for the target spatial region, the display of these controls is controlled. These display rules include at least the occlusion relationships between the controls to be displayed. In this method, for a target spatial region in the game scene, preset control display rules are established, and controls within that region are displayed according to these rules. Different spatial regions can have different control display rules. This method avoids obscuring important controls within a region, preventing players from missing important information, facilitating reasonable game strategies, and improving the gaming experience.
[0010] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0011] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0012] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0013] Figure 1 A flowchart illustrating a method for displaying a control according to an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of a visual cone provided in an embodiment of the present invention;
[0015] Figure 3 A frontal schematic diagram of the center and edge regions of the line of sight provided in an embodiment of the present invention;
[0016] Figure 4 A side view of the center and edge regions of the line of sight provided in an embodiment of the present invention;
[0017] Figure 5 A schematic diagram illustrating the occlusion relationship of controls in a target spatial region, provided as an embodiment of the present invention;
[0018] Figure 6 This is a schematic diagram illustrating another control occlusion relationship in a target space region, provided by an embodiment of the present invention.
[0019] Figure 7 A schematic diagram of the structure of a control display control device provided in an embodiment of the present invention;
[0020] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] In related technologies, scene layer controls in a game system are positioned within the game scene, and the occlusion relationship between controls is determined based on their distance from the virtual camera. For HUD layer controls, the importance of each control is pre-determined based on its type, thus determining its display layer. Controls with higher display layers may obscure controls with lower display layers. In the game interface, the display layer of HUD controls is generally higher than that of scene layer controls, which may cause HUD controls to obscure important information provided by scene layer controls. During gameplay, if important information provided by scene layer controls is obscured, the lack of this information can affect a player's judgment, leading to inappropriate strategies and a negative impact on the game experience.
[0023] Based on the above, the present invention provides a method, apparatus and electronic device for displaying controls. This technology can be applied to game systems or other virtual systems, especially to the display control of various information, controls and other objects in virtual scenes.
[0024] In one embodiment of this disclosure, the control display control method can run on a local terminal device or a server. When the control display control method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0025] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of control display methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0026] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.
[0027] In one possible implementation, this invention provides a method for displaying and controlling controls. A graphical user interface (GUI) is provided through a terminal device, which can be either a local terminal device or a client device in a cloud interaction system. The GUI displays a scene from a game; the scene is captured by a virtual camera within the game scene. The virtual camera is located within the game scene and typically moves with the controlled virtual character. Players can control the movement of the controlled virtual character, thereby controlling the movement of the virtual camera. Players can also adjust the orientation of the virtual camera, thus adjusting the viewpoint of the scene.
[0028] like Figure 1 As shown, the display control method of this control includes the following steps:
[0029] Step S102: Based on the shooting parameters of the virtual camera, determine the target space area from the game scene; wherein, the shooting parameters include: the position of the virtual camera in the game scene, and the orientation of the virtual camera; at least a portion of the content in the target space area is displayed in the scene screen;
[0030] Once the virtual camera's shooting parameters are determined, the scene image captured by the virtual camera will also be determined. Among the shooting parameters, the virtual camera's position within the game scene can be represented using the game scene's 3D coordinate system; the virtual camera's orientation can be represented by the direction of its ray. It's understandable that when the virtual camera captures the game scene, only a portion of the space will be photographed, and the content of that photographed area will be displayed in the scene image. Of course, the content within these areas may occlude each other; for example, models within the same area may occlude each other.
[0031] The target spatial region can be determined based on the position and orientation of the virtual camera. The content within the target spatial region can be fully displayed in the scene or only partially displayed. The target spatial region will change as the shooting parameters of the virtual camera change. In one approach, the target spatial region can be determined based on the spatial region captured by the virtual camera; for example, the target spatial region can be the entirety or a portion of the spatial region captured by the virtual camera.
[0032] Step S104: Determine the control to be displayed located in the target space area;
[0033] The controls to be displayed can include various types of controls, such as health bars for virtual objects, position indicators, and float controls. These controls are typically associated with a specific location within the game scene or with a virtual object; therefore, they have a specific position within the game scene. Once the target space area is determined, the controls located within that target space area are the aforementioned controls to be displayed.
[0034] Step S106: Based on the preset control display rules of the target space area, control the display of the controls to be displayed; wherein, the control display rules include at least the occlusion relationship between the controls to be displayed.
[0035] The target space region can include one or more, and different target space regions can be configured with different control display rules. Under different display rules, the occlusion relationships between the controls to be displayed differ. The importance of the information provided by the controls to be displayed will change in different target space regions. For example, for a player, in the central area of the scene captured by the virtual camera, the player is more concerned with the health information of virtual objects in that area. Therefore, for the controls to be displayed in that area, controls providing health information can be prioritized and not obscured by other controls. Similarly, in the edge areas of the scene captured by the virtual camera, the player is more concerned with location cues. Therefore, for the controls to be displayed in that area, controls providing location cues can be prioritized and not obscured by other controls.
[0036] In actual implementation, different control display rules are set for different target space areas. For a certain control to be displayed, if the control is located in target space area A, the control is displayed according to the control display rules of target space area A; if the control is moved to target space area B, the control is displayed according to the control display rules of target space area B.
[0037] In one implementation, different control display rules can be implemented through control display layers. The game system can set multiple control display layers, each corresponding to a target space region. For a given control, each control display layer contains that control. When the control is located in target space region A, the control in the control display layer corresponding to target space region A is displayed, and the control in other control display layers is hidden. When the control is located in target space region B, the control in the control display layer corresponding to target space region B is displayed, and the control in other control display layers is hidden.
[0038] The aforementioned control display method provides a graphical user interface (GUI) through a terminal device. The GUI displays a game scene image, captured by a virtual camera within the game scene. Based on the virtual camera's shooting parameters, a target spatial region is determined from the game scene. These parameters include the virtual camera's position and orientation within the game scene. At least a portion of the content within the target spatial region is displayed in the scene image. Controls to be displayed within the target spatial region are identified. Based on preset control display rules for the target spatial region, the display of these controls is controlled. These display rules include, at least, the occlusion relationships between the controls to be displayed. In this method, for a target spatial region in the game scene, preset control display rules are established, and controls within that region are displayed according to these rules. Different spatial regions can have different control display rules. This method avoids obscuring important controls within a region, preventing players from missing important information, facilitating the development of reasonable game strategies, and improving the gaming experience.
[0039] The following embodiments further describe how to determine the target spatial region from the game scene.
[0040] Specifically, based on the shooting parameters of the virtual camera, a view frustum of the virtual camera is generated in the game scene; wherein, the view frustum includes: the scene space captured by the virtual camera; at least a portion of the scene content in the scene space is displayed in the scene screen; and the target space region is determined based on the view frustum.
[0041] Once the shooting parameters such as the position and orientation of the virtual camera are determined, the virtual camera's frustum is also determined. Typically, the scene space contained within this frustum is the scene space displayed in the scene image. It is understandable that when the shooting parameters change, the position of the frustum changes, which in turn causes the scene space displayed in the scene image to change. In this embodiment, the target spatial region is determined based on the frustum; for example, the scene space contained within the frustum is determined as the target spatial region, or a specified portion of the area within the frustum is determined as the target spatial region; or, the space at a specified orientation of the frustum is determined as the target spatial region. This target spatial region may be adjacent to, separate from, or partially overlap with the frustum.
[0042] In one specific implementation, such as Figure 2 As shown, the visual cone includes a near plane, a far plane, and multiple lateral planes connecting the near plane and the far plane; the normal directions of the near plane and the far plane are the same as the orientation of the virtual camera; the distance between the near plane and the virtual camera is less than the distance between the far plane and the virtual camera. Figure 2 In the diagram, the Near plane indicates the near plane, and the Far plane indicates the far plane. Between the near and far planes are four trapezoidal side planes, each connecting to both the near and far planes. The near plane, far plane, and multiple side planes form a closed space, which is the scene space captured by the virtual camera within the view frustum. Additionally, the Oc indicator shows the location of the virtual camera, α is the vertical field of view, and β is the horizontal field of view.
[0043] Specifically, a first planar region is determined on the near plane of the visual cone; based on the orientation of the virtual camera, the first planar region is projected onto the far plane of the visual cone, and a second planar region is generated on the far plane; based on the first and second planar regions, the target space region is determined.
[0044] For example, if the near plane is a rectangular plane, an elliptical first planar region is generated in the center of the near plane. Then, along the orientation of the virtual camera, the first planar region is projected onto the far plane, resulting in a second planar region on the far plane. This second planar region is located in the center of the far plane, has the same shape as the first planar region, but is larger in size. Connecting the first and second planar regions with a curved surface creates a closed space, namely the aforementioned target space region.
[0045] In one approach, only one target spatial region can be defined, and the control display rules for that target spatial region can be set. The controls in the space outside the target spatial region in the view frustum can be displayed using the default control display rules.
[0046] In another approach, multiple target spatial regions can be defined. Players have different needs for control information in different target spatial regions; therefore, different control display rules are set for different target spatial regions. Specifically, the target spatial regions include a first target spatial region and a second target spatial region; wherein, the first and second target spatial regions form a visual frustum; the first target spatial region is located in the central region of the visual frustum, and the second target spatial region is located in the edge region of the visual frustum; the second target spatial region surrounds the first target spatial region.
[0047] In this method, the visual cone, i.e. the scene space in the scene image, is divided into two target space regions. The first target space region is located in the central region of the visual cone, and the second target space region is the space region in the visual cone other than the first target space region.
[0048] Figure 3 and Figure 4 As an example, Figure 3 The scene image formed within the view frustum of the virtual camera, i.e., the scene image captured by the virtual camera, is a third-person perspective view, with the controlled virtual objects located within this scene image. Since the view frustum is divided into a first target space region and a second target space region, two regions will also appear in the scene image. The center of the view corresponds to the first target space region, and the edge of the view corresponds to the second target space region. For the player, their gaze is primarily focused on the center of the view, occasionally glancing towards the edge; therefore, the player's information needs for the two regions differ. Based on this, different control display rules need to be set for the first and second target space regions.
[0049] Figure 4 yes Figure 3 From the side view, it can be seen that the center of the line of sight corresponds to a cone-shaped spatial region, and the edge of the line of sight surrounds the center of the line of sight, which is the region in the visual cone excluding the center of the line of sight.
[0050] In the above method, the target spatial region is determined by the view frustum of the virtual camera. This target spatial region can change with the shooting parameters of the virtual camera. The position of the target spatial region in the game scene is detected in real time. For the controls to be displayed in the target spatial region, they are displayed according to the control display rules of the target spatial region, which can avoid important controls being obscured.
[0051] The following embodiments describe how to display controls based on the control display rules of the target spatial region. Specifically, if the target spatial region is located in the center region of the virtual camera's view frustum, the occlusion relationship of the control to be displayed is determined based on its scene position in the game scene; based on the determined occlusion relationship, the display of the control to be displayed is controlled.
[0052] The central region of the view frustum is usually the area where the player's gaze is most concentrated and where they pay more attention. Within this region, players tend to focus more on the information provided by controls that are closer to them. Therefore, if the target space is located in the central region of the view frustum, the occlusion relationship of the controls to be displayed is determined based on their position in the game scene. It can be understood that the occlusion relationship in this case is similar to the occlusion relationship between models in the scene, that is, controls that are closer to each other occlude controls that are farther away.
[0053] In one specific implementation, the controls to be displayed include multiple controls; the distance between the controls to be displayed and the virtual camera is determined based on the scene position of the controls in the game scene; if the distance between the first control and the virtual camera is less than the distance between the second control and the virtual camera, the first control occludes the second control; if the distance between the first control and the virtual camera is equal to the distance between the second control and the virtual camera, the occlusion relationship between the first control and the second control is determined based on the preset display priority of the first control and the second control.
[0054] In this method, if the first control is close to the virtual camera, then when the first control and the second control are in the same position on the virtual camera, the first control will obscure the second control; conversely, if the second control is close to the virtual camera, then when the first control and the second control are in the same position on the virtual camera, the second control will obscure the first control. The first and second controls being in the same position on the virtual camera can be understood as the first and second controls being passed through by the same ray emitted by the virtual camera. It should be noted that if the first control and the second control are in different positions on the virtual camera, then the first control will not obscure the second control.
[0055] Figure 5 As an example, target space region 1 is located in the central region of the visual cone. The first control is the health bar control of the virtual object, and the second control is the float control. The float control is located in the scene position indicated by the float control in the game scene. The virtual object is closer to the virtual camera than the scene position indicated by the float control. Therefore, the health bar control of the virtual object occludes the float control.
[0056] Additionally, if the first and second controls are equidistant from the virtual camera, the pre-set display priority determines the occlusion relationship between them. The display priority can be set according to the relative importance of the first and second controls. For example, if the health bar control has a higher display priority than the floating icon control, the health bar control will obscure the floating icon control.
[0057] Furthermore, if the target space area is located at the edge of the virtual camera's view frustum, the display of the controls to be displayed is controlled based on the preset display layer of the controls to be displayed. When the target space area is at the edge of the view frustum, the information that the player is concerned with may not be the information of the controls that are closer. Therefore, it is necessary to pre-set the display layer of the controls and display the controls to be displayed according to that display layer, rather than determining the occlusion relationship between controls based on their position and distance. Understandably, controls with higher display layers will occlude controls with lower display layers.
[0058] Figure 6 As an example, target space region 2 is located at the edge of the view frustum. The first control is the health bar control of the virtual object, and the second control is a float control. The float control is located at the scene position indicated by the float control in the game scene. The virtual object is closer to the virtual camera than the scene position indicated by the float control. However, since both the virtual object and the scene position indicated by the float control are at the edge of the view frustum, and both the virtual object and the scene position are far away from the controlled virtual object, the player is more concerned about the scene position indicated by the float control, and may not care much about the health value indicated by the virtual object's health bar control. In this case, even though the virtual object is closer to the virtual camera than the scene position indicated by the float control, the display layer of the float control is higher than that of the health bar control, and the float control occludes the health bar control.
[0059] In order to use different control display rules in different control areas, this embodiment sets up multiple control layers for the relevant controls in the game system. Each control layer contains the same controls, but the control display rules in each control layer are different. Based on this, for different target space areas, different control layers are called to apply the corresponding control display rules to display the controls.
[0060] Specifically, the controls to be displayed include: a first sub-control preset in the scene layer and a second sub-control preset in the HUD layer; wherein, the first sub-control in the scene layer is displayed based on the scene position of the first sub-control in the game scene; the second sub-control in the HUD layer is displayed based on the preset display layer; it should be noted that the first sub-control and the second sub-control are the same control to be displayed, but they are located in different control layers and are displayed according to different control display rules.
[0061] As an example, suppose the game scene involves three types of controls to be displayed: control A, control B, and control C. The scene layer includes the first child control of control A, the first child control of control B, and the first child control of control C. The HUD layer includes the second child control of control A, the second child control of control B, and the second child control of control C. In the scene layer, the first child controls of the three types of controls are displayed based on their position within the game scene. In the HUD layer, the second child controls of the three types of controls are displayed based on a preset display hierarchy. That is, different control layers use different control display rules.
[0062] If the target space area is located in the center of the virtual camera's frustum, the first sub-control in the scene layer is displayed, and the second sub-control is hidden. Since the first sub-control is displayed, it is based on its position in the game scene, meaning that controls closer to the virtual camera obscure controls farther away. If the target space area is located at the edge of the virtual camera's frustum, the second sub-control in the HUD layer is displayed, and the first sub-control is hidden. Therefore, the second sub-control is displayed based on a preset display layer.
[0063] In related technologies, the display level of controls in the HUD layer is generally higher than that of controls in the scene layer, which may cause controls in the scene layer to be obscured. However, in this embodiment, only controls in the scene layer or only controls in the HUD layer are displayed in a target space area, so the situation of controls in the HUD layer obscuring controls in the scene layer will no longer occur. The types of controls in each layer are the same, but the display rules of the controls are different. Therefore, each layer can display various types of controls, and at the same time, the information of important controls will not be obscured.
[0064] In one implementation, in response to a change in the target space region where the control to be displayed is located, the display states of the first sub-control and the second sub-control are controlled based on the current target space region where the control to be displayed is located; wherein the display state includes: showing or hiding. For example, if the control to be displayed is located in target space region 1, which is located in the center region of the visual frustum, then the first sub-control is displayed and the second sub-control is hidden; as the shooting parameters of the virtual camera change, the control to be displayed is located in target space region 2, which is located in the edge region of the visual frustum, then the display state of the first sub-control changes to hidden and the display state of the second sub-control changes to showing.
[0065] By optimizing the display of various controls based on the information needs of different areas within the game scene, and combining the display rules of controls with the player's line of sight, dynamic optimization of the battlefield perspective can be achieved. This method can provide players with a better game field of view, especially significantly improving the combat perspective and experience of multi-player competitive shooting games.
[0066] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 7 The diagram illustrates the structure of a display control device for a control, which provides a graphical user interface via a terminal device; the graphical user interface displays a scene image of a game scene; the scene image is captured by a virtual camera in the game scene; the device includes:
[0067] The region determination module 70 is used to determine a target spatial region from the game scene based on the shooting parameters of the virtual camera; wherein, the shooting parameters include: the position of the virtual camera in the game scene, and the orientation of the virtual camera; at least a portion of the content in the target spatial region is displayed in the scene screen;
[0068] The control determination module 72 is used to determine the controls to be displayed located in the target space area;
[0069] The display control module 74 is used to control the display of controls to be displayed based on the preset control display rules of the target space area; wherein, the control display rules include at least the occlusion relationship between the controls to be displayed.
[0070] The aforementioned control display device provides a graphical user interface (GUI) via a terminal device. The GUI displays a scene of the game environment. This scene is captured by a virtual camera within the game scene. Based on the virtual camera's shooting parameters, a target spatial region is determined from the game scene. These parameters include the virtual camera's position and orientation within the game scene. At least a portion of the content within the target spatial region is displayed in the scene. Controls to be displayed within the target spatial region are identified. Based on preset control display rules for the target spatial region, the display of these controls is controlled. These display rules include, at least, the occlusion relationships between the controls to be displayed. In this method, for a target spatial region in the game scene, preset control display rules are established, and controls within that region are displayed according to these rules. Different spatial regions can have different control display rules. This method avoids obscuring important controls within a region, preventing players from missing important information, facilitating the development of reasonable game strategies, and improving the gaming experience.
[0071] The aforementioned region determination module is also used to: generate a virtual camera frustum in the game scene based on the shooting parameters of the virtual camera; wherein the frustum includes: the scene space captured by the virtual camera; at least a portion of the scene content in the scene space is displayed in the scene image; and determine the target space region based on the frustum.
[0072] The aforementioned visual cone includes a near plane, a far plane, and multiple lateral planes connecting the near plane and the far plane; the normal directions of the near plane and the far plane are the same as the orientation of the virtual camera; the distance between the near plane and the virtual camera is less than the distance between the far plane and the virtual camera; the aforementioned region determination module is further used to: determine a first planar region on the near plane of the visual cone; project the first planar region onto the far plane of the visual cone based on the orientation of the virtual camera, and generate a second planar region on the far plane; and determine a target spatial region based on the first planar region and the second planar region.
[0073] The aforementioned target spatial region includes a first target spatial region and a second target spatial region; wherein, the first target spatial region and the second target spatial region constitute the visual cone; the first target spatial region is located in the central region of the visual cone, and the second target spatial region is located in the edge region of the visual cone; the second target spatial region surrounds the first target spatial region.
[0074] The aforementioned display control module is also used to: if the target space area is located in the center area of the virtual camera's view frustum, determine the occlusion relationship of the control to be displayed based on its scene position in the game scene; and control the display of the control to be displayed based on the determined occlusion relationship.
[0075] The aforementioned controls to be displayed include multiple controls; the aforementioned display control module is further configured to: determine the distance between the controls to be displayed and the virtual camera based on the scene position of the controls to be displayed in the game scene; if the distance between the first control and the virtual camera is less than the distance between the second control and the virtual camera, the first control occludes the second control; if the distance between the first control and the virtual camera is equal to the distance between the second control and the virtual camera, determine the occlusion relationship between the first control and the second control based on the preset display priority of the first control and the second control.
[0076] The aforementioned display control module is also used to: if the target space area is located at the edge area of the virtual camera's view frustum, control the display of the control to be displayed based on the preset display layer of the control to be displayed.
[0077] The aforementioned controls to be displayed include: a first sub-control preset in the scene layer and a second sub-control preset in the HUD layer; wherein, the first sub-control in the scene layer is displayed based on the scene position of the first sub-control in the game scene; the second sub-control in the HUD layer is displayed based on a preset display layer; the aforementioned display control module is further configured to: if the target space area is located in the center area of the virtual camera's frustum, display the first sub-control in the scene layer and hide the second sub-control; if the target space area is located in the edge area of the virtual camera's frustum, display the second sub-control in the HUD layer and hide the first sub-control.
[0078] The aforementioned device further includes a state control module, used to: in response to a change in the target space area where the control to be displayed is located, control the display state of the first sub-control and the second sub-control based on the target space area where the control to be displayed is currently located; wherein the display state includes: showing or hiding.
[0079] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the display control method of the aforementioned control. This electronic device can be a server or a terminal device.
[0080] See Figure 8 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the display control method of the aforementioned control.
[0081] Furthermore, Figure 8 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0082] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0083] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0084] The processor in the aforementioned electronic device, by executing machine-executable instructions, can implement the following operations in the display control method of the aforementioned control:
[0085] A graphical user interface is provided through a terminal device; the graphical user interface displays a scene of the game scene; the scene is captured by a virtual camera in the game scene; a target spatial area is determined from the game scene based on the shooting parameters of the virtual camera; wherein the shooting parameters include: the position of the virtual camera in the game scene and the orientation of the virtual camera; at least a portion of the content in the target spatial area is displayed in the scene; controls to be displayed are determined in the target spatial area; the controls to be displayed are controlled to be displayed based on preset control display rules for the target spatial area; wherein the control display rules include at least: the occlusion relationship between the controls to be displayed.
[0086] Based on the shooting parameters of the virtual camera, a view frustum of the virtual camera is generated in the game scene; wherein the view frustum includes: the scene space captured by the virtual camera; at least part of the scene content in the scene space is displayed in the scene screen; and the target space region is determined based on the view frustum.
[0087] The visual cone includes a near plane, a far plane, and multiple lateral planes connecting the near and far planes; the normal directions of the near and far planes are the same as the orientation of the virtual camera; the distance between the near plane and the virtual camera is less than the distance between the far plane and the virtual camera; a first planar region is determined on the near plane of the visual cone; based on the orientation of the virtual camera, the first planar region is projected onto the far plane of the visual cone, generating a second planar region on the far plane; based on the first and second planar regions, the target space region is determined.
[0088] The target space region includes a first target space region and a second target space region; wherein, the first target space region and the second target space region constitute the visual cone; the first target space region is located in the central region of the visual cone, and the second target space region is located in the edge region of the visual cone; the second target space region surrounds the first target space region.
[0089] If the target space region is located in the center region of the virtual camera's view frustum, the occlusion relationship of the control to be displayed is determined based on its scene position in the game scene; based on the determined occlusion relationship, the display of the control to be displayed is controlled.
[0090] The control to be displayed includes multiple controls; based on the scene position of the control to be displayed in the game scene, the distance between the control to be displayed and the virtual camera is determined; if the distance between the first control to be displayed and the virtual camera is less than the distance between the second control to be displayed and the virtual camera, the first control occludes the second control; if the distance between the first control to be displayed and the virtual camera is equal to the distance between the second control to be displayed and the virtual camera, the occlusion relationship between the first control and the second control is determined based on the preset display priority of the first control and the second control.
[0091] If the target space area is located at the edge of the virtual camera's view frustum, the display of the control to be displayed is controlled based on the preset display level of the control to be displayed.
[0092] The controls to be displayed include: a first sub-control preset in the scene layer and a second sub-control preset in the HUD layer; wherein, the first sub-control in the scene layer is displayed based on the scene position of the first sub-control in the game scene; the second sub-control in the HUD layer is displayed based on the preset display layer; if the target space area is located in the center area of the virtual camera's frustum, the first sub-control in the scene layer is displayed and the second sub-control is hidden; if the target space area is located in the edge area of the virtual camera's frustum, the second sub-control in the HUD layer is displayed and the first sub-control is hidden.
[0093] In response to a change in the target space area where the control to be displayed is located, the display state of the first sub-control and the second sub-control is controlled based on the target space area where the control to be displayed is currently located; wherein, the display state includes: showing or hiding.
[0094] In the above method, for the target space area in the game scene, there are pre-set control display rules, and the controls located in the control area are displayed according to the control display rules. Different control display rules can be set for different space areas. This method can avoid important controls in the area being obscured, prevent players from missing important information, help players make reasonable game strategies, and improve the game experience.
[0095] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the display control method of the above-mentioned control.
[0096] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the display control method of the aforementioned control:
[0097] A graphical user interface is provided through a terminal device; the graphical user interface displays a scene of the game scene; the scene is captured by a virtual camera in the game scene; a target spatial area is determined from the game scene based on the shooting parameters of the virtual camera; wherein the shooting parameters include: the position of the virtual camera in the game scene and the orientation of the virtual camera; at least a portion of the content in the target spatial area is displayed in the scene; controls to be displayed are determined in the target spatial area; the controls to be displayed are controlled to be displayed based on preset control display rules for the target spatial area; wherein the control display rules include at least: the occlusion relationship between the controls to be displayed.
[0098] Based on the shooting parameters of the virtual camera, a view frustum of the virtual camera is generated in the game scene; wherein the view frustum includes: the scene space captured by the virtual camera; at least part of the scene content in the scene space is displayed in the scene screen; and the target space region is determined based on the view frustum.
[0099] The visual cone includes a near plane, a far plane, and multiple lateral planes connecting the near and far planes; the normal directions of the near and far planes are the same as the orientation of the virtual camera; the distance between the near plane and the virtual camera is less than the distance between the far plane and the virtual camera; a first planar region is determined on the near plane of the visual cone; based on the orientation of the virtual camera, the first planar region is projected onto the far plane of the visual cone, generating a second planar region on the far plane; based on the first and second planar regions, the target space region is determined.
[0100] The target space region includes a first target space region and a second target space region; wherein, the first target space region and the second target space region constitute the visual cone; the first target space region is located in the central region of the visual cone, and the second target space region is located in the edge region of the visual cone; the second target space region surrounds the first target space region.
[0101] If the target space region is located in the center region of the virtual camera's view frustum, the occlusion relationship of the control to be displayed is determined based on its scene position in the game scene; based on the determined occlusion relationship, the display of the control to be displayed is controlled.
[0102] The control to be displayed includes multiple controls; based on the scene position of the control to be displayed in the game scene, the distance between the control to be displayed and the virtual camera is determined; if the distance between the first control to be displayed and the virtual camera is less than the distance between the second control to be displayed and the virtual camera, the first control occludes the second control; if the distance between the first control to be displayed and the virtual camera is equal to the distance between the second control to be displayed and the virtual camera, the occlusion relationship between the first control and the second control is determined based on the preset display priority of the first control and the second control.
[0103] If the target space area is located at the edge of the virtual camera's view frustum, the display of the control to be displayed is controlled based on the preset display level of the control to be displayed.
[0104] The controls to be displayed include: a first sub-control preset in the scene layer and a second sub-control preset in the HUD layer; wherein, the first sub-control in the scene layer is displayed based on the scene position of the first sub-control in the game scene; the second sub-control in the HUD layer is displayed based on the preset display layer; if the target space area is located in the center area of the virtual camera's frustum, the first sub-control in the scene layer is displayed and the second sub-control is hidden; if the target space area is located in the edge area of the virtual camera's frustum, the second sub-control in the HUD layer is displayed and the first sub-control is hidden.
[0105] In response to a change in the target space area where the control to be displayed is located, the display state of the first sub-control and the second sub-control is controlled based on the target space area where the control to be displayed is currently located; wherein, the display state includes: showing or hiding.
[0106] In the above method, for the target space area in the game scene, there are pre-set control display rules, and the controls located in the control area are displayed according to the control display rules. Different control display rules can be set for different space areas. This method can avoid important controls in the area being obscured, prevent players from missing important information, help players make reasonable game strategies, and improve the game experience.
[0107] The computer program products of the control display control method, apparatus and electronic device provided in the embodiments of the present invention include a machine-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0109] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0110] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a machine-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0111] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0112] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for controlling the display of a control, characterized in that, A graphical user interface is provided through the terminal device; The graphical user interface displays scene images of the game scene; The scene was captured by a virtual camera within the game scene; The method includes: Based on the shooting parameters of the virtual camera, a target spatial region is determined from the game scene; wherein, the shooting parameters include: the position of the virtual camera in the game scene, and the orientation of the virtual camera; at least a portion of the content in the target spatial region is displayed in the scene screen; Identify the control to be displayed located in the target space area; Based on the preset control display rules of the target space region, the control to be displayed is controlled to be displayed; wherein, the control display rules include at least: the occlusion relationship between the control to be displayed; different control display rules are set for different target space regions, and the importance of the information provided by the control to be displayed changes in different target space regions, and the occlusion relationship between the control to be displayed is different in different control display rules.
2. The method according to claim 1, characterized in that, The step of determining the target spatial region from the game scene based on the shooting parameters of the virtual camera includes: Based on the shooting parameters of the virtual camera, a view frustum of the virtual camera is generated in the game scene; wherein, the view frustum includes: the scene space captured by the virtual camera; at least a portion of the scene content in the scene space is displayed in the scene screen; Based on the visual cone, the target spatial region is determined.
3. The method according to claim 2, characterized in that, The visual cone includes a near plane, a far plane, and a plurality of lateral planes connecting the near plane and the far plane; the normal directions of the near plane and the far plane are the same as the orientation of the virtual camera; The distance between the near plane and the virtual camera is less than the distance between the far plane and the virtual camera; The step of determining the target spatial region based on the visual cone includes: A first planar region is defined on the near plane of the visual cone; Based on the orientation of the virtual camera, the first planar region is projected onto the far plane of the visual cone, and a second planar region is generated on the far plane; The target spatial region is determined based on the first planar region and the second planar region.
4. The method according to claim 2, characterized in that, The target spatial region includes a first target spatial region and a second target spatial region; The first target space region and the second target space region constitute the visual cone; the first target space region is located in the central region of the visual cone, and the second target space region is located in the edge region of the visual cone. The second target space region surrounds the first target space region.
5. The method according to claim 1, characterized in that, The steps for controlling the display of the control to be displayed based on the preset control display rules of the target space region include: If the target space region is located in the center region of the virtual camera's view frustum, the occlusion relationship of the control to be displayed is determined based on the scene position of the control to be displayed in the game scene; Based on the determined occlusion relationship, the control to be displayed is controlled to be displayed.
6. The method according to claim 5, characterized in that, The controls to be displayed include multiple controls; the step of determining the occlusion relationship of the controls to be displayed based on their scene positions in the game scene includes: Based on the scene position of the control to be displayed in the game scene, determine the distance between the control to be displayed and the virtual camera; If the distance between the first control in the control to be displayed and the virtual camera is less than the distance between the second control in the control to be displayed and the virtual camera, the first control will obscure the second control; If the distance between the first control in the control to be displayed and the virtual camera is equal to the distance between the second control in the control to be displayed and the virtual camera, the occlusion relationship between the first control and the second control is determined based on the preset display priority of the first control and the second control.
7. The method according to claim 1, characterized in that, The steps for controlling the display of the control to be displayed based on the preset control display rules of the target space region include: If the target space region is located at the edge region of the virtual camera's view frustum, the display of the control to be displayed is controlled based on the preset display layer of the control to be displayed.
8. The method according to claim 1, characterized in that, The control to be displayed includes: a first sub-control preset in the scene layer, and a second sub-control preset in the HUD layer; wherein, the first sub-control in the scene layer is displayed based on the scene position of the first sub-control in the game scene; the second sub-control in the HUD layer is displayed based on a preset display level; The step of controlling the display of the control to be displayed based on the preset control display rules of the target space region includes: If the target space region is located in the center region of the virtual camera's view frustum, the first sub-control in the scene layer is displayed, and the second sub-control is hidden; If the target space region is located at the edge region of the virtual camera's view frustum, the second sub-control in the HUD layer is displayed, and the first sub-control is hidden.
9. The method according to claim 8, characterized in that, The method further includes: In response to a change in the target space area where the control to be displayed is located, the display state of the first sub-control and the second sub-control is controlled based on the target space area where the control to be displayed is currently located; wherein, the display state includes: showing or hiding.
10. A display control device for a control, characterized in that, A graphical user interface is provided through the terminal device; The graphical user interface displays scene images of the game scene; The scene was captured by a virtual camera within the game scene; The device includes: The region determination module is used to determine a target spatial region from the game scene based on the shooting parameters of the virtual camera; wherein, the shooting parameters include: the position of the virtual camera in the game scene, and the orientation of the virtual camera; at least a portion of the content in the target spatial region is displayed in the scene screen; The control determination module is used to determine the controls to be displayed located in the target space area; The display control module is used to control the display of the control to be displayed based on the preset control display rules of the target space area; wherein, the control display rules include at least: the occlusion relationship between the control to be displayed; different control display rules are set for different target space areas, and the importance of the information provided by the control to be displayed changes in different target space areas, and the occlusion relationship between the control to be displayed is different in different control display rules.
11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the display control method of the control according to any one of claims 1-9.
12. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the display control method of the control according to any one of claims 1-9.