Information display method and device in game, electronic equipment and storage medium
By adjusting the size and position of the information prompt area, the problem of low recognizability of information display methods in games with changing scenes and model shapes was solved, thus improving the efficiency of human-computer interaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2024-11-11
- Publication Date
- 2026-05-12
AI Technical Summary
In existing technologies, the way information is displayed in games is difficult to adapt to the changing game scenes and model shapes, resulting in low information recognition and affecting the efficiency of human-computer interaction.
By adjusting the size and position of the information prompt area in real time based on the change in the display area of the second virtual object in the graphical user interface, the prompt information is ensured to maintain high recognizability amidst changes in background and model shape.
Effective control of the display range of prompts improves information recognition, enhances human-computer interaction efficiency, and solves the problem of low information recognition.
Smart Images

Figure CN122006241A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human-computer interaction technology, and more specifically, to a method, device, electronic device, and storage medium for displaying information in a game. Background Technology
[0002] With the development of the internet, various types of video games have emerged to meet users' daily entertainment needs. In video games, information prompts are often provided to users through "jump text." Jump text refers to the prompt text generated from other virtual object models when the user-controlled virtual object launches an attack or auxiliary action event during gameplay.
[0003] Currently, information in games is typically displayed within a fixed area and pops out in a pre-set, fixed direction. However, this method of information display is difficult to adapt to changing game scenes and model shapes. For example, when the game background color is similar to the color of the prompt text, it can cause low visibility of the prompts, affecting the efficiency of human-computer interaction. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a method, device, electronic device and storage medium for displaying information in games, so as to solve the problems of low information recognition and reduced human-computer interaction efficiency.
[0005] In a first aspect, embodiments of this application provide a method for displaying information in a game, which provides a graphical user interface through a terminal device. The graphical user interface displays at least a portion of the game scene, and the game scene includes a first virtual object and a second virtual object controlled by the terminal device, including:
[0006] In response to a movement control command for a first virtual object, control the first virtual object to move within the game scene;
[0007] In response to a specified interactive behavior between the first virtual object and the second virtual object, an information prompt area is provided at the second virtual object based on the display area of the second virtual object in the graphical user interface. The size of the information prompt area changes with the display area. The specified interactive behavior includes game behavior that adjusts the preset attribute parameters of the second virtual object.
[0008] The information prompt area provides prompts indicating the preset attribute parameters of the second virtual object.
[0009] Secondly, embodiments of this application also provide an information display device for a game, which provides a graphical user interface through a terminal device. The graphical user interface displays at least a portion of the game scene, and the game scene includes a first virtual object and a second virtual object controlled by the terminal device. The device includes:
[0010] The movement control module is used to respond to movement control commands for the first virtual object and control the first virtual object to move within the game scene;
[0011] The prompt area determination module is used to respond to a specified interaction behavior between the first virtual object and the second virtual object. Based on the display area of the second virtual object in the graphical user interface, it provides an information prompt area at the second virtual object. The area size of the information prompt area changes with the display area. The specified interaction behavior includes game behavior that adjusts the preset attribute parameters of the second virtual object.
[0012] The prompt information display module is used to provide prompt information in the information prompt area to indicate the preset attribute parameters of the second virtual object.
[0013] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform steps of the information display method in the game described above.
[0014] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the information display method in the game described above.
[0015] The embodiments of this application bring the following beneficial effects:
[0016] This application provides a method, apparatus, electronic device, and storage medium for displaying information in a game. Based on the current display area of a second virtual object in the graphical user interface, the information prompt area can be determined in real time. This allows the information prompt area to adjust according to changes in the camera's perspective or the shape of the second virtual object, effectively controlling the display range of the prompt information. This avoids the reduced recognizability of the prompt information due to changes in background and model shape, improving information recognizability and human-computer interaction efficiency. Compared with existing information display methods in games, this solves the problems of low information recognizability and reduced human-computer interaction efficiency.
[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating the information display method in a game provided in an embodiment of this application is shown;
[0020] Figure 2 A schematic diagram showing the display area of the second virtual object provided in the embodiments of this application in the first form is shown;
[0021] Figure 3 This illustration shows a schematic diagram of the display area of the second virtual object in a second form, as provided in an embodiment of this application.
[0022] Figure 4 A flowchart illustrating the method for determining the information prompt area provided in an embodiment of this application is shown;
[0023] Figure 5 This illustration shows a schematic diagram of an information prompt indicating the endpoint location provided in an embodiment of this application;
[0024] Figure 6 This illustration shows another diagram of the endpoint location provided in an embodiment of this application;
[0025] Figure 7 A schematic diagram of the structure of the information display device in the game provided in the embodiment of this application is shown;
[0026] Figure 8 A schematic diagram of the structure of the electronic device provided in the embodiments of this application is shown. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0028] It is worth noting that prior to this application, with the development of the internet, various types of video games emerged to meet users' daily entertainment needs. In video games, information prompts are often provided to users via "jump text." Jump text refers to the prompt text generated from the models of other virtual objects during gameplay when the user-controlled virtual object launches an attack or assists in an action event. For example, when attacking and causing damage to another virtual object, a prompt text indicating the damage number is generated; or when healing another virtual object, a prompt text indicating the increase in health is generated.
[0029] Currently, information in games is typically displayed within a fixed area, popping out in a pre-set, fixed direction. However, this method is difficult to adapt to changing game scenes and the shape of models. For example, when adjusting the virtual camera's viewpoint or changing the shape of other virtual objects, the game background color may become too similar to the color of the prompt text, resulting in low information visibility and impacting human-computer interaction efficiency.
[0030] The following explains the terms used in the embodiments of this application.
[0031] Graphical User Interface:
[0032] It is a human-computer interface display format that allows users to manipulate icons, icons, or menu options on the screen using input devices such as a mouse or keyboard. It also allows users to manipulate icons or menu options on the screen by performing touch operations on the touch screen of a touch terminal in order to select commands, launch programs, or perform other tasks.
[0033] Virtual scene:
[0034] A virtual scene is a virtual environment displayed (or provided) by an application while it is running on a terminal device or server; that is, the scene used during normal gameplay. In other words, a virtual scene refers to virtual game controls that carry virtual objects during gameplay. These virtual objects can perform actions such as movement and skill release in the virtual scene based on the user's (i.e., the player's) commands to the terminal device. Optionally, a virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A virtual scene can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual scene. The virtual environment can be sky, land, ocean, etc., where land includes environmental elements such as deserts and cities. The virtual scene is the scene where the user controls the complete game logic of the virtual objects. Optionally, a virtual scene can also be used for virtual environment battles between at least two virtual objects, and the virtual scene has virtual resources available for use by at least two virtual objects. For example, a virtual scene can include any one or more of the following elements: game background elements, game virtual character elements, game item elements, etc.
[0035] In an optional implementation, the information display method in a game according to one embodiment of this disclosure can run on a local terminal device or a server. When the information display method in a game 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 client devices.
[0036] 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 the game loading method 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, the 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 the game screen and other data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.
[0037] 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.
[0038] In one possible implementation, this invention provides a method for displaying information in a game, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interactive system.
[0039] Based on this, embodiments of this application provide a method for displaying information in games to improve information recognition and enhance human-computer interaction efficiency.
[0040] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for displaying information in a game, as provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the information display method in the game includes:
[0041] Step S101: In response to a movement control command for the first virtual object, control the first virtual object to move within the game scene;
[0042] Step S102: In response to a specified interaction between the first virtual object and the second virtual object, an information prompt area is provided at the second virtual object based on the display area of the second virtual object in the graphical user interface;
[0043] Step S103: Provide prompt information in the information prompt area to indicate the preset attribute parameters of the second virtual object.
[0044] The information display method in the game provided in this application can determine the information prompt area in real time based on the display area of the second virtual object in the graphical user interface at the current moment. This allows the information prompt area to be adjusted as the camera viewpoint or the shape of the second virtual object changes, thereby effectively controlling the display range of the prompt information. This avoids the impact of reduced recognizability of the prompt information caused by changes in the background and model shape, improves information recognizability, enhances human-computer interaction efficiency, and solves the problems of low information recognizability and reduced human-computer interaction efficiency.
[0045] To facilitate understanding of this embodiment, the following description will use an example of an information display method in a game provided by this application applied to a terminal device to illustrate the exemplary steps provided by this application embodiment.
[0046] The system provides a graphical user interface via a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device.
[0047] In step S101, in response to a movement control command for the first virtual object, the first virtual object is controlled to move within the game scene.
[0048] In this step, the first virtual object may refer to a virtual object controlled by the current user through the terminal device. For example, the first virtual object may be a controlled virtual character controlled by the current user.
[0049] The second virtual object can refer to the target object of the action of the first virtual object. For example, the second virtual object can be an uncontrolled virtual character or a controlled virtual character controlled by other users.
[0050] In the embodiments of this application, the changes in the virtual scene content presented by the graphical user interface can be controlled by at least one of the following methods.
[0051] One approach is to update the game scene content presented in the graphical user interface based on changes in the position of a first virtual object within the game scene. For example, in response to a movement control command for the first virtual object, the first virtual object is controlled to move within the game scene, thereby changing the presented game scene content.
[0052] Another approach is to update the game scene content presented in the graphical user interface based on changes in the viewing perspective of the first virtual object. For example, in response to a command to adjust the viewing perspective of the first virtual object, the viewing perspective of the first virtual object is adjusted so that the presented game scene content changes.
[0053] In this way, when the position of the first virtual object changes in the game scene, the position of the virtual camera corresponding to the first virtual object changes accordingly. When the viewing angle of the first virtual object changes, the viewing angle of the virtual camera corresponding to the first virtual object also changes accordingly, so that the game scene content captured by the virtual camera also changes synchronously.
[0054] In step S102, in response to a specified interaction between the first virtual object and the second virtual object, an information prompt area is provided at the second virtual object based on the display area of the second virtual object in the graphical user interface.
[0055] In this step, the specified interaction behavior can refer to the interaction behavior applied by the first virtual object to the second virtual object. The specified interaction behavior includes game behavior that adjusts the preset attribute parameters of the second virtual object.
[0056] For example, the specified interactive behaviors include, but are not limited to: attack behavior imposed by the first virtual object on the second virtual object, attribute adjustment behavior imposed by the first virtual object on the second virtual object, and health restoration behavior imposed by the first virtual object on the second virtual object.
[0057] Preset attribute parameters can refer to parameters used to characterize the state attributes of the second virtual object. For example, preset attribute parameters are numerical parameters, that is, they characterize the state attributes of the first virtual object in numerical form. As an example, preset attribute parameters include, but are not limited to, at least one of the following: the second virtual object's health points, the second virtual object's attack power, the second virtual object's defense power, and the second virtual object's movement speed.
[0058] In one scenario, when the first virtual object attacks the second virtual object, it inflicts damage on the second virtual object, reducing its health. In this case, the default attribute parameter is the second virtual object's health, and the displayed message is the damage value.
[0059] In another scenario, when the first virtual object performs a health restoration action on the second virtual object, it increases the second virtual object's current health. In this case, the default attribute parameter is the second virtual object's health, and the message displayed is the health restoration value.
[0060] In the third scenario, when the first virtual object applies attribute adjustment behavior to the second virtual object, it increases or decreases the corresponding attributes of the second virtual object. In this case, the preset attribute parameter is the corresponding attribute of the second virtual object. For example, if the attack power of the second virtual object is increased, the preset attribute parameter is the attack power of the second virtual object, and the prompt message is the increased attack power value; if the defense power of the second virtual object is decreased, the preset attribute parameter is the defense power of the second virtual object, and the prompt message is the decreased defense power value.
[0061] In this embodiment of the application, the terminal device determines the display area of the second virtual object in the graphical user interface at the current moment when a specified interactive behavior occurs. If the display area of the second virtual object changes, the area size of the information prompt area will also change with the change in display area.
[0062] In one example, the size of the information prompt area will change according to the display area of the second virtual object under different viewing angles and / or different forms.
[0063] In one scenario, if the second virtual object is a bear, then when the virtual camera's viewing angle changes from a horizontal to a vertical perspective, the display area of the second virtual object in the graphical user interface will change. At this time, the size of the information prompt area will also change with the change in display area.
[0064] In another scenario, if the shape of the second virtual object changes, becoming larger or smaller, the display area of the second virtual object in the graphical user interface will also change. In this case, the size of the information prompt area will also change with the change in display area.
[0065] It should be noted that the changes in the form of the second virtual object include, but are not limited to, changes in size and posture. For example, when the size of the second virtual object increases, the shape of the second virtual object also increases, and the corresponding display area also increases; when the posture of the second virtual object changes from standing to crawling, the shape of the second virtual object also changes, and the corresponding display area also changes.
[0066] The following reference Figure 2 , Figure 3 Let's discuss the changes in display area.
[0067] Figure 2 This illustration shows a schematic diagram of the display area of the second virtual object in its first form, as provided in an embodiment of this application. Figure 2 As shown, a graphical user interface 20 is provided through a terminal device 10, in which a first virtual object 210 and a second virtual object 220 are displayed. Figure 2 In the current frame graphical user interface shown, the second virtual object 220 is currently in the first state. In the first state, the display area corresponding to the second virtual object 220 is region 230, which is displayed as a dashed line.
[0068] Figure 3 This illustration shows a schematic diagram of the display area of the second virtual object in a second form, as provided in the embodiments of this application. Figure 3 As shown, in Figure 3 In the current frame graphical user interface shown, the second virtual object 220 is in the second form. The second virtual object 220 is larger in size than the first form. The display area corresponding to the second virtual object 220 in the second form is region 310, which is displayed as a dashed line.
[0069] Here, the information prompt area includes the information prompt start point and the information prompt end point. The information prompt start point can refer to the starting point of the information prompt, and the information prompt end point can refer to the ending point of the information prompt. The prompt information will be displayed from the information prompt start point to the information prompt end point.
[0070] The information prompt starting point includes a first information prompt starting point located at a fixed position on the model of the second virtual object, and a second information prompt starting point whose position is variable. The first information prompt starting point can be a fixed mounting point on the 3D model of the second virtual object; for example, it can be a set center point of the 3D model of the second virtual object. The position of the second information prompt starting point is determined by the geometry of the display area boundary, and its position changes when the display area changes; for example, it can be the geometric center point of the display area boundary.
[0071] The display area refers to the display area corresponding to the boundary of the display area of the 3D model of the second virtual object in the graphical user interface from the current virtual camera's perspective. The display area is used to characterize the size of the display area of the model of the second virtual object in the graphical user interface.
[0072] The following reference Figure 4 This section will explain how to determine the information prompt area.
[0073] Figure 4 A flowchart illustrating the method for determining the information prompt area provided in an embodiment of this application is shown, such as... Figure 4 As shown, the method for determining the information prompt area includes:
[0074] Step S1021: Based on the starting point of the information prompt, select the ending point of the information prompt on the boundary of the display area corresponding to the display area.
[0075] Here, the information prompt area is determined based on the information prompt start point and information prompt end point. First, the information prompt end point corresponding to the information prompt start point can be determined, and then the area size of the information prompt area can be determined according to the information prompt end point.
[0076] Specifically, a first ray is emitted from the starting point of the information prompt along a set tilt angle. The endpoint of the information prompt is determined based on the first intersection point of the first ray and the boundary of the display area. The boundary of the display area can refer to the boundary of the projection area of the second virtual object from the current viewing angle of the virtual camera.
[0077] In one scenario, the first intersection point between the first ray and the boundary of the display area can be directly used as the endpoint of the information prompt.
[0078] The following reference Figure 5 Let me introduce the first method for determining the destination of the information prompt.
[0079] Figure 5 This illustration shows a schematic diagram of an information prompt for the endpoint location provided in an embodiment of this application. Figure 5 As shown, the information prompt starting point 410 is located within the display area boundary 420. A first ray 430 is emitted from the information prompt starting point 410 at a set tilt angle 440. The first intersection point 450 of the first ray 430 and the display area boundary 420 is the information prompt ending point.
[0080] In another scenario, to avoid text overlap between adjacent prompts, after determining the first intersection point, boundary points within a preset range centered on the first intersection point can be selected as candidate prompt endpoints. For example, multiple points on the display area boundaries within a circular area with a radius of 10 pixels centered on the first intersection point can be selected as candidate prompt endpoints. Boundary points among these candidate endpoints that meet a preset distance condition are then determined as the final prompt endpoints. This preset distance condition is the required distance between the candidate prompt endpoint and the prompt's starting point; for example, the preset distance condition is the candidate prompt endpoint furthest from the prompt's starting point. In this way, while ensuring minimal deviation in the prompt trajectory, the point furthest from the prompt's starting point is selected as the final prompt endpoint.
[0081] The following reference Figure 6 Let me introduce the second method for determining the endpoint of the information prompt.
[0082] Figure 6 This illustration shows another diagram of the endpoint location provided in an embodiment of this application. Figure 6 As shown, the first ray emitted from the information prompt starting point 410 intersects the boundary of the display area at the first intersection point 450. Boundary points 510, 520, and 530 within a circular area 500 centered at the first intersection point 450 and with a radius of 30 pixels are selected as candidate information prompt endpoints. The distances between boundary points 510 and 410, 520 and 410, and 530 and 410 are determined respectively. The boundary point with the furthest distance is selected as the information prompt endpoint that meets the preset distance condition. For example, if boundary point 520 has the furthest distance from the information prompt starting point 410, then boundary point 520 is determined as the information prompt endpoint.
[0083] In one example, the display area boundary corresponding to the display area can be determined as follows: multiple second rays are emitted from the center point of the virtual camera towards the second virtual object, and a second intersection point is determined between each second ray and the model of the second virtual object. Then, a boundary point representing the display area boundary of the second virtual object in the current viewpoint is selected from the multiple second intersection points, and the display area boundary of the second virtual object is determined based on the selected boundary point.
[0084] Specifically, multiple rays are emitted from the center point of the virtual camera towards the surface of the 3D model of the second virtual object. These emitted rays are called second rays, and the second rays that intersect with the surface of the 3D model of the second virtual object are called target second rays. Each target second ray has at least one intersection with the surface of the 3D model of the second virtual object; these intersections are called second intersection points. For each target second ray, the second intersection point closest to the virtual camera is selected from the at least one second intersection point corresponding to that target second ray as the target second intersection point.
[0085] Then, the second intersection points corresponding to the second rays of all targets are projected onto the two-dimensional plane corresponding to the virtual camera to obtain multiple two-dimensional projection points. Boundary points representing the display area boundary of the second virtual object in the current viewpoint are selected from the two-dimensional projection points. The closed shape obtained by connecting these boundary points in a clockwise or counterclockwise order is called the display area boundary. The two-dimensional plane is parallel to the current shooting plane of the virtual camera, and the current shooting plane is a plane perpendicular to the center line of the virtual camera's viewpoint.
[0086] In addition, the model of the second virtual object is equipped with part information. After determining the second intersection point of the target, the part information of the second virtual object corresponding to the second intersection point of the target can be obtained, so as to divide the boundary of the display area using the part information. The part information is different for different object types. For example, for humanoid objects, the part information includes, but is not limited to: upper body, left arm, right arm, left leg, and right leg.
[0087] In one example, to improve the calculation efficiency of the display area boundary, it is necessary to limit the number and range of the emitted second rays. Here, the size parameters of the second virtual object can be obtained first, and the number and range of the emitted second rays can be determined according to the size parameters of the second virtual object. The larger the size parameter value, the larger the number and range of the emitted second rays; the smaller the size parameter value, the smaller the number and range of the emitted second rays.
[0088] In one example, when the second virtual object is a different virtual object, the size of the different virtual objects may vary significantly. To reduce the difference in display distance (length of the information prompt trajectory) caused by the size difference, the position of the information prompt endpoint can be corrected based on the size parameters of the second virtual object. Specifically, the size parameters of the second virtual object can be obtained, and a correction coefficient can be determined based on the size parameters. This correction coefficient can then be used to correct the position of the information prompt endpoint, and the corrected information prompt endpoint can be determined as the final information prompt endpoint.
[0089] When determining the correction displacement, the ratio between the size parameter of the second virtual object and the size parameter of the reference object can be determined, and then the correction displacement can be determined based on the ratio. For example, the size parameter is represented by a value between 0 and 1. When the size parameter is 1, it means that the second virtual object has the maximum size. When the size parameter of the second virtual object is 1, the ratio of 1 to the reference size parameter 0.5 is calculated to be 2. By looking up the table, the correction coefficient corresponding to the correction displacement is obtained as -0.1. Then, the distance between the information prompt start point and the information prompt end point is reduced by 10% in the direction of the line connecting the information prompt start point and the information prompt end point, and the position after the distance reduction is determined as the final information prompt end point.
[0090] Here, the tilt angle setting includes any one of the following: a fixed first tilt angle, or a second tilt angle determined based on the display area boundary.
[0091] In one example, when the tilt angle includes a first tilt angle, the angle of 45° or 60° with the horizontal line of the graphical user interface can be directly used as the first tilt angle.
[0092] In one example, when the tilt angle includes a second tilt angle, a target boundary region that meets the boundary area requirements within the display area boundary can be determined. For example, the name of the second virtual object, the projected images corresponding to multiple two-dimensional projection points, the part information corresponding to each two-dimensional projection point, and the display area boundary are input into an image detection model. The image detection model is then used to segment the display area boundary to obtain multiple segmentation boundaries. The boundary area corresponding to each segmentation boundary is determined, and the segmentation boundary that meets the boundary area requirements is selected as the target boundary region. Then, a tilt angle is selected within the target boundary region. For example, the angle between the midline of the target boundary region and the horizontal line of the graphical user interface is selected as the tilt angle.
[0093] The boundary area requirement refers to the area requirement for the portion of the display area that is defined by the boundary lines. For example, the boundary area requirement could refer to the boundary with the largest area among all the segmented boundaries.
[0094] A segmentation boundary can refer to a portion of the boundary within the displayed area. Different segmentation boundaries are used to distinguish different parts of a second virtual object.
[0095] The area corresponding to the dividing boundary can refer to the area of the closed region formed by connecting the two endpoints of the dividing boundary with the starting point of the information prompt.
[0096] The image detection model is a trained neural network model that can divide the display area boundary according to the input data, so as to segment the second virtual object according to each part of the second virtual object, thereby reflecting the segmentation boundary corresponding to each part in the display area boundary.
[0097] Step S1022: Based on the information prompt start point and information prompt end point, determine the area size of the information prompt area corresponding to the display area.
[0098] Here, the line connecting the starting point and the ending point of the information prompt is taken as the two vertices on the diagonal of the preset regular shape. A preset regular shape is constructed based on these two vertices. The preset regular shape can be a rectangle, a square, a parallelogram, etc.
[0099] Then, the size of the preset rule graphic is used as the area size of the information prompt area.
[0100] Step S1023: Provide an information prompt area at the starting point of the information prompt according to the area size.
[0101] Finally, the starting point of the information prompt is taken as the target vertex of the information prompt area. For example, the starting point of the information prompt is taken as the lower left vertex of the information prompt area. The area included by the graphic constructed by the target vertex, the area size and the preset rule graphic is the information prompt area.
[0102] At this time, when the virtual camera's perspective changes or the shape of the second virtual object changes, the display area and the boundary of the display area will change accordingly, thus changing the position of the information prompt's starting point and / or ending point, and consequently altering the information prompt area.
[0103] In step S103, a prompt message is provided in the information prompt area to indicate the preset attribute parameters of the second virtual object.
[0104] In this step, the information prompt trajectory can be a straight line or a curve. The following example uses a straight line from the starting point to the ending point of the information prompt as an illustration of the information prompt process.
[0105] Here, the starting point of the information prompt is denoted as S, and the coordinates of the starting point S are denoted as (Sx, Sy). The tilt angle is set as α. The first ray is denoted as Rs. The ending point of the information prompt is denoted as E, and the coordinates of the ending point S are denoted as (Ex, Ey). Then, the part of the first ray from the starting point to the ending point is the information prompt trajectory. At this time, according to the starting point of the information prompt and the set tilt angle α, the position of the ending point of the information prompt can be determined as: Ex = Sx + te × cos(α); Ey = Sy + te × sin(α). In the above formula, te represents the straight-line distance between the starting point and the ending point of the information prompt.
[0106] In one example, after determining the information prompt area, an information prompt trajectory is selected within the area based on the information prompt's endpoint and starting point. This trajectory provides prompt information with preset attribute parameters. The information prompt trajectory refers to the movement path of the prompt information, which will move from the starting point to the endpoint along this trajectory. As an example, the information prompt trajectory can be a straight line or a curve such as an arc.
[0107] Specifically, the information display duration T can be set. Based on the set duration T, the starting point S, and the ending point E of the information prompt, the motion velocity vector V of the information prompt is calculated: V = Sx(Ex-Sx, Ey-Sy) / T. Therefore, the position J of the prompt at time t is: Jx = Sx + Vx × t; Jy = Sy + Vy × t, where (Jx, Jy) represent the coordinates of position J, and Vx and Vy represent the velocities of the motion velocity vector V in the x-axis and y-axis directions, respectively. Thus, based on the position J of the prompt at time t, the animation of the prompt's movement can be displayed in the graphical user interface until the duration T ends and it disappears.
[0108] Whenever a specified interaction occurs between the first virtual object and the second virtual object, the prompt information will be displayed in the manner described above. For example, whenever the first virtual object causes damage to the second virtual object, the damage value will be used as the prompt information, and the damage value will be controlled to move along the prompt trajectory so that the damage value moves from the prompt start point to the prompt end point. When the damage value moves to the prompt end point, the prompt process corresponding to this specified interaction will end.
[0109] Based on the same inventive concept, this application also provides an information display device in the game corresponding to the information display method in the game. Since the principle of the device in this application is similar to the information display method in the game described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0110] Please see Figure 7, Figure 7 This is a schematic diagram of the structure of an information display device in a game provided in an embodiment of this application. Figure 7 As shown, a graphical user interface is provided through a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device. The information display device 600 in the game includes:
[0111] The movement control module 601 is used to respond to movement control commands for the first virtual object and control the first virtual object to move within the game scene;
[0112] The prompt area determination module 602 is used to respond to a specified interaction behavior between the first virtual object and the second virtual object, and to provide an information prompt area at the second virtual object based on the display area of the second virtual object in the graphical user interface. The area size of the information prompt area changes with the display area. The specified interaction behavior includes game behavior that adjusts the preset attribute parameters of the second virtual object.
[0113] The prompt information display module 603 is used to provide prompt information in the information prompt area to indicate the preset attribute parameters of the second virtual object.
[0114] In one possible implementation of this application, the change in the size of the information prompt area with the change in the display area includes: the size of the information prompt area changes according to the change in the display area of the second virtual object under different viewing angles and / or different forms.
[0115] In one possible embodiment of this application, the prompting area determination module 602 includes a prompting endpoint determination module, an area size determination module, and an information prompting area determination module: the prompting endpoint determination module is used to select the information prompting endpoint on the boundary of the display area corresponding to the display area based on the information prompting start point; the area size determination module is used to determine the area size of the information prompting area corresponding to the display area based on the information prompting start point and the information prompting endpoint; the information prompting area determination module is used to provide the information prompting area at the information prompting start point according to the area size.
[0116] In one possible implementation of this application, the prompt information display module 603 includes a prompt trajectory determination module, which is used to select an information prompt trajectory in the information prompt area to provide prompt information with preset attribute parameters along the information prompt trajectory.
[0117] In one possible embodiment of this application, the prompt endpoint determination module includes an information prompt endpoint determination module, which is used to emit a first ray from the information prompt starting point along a set tilt angle direction, and determine the information prompt endpoint based on the first intersection point of the first ray and the boundary of the display area.
[0118] In one possible implementation of this application, the information prompt endpoint determination module is specifically used to: select a boundary point on the boundary of the display area that is centered at a first intersection point and within a preset range as a candidate information prompt endpoint; and determine the boundary point among the candidate information prompt endpoints that meets the preset distance condition as the information prompt endpoint, wherein the preset distance condition is the condition that the distance between the candidate information prompt endpoint and the information prompt starting point must meet.
[0119] In one possible embodiment of this application, the prompt endpoint determination module further includes a correction coefficient determination module and a prompt endpoint correction module. The correction coefficient determination module is used to obtain the body shape parameters of the second virtual object and determine the correction coefficient based on the body shape parameters. The prompt endpoint correction module is used to correct the position of the information prompt endpoint using the correction coefficient, so as to determine the corrected position as the final information prompt endpoint.
[0120] In one possible implementation of this application, the setting of the tilt angle includes any one of the following: a fixed first setting tilt angle, and a second setting tilt angle determined based on the boundary of the display area.
[0121] In one possible implementation of this application, the setting tilt angle includes a second set tilt angle. The information display device 600 in the game also includes a tilt angle determination module. The tilt angle determination module includes a boundary area determination module and a tilt angle selection module. The boundary area determination module is used to determine a target boundary area in the boundary of the display area that meets the boundary area requirement. The tilt angle selection module is used to select a set tilt angle in the target boundary area. The boundary area requirement is the requirement for the area corresponding to a portion of the boundary in the boundary of the display area.
[0122] In one possible implementation of this application, the boundary region determination module is specifically used to: segment the display area boundary to obtain multiple segmentation boundaries; determine the boundary region area corresponding to each segmentation boundary, and select the segmentation boundary that meets the boundary region area requirement as the target boundary region.
[0123] In one possible implementation of this application, the correction coefficient determination module is specifically used to: determine the ratio between the body shape parameter of the second virtual object and the reference body shape parameter, and determine the correction displacement based on the ratio.
[0124] In one possible embodiment of this application, the information display device 600 in the game further includes a display area boundary determination module. The display area boundary determination module is used to emit multiple second rays from the center point of the virtual camera to the second virtual object, and determine the second intersection point of each second ray with the model of the second virtual object; select boundary points representing the display area boundary of the second virtual object from the multiple second intersection points, and determine the display area boundary of the second virtual object based on the selected boundary points.
[0125] In one possible implementation of this application, the information prompting starting point includes a first information prompting starting point located at a fixed position on the model of the second virtual object and a second information prompting starting point whose position is variable. The position of the second information prompting starting point is determined by the geometry of the display area boundary.
[0126] The information display device in the game provided by this application can determine the information prompt area in real time based on the display area of the second virtual object in the graphical user interface at the current moment. This allows the information prompt area to be adjusted according to changes in the camera's perspective or the shape of the second virtual object, thereby effectively controlling the display range of the prompt information. This avoids the impact of reduced recognizability of the prompt information caused by changes in the background and model shape, improves information recognizability, enhances human-computer interaction efficiency, and solves the problems of low information recognizability and reduced human-computer interaction efficiency.
[0127] Please see Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 700 includes a processor 710, a memory 720, and a bus 730.
[0128] The memory 720 stores machine-readable instructions executable by the processor 710. When the electronic device 700 is running, the processor 710 communicates with the memory 720 via the bus 730. When the machine-readable instructions are executed by the processor 710, they can perform the operations described above. Figure 1 The steps of the information display method in the game in the illustrated embodiment are as follows:
[0129] A graphical user interface (GUI) is provided through a terminal device, displaying at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device. In response to a movement control command for the first virtual object, the first virtual object is controlled to move within the game scene. In response to a specified interactive behavior occurring between the first and second virtual objects, an information prompt area is provided at the second virtual object based on its display area in the GUI. The size of the information prompt area varies with the display area. The specified interactive behavior includes game behavior involving adjusting preset attribute parameters of the second virtual object. Prompt information indicating the preset attribute parameters of the second virtual object is provided in the information prompt area.
[0130] The electronic device provided in this application can determine the information prompt area in real time based on the display area of the second virtual object in the graphical user interface at the current moment. This allows the information prompt area to be adjusted according to changes in the camera's perspective or the shape of the second virtual object, thereby effectively controlling the display range of the prompt information. This avoids the impact of reduced recognizability of the prompt information caused by changes in the background and model shape, improves information recognizability, enhances human-computer interaction efficiency, and solves the problems of low information recognizability and reduced human-computer interaction efficiency.
[0131] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 The steps of the information display method in the game in the illustrated embodiment are as follows:
[0132] A graphical user interface (GUI) is provided through a terminal device, displaying at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device. In response to a movement control command for the first virtual object, the first virtual object is controlled to move within the game scene. In response to a specified interactive behavior occurring between the first and second virtual objects, an information prompt area is provided at the second virtual object based on its display area in the GUI. The size of the information prompt area varies with the display area. The specified interactive behavior includes game behavior involving adjusting preset attribute parameters of the second virtual object. Prompt information indicating the preset attribute parameters of the second virtual object is provided in the information prompt area.
[0133] The computer-readable storage medium provided in this application can determine the information prompt area in real time based on the display area of the second virtual object in the graphical user interface at the current moment. This allows the information prompt area to be adjusted according to changes in the camera's perspective or the shape of the second virtual object, thereby effectively controlling the display range of the prompt information. This avoids the impact of reduced recognizability of the prompt information caused by changes in the background and model shape, improves information recognizability, enhances human-computer interaction efficiency, and solves the problems of low information recognizability and reduced human-computer interaction efficiency.
[0134] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0135] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0136] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0137] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0138] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, 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 this application. 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.
[0139] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application 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, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such 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 this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for displaying information in a game, characterized in that, A graphical user interface is provided through a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device, including: In response to a movement control command for the first virtual object, the first virtual object is controlled to move within the game scene; In response to a specified interaction between the first virtual object and the second virtual object, an information prompt area is provided at the second virtual object based on the display area of the second virtual object in the graphical user interface. The size of the information prompt area changes with the display area. The specified interaction includes game behavior that adjusts preset attribute parameters of the second virtual object. The information prompt area provides prompt information to indicate the preset attribute parameters of the second virtual object.
2. The method according to claim 1, characterized in that, The change in the size of the information prompt area with the change in the display area includes: the size of the information prompt area changes according to the change in the display area of the second virtual object under different viewing angles and / or different forms.
3. The method according to claim 1, characterized in that, The information prompt area includes an information prompt starting point. Providing an information prompt area at the location of the second virtual object based on the display area of the second virtual object in the graphical user interface includes: Based on the starting point of the information prompt, the ending point of the information prompt is selected on the boundary of the display area corresponding to the display area; Based on the information prompt start point and the information prompt end point, determine the area size of the information prompt area corresponding to the display area; The information prompt area is provided at the starting point of the information prompt according to the area size.
4. The method according to claim 3, characterized in that, The provision of prompt information in the information prompt area to indicate the preset attribute parameters of the second virtual object includes: Based on the information prompt endpoint and the information prompt start point, an information prompt trajectory is selected in the information prompt area to provide prompt information for the preset attribute parameters along the information prompt trajectory.
5. The method according to claim 3, characterized in that, The step of selecting the information prompt endpoint on the boundary of the display area corresponding to the display area includes: A first ray is emitted from the starting point of the information prompt along a set tilt angle, and the endpoint of the information prompt is determined based on the first intersection point of the first ray and the boundary of the display area.
6. The method according to claim 5, characterized in that, The step of determining the information prompt endpoint based on the first intersection point of the first ray and the boundary of the display area includes: On the boundary of the display area, select a boundary point centered on the first intersection point and within a preset range as the candidate information prompt endpoint; The boundary points among the candidate information prompt endpoints that meet the preset distance conditions are determined as information prompt endpoints. The preset distance conditions are the conditions that the distance between the candidate information prompt endpoints and the information prompt starting points must meet.
7. The method according to claim 5 or 6, characterized in that, The method further includes: Obtain the body shape parameters of the second virtual object, and determine the correction coefficient based on the body shape parameters; The position of the information prompt endpoint is corrected using the correction coefficient, and the corrected position is determined as the final information prompt endpoint.
8. The method according to claim 5, characterized in that, The set tilt angle includes any one of the following: a fixed first set tilt angle, or a second set tilt angle determined based on the boundary of the display area.
9. The method according to claim 8, characterized in that, The set tilt angle includes the second set tilt angle, and the method further includes: Determine the target boundary region within the display area boundary that meets the boundary region area requirements; Select a set tilt angle in the target boundary region. The boundary region area requirement is the area requirement for the area corresponding to a portion of the boundary defined in the display area boundary.
10. The method according to claim 9, characterized in that, Determining the target boundary region within the display area boundary that meets the boundary region area requirements includes: The display area boundary is segmented to obtain multiple segmentation boundaries; Determine the area of the boundary region corresponding to each segmentation boundary, and select the segmentation boundary that meets the boundary region area requirements as the target boundary region.
11. The method according to claim 7, characterized in that, The determination of the corrected displacement based on the body shape parameters includes: Determine the ratio between the size parameters of the second virtual object and the reference size parameters, and determine the correction displacement based on the ratio.
12. The method according to claim 3, characterized in that, The display area boundary corresponding to the display area is determined by the following methods: Multiple second rays are emitted from the center point of the virtual camera toward the second virtual object, and the second intersection point of each second ray with the model of the second virtual object is determined; Select a boundary point from multiple second intersection points to characterize the display area boundary of the second virtual object in the current view, and determine the display area boundary of the second virtual object based on the selected boundary point.
13. The method according to claim 3, characterized in that, The information prompting starting point includes a first information prompting starting point located at a fixed position on the model of the second virtual object and a second information prompting starting point whose position is variable. The position of the second information prompting starting point is determined by the geometry of the display area boundary.
14. An information display device for a game, characterized in that, A graphical user interface is provided through a terminal device, which displays at least a portion of the game scene. The game scene includes a first virtual object and a second virtual object controlled by the terminal device, including: The movement control module is used to control the first virtual object to move in the game scene in response to a movement control command for the first virtual object; The prompt area determination module is used to respond to a specified interaction behavior between the first virtual object and the second virtual object, and to provide an information prompt area at the second virtual object based on the display area of the second virtual object in the graphical user interface. The area size of the information prompt area changes with the change of the display area. The specified interaction behavior includes game behavior that adjusts the preset attribute parameters of the second virtual object. The prompt information display module is used to provide prompt information in the information prompt area to indicate the preset attribute parameters of the second virtual object.
15. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the information display method in a game as claimed in any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the information display method in a game as described in any one of claims 1 to 13.