CN112044060B - Method and system for generating blocking area in game map - Google Patents

Method and system for generating blocking area in game map Download PDF

Info

Publication number
CN112044060B
CN112044060B CN202010910840.7A CN202010910840A CN112044060B CN 112044060 B CN112044060 B CN 112044060B CN 202010910840 A CN202010910840 A CN 202010910840A CN 112044060 B CN112044060 B CN 112044060B
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.)
Active
Application number
CN202010910840.7A
Other languages
Chinese (zh)
Other versions
CN112044060A (en
Inventor
刘德建
柳旭辉
张延锋
黄孔弘
翁存敏
陈宏展
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianqing Online Interactive Technology Co Ltd
Original Assignee
Fujian Tianqing Online Interactive Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fujian Tianqing Online Interactive Technology Co Ltd filed Critical Fujian Tianqing Online Interactive Technology Co Ltd
Priority to CN202010910840.7A priority Critical patent/CN112044060B/en
Publication of CN112044060A publication Critical patent/CN112044060A/en
Application granted granted Critical
Publication of CN112044060B publication Critical patent/CN112044060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features 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/30Features 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
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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: s1, creating an air wall formed by a plurality of vertexes when editing a game map; s2, after editing a plurality of different air walls on the game map, combining the air walls into a closed blocking area; and S3, setting the number of each blocked area to form different map blocked areas. The invention can divide the large map into a plurality of different blocking areas, thereby improving the working efficiency.

Description

Method and system for generating blocking area in game map
Technical Field
The invention relates to the field of game map making, in particular to a method and a system for generating a blocking 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 region range, and each region has its own special event, for example, a player entering a certain region triggers a scenario, and generates a certain event, etc. Each area also has different topography and topography, some mountain areas, some forests, some plains, some rivers and the like, and the topography is designed by dividing the areas, so that the difficulty in designing the topography is reduced by dividing the areas. It is important that each region generally has different resources, and the region sizes and layouts of the different resource regions need to be designed according to the size of the resource region and the environment type. However, when dividing map areas, because the shape of each area is irregular, the generated area generally needs to be blocked, so that it is difficult to generate a blocked area in the map.
The "air wall" of the electronic game is actually blocked by a transparent "wall" layer, called an air wall, where the character appears to move during the game. Air walls are present in most large role playing games due to the model frame of the game setting, BUGs, etc.
Disclosure of Invention
In order to overcome the problems, the invention aims to provide a method for generating a blocking area in a game map, which is beneficial to dividing a large map into a plurality of different blocking areas when a game player edits the game map, and improves the working efficiency.
The invention is realized by adopting the following scheme: a method of generating a blocked area in a game map, the method comprising the steps of:
s1, creating an air wall formed by a plurality of vertexes when editing a game map;
s2, after editing a plurality of different air walls on the game map, combining the air walls into a closed blocking area;
and S3, setting the number of each blocked area to form different map blocked areas.
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 the air wall is edited, the air wall surface is displayed using colors.
Further, the step S2 is further specifically: after editing a plurality of different air walls on a game map, connecting the end to end of each air wall by combining the air walls to form a closed blocking area, and judging whether the blocking area is completely closed, wherein when judging whether the blocking area is completely closed, the air wall heights are fixed, so that only the bottom surface top point of the air wall is judged, and the top surface top point of the air wall does not need to be judged, the judging mode is as follows:
setting a selected air wall object list and a residual air wall object list, storing all the air wall objects on the residual air wall object list, wherein the residual air wall object list is used for judging the service condition of the list air wall objects, and if the air wall of the residual air wall object list is judged to be closed, deleting the judged air wall object from the residual air wall object list and adding the judged air wall object 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 deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the top points 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 region is not a closed region;
if a plurality of air walls are selected, sorting the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the bottom surface vertex of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the bottom surface vertex;
traversing the air walls after judgment, and deleting the air wall from the residual air wall object list after the judgment of the bottom surface vertex of one air wall is completed until all the air walls are deleted, wherein the number of the residual air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and a finishing point, so that the 1 st top point of the bottom surface of the air wall is used as the starting point, and the last top point is used as the finishing point; then, judging whether the end point of the bottom surface of the previous air wall is the start 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 start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuing to traverse to judge 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, carrying out reverse sequence 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 judging process, if the end-to-end position of the bottom surface of one air wall is not the same as the end-to-end position of the bottom surface of the other air wall, the air walls are judged to be combined into a closed area, and only if the end-to-end connection of all the top points of the bottom surfaces of the air walls is finally judged, the selected air walls can be judged to form the closed area.
Further, the step S3 is further specifically: in the map, after the air wall combination is established to form a blocked area, the number of each blocked area is set to form different map blocked areas; since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number are set for each air wall, and a blocking area can be determined to have a plurality of air walls through the left area number and the right area number.
Further, the manner of setting the region numbers is as follows: setting a left area number for the blocked area when the left area number and the right area number of the blocked area do not exist;
setting a right area number for the blocked area when the left area number of the blocked area exists and the right area number does not exist;
if the left area number of the blocked area does not exist, setting the left area number of the blocked area when the right area number exists;
when the left and right area numbers of the blocked area are both present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the old area number needs to be deleted, and a new area number needs to be set.
The present invention also provides a system for generating a blocked area in a game map, the system comprising: the system comprises an air wall creation module, a blocked area production module and a blocked area numbering module;
the air wall creation module is used for creating an air wall formed by a plurality of vertexes when editing the game map;
the blocking area production module is used for combining a plurality of different air walls into a closed blocking area after editing the air walls on the game map;
and the blocking area numbering module is used for setting the number of each blocking area so as to form different map blocking areas.
Further, the implementation manner of the air wall creation module is further specifically as follows: in editing a game map, an air wall formed of a plurality of vertices is created, and when the air wall is edited, the air wall surface is displayed using colors.
Further, the implementation manner of the production module of the blocking area is further specifically as follows: after editing a plurality of different air walls on a game map, connecting the end to end of each air wall by combining the air walls to form a closed blocking area, and judging whether the blocking area is completely closed, wherein when judging whether the blocking area is completely closed, the air wall heights are fixed, so that only the bottom surface top point of the air wall is judged, and the top surface top point of the air wall does not need to be judged, the judging mode is as follows:
setting a selected air wall object list and a residual air wall object list, storing all the air wall objects on the residual air wall object list, wherein the residual air wall object list is used for judging the service condition of the list air wall objects, and if the air wall of the residual air wall object list is judged to be closed, deleting the judged air wall object from the residual air wall object list and adding the judged air wall object 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 deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the top points 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 region is not a closed region;
if a plurality of air walls are selected, sorting the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the bottom surface vertex of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the bottom surface vertex;
traversing the air walls after judgment, and deleting the air wall from the residual air wall object list after the judgment of the bottom surface vertex of one air wall is completed until all the air walls are deleted, wherein the number of the residual air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and a finishing point, so that the 1 st top point of the bottom surface of the air wall is used as the starting point, and the last top point is used as the finishing point; then, judging whether the end point of the bottom surface of the previous air wall is the start 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 start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuing to traverse to judge 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, carrying out reverse sequence 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 judging process, if the end-to-end position of the bottom surface of one air wall is not the same as the end-to-end position of the bottom surface of the other air wall, the air walls are judged to be combined into a closed area, and only if the end-to-end connection of all the top points of the bottom surfaces of the air walls is finally judged, the selected air walls can be judged to form the closed area.
Further, the implementation manner of the blocking area numbering module is further specifically as follows: in the map, after the air wall combination is established to form a blocked area, the number of each blocked area is set to form different map blocked areas; since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number are set for each air wall, and a blocking area can be determined to have a plurality of air walls through the left area number and the right area number.
Further, the manner of setting the region numbers is as follows: setting a left area number for the blocked area when the left area number and the right area number of the blocked area do not exist;
setting a right area number for the blocked area when the left area number of the blocked area exists and the right area number does not exist;
if the left area number of the blocked area does not exist, setting the left area number of the blocked area when the right area number exists;
when the left and right area numbers of the blocked area are both present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the old area number needs to be deleted, and a new area number needs to be 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 blocking areas, sets the number of each blocking area to form different map blocking areas, is beneficial to dividing the large map into a plurality of different blocking areas when a game player edits the game map, and develops the subsequent game map, so that the operation of a developer is more convenient, and the working efficiency is improved.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
FIG. 2 is a schematic view of an air wall bottom surface vertex in accordance with an embodiment of the present invention.
FIG. 3 is a schematic view of a blocked area formed by the bottom surface of an air wall according to an embodiment of the present invention.
Fig. 4 is a numbering schematic diagram of the lockout area setting of an embodiment of the present invention.
Fig. 5 is a system schematic block diagram 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 blocked area in a game map according to the present invention includes the steps of:
s1, creating an air wall formed by a plurality of vertexes when editing a game map; the step S1 is further specifically: in editing a game map, an air wall formed of a plurality of vertices is created, and when the air wall is edited, the air wall surface is displayed using colors.
S2, after editing a plurality of different air walls on the game map, combining the air walls into a closed blocking area;
and S3, setting the number of each blocked area to form different map blocked areas.
The invention is further described with reference to the following specific examples:
the invention relates to a method for generating a blocking area in a game map, which comprises the following steps:
1. creating air walls 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 having an impact volume. Similar to a normal object wall, but is not visible on the map when running the game, as if it were hidden by a wall that is not visible in the air. Because the air wall supports the arrangement of a plurality of vertexes, the arrangement of a plurality of irregular patterns can be satisfied.
When editing the air wall, the air wall is displayed by using a green wall surface, so that the air wall is obvious in editing and easy to operate. In an actual map, the air wall is not displayed, but is simply a division of a blocked area. Each air wall may have a plurality of vertices forming an irregular pattern of air walls that may be connected by their vertices.
As shown in FIG. 2, an air wall with three vertices is provided, because the set height of the air wall is fixed, the vertices refer to the vertices of the bottom surface of the air wall, and the upper vertex is (0, 0) if the lower vertex is (0, 10) and the fixed height is 10.
2. Combining multiple air walls into a closed containment area
After editing a plurality of different air walls on the game map, the air walls can be combined to connect the air walls end to form a closed blocking area. However, only the completely closed air wall can form a blocked area, so that the judgment of the blocking area closure is required. The following is the region closure algorithm used on this side.
The more common region closure algorithm is: if a graph is closed, then for each node there is at least one connected output node, and also at least one input node, plus itself, there must be at least three nodes within the nine-grid centered on it. Therefore, only whether the node number is larger than 2 is needed to judge, and if one node is not larger than 2, the graph is not closed. However, the graphic algorithm needs to know all the vertexes and edges, and the graph generated by the edge through the air wall only knows the head and tail vertexes of a certain edge and the added vertexes in the middle of the edge, so that the graphic algorithm is not suitable for the common algorithm.
Since the lockout area is completely closed, whether or not the area is closed can be determined by determining whether or not an extension line of one side extends outside the area. The algorithm is as follows:
(1) First, the selected air wall objects are stored on a list, named the selected air wall object list. And then the air walls are stored on another list again for judging the use condition of the air wall objects of the list, if the air walls of the list are judged to be closed, the judged air wall objects are required 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 currently selected air wall object list, and the other is the residual air wall object list;
(2) Sorting the selected air wall object list, putting a first air wall into the selected air wall object list, 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 top points 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 ordered by 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 the air walls after the judgment, deleting the air wall from the residual air wall object list after the judgment of the top point of the bottom surface of one air wall is finished, and enabling the number of the residual air wall object list to be 0 until all the air walls are deleted;
(6) The bottom surface vertexes of each air wall are provided with a starting point and a finishing point, the first vertex is set as the starting point, the last vertex is set as the finishing point, if the air wall is provided with three vertexes, the 1 st vertex is set as the starting point, the 3 rd vertex is set as the finishing point, and the like; this will be explained by way of example below:
the first air wall has four bottom vertices: the first vertex is (0, 0), i.e. 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 end point;
the second air wall has two bottom vertices: the first vertex is (0, 10, 0), i.e. the starting point; the second vertex is (10, 0), which is the end point;
the third air wall has four bottom vertices: the first vertex is (10,0,0), namely the starting point; the second vertex is (10,5,0); the third vertex is (8,8,0); the fourth vertex is (10, 0), which is the end point;
the fourth air wall has two bottom vertices: the first vertex is (10,0,0), namely the starting point; the second vertex is (0, 0), which is the end point.
(7) And judging whether the end point of the bottom surface of the last air wall is the start point of the bottom surface of the next air wall or not by judging whether the coordinate positions of the vertexes are identical (namely, the X-axis coordinate, the Y-axis coordinate and the Z-axis coordinate are identical), if the end point of the bottom surface of the last air wall is the start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall list, and continuing to traverse to judge the next vertex. For example, the end point of the bottom surface of the first air wall in the above example is identical to the start point of the bottom surface of the second air wall, and then the judgment of the second air wall and the third air wall is continued.
If the end point of the last air wall bottom surface is not the start point of the next air wall bottom surface but the end point of the next air wall bottom surface, the vertex of the next air wall bottom surface is operated in reverse order so that the start point position and the end point position of the air wall bottom surface 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, the top point of the bottom surface of the third air wall is operated in reverse order, and after the reverse order operation is finished, the third air wall is changed to the first top point (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. The reverse operation is completed, the starting point of the bottom surface of the next air wall is the end point of the bottom surface of the last air wall, and the traversing judgment of the next air wall is continued until all the air walls are judged.
(8) In the above-mentioned judging process, as long as there is the head-to-tail position of an air wall and there is not the head-to-tail position of another air wall and it is the same, it can judge these air walls are combined and do not become a closed area, finally judge that all air wall bottom surface summits can be done end-to-end, just can judge these air walls of selecting can constitute a closed area.
Referring to fig. 3, a plan view of an area formed by four air walls of the above example is shown.
3. Setting the number of each blocked area to form different map blocked areas
After the blocked areas are combined by creating the air walls in the map, the number of each blocked area needs to be set to form different map blocked areas. Since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number can be set to each air wall, and by means of the left area number and the right area number, it can be determined that one area has several air walls, and the area is formed by combining the several air walls.
The format of the zone numbers is directly numbered with numerals, the left zone numbers are refarea index, the right zone numbers are lightarea index, one air wall left zone is set to zone 1, i.e., refarea index=1, and the right zone is set to zone 2, i.e., lightarea index=2.
The set region numbering method is as follows:
(1) Setting a left area number when the left area number and the right area number do not exist;
(2) Setting a right region number when the left region number exists and the right region number does not exist;
(3) If the left area number does not exist, setting the left area number when the right area number exists;
(4) When the left and right area numbers are all present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the oldest area number needs to be deleted, and the new area number needs to be set.
Region setting numbers as in fig. 4: the figure shows the effect of the region after the region is numbered. The left area number of the first air wall is set to be 1, and the right area number 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 fourth air wall left area number is set to 1, and the right area number is not set.
Referring to fig. 5, the present invention further provides a system for generating a blocked area in a game map, the system comprising: the system comprises an air wall creation module, a blocked area production module and a blocked area numbering module;
the air wall creation module is used for creating an air wall formed by a plurality of vertexes when editing the game map;
the blocking area production module is used for combining a plurality of different air walls into a closed blocking area after editing the air walls on the game map;
and the blocking area numbering module is used for setting the number of each blocking area so as to form different map blocking areas.
The implementation mode of the air wall creation module is further specifically as follows: in editing a game map, an air wall formed of a plurality of vertices is created, and when the air wall is edited, the air wall surface is displayed using colors.
The implementation mode of the production module of the blocking area is further specifically as follows: after editing a plurality of different air walls on a game map, connecting the end to end of each air wall by combining the air walls to form a closed blocking area, and judging whether the blocking area is completely closed, wherein when judging whether the blocking area is completely closed, the air wall heights are fixed, so that only the bottom surface top point of the air wall is judged, and the top surface top point of the air wall does not need to be judged, the judging mode is as follows:
setting a selected air wall object list and a residual air wall object list, storing all the air wall objects on the residual air wall object list, wherein the residual air wall object list is used for judging the service condition of the list air wall objects, and if the air wall of the residual air wall object list is judged to be closed, deleting the judged air wall object from the residual air wall object list and adding the judged air wall object 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 deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the top points 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 region is not a closed region;
if a plurality of air walls are selected, sorting the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the bottom surface vertex of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the bottom surface vertex;
traversing the air walls after judgment, and deleting the air wall from the residual air wall object list after the judgment of the bottom surface vertex of one air wall is completed until all the air walls are deleted, wherein the number of the residual air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and a finishing point, so that the 1 st top point of the bottom surface of the air wall is used as the starting point, and the last top point is used as the finishing point; then, judging whether the end point of the bottom surface of the previous air wall is the start 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 start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuing to traverse to judge 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, carrying out reverse sequence 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 judging process, if the end-to-end position of the bottom surface of one air wall is not the same as the end-to-end position of the bottom surface of the other air wall, the air walls are judged to be combined into a closed area, and only if the end-to-end connection of all the top points of the bottom surfaces of the air walls is finally judged, the selected air walls can be judged to form the closed area.
The implementation mode of the blocking area numbering module is further specifically as follows: in the map, after the air wall combination is established to form a blocked area, the number of each blocked area is set to form different map blocked areas; since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number are set for each air wall, and a blocking area can be determined to have a plurality of air walls through the left area number and the right area number.
The manner of setting the region numbers is as follows: setting a left area number for the blocked area when the left area number and the right area number of the blocked area do not exist;
setting a right area number for the blocked area when the left area number of the blocked area exists and the right area number does not exist;
if the left area number of the blocked area does not exist, setting the left area number of the blocked area when the right area number exists;
when the left and right area numbers of the blocked area are both present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the old area number needs to be deleted, and a new area number needs to be set.
The foregoing description is only of the preferred embodiments of the invention, and all changes and modifications that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (8)

1. A method of generating a blocked area in a game map, characterized by: the method comprises the following steps:
s1, creating an air wall formed by a plurality of vertexes when editing a game map;
s2, after editing a plurality of different air walls on the game map, combining the air walls into a closed blocking area;
step S3, setting the number of each blocking area to form different map blocking areas;
the step S2 is further specifically: after editing a plurality of different air walls on a game map, connecting the end to end of each air wall by combining the air walls to form a closed blocking area, and judging whether the blocking area is completely closed, wherein when judging whether the blocking area is completely closed, the air wall heights are fixed, so that only the bottom surface top points of the air walls are judged, and the top surface top points of the air walls do not need to be judged, the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all the air wall objects on the residual air wall object list, wherein the residual air wall object list is used for judging the service condition of the list air wall objects, and if the air wall of the residual air wall object list is judged to be closed, deleting the judged air wall object from the residual air wall object list and adding the judged air wall object 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 deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the top points 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 region is not a closed region;
if a plurality of air walls are selected, sorting the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the bottom surface vertex of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the bottom surface vertex;
traversing the air walls after judgment, and deleting the air wall from the residual air wall object list after the judgment of the bottom surface vertex of one air wall is completed until all the air walls are deleted, wherein the number of the residual air wall object list is 0;
the top point of the bottom surface of each air wall is provided with a starting point and a finishing point, so that the 1 st top point of the bottom surface of the air wall is used as the starting point, and the last top point is used as the finishing point; then, judging whether the end point of the bottom surface of the previous air wall is the start 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 start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuing to traverse to judge 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, carrying out reverse sequence 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 judging process, if the end-to-end position of the bottom surface of one air wall is not the same as the end-to-end position of the bottom surface of the other air wall, the air walls are judged to be combined into a closed area, and only if the end-to-end connection of all the top points of the bottom surfaces of the air walls is finally judged, the selected air walls can be judged to form the closed area.
2. A method of generating a blocked area in a game map as claimed in claim 1, wherein: the step S1 is further specifically: in editing a game map, an air wall formed of a plurality of vertices is created, and when the air wall is edited, the air wall surface is displayed using colors.
3. A method of generating a blocked area in a game map as claimed in claim 1, wherein: the step S3 is further specifically: in the map, after the air wall combination is established to form a blocked area, the number of each blocked area is set to form different map blocked areas; since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number are set for each air wall, and a blocking area can be determined to have a plurality of air walls through the left area number and the right area number.
4. A method of generating a blocked area in a game map as claimed in claim 3, wherein: the manner of setting the region numbers is as follows: setting a left area number for the blocked area when the left area number and the right area number of the blocked area do not exist;
setting a right area number for the blocked area when the left area number of the blocked area exists and the right area number does not exist;
if the left area number of the blocked area does not exist, setting the left area number of the blocked area when the right area number exists;
when the left and right area numbers of the blocked area are both present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the old area number needs to be deleted, and a new area number needs to be set.
5. A system for generating a blocked area in a game map, characterized by: the system comprises: the system comprises an air wall creation module, a blocked area production module and a blocked area numbering module;
the air wall creation module is used for creating an air wall formed by a plurality of vertexes when editing the game map;
the blocking area production module is used for combining a plurality of different air walls into a closed blocking area after editing the air walls on the game map;
the blocking area numbering module is used for setting the number of each blocking area to form different map blocking areas; the implementation mode of the production module of the blocking area is further specifically as follows: after editing a plurality of different air walls on a game map, connecting the end to end of each air wall by combining the air walls to form a closed blocking area, and judging whether the blocking area is completely closed, wherein when judging whether the blocking area is completely closed, the air wall heights are fixed, so that only the bottom surface top points of the air walls are judged, and the top surface top points of the air walls do not need to be judged, the judgment mode is specifically as follows:
setting a selected air wall object list and a residual air wall object list, storing all the air wall objects on the residual air wall object list, wherein the residual air wall object list is used for judging the service condition of the list air wall objects, and if the air wall of the residual air wall object list is judged to be closed, deleting the judged air wall object from the residual air wall object list and adding the judged air wall object 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 deleting the first air wall from the rest air wall object list;
if only one air wall is selected, directly judging whether the top points 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 region is not a closed region;
if a plurality of air walls are selected, sorting the air walls through the bottom surface vertex coordinate values of the air walls; the coordinate value of the bottom surface vertex of each air wall is equal to the absolute coordinate value of the air wall plus the relative coordinate value of the bottom surface vertex;
traversing the air walls after judgment, and deleting the air wall from the residual air wall object list after the judgment of the bottom surface vertex of one air wall is completed until all the air walls are deleted, wherein the number of the residual air wall object list is 0; the top point of the bottom surface of each air wall is provided with a starting point and a finishing point, so that the 1 st top point of the bottom surface of the air wall is used as the starting point, and the last top point is used as the finishing point; then, judging whether the end point of the bottom surface of the previous air wall is the start 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 start point of the bottom surface of the next air wall, deleting the air wall from the residual air wall object list, and continuing to traverse to judge 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, carrying out reverse sequence 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 judging process, if the end-to-end position of the bottom surface of one air wall is not the same as the end-to-end position of the bottom surface of the other air wall, the air walls are judged to be combined into a closed area, and only if the end-to-end connection of all the top points of the bottom surfaces of the air walls is finally judged, the selected air walls can be judged to form the closed area.
6. A system for generating a blocked area in a game map as defined in claim 5, wherein: the implementation mode of the air wall creation module is further specifically as follows: in editing a game map, an air wall formed of a plurality of vertices is created, and when the air wall is edited, the air wall surface is displayed using colors.
7. A system for generating a blocked area in a game map as defined in claim 5, wherein: the implementation mode of the blocking area numbering module is further specifically as follows: in the map, after the air wall combination is established to form a blocked area, the number of each blocked area is set to form different map blocked areas; since only one area is allowed on the left and right sides of each air wall, a left area number and a right area number are set for each air wall, and a blocking area can be determined to have a plurality of air walls through the left area number and the right area number.
8. A system for generating a blocked area in a game map as defined in claim 7, wherein: the manner of setting the region numbers is as follows: setting a left area number for the blocked area when the left area number and the right area number of the blocked area do not exist;
setting a right area number for the blocked area when the left area number of the blocked area exists and the right area number does not exist;
if the left area number of the blocked area does not exist, setting the left area number of the blocked area when the right area number exists;
when the left and right area numbers of the blocked area are both present, a judgment needs to be made as to whether the newly set number is the same as the existing number, if so, the newly set number does not need to be reset, and if not, the old area number needs to be deleted, and a new area number needs to be set.
CN202010910840.7A 2020-09-02 2020-09-02 Method and system for generating blocking area in game map Active CN112044060B (en)

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 CN112044060A (en) 2020-12-08
CN112044060B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115738250A (en) * 2022-11-18 2023-03-07 网易(杭州)网络有限公司 Method, device, equipment and medium for virtual character interaction in game

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663802A (en) * 2012-04-20 2012-09-12 北京像素软件科技股份有限公司 Game terrain road generating 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
CN110213311A (en) * 2018-04-03 2019-09-06 腾讯科技(深圳)有限公司 Information-pushing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10486068B2 (en) * 2015-05-14 2019-11-26 Activision Publishing, Inc. System and method for providing dynamically variable maps in a video game

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102663802A (en) * 2012-04-20 2012-09-12 北京像素软件科技股份有限公司 Game terrain road generating method and device
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

Also Published As

Publication number Publication date
CN112044060A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN106683167A (en) Automatic modeling approach for high precision model of complex building
US20110050691A1 (en) Real-time user guided optimization of general 3d data
CN112044060B (en) Method and system for generating blocking area in game map
CN107126702A (en) A kind of generation method of 3D game Random map
CN108320047A (en) A kind of selection method of the optimal travel route of crane based on BIM technology
JP5967786B2 (en) Simulation device
CN110544284B (en) Method for automatically planning optimal layout flow chart
CN117113472A (en) Method and system for merging and splitting basic geographic surface elements
CN103164230B (en) Requirement modeling method based on new characteristic model and model transformation method
CN114419256B (en) Urban level BIM data light weight method and system based on multistage shell extraction algorithm
JPH0844883A (en) Automatic layout device
CN115081075A (en) Automatic method for converting three-dimensional information model into two-dimensional design drawing
CN115221835A (en) Physical verification method and device for chip design
CN110956015B (en) Method for checking double graph manufacture constraint
CN113744399B (en) Terrain layered data processing method, apparatus, device and machine readable storage medium
CN113590885B (en) Vector graphic rasterization method
Lee Practical solutions for specific generalization tasks
JPH09212672A (en) Graphic data processing method
CN111105479B (en) Design method for automatically displaying tree complex structure data based on collision detection
US20150169803A1 (en) Simulation apparatus, controlling method, program and information storage medium for the simulation apparatus
Sui et al. An automated refactoring tool for dataflow visual programming language
CN116883546A (en) 2D game map cutting method and system
CN118334288A (en) Method for automatically dividing building functional partitions in three-dimensional model
CN117574473A (en) Method for automatically and continuously numbering foundation piles according to bearing platform sequence
CN116882340A (en) Method for automatically generating ring oscillator layout

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