Display method, device and electronic device of skill indicator
By determining the skill release position and damage range in the hexagonal scene map, and generating skill indicators that are highly matched with the damage range, the problem of poor indication effect in the prior art is solved and the user's combat decision-making efficiency is improved.
Patent Information
- Application Number
- CN202210197638.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-03-02
AI Technical Summary
In the hexagonal scene map, existing skill indicators cannot accurately indicate the skill damage range, making it difficult for users to determine whether they are attacked and affect combat decisions.
By determining the skill release position and damage range under the hexagonal scene unit, the direction information of the skill indicator is generated based on the relative position of the specified scene unit in the damage range, and the indicator is generated along the direction based on the release position.
It improves the degree of matching between the skill indicator and the damage range, ensures that users can accurately identify the attacked area, and improves human-computer interaction efficiency.
Smart Images

Figure CN114712852B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of human-computer interaction, and in particular, to a display method, device, and electronic device for a skill indicator. Background Art
[0002] In combat games, the scene map of the game scene is usually composed of continuous polygons, such as quadrilaterals or hexagons. Compared with the quadrilateral scene map, the hexagonal scene map has many advantages, such as the largest area with the same perimeter, the equal distance from the center of the cell to the center points of adjacent cells in all directions, and deeper strategies. For skills with area-of-effect attacks, before the skill is released, a skill indicator is usually displayed, and the skill indicator indicates the damage area after the skill is released based on the release direction and damage range of the skill. Since the damage range of the skill is usually a standard shape, such as a circle, rectangle, sector, cone, etc., the damage area indicated by the skill indicator cannot be perfectly matched with the hexagons in the map, resulting in difficulty for users to determine whether a certain hexagonal area is attacked based on the damage area indicated by the skill indicator, and the indication effect of the skill indicator is poor, affecting the user's combat decision-making. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a display method, device, and electronic device for a skill indicator, so as to improve the indication effect of the indicator and further improve the human-computer interaction efficiency of users.
[0004] In a first aspect, an embodiment of the present invention provides a display method for a skill indicator. A graphical user interface is provided by a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of scene units arranged continuously; the scene units are hexagons; the method includes: responding to a trigger operation for a target skill, determining the release position and damage range of the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; determining the direction information of the skill indicator of the target skill based on the relative positions of a plurality of specified scene units in the damage range; generating and displaying a skill indicator along the direction indicated by the direction information with the release position as a reference based on the preset indicator parameters of the target skill.
[0005] The step of responding to a trigger operation for a target skill and determining the release position and damage range of the target skill includes: responding to a dragging operation on a skill control for the target skill, and determining the release position of the target skill based on the dragging position of the skill control; in the hexagonal coordinate system of the virtual scene, determining the coordinate information of each scene unit in the damage range of the target skill based on the preset damage range parameters and release position of the target skill; and determining the coordinate information of each scene unit in the damage range of the target skill as the damage range of the target skill.
[0006] The steps of determining the direction information of the skill indicator of the target skill based on the relative positions of multiple specified scenario units in the damage range include: obtaining the target scenario unit in the damage range that is farthest from the release position; determining the direction information of the skill indicator of the target skill according to the relationship between the line connecting the target scenario position and the release position and the edges and corners of the hexagon.
[0007] The steps of determining the direction information of the skill indicator of the target skill according to the relationship between the line connecting the target scenario unit and the release position and the edges and corners of the hexagon include: if the line connecting the target scenario unit and the release position meets the specified conditions, determining the direction information of the skill indicator of the target skill based on the target scenario unit and the release position; where the specified conditions include: the line connecting the target scenario unit and the release position is perpendicular to any side of the hexagon or passes through any corner of the hexagon; if the line connecting the target scenario unit and the release position does not meet the specified conditions, determining the direction information of the skill indicator of the target skill based on the target scenario unit, the adjacent scenario unit of the target scenario unit, and the release position; where the distance between the adjacent scenario unit and the release position is not less than the distance between the scenario unit other than the target scenario unit in the damage range and the release position.
[0008] The steps of, if the line connecting the target scenario unit and the release position meets the specified conditions, determining the direction information of the skill indicator of the target skill based on the target scenario unit and the release position include: if the line connecting the target scenario unit and the release position meets the specified conditions, determining the difference between the coordinate information of the target scenario unit domain release position as the direction information of the skill indicator of the target skill.
[0009] The steps of, if the line connecting the target scenario unit and the release position does not meet the specified conditions, determining the direction information of the skill indicator of the target skill based on the target scenario unit, the adjacent scenario unit of the target scenario unit, and the release position include: if the line connecting the target scenario unit and the release position does not meet the above-specified conditions, calculating the sum of the coordinate information of the target scenario unit and the adjacent scenario unit to obtain an intermediate result; determining the difference between the intermediate result and the coordinate information of the release position as the direction information of the skill indicator of the target skill.
[0010] The steps of generating and displaying the skill indicator based on the preset indicator parameters of the target skill and along the direction indicated by the direction information with the release position as the reference include: determining the size parameters of the skill indicator based on the shape of the damage range and the damage distance of the target skill; generating and displaying the skill indicator starting from the release position along the direction indicated by the direction information; where the display size of the skill indicator matches the size parameters.
[0011] In a second aspect, an embodiment of the present invention provides a display device for a skill indicator, which provides a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene unit is a hexagon; the device includes: a first determination module, configured to determine the release position and damage range of a target skill in response to a trigger operation for the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; a second determination module, configured to determine the direction information of the skill indicator of the target skill based on the relative positions of a plurality of specified scene units in the damage range; a display module, configured to generate and display the skill indicator along the direction indicated by the direction information with the release position as a reference based on the preset indicator parameters of the target skill.
[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, 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 skill indicator display method.
[0013] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, the machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-mentioned skill indicator display method.
[0014] The embodiments of the present invention bring the following beneficial effects:
[0015] The above-mentioned skill indicator display method, device and electronic device provide a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene unit is a hexagon; in response to a trigger operation for a target skill, the release position and damage range of the target skill are determined; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; the direction information of the skill indicator of the target skill is determined based on the relative positions of a plurality of specified scene units in the damage range; based on the preset indicator parameters of the target skill, the skill indicator is generated and displayed along the direction indicated by the direction information with the release position as a reference. In this way, the release position and damage range of the skill are determined under the hexagon scene unit, and the direction information is determined based on the specified scene units in the damage range, and then the skill indicator is generated and displayed based on parameters such as the direction information and the release position; the skill indicator generated in this way has a high matching degree with the damage range of the skill, which is beneficial for users to quickly determine whether a certain hexagonal area is attacked based on the skill indicator, the damage range of the skill is accurately and clearly indicated, the indication effect of the skill indicator is improved, and the human-computer interaction efficiency of users is further improved.
[0016] Other features and advantages of the present invention will be set forth in the following description, and in part will be obvious from the description, or may be learned by practice of the present invention. The objectives and other advantages of the present invention are realized and attained by the structure particularly pointed out in the specification, claims and drawings.
[0017] To make the above objectives, features and advantages of the present invention more comprehensible, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. Brief Description of the Drawings
[0018] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 Schematic diagram of a skill indicator indicating the damage range provided by an embodiment of the present invention;
[0020] Figure 2 Flowchart of a display method of a skill indicator provided by an embodiment of the present invention;
[0021] Figure 3 Schematic diagram of a hexagonal coordinate system for positioning a scene unit provided by an embodiment of the present invention;
[0022] Figure 4 Schematic diagram of a damage range provided by an embodiment of the present invention;
[0023] Figure 5 Schematic diagram of a positional relationship provided by an embodiment of the present invention;
[0024] Figure 6 Schematic diagram of another positional relationship provided by an embodiment of the present invention;
[0025] Figure 7 Schematic diagram of another skill indicator indicating the damage range provided by an embodiment of the present invention;
[0026] Figure 8 Schematic diagram of data processing during the generation process of a skill indicator provided by an embodiment of the present invention;
[0027] Figure 9 Schematic diagram of the structure of a display device of a skill indicator provided by an embodiment of the present invention;
[0028] Figure 10A structural schematic diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0029] 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. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0030] In most virtual scenario applications, such as combat games, it is necessary to set up a scenario map for users to control the movement of characters within the map. Compared with a quadrilateral map, a scenario map composed of hexagons is increasingly widely used due to its advantages such as the largest area with the same perimeter, the equal distance from the center of a cell to the center points of adjacent cells in all directions, and deeper strategies. During the combat process, users can control the character to release a range damage skill. In order to give full play to combat strategies to a greater extent in the hexagon map scenario, it is crucial to accurately and clearly display the damage range area of the skill to the user using a skill indicator before the skill damage takes effect.
[0031] The skill indicator is a control generated based on a certain size and direction and used to indicate the scenario area covered by the skill's action range, and has various shapes such as rectangle, circle, sector, and cone. In the related art, the skill indicator is generated and displayed in a pure physical manner. Figure 1 As an example of a rectangular skill indicator indicating the damage area, a relevant coordinate system (such as a two-dimensional coordinate system) is established with a certain fixed point on the map as the origin in the hexagon map scenario, and the position of each geometric point inside the hexagon in the scenario map is located in the form of point coordinates. Among them, A is the position point of the target character. The user locks the relevant parameters of the skill to be released by the character and releases the skill at position B on the map. The damage position coordinates are calculated in the coordinate system according to the skill parameters, and the skill indicator is generated and displayed using the direction vector obtained from the damage position coordinates and the A position coordinates and the pre-fixed indicator size, that is, the hatched rectangular part in the figure. However, when the damage area indicated by this skill indicator intersects with the hexagon map, it is in a non-edge and non-corner position, and users are prone to confusion about whether damage is caused at positions E and C. Therefore, the skill indicator generated and displayed with points on the map as the minimum calculation unit cannot utilize the strategic depth advantage brought by the hexagon grid. In addition, the skill indicator generated by this method often intersects with the hexagon at non-edge and non-corner positions, and it is impossible to clearly identify whether the intersecting part is damaged, which has a very strong confusing effect on users' understanding of hexagons and using hexagons for strategic matching. The indication effect of the skill indicator is poor, affecting users' combat decisions.
[0032] Based on this, a display method, device, and electronic device for a skill indicator provided by an embodiment of the present invention can be applied in games or other virtual scenarios, and in particular, can be applied to skill indication in combat games.
[0033] In one embodiment of the present invention, the display method of the skill indicator can run on a touch local terminal device or a server. When the display method of the skill indicator runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and client devices.
[0034] In an alternative embodiment, various cloud applications can run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running entity of the game program and the presenting entity of the game screen are separated. The storage and running of the display method of the skill indicator are completed on the cloud game server, and the role of the client device is for data reception, sending, and game screen presentation. For example, the client device can be a display device with data transmission function near the user side, such as a mobile terminal, a television, a computer, a personal digital assistant, etc.; however, the information processing is performed by the cloud game server in the cloud. When playing a game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses data such as the game screen, returns it to the client device through the network, and finally, the client device decodes and outputs the game screen.
[0035] In an alternative embodiment, taking a game as an example, the local touch terminal device stores a game program and is used to present the game screen. The local touch terminal device is used to interact with the player through a graphical user interface, that is, conventionally, the game program is downloaded and installed on the electronic device and run. The way the local touch terminal device provides the graphical user interface to the player can include various methods. For example, it can be rendered and displayed on the display screen of the terminal, or provided to the player through holographic projection. For example, the local touch terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, and the graphical user interface includes the game screen. The processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.
[0036] In a possible implementation manner, an embodiment of the present invention provides a method for displaying a skill indicator. A graphical user interface is provided through a touch terminal device. The touch terminal device may be the aforementioned local touch terminal device or the client device in the aforementioned cloud interaction system. A graphical user interface is provided through the touch terminal device, and the content of the interface can be displayed according to the type of the launched application program. For example, a game scene screen, a communication interaction window, etc. In this embodiment, a virtual scene is displayed in the graphical user interface. The virtual scene may be a simulation environment of the real world, a semi-simulated and semi-fictional virtual environment, or a purely fictional virtual environment. It should be noted that the virtual scene is composed of a plurality of continuously arranged scene units, and the shape of the scene unit is a hexagon. That is, the virtual scene is composed of continuously arranged hexagons. Except for the hexagons located at the edge, each hexagon has six sides adjacent to other hexagons.
[0037] For ease of understanding of this embodiment, a method for displaying a skill indicator disclosed in an embodiment of the present invention will be introduced in detail as follows. Figure 2 As shown, a graphical user interface is provided through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene unit is a hexagon; the method for displaying the skill indicator includes the following steps:
[0038] Step S202: Respond to a trigger operation for a target skill, and determine the release position and damage range of the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units;
[0039] Skills are various special functions in the virtual scene that can assist the target character in interacting with other characters. The skill types of skills can include attack skills, defense skills, healing skills, etc. Skills are also divided into targeted skills and area skills. A targeted skill is a skill that needs to specify a release direction or a release target during the skill release process. An area skill is a skill that needs to specify a release range during the skill release process, and the release range can be determined by specifying a shape and a release distance.
[0040] Here, the target skill is an area ability for the user to control the target character to use or release an attack and cause damage to other virtual characters. The damage shape of this skill includes: rectangle, circle, sector, cone, etc., and there are multiple settings for the damage distance. The user can control the target character to release the target skill to a hexagonal scene unit in the virtual scene, trigger the damage effect of the area damage at this position and cause a certain damage range in the scene. Among them, the position of the hexagonal scene unit is the release position; the damage range can be determined according to the shape of the skill damage and the damage distance parameter, including multiple scene units including the release position. For example, when the skill damage shape is a circle, the damage range can include the release position and multiple hexagonal scene units centered on the release range, and the outlines of the multiple hexagonal scene units are relatively close to a circle.
[0041] The trigger operation is a user operation received by the client on the skill button, and the client generates a trigger instruction according to the received user operation. Exemplarily, the user operation can be at least one of an operation on a user interface control, a voice operation, an action operation, a text operation, a mouse operation, a keyboard operation, and a game joystick operation.
[0042] In this step, in the graphical user interface or a specified window within the graphical user interface, the user triggers the skill control to control the target character to release the target skill. In response to the user's trigger operation, the release position and the damage range of the target skill are determined. Specifically, the release position can be determined by the position of the hexagonal scene unit where the skill release point is located; the damage range can be determined by the set of positions of the hexagonal scene units covered by the damage distance of the skill. Here, the hexagonal scene unit is used as the smallest unit to locate the release position and the damage range, and the damage range area fits well with the virtual scene, improving the accuracy of the damage range.
[0043] Step S204, determine the direction information of the skill indicator of the target skill based on the relative positions of multiple specified scene units in the damage range;
[0044] As described above, the skill indicator has a certain size and a determined direction and is used to indicate the damage range after the target skill is released. The indicator shape is generally the same as the damage shape of the skill, including: rectangular indicator, circular indicator, sector indicator, cone indicator. The damage range indicated by the skill indicator includes multiple hexagonal scene units. Taking the hexagonal scene unit as the smallest measurement unit, the direction information of the skill indicator is determined according to the relative positions of multiple specified scene units in the damage range. Specifically, the target scene unit farthest from the release position in the damage range can be obtained, and the direction information of the skill indicator of the target skill can be determined according to the relationship between the connection line between the target scene position and the release position and the corners of the hexagon.
[0045] Specifically, when the damage shape of the skill is circular, the direction information of the above skill indicator can be the direction of a diameter in the circle. When the damage shape of the skill is other shapes, the direction information of the above skill indicator is usually related to the release direction of the skill. For example, when the damage shape is rectangular, the direction information of the skill indicator is the direction of the center line in the length direction of the rectangle.
[0046] Step S206: Based on the preset indicator parameters of the target skill, taking the release position as a reference, generate and display a skill indicator along the direction indicated by the direction information.
[0047] The above preset indicator parameters of the target skill are related to the size parameters, shape parameters, etc. of the skill indicator, and can be determined and set in advance according to the damage shape and damage distance of the target skill. Specifically, the size parameters of the skill indicator are preset by the damage shape of the target skill, and different damage shapes preset different size parameters; the parameter values of the skill indicator can be preset according to the damage distance.
[0048] Furthermore, taking the release position as the starting point, generate and display a skill indicator along the direction indicated by the direction information according to the preset size parameter. In this case, since the hexagonal scene unit is used as the minimum measurement unit for the display calculation of the skill indicator, it highly conforms to the virtual scene structure spliced by hexagons, improving the indication effect of the skill indicator and further enhancing the user's human-computer interaction efficiency.
[0049] The above display method of the skill indicator provides a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene unit is a hexagon; in response to a trigger operation for the target skill, determine the release position and damage range of the target skill; where the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; based on the relative positions of a plurality of specified scene units in the damage range, determine the direction information of the skill indicator of the target skill; based on the preset indicator parameters of the target skill, taking the release position as a reference, generate and display a skill indicator along the direction indicated by the direction information. In this method, determine the release position and damage range of the skill under the hexagonal scene unit, and determine the direction information based on the specified scene units in the damage range, and then generate and display a skill indicator based on parameters such as the direction information and release position; the skill indicator generated in this way has a high degree of matching with the damage range of the skill, which is beneficial for the user to quickly determine whether a certain hexagonal area is attacked based on the skill indicator, and the damage range of the skill is accurately and clearly indicated, improving the indication effect of the skill indicator and further enhancing the user's human-computer interaction efficiency.
[0050] The following embodiments provide specific implementation manners for determining the release position and damage range of a target skill.
[0051] In response to a drag operation on a skill control for a target skill, based on the drag position of the skill control, determine the release position of the target skill; in the hexagonal coordinate system of the virtual scene, based on the preset damage range parameters of the target skill and the release position, determine the coordinate information of each scene unit in the damage range of the target skill; and determine the coordinate information of each scene unit in the damage range of the target skill as the damage range of the target skill.
[0052] First, control the movement of the control between the hexagonal scene units in the virtual scene through the user's drag operation on the skill control, and use the real-time position of the skill control as the release position for the user to control the target character to release the target skill. It should be noted that when the user drags the skill control to move in the virtual scene, the skill control is not released at this time, and the skill is not released either.
[0053] Next, in the hexagonal coordinate system of the virtual scene, based on the preset damage range parameters of the target skill and the release position, determine the coordinate information of each scene unit in the damage range of the target skill; where the hexagonal coordinate system is a coordinate system extended in three directions of the hexagonal scene units in the scene, as Figure 3 shown, a virtual scene example composed of regular hexagonal scene units. In the virtual scene, a regular hexagonal scene unit is used as a measurement unit, and a regular hexagon (the filled part in the figure) is set as the coordinate origin in advance to establish a regular hexagonal coordinate system to represent the positions of each scene unit in the scene. In this way, the position of each object in the virtual scene can be represented by the coordinates of the corresponding scene unit. The preset damage range parameters refer to the relative coordinate parameters of the damage range preset for the target skill, which can be read from the damage range relative coordinate set according to the damage shape and damage distance parameters of the target skill.
[0054] In one embodiment, the damage range relative coordinate set is a coordinate set of the damage range corresponding to each release position set according to the skill parameters of different damage shapes and damage distances in the hexagonal coordinate system. This set takes the release position as the origin and calculates the relative coordinates. Further, the preset damage range parameters read can be added to the coordinates of the skill release position located in the hexagonal coordinate system to obtain the coordinate information of each scene unit in the damage range of the skill.
[0055] Finally, represent the damage range of the target skill with the coordinate set of each scene unit in the above damage range.
[0056] In this step, the release position and damage range of the target skill are precisely located using hexagonal coordinates. Among them, the method of obtaining the damage range coordinates through the preset relative coordinates of the damage range is simple and convenient, greatly reducing the computing pressure on the computer.
[0057] The following embodiments provide specific implementation manners for determining the direction information of the skill indicator.
[0058] In obtaining the damage range, the target scene unit farthest from the release position is acquired; according to the relationship between the connection line of the target scene position and the release position and the edges and corners of the hexagon, the direction information of the skill indicator of the target skill is determined.
[0059] There can be one or multiple target scene units that are farthest from the release position. Taking one target scene unit as an example, the relationship between the connection line of the target scene position and the release position and the edges and corners of the hexagon can include various cases. For example, the connection line of the target scene position and the release position may be perpendicular to any side of the hexagonal scene unit, may pass through any corner of the hexagonal scene unit, or may neither be perpendicular to any side nor pass through any corner.
[0060] If the connection line of the target scene position and the release position is perpendicular to any side of the hexagonal scene unit or passes through any corner of the hexagonal scene unit, then the direction of the connection line of the target scene position and the release position can be used as the direction information of the skill indicator; if the connection line of the target scene position and the release position is neither perpendicular to any side of the hexagonal scene unit nor passes through any corner of the hexagonal scene unit, then multiple target scene positions need to be acquired so that the connection line between the center point of the multiple target scene positions and the release position is perpendicular to any side of the hexagonal scene unit or passes through any corner of the hexagonal scene unit.
[0061] For the sake of easy understanding, Figure 4 As an example, A is the position of the target character, and the area where scene units 1 - 10 are located is the damage range caused by the target skill with the 1st target scene position as the release position and a damage distance of 4 scene units. Among them, the 10th target scene is the farthest from the release position and is determined as the target scene unit. Further, according to the relationship between the connection line of the target scene position and the release position and the edges and corners of the hexagon, the direction information of the skill indicator of the target skill is determined.
[0062] Specifically, if the line connecting the target scenario unit and the release position meets the specified conditions, the direction information of the skill indicator of the target skill is determined based on the target scenario unit and the release position; wherein, the specified conditions include: the line connecting the target scenario unit and the release position is perpendicular to any side of the hexagon, or passes through any corner of the hexagon; if the line connecting the target scenario unit and the release position does not meet the specified conditions, the direction information of the skill indicator of the target skill is determined based on the target scenario unit, the adjacent scenario units of the target scenario unit, and the release position; wherein, the distance between the adjacent scenario unit and the release position is not less than the distance between the scenario unit other than the target scenario unit in the damage range and the release position. It can be understood that the adjacent scenario unit is the scenario unit other than the target scenario unit that is the farthest from the releasing party. The distance between this adjacent scenario unit and the releasing unit may be the same as or different from the distance between the target scenario unit and the releasing unit.
[0063] The above-mentioned positional relationship where the line connecting the target scenario unit and the release position is perpendicular to any side of the hexagon can be illustrated by the Figure 5 positional relationship of the line segment in; the above-mentioned positional relationship where the line connecting the target scenario unit and the release position passes through any corner of the hexagon can be illustrated by the Figure 6 positional relationship of the line segment in.
[0064] In one implementation, it is possible to determine whether the line connecting the target scenario unit and the release position meets the above-mentioned specified conditions by the position coordinates of the scenario unit in the hexagon coordinate system. Specifically, assuming that the release position coordinate is (a1, b1, c1) and the target scenario unit coordinate is (a2, b2, c2), calculate the differences in each direction, that is, d a = a2 - a1, d b = b2 - b1, d c = c2 - c1. If there is exactly 1 of d a , d b , d c that is 0, it indicates that the line connecting the target scenario unit and the release position is perpendicular to any side of the hexagon; if d a , d b , d c are all not 0, but there are exactly two of the three that are equal, then the line connecting the target scenario unit and the release position passes through any corner of the hexagon; if d a , d b , d c are all different from each other, it indicates that the line connecting the target scenario unit and the release position does not meet the above-mentioned specified conditions.
[0065] According to the situation where the line connecting the target scenario unit and the release position meets the specified conditions, different methods are used to calculate the direction information of the skill indicator. Specifically, taking Figure 4For example, if the line connecting the target scenario unit and the release position meets the specified conditions, the direction information of the skill indicator of the target skill is determined based on the positions of the 1st and 10th hexagonal scenario units; if the line connecting the target scenario unit and the release position does not meet the specified conditions, the distance between the 9th and 1st scenario units is not less than the distance between the 1st scenario unit and the other scenario units except the 10th scenario unit within the damage range, and the adjacent scenario unit should be the 9th hexagonal scenario unit. Therefore, the direction information of the skill indicator of the target skill is determined based on the positions of the 10th, 9th, and 1st hexagonal scenario units.
[0066] The following elaborates on the specific calculation method for determining the direction information of the skill indicator of the target skill. In one method, if the line connecting the target scenario unit and the release position meets the specified conditions, the difference between the coordinate information of the target scenario unit and the release position is determined as the direction information of the skill indicator of the target skill.
[0067] Specifically, when the line connecting the target scenario unit and the release position meets the specified conditions, if the release position coordinate within the coordinate set of the damage range is (a1, b1, c1) and the target scenario unit coordinate is (a2, b2, c2), then the direction information of the skill indicator of this skill is (a2 - a1, b2 - b1, c2 - c1). It can be understood that the direction of the line connecting the target scenario unit and the release position is the direction information of the skill indicator.
[0068] In another method, if the line connecting the target scenario unit and the release position does not meet the specified conditions, the sum of the coordinate information of the target scenario unit and the adjacent scenario unit is calculated to obtain an intermediate result; the difference between the intermediate result and the coordinate information of the release position is determined as the direction information of the skill indicator of the target skill.
[0069] Specifically, when the line connecting the target scenario unit and the release position does not meet the specified conditions, if the release position coordinate is (a1, b1, c1), the target scenario unit coordinate is (a2, b2, c2), and the adjacent scenario unit coordinate is (a3, b3, c3), then the direction information of the skill indicator is (a2 + a3 - 2a1, b2 + b3 - 2b1, c2 + c3 - 2c1).
[0070] The following embodiments provide specific implementation methods for displaying the skill indicator.
[0071] Based on the shape of the damage range and the damage distance of the target skill, the size parameter of the skill indicator is determined; starting from the release position, the skill indicator is generated and displayed along the direction indicated by the direction information; wherein, the display size of the skill indicator matches the size parameter.
[0072] Specifically, the shape of the skill indicator is consistent with the shape of the target skill damage. Different damage range shapes are preset with different size parameters. For example, for a rectangular damage shape, the length and width parameters of the indicator are set; for fan-shaped, conical, and circular damage shapes, the radius parameter is set. The parameter values of the skill indicator are preset according to the skill damage distance. In one embodiment, taking a rectangle as an example, the maximum damage distance can reach 4 scene units, and the width of the indicator remains unchanged at 3 scene unit side lengths. When the damage distance increases from 1 scene unit to 4 scene units, the lengths of the indicator are 1.5, 3, 4.75, and 6.25 scene unit side lengths respectively. Further, starting from the release position, a skill indicator is generated and displayed along the direction indicated by the direction information.
[0073] For ease of understanding, Figure 7 shows a schematic diagram of a rectangular indicator indicating the damage range in an embodiment. Among them, the rectangle filled with a horizontal line in the schematic diagram is the generated rectangular indicator; the hexagon splicing area filled with dots is the damage range indicated by the indicator; the direction of the dotted arrow is the direction information of the indicator; the direction of the solid arrow is the release direction of the target skill. From Figure 7 it can be seen that the skill indicator generated by the method of this embodiment has a high intersection-over-union ratio with the damage range of the skill, that is, the skill indicator has a high matching degree with the damage range, and this skill indicator can clearly and accurately indicate which hexagon scene units will be attacked by the target skill.
[0074] This embodiment also provides another specific implementation method, and the data processing logic flow of this method is as Figure 8 shown. The following is a detailed introduction to the display process of this skill indicator:
[0075] 1) Obtain the set of actual damage range coordinates.
[0076] As Figure 7As shown in the figure, A is the position of the target character. The area where scene units 1 - 10 are located is the damage range caused by a skill released from the 1st hexagon with a distance of 3 scene units as the release position and a damage distance of 3 scene units. Taking the hexagon scene unit as the smallest measurement unit, setting the release position as the origin, a hexagonal coordinate system is established. The coordinate of the damage range composed of these 10 scene units is: 1-(0,0,0), 2-(1,-1,0), 3-(-1,1,0), 4-(1,0,-1), 5-(0,1,-1), 6-(0,2,-2), 7-(2,0,-2), 8-(1,1,-2), 9-(2,1,-3), 10-(1,2,-3). Among them, the 10th scene unit is the farthest from the release position and is determined as the target scene unit; the distance between the 9th and 1st scene units is not less than the distance between the 1st scene unit and other scene units (except the 10th scene unit) in the damage range, so the 9th scene unit is determined as the adjacent scene unit.
[0077] 2) Judge whether the connection line between the target scene unit and the release position meets the conditions according to the position coordinates.
[0078] The release position coordinate in the damage range is (0,0,0), and the target scene unit coordinate is (1,2,-3). Calculate the difference in each direction to get d a =1, d b =3.d c =-3, getting d a , d b , d c are all non-zero and not equal to each other, so the connection line between the target scene unit and the release position does not meet the specified conditions.
[0079] 3) According to the judgment result, calculate the indicator direction information using the target scene unit coordinates, adjacent scene unit coordinates and release position coordinates.
[0080] The release position coordinate in the damage range set is (a1, b1, c1)=(0,0,0), the target scene unit coordinate is (a2, b2, c2)=(1,2,-3), and the adjacent scene unit coordinate is ((a3, b3, c3)=(2,1,-3). Then the skill indicator direction vector is: (a2 + a3 - 2a1, b2 + b3 - 2b1, c2 + c3 - 2c1)=(3,3,-6).
[0081] 4) Obtain the preset indicator parameters according to the damage shape and length.
[0082] According to the above description, when the damage distance is 3 scene units, the length of the rectangular indicator is 4.75 scene unit side lengths, and the width is 3 scene unit side lengths.
[0083] 5) Calculate the specific position of the indicator and generate and display it.
[0084] Taking the release position coordinates (0, 0, 0) as the starting point of the rectangle center, with the direction of (3, 3, -6), and using 4.75 side lengths of the scene unit and 3 side lengths of the scene unit as the length and width parameter values, generate and display the skill indicator.
[0085] It should be noted that while the indicator is being displayed, the damage range indicated by the indicator is highlighted.
[0086] In the above method for displaying the skill indicator, the display range of the skill indicator is accurately calculated according to the preset size of the skill indicator and the calculated direction information. The damage range is precisely and clearly displayed, improving the indication effect of the skill indicator and further enhancing the user's human-computer interaction efficiency.
[0087] Corresponding to the above method embodiments, refer to Figure 9 The schematic diagram of a display device for a skill indicator as shown. Provide a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene unit is a hexagon; the device includes the following steps:
[0088] The first determination module 902 is used to respond to the trigger operation for the target skill and determine the release position and damage range of the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units;
[0089] The second determination module 904 is used to determine the direction information of the skill indicator of the target skill based on the relative positions of a plurality of specified scene units in the damage range;
[0090] The display module 906 is used to generate and display the skill indicator based on the preset indicator parameters of the target skill, with the release position as the reference, along the direction indicated by the direction information.
[0091] The display device of the above skill indicator provides a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; the virtual scene is composed of a plurality of continuously arranged scene units; the scene units are hexagons; in response to a trigger operation for a target skill, the release position and damage range of the target skill are determined; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; based on the relative positions of a plurality of specified scene units in the damage range, the direction information of the skill indicator of the target skill is determined; based on the preset indicator parameters of the target skill, with the release position as the reference, a skill indicator is generated and displayed along the direction indicated by the direction information. In this way, the hexagon scene unit is used as the smallest measurement unit to accurately generate and display the skill indicator, and the damage range is accurately and clearly displayed, improving the indication effect of the skill indicator and further enhancing the user's human-computer interaction efficiency.
[0092] The above first determination module is further configured to, in response to a dragging operation on the skill control of the target skill, determine the release position of the target skill based on the dragging position of the skill control; in the hexagon coordinate system of the virtual scene, based on the preset damage range parameters and the release position of the target skill, determine the coordinate information of each scene unit in the damage range of the target skill; and determine the coordinate information of each scene unit in the damage range of the target skill as the damage range of the target skill.
[0093] The above second determination module is further configured to obtain the target scene unit in the damage range that is the farthest from the release position; and determine the direction information of the skill indicator of the target skill according to the relationship between the connection line between the target scene position and the release position and the sides and corners of the hexagon.
[0094] The above second determination module is further configured to, if the connection line between the target scene unit and the release position meets the specified conditions, determine the direction information of the skill indicator of the target skill based on the target scene unit and the release position; wherein, the specified conditions include: the connection line between the target scene unit and the release position is perpendicular to any side of the hexagon or passes through any corner of the hexagon; if the connection line between the target scene unit and the release position does not meet the specified conditions, determine the direction information of the skill indicator of the target skill based on the target scene unit, the adjacent scene units of the target scene unit, and the release position; wherein, the distance between the adjacent scene unit and the release position is not less than the distance between the scene unit other than the target scene unit in the damage range and the release position.
[0095] The above second determination module is further configured to, if the connection line between the target scene unit and the release position meets the specified conditions, determine the difference between the coordinate information of the target scene unit domain and the release position as the direction information of the skill indicator of the target skill.
[0096] The above-mentioned second determination module is further configured to, if the connection line between the target scene unit and the release position does not meet the specified condition, calculate the sum of the coordinate information of the target scene unit and the adjacent scene unit to obtain an intermediate result; and determine the difference between the intermediate result and the coordinate information of the release position as the direction information of the skill indicator of the target skill.
[0097] The above-mentioned display module is further configured to determine the size parameter of the skill indicator based on the damage range shape and the damage distance of the target skill; generate and display the skill indicator starting from the release position along the direction indicated by the direction information; wherein, the display size of the skill indicator matches the size parameter.
[0098] This embodiment further provides an electronic device, including a processor and a memory. 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 skill indicator display method. The electronic device can be a server or a terminal device.
[0099] See Figure 10 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, and the processor 100 executes the machine-executable instructions to implement the above-mentioned skill indicator display method.
[0100] Furthermore, Figure 10 the electronic device shown further includes a bus 102 and a communication interface 103. The processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
[0101] Among them, the memory 101 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 103 (which can be wired or wireless), a communication connection is established between the system network element and at least one other network element, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 102 can be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 10 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0102] The processor 100 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 100 or the instructions in the form of software. The above-mentioned processor 100 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and combines its hardware to complete the steps of the method in the foregoing embodiments.
[0103] This embodiment also provides a machine-readable storage medium. The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above method for displaying the skill indicator.
[0104] The computer program product of the method, device, electronic device, and storage medium for displaying a skill indicator provided by the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the foregoing method embodiments. For specific implementation, reference can be made to the method embodiments, which will not be elaborated here.
[0105] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the foregoing method embodiments, which will not be elaborated here.
[0106] In addition, in the description of the embodiments of the present invention, unless otherwise clearly defined and limited, the terms "installation", "connection", and "coupling" shall be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or an integral connection; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediate medium, and it may be the communication inside two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0107] If the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0108] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0109] Finally, it should be noted that the above embodiments are only specific embodiments of the present invention, used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope 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 within the technical scope disclosed by the present invention can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A display method of a skill indicator, characterized in that, Provide a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; The virtual scene is composed of a plurality of continuously arranged scene units; the scene units are hexagons; the method includes: In response to a trigger operation for a target skill, determine the release position and damage range of the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; Based on the relative positions of a plurality of specified scene units in the damage range, determine the direction information of the skill indicator of the target skill; Based on the preset indicator parameters of the target skill, generate and display the skill indicator along the direction indicated by the direction information with the release position as the reference; The step of determining the direction information of the skill indicator of the target skill based on the relative positions of a plurality of specified scene units in the damage range includes: Obtain the target scene unit in the damage range that is the farthest from the release position; Based on the relationship between the connection line between the target scene unit and the release position and the sides and corners of the hexagon, determine the direction information of the skill indicator of the target skill; The step of determining the direction information of the skill indicator of the target skill based on the relationship between the connection line between the target scene unit and the release position and the sides and corners of the hexagon includes: If the connection line between the target scene unit and the release position meets the specified conditions, determine the direction information of the skill indicator of the target skill based on the target scene unit and the release position; wherein, the specified conditions include: the connection line between the target scene unit and the release position is perpendicular to any side of the hexagon or passes through any corner of the hexagon; If the connection line between the target scene unit and the release position does not meet the specified conditions, determine the direction information of the skill indicator of the target skill based on the target scene unit, the adjacent scene unit of the target scene unit, and the release position; wherein, the distance between the adjacent scene unit and the release position is not less than the distance between the scene unit other than the target scene unit in the damage range and the release position.
2. The method according to claim 1, wherein The step of determining the release position and damage range of the target skill in response to a trigger operation for the target skill includes: In response to a drag operation on the skill control for the target skill, determine the release position of the target skill based on the drag position of the skill control; In the hexagonal coordinate system of the virtual scene, based on the preset damage range parameters of the target skill and the release position, determine the coordinate information of each scene unit in the damage range of the target skill; Determine the coordinate information of each scene unit in the damage range of the target skill as the damage range of the target skill.
3. The method according to claim 1, wherein If the connection line between the target scene unit and the release position meets the specified conditions, the step of determining the direction information of the skill indicator of the target skill based on the target scene unit and the release position includes: If the line connecting the target scene unit and the release position meets the specified condition, the difference between the coordinate information of the target scene unit and the release position is determined as the direction information of the skill indicator of the target skill.
4. The method according to claim 1, wherein If the line connecting the target scene unit and the release position does not meet the specified condition, the steps of determining the direction information of the skill indicator of the target skill based on the target scene unit, the adjacent scene units of the target scene unit, and the release position include: If the line connecting the target scene unit and the release position does not meet the specified condition, calculate the sum of the coordinate information of the target scene unit and the adjacent scene units to obtain an intermediate result; The difference between the intermediate result and the coordinate information of the release position is determined as the direction information of the skill indicator of the target skill.
5. The method according to claim 1, wherein The steps of generating and displaying the skill indicator along the direction indicated by the direction information with the release position as the reference based on the preset indicator parameters of the target skill include: Determine the size parameters of the skill indicator based on the damage range shape and damage distance of the target skill; Generate and display the skill indicator along the direction indicated by the direction information with the release position as the starting point; wherein, the display size of the skill indicator matches the size parameters.
6. A display device for a skill indicator, characterized in that, Provide a graphical user interface through a terminal device; a virtual scene is displayed in the graphical user interface; The virtual scene is composed of a plurality of continuously arranged scene units; the scene units are hexagons; the device includes: A first determination module, configured to respond to a trigger operation for a target skill, and determine the release position and damage range of the target skill; wherein, the release position is a scene unit in the virtual scene; the release position is located within the damage range; the damage range includes a plurality of scene units; A second determination module, configured to determine the direction information of the skill indicator of the target skill based on the relative positions of a plurality of specified scene units in the damage range; A display module, configured to generate and display the skill indicator along the direction indicated by the direction information with the release position as the reference based on the preset indicator parameters of the target skill; The second determination module is further configured to obtain the target scene unit in the damage range that is the farthest from the release position; and determine the direction information of the skill indicator of the target skill according to the relationship between the line connecting the target scene unit and the release position and the edges and corners of the hexagon. The second determination module is further configured to, if the connection line between the target scenario unit and the release position meets a specified condition, determine the direction information of the skill indicator of the target skill based on the target scenario unit and the release position; wherein, the specified condition includes: the connection line between the target scenario unit and the release position is perpendicular to any side of the hexagon or passes through any corner of the hexagon; if the connection line between the target scenario unit and the release position does not meet the specified condition, determine the direction information of the skill indicator of the target skill based on the target scenario unit, the adjacent scenario unit of the target scenario unit, and the release position; wherein, the distance between the adjacent scenario unit and the release position is not less than the distance between the scenario unit other than the target scenario unit in the damage range and the release position.
7. An electronic device, characterized in that, It includes a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the skill indicator display method according to any one of claims 1-5.
8. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the skill indicator display method according to any one of claims 1-5.
Citation Information
Patent Citations
Data processing method and device, computer equipment and storage medium
CN114082173A