CN112044060A - Method and system for generating blocking area in game map - Google Patents
Method and system for generating blocking area in game map Download PDFInfo
- Publication number
- CN112044060A CN112044060A CN202010910840.7A CN202010910840A CN112044060A CN 112044060 A CN112044060 A CN 112044060A CN 202010910840 A CN202010910840 A CN 202010910840A CN 112044060 A CN112044060 A CN 112044060A
- Authority
- CN
- China
- Prior art keywords
- air wall
- air
- area
- walls
- wall
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/50—Controlling the output signals based on the game progress
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/30—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention provides a method for generating a blocking area in a game map, which comprises the following steps: step S1, when editing the game map, creating an air wall formed by a plurality of vertexes; step S2, after a plurality of different air walls are edited on the game map, combining the air walls into a closed blocking area; step S3, the number of each containment zone is set to form a different map containment zone. The invention can divide the region of the geodetic map to generate a plurality of different blocking regions, thereby improving the working efficiency.
Description
Technical Field
The invention relates to the field of game map making, in particular to a method and a system for generating a blocked area in a game map.
Background
In a game map, a large map is often divided into a plurality of different areas. Each map scene has its own area range, and each area has its own special event, for example, a player entering a certain area triggers a scenario to generate a certain event, etc. Every region also has the topography and landform of oneself difference, and some are the mountain region, some are the forest, some are the plain, some are rivers etc. all need carry out subregion and design the topography, use the subregion design, help reducing the degree of difficulty of designing the topography. More importantly, each area generally has different resources, and the area size and layout of different resource areas need to be designed according to the size and environment type of the resource areas. However, when dividing a map area, because the shape of each area is irregular, the generated area generally needs to be blocked, and therefore, it is difficult to generate a blocked area in the map.
The 'air wall' of the electronic game is a transparent 'wall' which is a place where a character can move in the game process and is actually blocked by the 'wall'. Air walls are present in most large role-playing games because of the model framework, BUG, etc. set by the game.
Disclosure of Invention
In order to overcome the above problems, an object of the present invention is to provide a method for generating a blocked area in a game map, which is helpful for a game player to divide a geodetic map into areas and generate a plurality of different blocked areas when editing the game map, thereby improving work efficiency.
The invention is realized by adopting the following scheme: a method of generating a containment zone in a game map, the method comprising the steps of:
step S1, when editing the game map, creating an air wall formed by a plurality of vertexes;
step S2, after a plurality of different air walls are edited on the game map, combining the air walls into a closed blocking area;
step S3, the number of each containment zone is set to form a different map containment zone.
Further, the step S1 is further specifically: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
Further, the step S2 is further specifically: after a plurality of different air walls are edited on a game map, the air walls are combined, the air walls are connected end to form a closed blocked area, and whether the blocked area is completely closed or not is judged, wherein when the blocked area is judged to be completely closed or not, the height of the air walls is fixed, so that the top of the air wall is not required to be judged as long as the top of the bottom of the air wall is judged, and the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all air wall objects in the residual air wall object list, wherein the residual air wall object list is used for judging the use condition of the list air wall objects, and if the air wall of the residual air wall object list judges the closing operation, deleting the judged air wall objects from the residual air wall object list and adding the air wall objects into the selected air wall object list;
sorting the selected air wall object list, putting a first air wall in the selected air wall object list, and then deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area; if not, the area is not a closed area;
if a plurality of air walls are selected, sequencing the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the vertex of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
traversing the air walls after judgment, deleting the air wall from the remaining air wall object list after the bottom vertex of one air wall is judged, until all the air walls are deleted, wherein the number of the remaining air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and an end point, the 1 st top point of the bottom surface of the air wall is taken as the starting point, and the last top point is set as the end point; then, judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuously traversing and judging the top point of the bottom surface of the next air wall;
if the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, performing reverse operation on the top point of the bottom surface of the next air wall, so that the start point position and the end point position of the bottom surface of the air wall are exchanged;
in the above determination process, as long as the head and tail positions of the bottom surface of one air wall are not the same as those of the other air walls, it is determined that the air walls are not combined into a closed area, and only if the top points of the bottom surfaces of all the air walls are finally determined to be connected end to end, it can be determined that the selected air walls can form a closed area.
Further, the step S3 is further specifically: in a map, after blocking areas are formed by creating air wall combinations, the number of each blocking area is set to form different map blocking areas; because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number are set for each air wall, and a plurality of air walls in a blocking area can be determined through the left area number and the right area number.
Further, the manner of setting the area number is as follows: if the left and right zone numbers of the blockade zone do not exist, setting the left zone number in the blockade zone;
if the left area number of the blockade area exists, and the right area number does not exist, setting the right area number of the blockade area;
the left area number of the blockade area does not exist, and when the right area number exists, the blockade area is set to be the left area number;
when the left and right area numbers of the blocking area exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the old area number needs to be deleted, and a new area number is set.
The present invention also provides a system for generating a containment zone in a game map, the system comprising: the system comprises an air wall creating module, a blocked area producing module and a blocked area numbering module;
the air wall creating module is used for creating an air wall formed by a plurality of vertexes when the game map is edited;
the blocked area production module is used for combining a plurality of different air walls into a closed blocked area after the air walls are edited on the game map;
the number module of the blocking area is used for setting the number of each blocking area to form different map blocking areas.
Further, the implementation manner of the air wall creation module is further specifically: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
Further, the implementation manner of the blocking area production module is further specifically that: after a plurality of different air walls are edited on a game map, the air walls are combined, the air walls are connected end to form a closed blocked area, and whether the blocked area is completely closed or not is judged, wherein when the blocked area is judged to be completely closed or not, the height of the air walls is fixed, so that the top of the air wall is not required to be judged as long as the top of the bottom of the air wall is judged, and the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all air wall objects in the residual air wall object list, wherein the residual air wall object list is used for judging the use condition of the list air wall objects, and if the air wall of the residual air wall object list judges the closing operation, deleting the judged air wall objects from the residual air wall object list and adding the air wall objects into the selected air wall object list;
sorting the selected air wall object list, putting a first air wall in the selected air wall object list, and then deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area; if not, the area is not a closed area;
if a plurality of air walls are selected, sequencing the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the vertex of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
traversing the air walls after judgment, deleting the air wall from the remaining air wall object list after the bottom vertex of one air wall is judged, until all the air walls are deleted, wherein the number of the remaining air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and an end point, the 1 st top point of the bottom surface of the air wall is taken as the starting point, and the last top point is set as the end point; then, judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuously traversing and judging the top point of the bottom surface of the next air wall;
if the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, performing reverse operation on the top point of the bottom surface of the next air wall, so that the start point position and the end point position of the bottom surface of the air wall are exchanged;
in the above determination process, as long as the head and tail positions of the bottom surface of one air wall are not the same as those of the other air walls, it is determined that the air walls are not combined into a closed area, and only if the top points of the bottom surfaces of all the air walls are finally determined to be connected end to end, it can be determined that the selected air walls can form a closed area.
Further, the implementation manner of the lockout zone number module is further specifically: in a map, after blocking areas are formed by creating air wall combinations, the number of each blocking area is set to form different map blocking areas; because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number are set for each air wall, and a plurality of air walls in a blocking area can be determined through the left area number and the right area number.
Further, the manner of setting the area number is as follows: if the left and right zone numbers of the blockade zone do not exist, setting the left zone number in the blockade zone;
if the left area number of the blockade area exists, and the right area number does not exist, setting the right area number of the blockade area;
the left area number of the blockade area does not exist, and when the right area number exists, the blockade area is set to be the left area number;
when the left and right area numbers of the blocking area exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the old area number needs to be deleted, and a new area number is set.
The invention has the beneficial effects that: the invention creates the air wall formed by a plurality of vertexes in the game map, combines the air walls into the closed blocked area, and sets the number of each blocked area to form different map blocked areas, thereby being beneficial to dividing the area of the ground map to generate a plurality of different blocked areas for subsequent development of the game map when a game player edits the game map, leading the operation of the developer to be more convenient and improving the working efficiency.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention.
FIG. 2 is a schematic view of the bottom of an air wall according to an embodiment of the present invention.
Fig. 3 is a schematic view of a containment area formed by the bottom of an air wall according to an embodiment of the present invention.
Figure 4 is a numbered schematic of a containment zone arrangement according to an embodiment of the present invention.
Fig. 5 is a schematic block diagram of the system of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Referring to fig. 1, a method for generating a blocking area in a game map according to the present invention includes the following steps:
step S1, when editing the game map, creating an air wall formed by a plurality of vertexes; the step S1 further includes: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
Step S2, after a plurality of different air walls are edited on the game map, combining the air walls into a closed blocking area;
step S3, the number of each containment zone is set to form a different map containment zone.
The invention is further illustrated below with reference to a specific embodiment:
the invention discloses a method for generating a blocking area in a game map, which comprises the following steps:
1. creating an air wall formed of multiple vertices in a game map
In editing a game map, an air wall formed of a plurality of vertices (at least two vertices are required) is created. An air wall refers to a transparent object that has a collision volume. Similar to a normal object wall, but is not visible on the map when the game is played, as if it were blocked by walls that are not visible in the air. Because the air wall supports the arrangement of a plurality of vertexes, the arrangement of various irregular figures can be met.
When the air wall is edited, the green wall surface is used for displaying, so that the editing is obvious and the operation is easy. In an actual map, the air wall is not displayed, but is used as a partition of a blocking area. Each air wall may have a plurality of vertices forming an irregular pattern, and the irregular patterns of air walls may be connected by their vertices.
As shown in fig. 2, the air wall has three vertices, and since the heights of the set air walls are all fixed, the vertex numbers refer to the vertices of the bottom surface of the air wall, and the top vertices are not counted, for example, if one of the bottom vertices is (0, 0, 0), and the fixed height is 10, the top vertices is (0, 0, 10).
2. Combining multiple air walls into a closed containment area
After a plurality of different air walls are edited on a game map, the air walls can be combined to form a closed blocking area by connecting the air walls end to end. However, only a completely closed air wall can form a sealed-off area, so that a judgment of the sealing-off area is required. The following is the zone closing algorithm used here.
The more common region closure algorithm is: if a graph is closed, then for each node there must be at least three nodes within the nine grid centered around it, with at least one connected out node and also at least one in node. Therefore, only the number of nodes is required to be judged whether to be more than 2, and if one node is not more than 2, the node is not a closed graph. However, this graph algorithm needs to know all vertices and edges, and the graph generated by the side through the air wall only knows the vertex from the beginning to the end of a certain edge and the vertex added in the middle of the edge, so that it is not suitable for this common algorithm.
Since the containment zone is fully closed, it can be determined whether the zone is closed by determining whether an extension of one edge extends outside the zone. The algorithm is as follows:
(1) first, the selected air wall object is stored in a list named selected air wall object list. The air walls are then stored in another list to judge the use condition of the list air wall object, if the air walls of the list judge the closing operation, the judged air wall object needs to be deleted from the list, and the list is named as a residual air wall object list. Thus, two lists exist, one is the list of the selected air wall object currently selected, and the other is the list of the remaining air wall objects;
(2) sorting the selected air wall object list, putting the selected air wall object list into a first air wall, and deleting the first air wall from the rest air wall object list;
(3) if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area;
(4) if a plurality of air walls are selected, the air walls are sorted through the vertex coordinate values of the bottom surfaces of the air walls. The vertex coordinate value (absolute coordinate) of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
(5) traversing and judging the rear air wall, deleting the air wall from the list of the remaining air wall objects after judging the top point of the bottom surface of one air wall until all the air walls are deleted, wherein the number of the list of the remaining air wall objects is 0;
(6) the top points of the bottom surface of each air wall are provided with a starting point and an end point, the first top point is set as the starting point, the last top point is set as the end point, the air wall is provided with three top points, the 1 st top point is set as the starting point, the 3 rd top point is set as the end point, and the like; this will be explained below by way of example:
the first air wall has four base vertices: the first vertex is (0, 0, 0), which is the starting point; the second vertex is (0, 5, 0); the third vertex is (0, 8, 0); the fourth vertex is (0, 10, 0), which is the terminal point;
the second air wall presents two base vertices: the first vertex is (0, 10, 0), which is the starting point; the second vertex is (10, 10, 0), which is the terminal point;
the third air wall has four base vertices: the first vertex is (10, 0, 0), which is the starting point; the second vertex is (10, 5, 0); the third vertex is (8, 8, 0); the fourth vertex is (10, 10, 0), which is the terminal point;
the fourth air wall has two base vertices: the first vertex is (10, 0, 0), which is the starting point; the second vertex is (0, 0, 0), which is the endpoint.
(7) And judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall by judging whether the coordinate positions of the vertexes are completely the same (namely the X-axis coordinate, the Y-axis coordinate and the Z-axis coordinate are required to be completely consistent), and deleting the air wall from the residual air wall list and continuously traversing to judge the next vertex if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall. For example, if the end point of the bottom surface of the first air wall is identical to the start point of the bottom surface of the second air wall, the determination of the second air wall and the third air wall is continued.
If the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, the vertex of the bottom surface of the next air wall is operated in the reverse order, so that the start position and the end position of the bottom surface of the air wall are exchanged. For example, the end point of the bottom surface of the second air wall in the above example is the same as the end point of the bottom surface of the third air wall, and the top points of the bottom surface of the third air wall are performed in reverse order, after the reverse order operation is completed, the third air wall becomes the first top point (10, 10, 0), which is the starting point, the second top point (8, 8, 0), the third top point (10, 5, 0), and the fourth top point (10, 0, 0), which is the end point. And after the reverse operation is finished, the starting point of the bottom surface of the next air wall is the end point of the bottom surface of the previous air wall, and traversing and judging the next air wall continuously until all the air walls are judged.
(8) In the above determination process, as long as the head and tail positions of one air wall are not the same as those of other air walls, it can be determined that the air walls are not combined into a closed area, and finally, it can be determined that all the bottom surface vertexes of the air walls are connected end to end, and then it can be determined that the selected air walls can form a closed area.
Referring to fig. 3, a plan view of an area formed by the four air walls of the above example is shown.
3. Setting the number of each containment zone to form a different map containment zone
In the map, after the air walls are combined into the blocking areas, the number of each blocking area needs to be set to form different map blocking areas. Because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number can be set for each air wall, and through the left area number and the right area number, the number of the air walls in one area can be determined, and the area is formed by combining the air walls.
The area numbers are numbered directly in numeric form, the left area number is leftarea index, the right area number is rightarea index, and if one air wall left area is set as area 1, that is, leftarea index =1, and the right area is set as area 2, that is, rightarea index = 2.
The region numbering method is as follows:
(1) if the left area number and the right area number do not exist, setting the left area number;
(2) if the left area number exists, and the right area number does not exist, setting the right area number;
(3) the left area number does not exist, and when the right area number exists, the left area number is set;
(4) when the left and right area numbers exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the oldest area number needs to be deleted, and a new area number needs to be set.
As in the region setting number of fig. 4: the figure shows the effect diagram after the region is provided with the number. The number of the left area of the first air wall is set to be 1, and the number of the right area is not set; the number of the left area of the second air wall is set to be 1, and the number of the right area is set to be 2; the number of the left area of the third air wall is set to be 5, and the number of the right area is set to be 1; the left area number of the fourth air wall is set to 1, and the right area number is not set.
Referring to fig. 5, the present invention also provides a system for generating a blocking area in a game map, the system comprising: the system comprises an air wall creating module, a blocked area producing module and a blocked area numbering module;
the air wall creating module is used for creating an air wall formed by a plurality of vertexes when the game map is edited;
the blocked area production module is used for combining a plurality of different air walls into a closed blocked area after the air walls are edited on the game map;
the number module of the blocking area is used for setting the number of each blocking area to form different map blocking areas.
The air wall creation module is further implemented in the following manner: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
The implementation mode of the blocking area production module is further specifically as follows: after a plurality of different air walls are edited on a game map, the air walls are combined, the air walls are connected end to form a closed blocked area, and whether the blocked area is completely closed or not is judged, wherein when the blocked area is judged to be completely closed or not, the height of the air walls is fixed, so that the top of the air wall is not required to be judged as long as the top of the bottom of the air wall is judged, and the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all air wall objects in the residual air wall object list, wherein the residual air wall object list is used for judging the use condition of the list air wall objects, and if the air wall of the residual air wall object list judges the closing operation, deleting the judged air wall objects from the residual air wall object list and adding the air wall objects into the selected air wall object list;
sorting the selected air wall object list, putting a first air wall in the selected air wall object list, and then deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area; if not, the area is not a closed area;
if a plurality of air walls are selected, sequencing the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the vertex of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
traversing the air walls after judgment, deleting the air wall from the remaining air wall object list after the bottom vertex of one air wall is judged, until all the air walls are deleted, wherein the number of the remaining air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and an end point, the 1 st top point of the bottom surface of the air wall is taken as the starting point, and the last top point is set as the end point; then, judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuously traversing and judging the top point of the bottom surface of the next air wall;
if the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, performing reverse operation on the top point of the bottom surface of the next air wall, so that the start point position and the end point position of the bottom surface of the air wall are exchanged;
in the above determination process, as long as the head and tail positions of the bottom surface of one air wall are not the same as those of the other air walls, it is determined that the air walls are not combined into a closed area, and only if the top points of the bottom surfaces of all the air walls are finally determined to be connected end to end, it can be determined that the selected air walls can form a closed area.
The implementation manner of the lockout zone number module is further specifically as follows: in a map, after blocking areas are formed by creating air wall combinations, the number of each blocking area is set to form different map blocking areas; because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number are set for each air wall, and a plurality of air walls in a blocking area can be determined through the left area number and the right area number.
The mode of setting the area number is as follows: if the left and right zone numbers of the blockade zone do not exist, setting the left zone number in the blockade zone;
if the left area number of the blockade area exists, and the right area number does not exist, setting the right area number of the blockade area;
the left area number of the blockade area does not exist, and when the right area number exists, the blockade area is set to be the left area number;
when the left and right area numbers of the blocking area exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the old area number needs to be deleted, and a new area number is set.
The above description is only a preferred embodiment of the present invention, and all equivalent changes and modifications made in accordance with the claims of the present invention should be covered by the present invention.
Claims (10)
1. A method of generating a containment area in a game map, characterized by: the method comprises the following steps:
step S1, when editing the game map, creating an air wall formed by a plurality of vertexes;
step S2, after a plurality of different air walls are edited on the game map, combining the air walls into a closed blocking area;
step S3, the number of each containment zone is set to form a different map containment zone.
2. A method of generating a containment zone in a game map as defined in claim 1, wherein: the step S1 further includes: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
3. A method of generating a containment zone in a game map as defined in claim 1, wherein: the step S2 further includes: after a plurality of different air walls are edited on a game map, the air walls are combined, the air walls are connected end to form a closed blocked area, and whether the blocked area is completely closed or not is judged, wherein when the blocked area is judged to be completely closed or not, the height of the air walls is fixed, so that the top of the air wall is not required to be judged as long as the top of the bottom of the air wall is judged, and the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all air wall objects in the residual air wall object list, wherein the residual air wall object list is used for judging the use condition of the list air wall objects, and if the air wall of the residual air wall object list judges the closing operation, deleting the judged air wall objects from the residual air wall object list and adding the air wall objects into the selected air wall object list;
sorting the selected air wall object list, putting a first air wall in the selected air wall object list, and then deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area; if not, the area is not a closed area;
if a plurality of air walls are selected, sequencing the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the vertex of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
traversing the air walls after judgment, deleting the air wall from the remaining air wall object list after the bottom vertex of one air wall is judged, until all the air walls are deleted, wherein the number of the remaining air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and an end point, the 1 st top point of the bottom surface of the air wall is taken as the starting point, and the last top point is set as the end point; then, judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuously traversing and judging the top point of the bottom surface of the next air wall;
if the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, performing reverse operation on the top point of the bottom surface of the next air wall, so that the start point position and the end point position of the bottom surface of the air wall are exchanged;
in the above determination process, as long as the head and tail positions of the bottom surface of one air wall are not the same as those of the other air walls, it is determined that the air walls are not combined into a closed area, and only if the top points of the bottom surfaces of all the air walls are finally determined to be connected end to end, it can be determined that the selected air walls can form a closed area.
4. A method of generating a containment zone in a game map as defined in claim 1, wherein: the step S3 further includes: in a map, after blocking areas are formed by creating air wall combinations, the number of each blocking area is set to form different map blocking areas; because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number are set for each air wall, and a plurality of air walls in a blocking area can be determined through the left area number and the right area number.
5. A method of generating a containment zone in a game map as defined in claim 4, wherein: the mode of setting the area number is as follows: if the left and right zone numbers of the blockade zone do not exist, setting the left zone number in the blockade zone;
if the left area number of the blockade area exists, and the right area number does not exist, setting the right area number of the blockade area;
the left area number of the blockade area does not exist, and when the right area number exists, the blockade area is set to be the left area number;
when the left and right area numbers of the blocking area exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the old area number needs to be deleted, and a new area number is set.
6. A system for generating a containment area in a game map, characterized by: the system comprises: the system comprises an air wall creating module, a blocked area producing module and a blocked area numbering module;
the air wall creating module is used for creating an air wall formed by a plurality of vertexes when the game map is edited;
the blocked area production module is used for combining a plurality of different air walls into a closed blocked area after the air walls are edited on the game map;
the number module of the blocking area is used for setting the number of each blocking area to form different map blocking areas.
7. A system for generating a containment zone in a game map as defined in claim 6, wherein: the air wall creation module is further implemented in the following manner: in editing a game map, an air wall formed of a plurality of vertices is created, and when editing the air wall, the air wall surface is displayed using color.
8. A system for generating a containment zone in a game map as defined in claim 6, wherein: the implementation mode of the blocking area production module is further specifically as follows: after a plurality of different air walls are edited on a game map, the air walls are combined, the air walls are connected end to form a closed blocked area, and whether the blocked area is completely closed or not is judged, wherein when the blocked area is judged to be completely closed or not, the height of the air walls is fixed, so that the top of the air wall is not required to be judged as long as the top of the bottom of the air wall is judged, and the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all air wall objects in the residual air wall object list, wherein the residual air wall object list is used for judging the use condition of the list air wall objects, and if the air wall of the residual air wall object list judges the closing operation, deleting the judged air wall objects from the residual air wall object list and adding the air wall objects into the selected air wall object list;
sorting the selected air wall object list, putting a first air wall in the selected air wall object list, and then deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the vertexes of the bottom surfaces of the air walls are connected end to end, and if so, judging that the area is a closed area; if not, the area is not a closed area;
if a plurality of air walls are selected, sequencing the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the vertex of the bottom surface of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the vertex of the bottom surface;
traversing the air walls after judgment, deleting the air wall from the remaining air wall object list after the bottom vertex of one air wall is judged, until all the air walls are deleted, wherein the number of the remaining air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and an end point, the 1 st top point of the bottom surface of the air wall is taken as the starting point, and the last top point is set as the end point; then, judging whether the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, if the end point of the bottom surface of the previous air wall is the starting point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuously traversing and judging the top point of the bottom surface of the next air wall;
if the end point of the bottom surface of the previous air wall is not the start point of the bottom surface of the next air wall but the end point of the bottom surface of the next air wall, performing reverse operation on the top point of the bottom surface of the next air wall, so that the start point position and the end point position of the bottom surface of the air wall are exchanged;
in the above determination process, as long as the head and tail positions of the bottom surface of one air wall are not the same as those of the other air walls, it is determined that the air walls are not combined into a closed area, and only if the top points of the bottom surfaces of all the air walls are finally determined to be connected end to end, it can be determined that the selected air walls can form a closed area.
9. A system for generating a containment zone in a game map as defined in claim 6, wherein: the implementation manner of the lockout zone number module is further specifically as follows: in a map, after blocking areas are formed by creating air wall combinations, the number of each blocking area is set to form different map blocking areas; because only one area is allowed on the left side and the right side of each air wall, a left area number and a right area number are set for each air wall, and a plurality of air walls in a blocking area can be determined through the left area number and the right area number.
10. A system for generating a containment zone in a game map as defined in claim 9, wherein: the mode of setting the area number is as follows: if the left and right zone numbers of the blockade zone do not exist, setting the left zone number in the blockade zone;
if the left area number of the blockade area exists, and the right area number does not exist, setting the right area number of the blockade area;
the left area number of the blockade area does not exist, and when the right area number exists, the blockade area is set to be the left area number;
when the left and right area numbers of the blocking area exist, judgment needs to be carried out, whether the newly set number is the same as the existing number or not is judged, if the newly set number is the same as the existing number, resetting is not needed, and if the newly set number is different from the existing number, the old area number needs to be deleted, and a new area number is set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010910840.7A CN112044060B (en) | 2020-09-02 | 2020-09-02 | Method and system for generating blocking area in game map |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010910840.7A CN112044060B (en) | 2020-09-02 | 2020-09-02 | Method and system for generating blocking area in game map |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112044060A true CN112044060A (en) | 2020-12-08 |
CN112044060B CN112044060B (en) | 2023-08-22 |
Family
ID=73607835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010910840.7A Active CN112044060B (en) | 2020-09-02 | 2020-09-02 | Method and system for generating blocking area in game map |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112044060B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024103611A1 (en) * | 2022-11-18 | 2024-05-23 | 网易(杭州)网络有限公司 | Method and apparatus for virtual character interaction in game, device, and medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663802A (en) * | 2012-04-20 | 2012-09-12 | 北京像素软件科技股份有限公司 | Game terrain road generating method and device |
US20160332074A1 (en) * | 2015-05-14 | 2016-11-17 | Activision Publishing, Inc. | System and method for providing dynamically variable maps in a video game |
CN109045696A (en) * | 2018-07-24 | 2018-12-21 | 合肥爱玩动漫有限公司 | A kind of closed map Research on Automatic Filling |
CN109276884A (en) * | 2018-08-30 | 2019-01-29 | 北京深极智能科技有限公司 | Game path generation method and device |
CN110213311A (en) * | 2018-04-03 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Information-pushing method and device |
-
2020
- 2020-09-02 CN CN202010910840.7A patent/CN112044060B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663802A (en) * | 2012-04-20 | 2012-09-12 | 北京像素软件科技股份有限公司 | Game terrain road generating method and device |
US20160332074A1 (en) * | 2015-05-14 | 2016-11-17 | Activision Publishing, Inc. | System and method for providing dynamically variable maps in a video game |
CN110213311A (en) * | 2018-04-03 | 2019-09-06 | 腾讯科技(深圳)有限公司 | Information-pushing method and device |
CN109045696A (en) * | 2018-07-24 | 2018-12-21 | 合肥爱玩动漫有限公司 | A kind of closed map Research on Automatic Filling |
CN109276884A (en) * | 2018-08-30 | 2019-01-29 | 北京深极智能科技有限公司 | Game path generation method and device |
Non-Patent Citations (1)
Title |
---|
CSGO RUSHB中文网: "CSGO显示空气墙控制台指令", Retrieved from the Internet <URL:https://www.rushb.net/r_drawclipbrushes.html> * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024103611A1 (en) * | 2022-11-18 | 2024-05-23 | 网易(杭州)网络有限公司 | Method and apparatus for virtual character interaction in game, device, and medium |
Also Published As
Publication number | Publication date |
---|---|
CN112044060B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106683167A (en) | Automatic modeling approach for high precision model of complex building | |
US9030475B2 (en) | Method of computer-aided design of a modeled object having several faces | |
CN108434734A (en) | Virtual resource processing method, device, terminal and storage medium in scene of game | |
CN112163251A (en) | Building model unitization method and device, storage medium and electronic equipment | |
CN107126702A (en) | A kind of generation method of 3D game Random map | |
CN112044060A (en) | Method and system for generating blocking area in game map | |
EP3086293B1 (en) | Simulation device | |
CN105354878B (en) | The preparation method and device of a kind of electronic map data | |
CN114896666A (en) | Navigation tunnel parametric model establishing method and system based on BIM technology | |
CN105894553B (en) | A kind of Street Space form layout method based on grid selection | |
CN113028920A (en) | Blasthole arrangement method and device, electronic equipment and storage medium | |
CN109685844A (en) | A kind of weave mesh label and direction calibration optimization method and device | |
CN117113472A (en) | Method and system for merging and splitting basic geographic surface elements | |
JP3571452B2 (en) | Hierarchical transformation image processing method | |
CN114419256A (en) | City-level BIM data lightweight method and system based on multi-level shell extraction algorithm | |
CN112149244A (en) | Method for planning contour line processing track in material increase and decrease manufacturing | |
JPH087800B2 (en) | Method and apparatus for synthesizing solid model | |
JPH04133183A (en) | Topographic data generator | |
CN116523860A (en) | Method for detecting protection distance of graphical hydrant | |
CN116883546A (en) | 2D game map cutting method and system | |
CN105718704B (en) | The method of clinoplain mapping processing removing body | |
Zhou et al. | THE STUDY ON AN AUTOMATIC LAYOUT METHOD FOR EQUIPMENT IN NUCLEAR POWER PLANT | |
CN114756924A (en) | Household decorative surface generation method and device based on ground modeling | |
CN117807656A (en) | Linear engineering large-terrain hole digging modeling method based on grid | |
CN117633941A (en) | Method for arranging pipeline reserved holes |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |