Method, device and electronic equipment for determining skill damage range

By establishing a coordinate system in a hexagonal scene map and pre-storing the relative position information of the damage range, the skill damage range is determined by vector calculation, which solves the problems of high computational pressure and display mismatch in hexagonal scenes and achieves efficient and accurate damage range determination.

CN114712859BActive Publication Date: 2025-10-21NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210197590.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-02
Publication Date
2025-10-21
Estimated Expiration
2042-03-02

AI Technical Summary

Technical Problem

When calculating the damage range of skills in a hexagonal scene map, the existing technology places a heavy computational burden on the calculation, and the display of the damage range does not match the hexagonal scene map, causing confusion for players and excessive computational consumption.

Method used

By establishing a hexagonal coordinate system, the relative position information of the target skill's damage range relative to the release position is pre-stored, and the damage range is determined using vector calculation, reducing repeated calculations for each hexagon.

Benefits of technology

It reduces computational burden, improves the accuracy and display matching of damage range, aligns with player perception, and reduces the amount of calculation required during gameplay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114712859B_ABST
    Figure CN114712859B_ABST
Patent Text Reader

Abstract

The application provides a skill damage range determination method and device and electronic equipment, and relates to the technical field of games. The method comprises the following steps: in response to a target skill being released, determining a release position of the target skill; the release position is located in a scene unit in a virtual scene, the scene unit is a hexagon, and the virtual scene is composed of a plurality of scene units arranged continuously; based on the release position, first relative position information of a damage range of the target skill is acquired; the first relative position information comprises position information of the damage range of the target skill relative to the release position; and based on the first relative position information of the damage range of the target skill, the damage range of the target skill is determined. In this way, the damage range of the target skill is directly determined based on the relative position information, and it is not necessary to calculate whether each hexagon is in the damage range, so that the calculation amount is small, and the calculation pressure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of game technology, and in particular to a method, device and electronic equipment for determining a skill damage range. Background Art

[0002] In combat games, the scene maps of the game scenes are usually composed of continuous polygons, such as quadrilaterals or hexagons. Compared with quadrilateral scene maps, hexagonal scene maps have many advantages, such as the largest area with the same perimeter, equal distances from the center of a cell to the center points of adjacent cells in all directions, and deeper strategies. Considering that the damage range of skills is usually a standard shape, such as a circle, rectangle, fan, cone, etc., when calculating the damage range of a skill based on a hexagonal scene map, it is necessary to calculate whether each hexagon is within the damage range based on the shape of the skill damage range and the distribution of the surrounding hexagons, which puts a lot of calculation pressure. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, device and electronic device for determining the skill damage range, so as to determine the damage range in a hexagonal map scene and reduce the calculation pressure.

[0004] In a first aspect, an embodiment of the present invention provides a method for determining a skill damage range, the method comprising: in response to a target skill being released, determining a release position of a target skill; wherein the release position is located in a scene unit in a virtual scene, the scene unit is a hexagon, and the virtual scene is composed of a plurality of scene units arranged in a row; based on the release position, obtaining first relative position information of the damage range of the target skill; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position; based on the first relative position information of the damage range of the target skill, determining the damage range of the target skill.

[0005] The above-mentioned step of obtaining the first relative position information of the damage range of the target skill based on the release position includes: determining the second relative position information of the release position relative to the object position of the virtual object that releases the target skill; obtaining the first relative position information of the damage range of the target skill corresponding to the second relative position information; wherein, when the second relative position information is different, the first relative position information corresponding to the second relative position information is different.

[0006] The above-mentioned step of determining the second relative position information of the release position relative to the object position of the virtual object that releases the target skill includes: establishing a first hexagonal coordinate system with the scene unit corresponding to the object position as the origin, and determining the coordinate information of the release position in the first hexagonal coordinate system as the second relative position information; wherein, the second relative position information is used to: indicate the release direction and release distance of the virtual object releasing the target skill.

[0007] The first relative position information of the damage range of the target skill corresponding to the above-mentioned second relative position information is pre-set in the following manner: a second hexagonal coordinate system is established with the scene unit corresponding to the release position as the origin; the target scene unit to which the damage range of the target skill belongs is set; and the coordinate information of the target scene unit in the second hexagonal coordinate system is determined as the first relative position information of the damage range of the target skill corresponding to the second relative position information.

[0008] The above-mentioned step of setting the target scene unit to which the damage range of the target skill belongs includes: setting the target scene unit to which the damage range of the target skill belongs based on the range shape of the damage range of the target skill.

[0009] The above-mentioned step of setting the target scene unit to which the damage range of the target skill belongs includes: if the line connecting the object position and the release position meets the specified conditions, setting the target scene unit so that the center line of the area corresponding to the target scene unit coincides with the line connecting the object position and the release position; if the line connecting the object position and the release position does not meet the specified conditions, setting the target scene unit so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized; wherein, the specified conditions include: the line connecting the object position and the release position is perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position passes through any corner of the hexagonal scene unit in the virtual scene.

[0010] The above-mentioned step of determining the damage range of the target skill based on the first relative position information of the damage range of the target skill includes: obtaining the coordinate information of the release position in the first hexagonal coordinate system; wherein the first hexagonal coordinate system is: a coordinate system with the scene unit corresponding to the object position as the origin; based on the coordinate information of the release position in the first hexagonal coordinate system and the first relative position information of the damage range of the target skill, determining the coordinate information of the damage range of the target skill in the first hexagonal coordinate system.

[0011] In a second aspect, an embodiment of the present invention further provides a device for determining a skill damage range, comprising: a position determination module for determining a release position of a target skill in response to a target skill being released; wherein the release position is located in a scene unit in a virtual scene, the scene unit is a hexagon, and the virtual scene is composed of a plurality of scene units arranged in a row; an information acquisition module for acquiring first relative position information of the damage range of the target skill based on the release position; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position; a damage range determination module for determining the damage range of the target skill based on the first relative position information of the damage range of the target skill.

[0012] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned method for determining the skill damage range.

[0013] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned method for determining the skill damage range.

[0014] The embodiments of the present invention bring the following beneficial effects:

[0015] The above-mentioned method, device, and electronic device for determining the skill damage range determine the release position of the target skill in response to the target skill being released; wherein, the release position is located in a scene unit in the virtual scene, the scene unit is a hexagon, and the virtual scene is composed of multiple scene units arranged in a row; based on the release position, the first relative position information of the damage range of the target skill is obtained; wherein, the first relative position information includes: the position information of the damage range of the target skill relative to the release position; based on the first relative position information of the damage range of the target skill, the damage range of the target skill is determined. In this way, the relative position information of the damage range of the target skill relative to the release position can be pre-stored. During the game battle, after the release position is determined, the damage range of the target skill can be directly determined based on the relative position information. There is no need to calculate whether each hexagon is in the damage range, which reduces the amount of calculation and the calculation pressure.

[0016] In addition, the relative position information of the damage range of the pre-stored target skill relative to the release position is determined based on the hexagonal scene map. Based on the relative position information of the damage range of the pre-stored target skill relative to the release position, the damage range of the target skill is determined during the game. It can be understood that the damage range of the target skill is also determined based on the hexagonal scene map. Therefore, the damage range is more matched with the hexagonal scene map. Compared with the method of calculating the damage range based on a conventional two-dimensional map and displaying it on a hexagonal scene map, the accuracy of the damage range display can also be improved.

[0017] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of a damage range in a hexagonal scene map provided by an embodiment of the present invention;

[0021] Figure 2 A flowchart of a method for determining a skill damage range provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a hexagonal coordinate system and target skill release positions provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of first relative position information of a target skill damage range provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the shape of the damage range of a skill provided by an embodiment of the present invention;

[0025] Figure 6 A schematic diagram of a line connecting an object position and a release position and a target scene unit provided by an embodiment of the present invention;

[0026] Figure 7 A schematic diagram of another object position, a line connecting a release position, and a target scene unit provided by an embodiment of the present invention;

[0027] Figure 8 A schematic diagram of another object position, a line connecting a release position, and a target scene unit provided by an embodiment of the present invention;

[0028] Figure 9 A schematic diagram of the structure of a device for determining skill damage range provided by an embodiment of the present invention;

[0029] Figure 10 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0031] Currently, in combat game scenes and other virtual environments, quadrilaterals or hexagons can be used as scene units to piece together scene maps. Scene maps made of regular hexagons are becoming increasingly popular in games. Compared to regular quadrilaterals, regular hexagons offer many advantages, such as maximizing the area within the same perimeter (high utilization), equal distances from the center of a cell to the centers of adjacent cells in all directions (fairness), and deeper strategies. However, using regular hexagons also presents a problem: when the attacker simultaneously damages units on multiple hexagons, how can one accurately calculate which hexagons were damaged? For most attackers, the damage range caused by their skills is typically in standard shapes, such as circles, rectangles, sectors, and cones. When these standard shapes intersect with a hexagon, accurately calculating which hexagon was damaged is crucial for both the attacker and the attacked.

[0032] In related technologies, a purely physical method is used to calculate the damage range of a skill. For example, in addition to the hexagon, some games also have a conventional coordinate system, namely the Cartesian coordinate system. When calculating the damage range, the intersection is calculated using the coordinates and range of the rectangular coordinate system and the position of the hit party. The biggest advantage of this type of solution is that it is more intuitive and visually appealing, but the disadvantages that come with it are more obvious. The main disadvantages include: the coordinates of the rectangular coordinate system are used to calculate the damage range, which has nothing to do with the hexagon, and the strategic depth provided by the hexagon is not utilized; the determination of the damage range is very easy to cause confusion. Since standard shapes such as circles, rectangles, sectors, and cones may intersect with any position of the hexagon when they intersect with the hexagon, in terms of visual effects, whether damage is caused to a certain hexagon and the actual results are very likely to be ambiguous, causing confusion to players. For example Figure 1 In a game, if a virtual object at position A releases a skill at position B, dealing damage to enemies at position B and a straight line, whether the damage range extends to positions C, D, and E can easily become ambiguous, leading to user confusion and hindering combat strategy. Furthermore, during combat, frequently calculating whether each unit is within the damage range is very computationally expensive. Imagine a team battle with dozens of hexagons filled with teams. Every time each unit deals area damage, the computational complexity of calculating whether each unit is within the damage range is enormous.

[0033] Based on the above, the embodiments of the present invention provide a method, device, and electronic device for determining the skill damage range. This technology can be applied to games, animations, and films, and can specifically be used to determine the skill damage range in games or other three-dimensional scenes.

[0034] To facilitate understanding of this embodiment, a method for determining a skill damage range disclosed in an embodiment of the present invention is first described in detail. Figure 2 As shown, the method includes the following steps:

[0035] Step S202: In response to the target skill being released, determining a release position of the target skill; wherein the release position is located in a scene unit in the virtual scene, the scene unit being a hexagon, and the virtual scene being composed of a plurality of scene units arranged continuously;

[0036] In combat game scenes or other virtual scenes, the scene map of the virtual scene is usually composed of continuous polygons. The position of a virtual object in the scene can be represented by the position of the polygon where the virtual object is located. Each virtual object has at least one pre-set skill, and the damage shape, damage distance, and range of each skill are also set during the initial design. For example: when summoning a meteor skill, the corresponding damage shape is set to a circle and the damage distance is set to 2, while when releasing a tornado skill, the corresponding damage shape is set to a rectangle and the damage distance is set to 4, and so on. The damage shape, damage distance, and range information corresponding to different skills can be completely different or not completely the same. Based on this, after the user selects the virtual object to control, based on the characteristics of each skill possessed by the virtual object and the distance between the virtual object and the target attack object, the user chooses a suitable position within the range of the target skill to release the skill to achieve the purpose of damaging the target attack object.

[0037] In one approach, the virtual scene is composed of a continuous grid of hexagons. This means that the scene unit is a hexagon, and the virtual scene is composed of multiple scene units arranged in a continuous pattern. When an attack target appears in the virtual scene, the user controls the virtual object to release a skill at a certain location in the scene map. This means that when the target skill is released, it will cause a certain amount of damage to the target. For example, the degree of damage inflicted on the target is affected by the location where the target skill is released. The closer the release location is to the target, the greater the damage inflicted.

[0038] In one alternative approach, a hexagonal coordinate system is established within a virtual scene composed of multiple consecutive hexagons to describe the positions of objects within the virtual scene and the release locations of target skills. Specifically, the coordinate system is expanded in three directions, with the scene unit where the virtual object resides as the origin. The release location of the target skill is determined based on the target skill's range and release direction. Among them, the range of the target skill can be: 1, 2, 3, 4. The release positions of skills with different ranges are also different. For example, when the range of the target skill is 1, the position where the farthest virtual object is located with a scene unit of 1 can be used as the release position, totaling 6, and then based on the release direction, the final release position can be obtained; similarly, when the range of the target skill is 2, the position where the farthest virtual object is located with a scene unit of 2 can be used as the release position, totaling 18, and then based on the release direction, the final release position is determined from the 18 positions; when the range of the target skill is 3, the position where the farthest virtual object is located with a scene unit of 3 can be used as the release position, totaling 36, and then based on the release direction, the final release position is determined from the 36 positions.

[0039] Step S204: Acquire first relative position information of the damage range of the target skill based on the release position; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position;

[0040] Furthermore, after determining the target skill's release position, first relative position information of the target skill's damage range is obtained. The target skill's damage range is related to factors such as the skill's damage shape and damage range. Skill damage shapes include circular, rectangular, fan-shaped, and conical shapes, among others; skill damage ranges can be 1, 2, 3, or 4, among others. This first relative position information includes the position information of the target skill's damage range relative to the release position.

[0041] Due to different release positions, the target skill's damage range will also be located differently in the virtual scene. However, since skills have relatively fixed parameters such as damage shape and damage distance, the relative position between the target skill's damage range and the release position follows a certain pattern. Based on this, in this embodiment, the position information of the target skill's damage range relative to the release position, i.e., first relative position information, can be pre-set and stored. During the game, after the release position is determined, the first relative position information is searched and a simple vector calculation is performed between the release position and the first relative position information to obtain the target skill's damage range.

[0042] In a specific implementation, a skill usually has a release direction. Due to different release directions, one release position may correspond to multiple first relative position information, and each first relative position information also needs to be determined based on the release range.

[0043] Step S206: Determine the damage range of the target skill based on the first relative position information of the damage range of the target skill.

[0044] Based on the above, after obtaining the first relative position information of the damage range of the target skill, the damage range of the target skill can be obtained by performing vector addition on the release position coordinate information of the target skill and the first relative position information.

[0045] In one implementation, the target skill has a short range, and the line connecting the target position and the release position is perpendicular to any side of a hexagonal unit in the virtual scene, or passes through any corner of the hexagonal unit in the virtual scene. The centerline of the skill's damage range coincides with the line connecting the target position and the target skill's release position. The target skill's damage range is then calculated by adding the release position coordinates of the target skill to the first relative position information.

[0046] In another method, the range of the target skill is larger, and the line connecting the object position and the release position is not perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position does not pass through any corner of the hexagonal scene unit in the virtual scene. Then, after adding the release position coordinate information of the target skill to the first relative position information, the damage range of the target skill is adjusted according to the preset rules so that the angle between the center line of the damage range of the target skill and the line connecting the object position and the release position is minimized, thereby returning the damage range to the corner direction, which is more in line with the player's cognition.

[0047] The above-mentioned method for determining the skill damage range determines the release position of the target skill in response to the target skill being released; wherein, the release position is located in a scene unit in the virtual scene, the scene unit is a hexagon, and the virtual scene is composed of multiple scene units arranged in a row; based on the release position, first relative position information of the damage range of the target skill is obtained; wherein, the first relative position information includes: position information of the damage range of the target skill relative to the release position; based on the first relative position information of the damage range of the target skill, the damage range of the target skill is determined. In this way, the relative position information of the damage range of the target skill relative to the release position can be pre-stored. During the game, after the release position is determined, the damage range of the target skill can be directly determined based on the relative position information. There is no need to calculate whether each hexagon is within the damage range. The amount of calculation is small, which reduces the calculation pressure.

[0048] In addition, the relative position information of the damage range of the pre-stored target skill relative to the release position is determined based on the hexagonal scene map. Based on the relative position information of the damage range of the pre-stored target skill relative to the release position, the damage range of the target skill is determined during the game. It can be understood that the damage range of the target skill is also determined based on the hexagonal scene map. Therefore, the damage range is more matched with the hexagonal scene map. Compared with the method of calculating the damage range based on a conventional two-dimensional map and displaying it on a hexagonal scene map, the accuracy of the damage range display can also be improved.

[0049] The following embodiments provide specific implementation methods for obtaining the first relative position information.

[0050] Specifically, determine the second relative position information of the release position relative to the object position of the virtual object that releases the target skill; obtain the first relative position information of the damage range of the target skill corresponding to the second relative position information; wherein, when the second relative position information is different, the first relative position information corresponding to the second relative position information is different.

[0051] In combat game scenes, the skill attributes of each virtual object include: range, damage shape, damage distance, etc. Based on the range attribute of the skill, the release position of the target skill can be obtained, and the second relative position information of the release position relative to the position of the virtual object can be determined. For example, when the range of the target skill is 1, 6 scene units that are 1 unit away from the virtual object can be used as release positions. Since the skill release is also directional in the game scene, the positions of these 6 scene units relative to the virtual object are different. The final release position can be further determined based on the release direction of the skill. After determining the release position of the target skill, the object position of the virtual object is also known, and the second relative position information can be determined, and then the first relative position information of the damage range of the target skill corresponding to the second relative position information is obtained. Among them, the first relative position information is used to determine the damage range of the target skill.

[0052] Specifically, the virtual object can release the target skill in any direction. When the release direction of the target skill is different, the release position is also different. Based on this, the above-mentioned second relative position information can also be used to indicate the release direction of the target skill. When the release direction is different, the relative position of the damage range and the release position is also different. For example, when the virtual object releases the target skill to the right, the release position is located on the right side of the virtual object, and the damage range is also located on the right side of the release position; when the virtual object releases the target skill to the left, the release position is located on the left side of the virtual object, and the damage range is also located on the left side of the release position. Therefore, when the second relative position information is different, that is, the release direction is different, when the release direction is different, the first relative position information corresponding to the second relative position information will be different.

[0053] The first relative position information is related to the target skill's damage shape and damage range. In one approach, when the target skill's damage shape is a rectangle and the damage range is 1, the first relative position information will be composed of four scene units that are 1 unit away from the release position. When different release positions are selected, the first relative position information will also change. That is, when the second relative position information is different, the corresponding first relative position information will be different.

[0054] The following embodiment provides a specific implementation method for determining the second relative position information.

[0055] Specifically, a first hexagonal coordinate system is established with the scene unit corresponding to the object position as the origin, and the coordinate information of the release position in the first hexagonal coordinate system is determined as the second relative position information; wherein, the second relative position information is used to: indicate the release direction and release distance of the virtual object to release the target skill.

[0056] In one specific embodiment, Figure 3 As shown, the scene unit where the virtual object is located is taken as the coordinate origin, that is, the object position is taken as the coordinate origin, and the coordinates of the coordinate system are expanded in three directions of the scene unit to establish a first hexagonal coordinate system, and the coordinates of the object position of the virtual object are obtained as (0, 0, 0). The coordinate information of the release position in the hexagonal coordinate system is determined as the second relative position information. Among them, the release position of the skill depends on the range of the skill. The skill range is one of the attributes of the skill and is set when the skill is designed. The skill range can be 1, 2, 3, or 4. When the range of the target skill is 1, the user can control the virtual object to release the target skill at a scene unit that is 1 unit away from the virtual object. Since the coordinate system has three directions, there are six choices for the release position, namely (1, -1, 0), (0, -1, 1), (-1, 0, 1), (-1, 1, 0), (0, 1, -1), and (1, 0, -1). Please refer to Figure 3 , if the release direction of the target skill is to the right, the coordinates of the release position at this time are (1, 0, -1), which is the second relative position information of the release position relative to the object position. The second relative position information can indicate the release direction and release distance of the virtual object releasing the target skill. Since the above-mentioned first hexagonal coordinate system is established with the object position as the origin, the coordinates of the release position in the first hexagonal coordinate system can indicate the relative position relationship between the release position and the object position. For example, when the release position is (-1, 0, 1), the release direction is to the left of the object position, and the release distance is 1; for example, when the release position is (-2, 0, 2), the release direction is to the left of the object position, and the release distance is 2.

[0057] After determining the second relative position information, the first relative position information of the damage range of the target skill corresponding to the second relative position information can be obtained in the following manner: establish a second hexagonal coordinate system with the scene unit corresponding to the release position as the origin; set the target scene unit to which the damage range of the target skill belongs; and determine the coordinate information of the target scene unit in the second hexagonal coordinate system as the first relative position information of the damage range of the target skill corresponding to the second relative position information.

[0058] In one method, the release location's scene unit is used as the coordinate origin, and the coordinates of the coordinate system are expanded in three directions of the scene unit to establish a second hexagonal coordinate system. The release location's coordinates are determined as (0,0,0), and then the target scene unit for the target skill's damage range is set. The target skill's damage range is related to factors such as the skill's damage shape and damage range. Skill damage shapes include circular, rectangular, fan-shaped, and cone-shaped, and the skill's damage range can be 1, 2, 3, or 4.

[0059] In an alternative approach, Figure 4 In the example, if the target skill has a range of 1, a damage shape of a rectangle, and a damage distance of 4, when the user controls the virtual object in the first hexagonal coordinate system and selects (1,0,-1) as the release position, a total of 13 scene units can be damaged. At this time, the second hexagonal coordinate system is established with the release position as the coordinate origin to determine the coordinate information of the 13 scene units, which are divided into 1-(0,0,0), 2-(0,1,-1), 3-(1,1,-2), 4-(2,1,-3), 5-(3,1,-4), 6-(4,0,-4), 7-(3,0,-3), 8-(2,0,-2), 9-(1,0,-1), 10-(1,-1,0), 11-(2,-1,-1), 12-(3,-1,-2), 13-(4,-1,-3), see Figure 4 As shown, the coordinate information of the above 13 scene units is the first relative position information of the damage range of the target skill corresponding to the second relative position information.

[0060] The above-mentioned method of obtaining the first relative position information is related to the damage shape of the target skill. Specifically, based on the range shape of the damage range of the target skill, the target scene unit to which the damage range of the target skill belongs is set. The damage shape of a skill is one of the attributes of the skill, including: circle, rectangle, fan, cone, etc., which are set by engineers when designing the skill. Considering that the damage shape is usually a standard shape and it is difficult to absolutely match it with a hexagon, in order to make the damage range as accurate as possible, when setting the target scene unit, it is necessary to set it based on the damage shape of the target skill. For example, in the aforementioned Figure 4In the , the damage shape is a rectangle, and the shape of multiple target units is very similar to a rectangle. This method can improve the accuracy of the damage range, making the damage range match the skill's damage shape and player perception.

[0061] When releasing skills at the same position and with a certain damage distance, different damage range shapes will result in different damage ranges. For example, when the damage distance is 1, the damage shapes are circular, rectangular, fan-shaped, and cone-shaped respectively. Figure 5 As shown, the damage ranges are respectively a circle consisting of 7 scene units, a rectangle consisting of 4 scene units, a fan-shaped consisting of 4 scene units, and a cone-shaped consisting of 2 scene units, and the sizes of the damage ranges are different.

[0062] The following embodiment provides a specific implementation method for setting target scene units.

[0063] Specifically, if the line connecting the object position and the release position meets the specified conditions, the target scene unit is set so that the center line of the area corresponding to the target scene unit coincides with the line connecting the object position and the release position; if the line connecting the object position and the release position does not meet the specified conditions, the target scene unit is set so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized; wherein the above-mentioned specified conditions include: the line connecting the object position and the release position is perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position passes through any corner of the hexagonal scene unit in the virtual scene.

[0064] In one way, for example, if the target skill's range is 1, you can refer to Figure 6 , the line connecting the target position and the release position is perpendicular to any side of the virtual scene unit. When the range of the target skill is 2, see Figure 7 , the line connecting the object position and the release position is perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position passes through any corner of the hexagonal scene unit in the virtual scene. At this time, the target scene unit is set so that the center line of the area corresponding to the target scene unit coincides with the line connecting the object position and the release position.

[0065] In another way, when the target skill has a range of 3, see Figure 8 If the line connecting the object position and the release position is not perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position does not pass through any corner of the hexagonal scene unit in the virtual scene, the target scene unit is set so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized.

[0066] For details, see Figure 8 When the above conditions are not met, that is, when the line connecting the released skill and the target skill is neither perpendicular to the side of the hexagon nor passes through the corner of the hexagon, the damage range obtained by the above method is as follows Figure 8 As shown in the solid rectangle in the figure, the damage range at this time is quite different from the skill release direction, which does not conform to the player's cognition. At this time, the damage range needs to be adjusted, for example, adjusted to Figure 8 The damage range is shown in the dashed box in the image. The goal of this adjustment is to minimize the angle between the centerline of the area corresponding to the target scene unit and the line connecting the target position and the release position, so that the damage range matches the skill release direction as closely as possible, thus conforming to player perception.

[0067] The following provides a specific implementation method for determining the damage range of a target skill.

[0068] Specifically, the coordinate information of the release position in the first hexagonal coordinate system is obtained; wherein the first hexagonal coordinate system is: a coordinate system with the scene unit corresponding to the object position as the origin; based on the coordinate information of the release position in the first hexagonal coordinate system, and the first relative position information of the damage range of the target skill, the coordinate information of the damage range of the target skill in the first hexagonal coordinate system is determined.

[0069] In one method, a first hexagonal coordinate system is established with the scene unit corresponding to the object position as the origin, and the coordinate information of the release position in the first hexagonal coordinate system is determined. The coordinate information of the release position in the first hexagonal coordinate system is added to the first relative position information of the damage range of the target skill to determine the coordinate information of the damage range of the target skill in the first hexagonal coordinate system.

[0070] In an optional manner, the damage shape of the target skill is a rectangle, and when the damage distance is 4, taking (1,0,-1) as the release position of the target skill and the above 13 scene units as the first relative position information as an example, the damage range of the target skill in the first hexagonal coordinate system is: 1-(1,0,-1)+(0,0,0)=(1,0,-1), 2-(1,0,-1)+(0,1,-1)=(1,1,-2), 3-(1,0,-1)+(1,1,-2)=(2,1,-3), 4-(1,0,-1)+(2,1,-3)=(3,1,-4), 5-(1,0,-1)+(3,1,-4)=(4,1,-5), 6-(1,0,-1)+(3,1,-4)=(4,1,-5), (1,0,-1)+(4,0,-4)=(5,0,-5),7-(1,0,-1)+(3,0,-3)=(4,0,-4),8-(1,0,-1)+(2,0,-2)=(3,0,-3),9-(1,0,-1)+(1,0,-1)=(2,0,-2),10-(1,0,-1)+(1,-1,0)=(2,-1,-1),11-(1,0,-1)+(2,-1,-1)=(3,-1,-2),12-(1,0,-1)+(3,-1,-2)=(4,-1,-3),13-(1,0,-1)+(4,-1,-3)=(5,-1,-4). Based on this, the coordinate information of the damage range of the target skill in the first hexagonal coordinate system can be determined.

[0071] The method for determining skill damage ranges provided in the above embodiment uses hexagonal coordinates to pre-set the range coordinates for damage types of different shapes and distances. This significantly reduces computational complexity while also returning the target to the smallest unit, the hexagon. This, in turn, reflects the original intention of using hexagons as the fundamental unit for combat scenes—maximizing the combat strategy space afforded by hexagons. Furthermore, this embodiment also corrects for damage ranges in non-edge and non-corner directions, making the actual damage range more consistent with player perception.

[0072] For the above-mentioned embodiments, see Figure 9 A device for determining a skill damage range is shown, comprising:

[0073] a position determination module 90 for determining a release position of a target skill in response to the target skill being released; wherein the release position is located in a scene unit in the virtual scene, the scene unit being a hexagon, and the virtual scene being composed of a plurality of scene units arranged in a continuous pattern;

[0074] The information acquisition module 92 acquires first relative position information of the damage range of the target skill based on the release position; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position;

[0075] The damage range determination module 94 determines the damage range of the target skill based on the first relative position information of the damage range of the target skill.

[0076] The above-mentioned skill damage range determination device determines the release position of the target skill in response to the target skill being released; wherein, the release position is located in a scene unit in the virtual scene, the scene unit is a hexagon, and the virtual scene is composed of multiple scene units arranged in a row; based on the release position, the first relative position information of the damage range of the target skill is obtained; wherein, the first relative position information includes: the position information of the damage range of the target skill relative to the release position; based on the first relative position information of the damage range of the target skill, the damage range of the target skill is determined. In this way, the relative position information of the damage range of the target skill relative to the release position can be pre-stored. During the game battle, after the release position is determined, the damage range of the target skill can be directly determined based on the relative position information. There is no need to calculate whether each hexagon is in the damage range. The amount of calculation is small, which reduces the calculation pressure.

[0077] In addition, the relative position information of the damage range of the pre-stored target skill relative to the release position is determined based on the hexagonal scene map. Based on the relative position information of the damage range of the pre-stored target skill relative to the release position, the damage range of the target skill is determined during the game. It can be understood that the damage range of the target skill is also determined based on the hexagonal scene map. Therefore, the damage range is more matched with the hexagonal scene map. Compared with the method of calculating the damage range based on a conventional two-dimensional map and displaying it on a hexagonal scene map, the accuracy of the damage range display can also be improved.

[0078] The above-mentioned information acquisition module is also used to: determine the second relative position information of the release position relative to the object position; obtain the first relative position information of the damage range of the target skill corresponding to the second relative position information; wherein, when the second relative position information is different, the first relative position information corresponding to the second relative position information is different.

[0079] The above-mentioned information acquisition module is also used to: establish a first hexagonal coordinate system with the scene unit corresponding to the object position as the origin, and determine the coordinate information of the release position in the first hexagonal coordinate system as the second relative position information; wherein, the second relative position information is used to: indicate the release direction and release distance of the virtual object to release the target skill.

[0080] The above-mentioned information acquisition module is also used to: establish a second hexagonal coordinate system with the scene unit corresponding to the release position as the origin; set the target scene unit to which the damage range of the target skill belongs; and determine the coordinate information of the target scene unit in the second hexagonal coordinate system as the first relative position information of the damage range of the target skill corresponding to the second relative position information.

[0081] The above-mentioned information acquisition module is also used to: set the target scene unit to which the damage range of the target skill belongs based on the range shape of the damage range of the target skill.

[0082] The above-mentioned information acquisition module is also used to set the target scene unit if the line connecting the object position and the release position meets the specified conditions, so that the center line of the area corresponding to the target scene unit coincides with the line connecting the object position and the release position; if the line connecting the object position and the release position does not meet the specified conditions, set the target scene unit so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized; wherein the specified conditions include: the line connecting the object position and the release position is perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position passes through any corner of the hexagonal scene unit in the virtual scene.

[0083] The above-mentioned damage range determination module is also used to: obtain the coordinate information of the release position in the first hexagonal coordinate system; wherein, the first hexagonal coordinate system is: a coordinate system with the scene unit corresponding to the object position as the origin; based on the coordinate information of the release position in the first hexagonal coordinate system, and the first relative position information of the damage range of the target skill, determine the coordinate information of the damage range of the target skill in the first hexagonal coordinate system.

[0084] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-mentioned method for determining the skill damage range.

[0085] See also Figure 10 As shown, the electronic device includes a processor 100 and a memory 101, wherein 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 method for determining the skill damage range.

[0086] Further, Figure 10 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0087] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is achieved through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0088] The processor 100 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 100 or software instructions. The above processor 100 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as a random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or register. The storage medium is located in the memory 101. The processor 100 reads the information in the memory 101 and, in conjunction with its hardware, completes the steps of the method of the aforementioned embodiment.

[0089] This embodiment also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned method for determining the skill damage range.

[0090] The computer program product of the skill damage range determination method, device and system provided in 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 previous method embodiments. The specific implementation can be found in the method embodiments and will not be repeated here.

[0091] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0092] In addition, in the description of the embodiments of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; they may refer to mechanical connections or electrical connections; they may refer to direct connections or indirect connections through an intermediate medium; and they may refer to internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0093] If the 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 this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the 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 enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0094] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0095] Finally, it should be noted that the above embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A method for determining skill damage range, characterized in that: The method comprises: In response to a target skill being released, determining a release position of the target skill; wherein the release position is located in a scene unit in a virtual scene, the scene unit is a hexagon, and the virtual scene is composed of a plurality of the scene units arranged continuously; Based on the release position, first relative position information of the damage range of the target skill is obtained; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position; Determining the damage range of the target skill based on the first relative position information of the damage range of the target skill; The step of obtaining first relative position information of the damage range of the target skill based on the release position includes: determining second relative position information of the release position relative to the object position of the virtual object that releases the target skill; Obtaining first relative position information of the damage range of the target skill corresponding to the second relative position information; wherein, when the second relative position information is different, the first relative position information corresponding to the second relative position information is different; The first relative position information of the damage range of the target skill corresponding to the second relative position information is pre-set in the following manner: Establishing a second hexagonal coordinate system with the scene unit corresponding to the release position as the origin; Set the target scene unit that the damage range of the target skill belongs to; Determining the coordinate information of the target scene unit in the second hexagonal coordinate system as the first relative position information of the damage range of the target skill corresponding to the second relative position information; The step of setting the target scene unit to which the damage range of the target skill belongs includes: If a line connecting the object position and the release position satisfies a specified condition, setting the target scene unit so that a center line of an area corresponding to the target scene unit coincides with a line connecting the object position and the release position; If the line connecting the object position and the release position does not meet a specified condition, setting the target scene unit so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized; The specified conditions include: a line connecting the object position and the release position is perpendicular to any side of a hexagonal scene unit in the virtual scene, or a line connecting the object position and the release position passes through any corner of a hexagonal scene unit in the virtual scene.

2. The method according to claim 1, characterized in that The step of determining second relative position information of the release position relative to the object position of the virtual object that releases the target skill comprises: A first hexagonal coordinate system is established with the scene unit corresponding to the object position as the origin, and the coordinate information of the release position in the first hexagonal coordinate system is determined as the second relative position information; wherein, the second relative position information is used to: indicate the release direction and release distance of the virtual object releasing the target skill.

3. The method according to claim 1, characterized in that The step of setting the target scene unit to which the damage range of the target skill belongs includes: setting the target scene unit to which the damage range of the target skill belongs based on the range shape of the damage range of the target skill.

4. The method according to claim 1, wherein The step of determining the damage range of the target skill based on the first relative position information of the damage range of the target skill includes: Acquire coordinate information of the release position in a first hexagonal coordinate system; wherein the first hexagonal coordinate system is a coordinate system with a scene unit corresponding to the object position as an origin; Based on the coordinate information of the release position in the first hexagonal coordinate system and the first relative position information of the damage range of the target skill, the coordinate information of the damage range of the target skill in the first hexagonal coordinate system is determined.

5. A device for determining skill damage range, characterized in that: The device comprises: a position determination module, configured to determine a release position of the target skill in response to the target skill being released; wherein the release position is located in a scene unit in the virtual scene, the scene unit being a hexagon, and the virtual scene being composed of a plurality of the scene units arranged in a continuous manner; An information acquisition module, configured to acquire first relative position information of the damage range of the target skill based on the release position; wherein the first relative position information includes: position information of the damage range of the target skill relative to the release position; a damage range determination module, configured to determine the damage range of the target skill based on the first relative position information of the damage range of the target skill; The information acquisition module is further used to determine the second relative position information of the release position relative to the object position of the virtual object that releases the target skill; obtain the first relative position information of the damage range of the target skill corresponding to the second relative position information; wherein, when the second relative position information is different, the first relative position information corresponding to the second relative position information is different; the first relative position information of the damage range of the target skill corresponding to the second relative position information is pre-set in the following manner: establish a second hexagonal coordinate system with the scene unit corresponding to the release position as the origin; set the target scene unit to which the damage range of the target skill belongs; determine the coordinate information of the target scene unit in the second hexagonal coordinate system as the first relative position information of the damage range of the target skill corresponding to the second relative position information; The information acquisition module is also used to set the target scene unit if the line connecting the object position and the release position meets a specified condition, so that the center line of the area corresponding to the target scene unit coincides with the line connecting the object position and the release position; if the line connecting the object position and the release position does not meet the specified condition, set the target scene unit so that the angle between the center line of the area corresponding to the target scene unit and the line connecting the object position and the release position is minimized; wherein the specified condition includes: the line connecting the object position and the release position is perpendicular to any side of the hexagonal scene unit in the virtual scene, or the line connecting the object position and the release position passes through any corner of the hexagonal scene unit in the virtual scene.

6. 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 method for determining the skill damage range described in any one of claims 1-4.

7. A machine-readable storage medium, characterized in that The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the method for determining the skill damage range described in any one of claims 1-4.

Citation Information

Patent Citations

  • Data processing method and device, computer equipment and storage medium

    CN114082173A