CN110772790B - Method and system for resetting strange area of game map brush - Google Patents

Method and system for resetting strange area of game map brush Download PDF

Info

Publication number
CN110772790B
CN110772790B CN201911012967.0A CN201911012967A CN110772790B CN 110772790 B CN110772790 B CN 110772790B CN 201911012967 A CN201911012967 A CN 201911012967A CN 110772790 B CN110772790 B CN 110772790B
Authority
CN
China
Prior art keywords
rectangular
area
monster
container
pixel
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
CN201911012967.0A
Other languages
Chinese (zh)
Other versions
CN110772790A (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 CN201911012967.0A priority Critical patent/CN110772790B/en
Publication of CN110772790A publication Critical patent/CN110772790A/en
Application granted granted Critical
Publication of CN110772790B publication Critical patent/CN110772790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a method for resetting a strange area of a game map, which comprises the following steps: step S1, importing game resource data, namely importing a game map and monster area information into a game server; s2, fusing the monster regions, namely adding monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container with the ID and the monster regions; s3, analyzing the monster regions of the IDs of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file; and S4, importing the monster area resetting information file into a game server, and controlling the monster by the game server according to the monster area resetting information file. The invention improves the efficiency and quality of map monster area information output and improves the performance of the game server.

Description

Method and system for resetting strange area of game map brush
Technical Field
The invention relates to the technical field of computer communication, in particular to a method and a system for resetting a strange area of a game map.
Background
In some 2D or 2.5D games, a monster brushing area is generally composed of a plurality of rectangles, and a server performs random point brushing in the area, but in some long-term maintenance game maps, the maps often need to be updated, for example, some new objects need to be added in some areas, part of some monster brushing areas are covered by the objects, the monster brushing areas often need to be re-made, the areas do not change greatly, and only the rectangular blocks of the areas may be increased. Therefore, a new scheme and system for resetting the new strange area at one time is needed to reduce the labor cost.
Disclosure of Invention
In order to overcome the above problems, an object of the present invention is to provide a method for resetting a strange area of a game map, which improves the efficiency and quality of generating information of the strange area of the map, and improves the performance of a game server.
The invention is realized by adopting the following scheme: a method of game map brush monster area reset, the method comprising the steps of:
step S1, importing game resource data, namely importing a game map and monster area information into a game server;
s2, fusing the monster regions, namely adding monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container with the ID and the monster regions;
s3, analyzing the monster regions of the IDs of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
and S4, importing the monster area resetting information file into a game server, and controlling the monster by the game server according to the monster area resetting information file.
Further, the step S1 is further specifically: and importing the game map into the game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
Further, the step S2 is further specifically: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is converted into a mapping table formed by adding an ID and a pixel point set container, for example, one ID in all IDs of the monster region information is specifically used for converting each rectangle under one ID of the monster region information into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing an object mask for the pixel set container, wherein the object mask for removing is specifically as follows: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
Further, the step S3 is further specifically: constructing a rectangular area container, namely, according to a pixel set container obtained by blending odd-character areas, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions to output an odd-character area resetting information file, taking one ID in all IDs of the pixel set container as an example, and specifically comprising the following steps:
step S31, polling each pixel point from a pixel set container, and diffusing from the pixel point, wherein the diffusing mode adopts the outward diffusion of the upper, left, lower and right sequences, during diffusing, if a plurality of diffused pixel points are also in the pixel set container, the diffusion area is effective, otherwise, the diffusion area is invalid to indicate that the diffusion in the direction is stopped, finally, after the diffusion in all four directions is stopped, a rectangular area can be obtained, and the rectangular area is added into the rectangular area container of the cycle, so that each pixel point makes an attempt, and if the attempted rectangular block exists in the rectangular area container, the attempted rectangular block does not need to be added into the rectangular area container;
step S32, sorting and screening the rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain extent to obtain rectangular blocks meeting requirements;
step S33, acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, removing the pixel information in the current rectangular block from the pixel set container, and performing the steps S31, S32 and S33 until the number of the pixel sets in the removed pixel set container is less than ten percent of the pixels in the original pixel set container, so as to finish the circulation;
step S34, if the rectangular area container is constructed in a cycle after the steps, and none of the rectangular blocks is qualified after screening, the steps S31 and S32 are executed again for sorting, and the cycle is finished after the first five rectangular blocks are directly obtained, so that the condition that the dead cycle is not entered is ensured;
and step S35, reconstructing the area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area reset information file.
Further, the sorting and screening of the rectangular blocks in step S32 further specifically includes:
A. sorting for the first time, if the aspect ratio of the rectangular blocks is less than 0.4f, removing the rectangular blocks from the rectangular area container to obtain a new first rectangular queue;
B. in the first rectangular queue in the step A, sorting is carried out according to the area of the rectangle, and a new second rectangular queue is generated when the area is large and is in front of the queue;
C. b, sorting the second rectangular queue in the step B according to the aspect ratio, taking two rectangular blocks in the queue as an example, if the area of the rectangular block 1 is smaller than the area of the rectangular block 2, but the area of the rectangular block 1 is greater than or equal to 0.75 times of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is greater than the aspect ratio of the rectangular block 2, the rectangular block 1 should be arranged in front of the rectangular block 2, and a final rectangular queue is generated; the aspect ratio represents width to height minimum/width to height maximum.
Further, the step S4 is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area.
In addition, the invention also provides a system for resetting the brush monster area of the game map, which comprises an importing module, a fusing module, a screening module and a brush monster processing module;
the importing module is used for importing game resource data, namely importing the game map and monster area information into the game server;
the fusion module is used for fusing the monster regions, namely adding the monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container of the ID and the monster region;
the screening module is used for analyzing the monster regions of all IDs of the fused pixel set container, disassembling a screened rectangular region set and outputting a monster region reset information file;
the monster brushing processing module is used for importing a monster area resetting information file into the game server, and the game server controls a monster brushing according to the monster area resetting information file.
Further, the importing module is further specifically: and importing the game map into the game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
Further, the fusion module further specifically includes: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is converted into a mapping table formed by adding an ID and a pixel point set container, for example, one ID in all IDs of the monster region information is specifically used for converting each rectangle under one ID of the monster region information into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing the object mask for the pixel set container, wherein the removed object mask specifically comprises: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
Further, the screening module further specifically includes: constructing a rectangular area container, namely, according to a pixel set container obtained by fusing odd character areas, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions to output a odd character area reset information file, taking one ID in all IDs of the pixel set container as an example, and realizing the method through the following units:
the diffusion processing unit is used for polling each pixel point from the pixel set container and diffusing from the pixel point, the diffusion mode adopts the outward diffusion in the sequence of upper, left, lower and right, when diffusing, if a plurality of diffused pixel points are also in the pixel set container, the diffusion area is valid, otherwise, the expansion area is invalid to indicate that the diffusion in the direction is stopped, finally, after the diffusion in all four directions is stopped, a rectangular area can be obtained, and the rectangular area is added into the rectangular area container of the cycle, so that each pixel point makes an attempt, and if the attempted rectangular block exists in the rectangular area container, the attempted rectangular block does not need to be added into the rectangular area container;
the sorting and screening processing unit is used for sorting and screening the rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain extent to obtain rectangular blocks meeting requirements;
the eliminating processing unit is used for acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, eliminating the pixel information in the current rectangular block from the pixel set container, and finishing the circulation after the number of the pixel sets in the eliminated pixel set container is less than ten percent of the number of the pixels in the original pixel set container;
if the rectangular region container of the above units is constructed in a cycle and none of the rectangular blocks is qualified after screening, the circulation processing unit executes the diffusion processing unit and the sorting and screening processing unit again for sorting, and directly acquires the first five rectangular blocks and then finishes the cycle so as to ensure that the condition of no dead cycle is entered;
and acquiring a monster area reset information file unit, reconstructing area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area reset information file.
Further, the sorting and screening of the rectangular blocks in the step sorting and screening processing unit is further specifically as follows:
A. sorting for the first time, if the aspect ratio of the rectangular blocks is less than 0.4f, removing the rectangular blocks from the rectangular area container to obtain a new first rectangular queue;
B. in the first rectangular queue in the step A, sorting is carried out according to the area of the rectangle, and a new second rectangular queue is generated when the area is large and is in front of the queue;
C. b, sorting the second rectangular queue in the step B according to the aspect ratio, taking two rectangular blocks in the queue as an example, if the area of the rectangular block 1 is smaller than the area of the rectangular block 2, but the area of the rectangular block 1 is greater than or equal to 0.75 times of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is greater than the aspect ratio of the rectangular block 2, the rectangular block 1 should be arranged in front of the rectangular block 2, and a final rectangular queue is generated; the aspect ratio represents width to height minimum/width to height maximum.
Further, the strange brush processing module is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area.
The invention has the beneficial effects that: the method fuses the imported monster region information, adds the region points with the same ID into the same container, and generates a mapping container of the ID and the region; analyzing the areas of the IDs of the fused mapping container, disassembling the most reasonable rectangular area set, outputting a monster area reset information file, importing a new monster area reset information file to a game server, and enabling the server to use the new monster area reset information file to carry out monster brushing control; the invention improves the efficiency and quality of map monster area information output and improves the performance of the game server.
Drawings
FIG. 1 is a schematic flow diagram of the process of the present invention.
Fig. 2 is a schematic view of a diffusion method for diffusing pixels according to the present invention.
Fig. 3 is a schematic 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 resetting a strange area of a game map according to the present invention includes the steps of:
s1, importing game resource data, namely importing game maps and monster area information into a game server;
s2, fusing the monster regions, namely adding monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container with the ID and the monster regions;
s3, analyzing monster regions of all IDs of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
and S4, importing the monster area resetting information file into a game server, and controlling the monster by the game server according to the monster area resetting information file.
The step S1 is further specifically: and importing the game map into a game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
The step S2 is further specifically: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is converted into a mapping table formed by adding an ID and a pixel point set container, for example, one ID in all IDs of the monster region information is specifically used for converting each rectangle under one ID of the monster region information into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing the object mask for the pixel set container, wherein the removed object mask specifically comprises: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
The step S3 is further specifically: constructing a rectangular area container, namely, according to a pixel set container obtained by blending odd-character areas, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions to output an odd-character area resetting information file, taking one ID in all IDs of the pixel set container as an example, and specifically comprising the following steps:
step S31, polling each pixel point from the pixel set container, and diffusing from the pixel point, where the diffusion manner is outward diffusion in the order of top, left, bottom, and right, and the diffusion manner refers to the diagram in fig. 2, and during diffusion, if several diffused pixel points are also in the pixel set container, the diffusion area is valid, otherwise the expansion area is invalid to indicate that diffusion in this direction is stopped, and finally after diffusion in all four directions is stopped (i.e., finally, when all four directions hit an obstacle or a boundary, a cycle is ended), a rectangular area can be obtained, and the rectangular area is added to the rectangular area container in this cycle, so that each pixel point performs an attempt once, and if an attempted rectangular block exists in the rectangular area container, the rectangular area does not need to be added to the rectangular area container;
step S32, sorting and screening the rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain extent to obtain rectangular blocks meeting requirements;
the sorting and screening of the rectangular blocks in step S32 is further specifically:
A. first sorting, if the aspect ratio of the tile is less than 0.4f, where f represents a floating point type, 0.4f may be understood as 40% or 0.4 times; removing the rectangular block from the rectangular area container to obtain a new first rectangular queue;
B. in the first rectangular queue in the step A, sorting is carried out according to the area of the rectangle, and a new second rectangular queue is generated when the area is large and is in front of the queue;
C. b, sorting the second rectangular queue in the step B according to the aspect ratio, taking two rectangular blocks in the queue as an example, if the area of the rectangular block 1 is smaller than the area of the rectangular block 2, but the area of the rectangular block 1 is greater than or equal to 0.75 times of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is greater than the aspect ratio of the rectangular block 2, the rectangular block 1 should be arranged in front of the rectangular block 2, and a final rectangular queue is generated; the aspect ratio represents width to height minimum/width to height maximum.
Step S33, acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, removing the pixel information in the current rectangular block from the pixel set container, and performing the steps S31, S32 and S33 until the number of the pixel sets in the removed pixel set container is less than ten percent of the pixels in the original pixel set container, so as to finish the circulation;
step S34, if the rectangular area container is constructed in a cycle after the steps, and none of the rectangular blocks is qualified after screening, the steps S31 and S32 are executed again for sorting, and the cycle is finished after the first five rectangular blocks are directly obtained, so that the condition that the dead cycle is not entered is ensured;
and step S35, reconstructing area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area resetting information file.
In addition, in the present invention, the step S4 is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area. (since the monster region reset information file is divided into rectangular blocks relatively satisfying the monster region after the monster region reset information file has scanned the current map and removed the mask information, the game server does not need to perform any processing, and only needs to directly use these regions to refresh the monster).
Referring to fig. 2 and 3, the present invention further provides a system for resetting a brush monster area of a game map, wherein the system comprises an importing module, a fusing module, a filtering module, and a brush monster processing module;
the importing module is used for importing game resource data, namely importing the game map and monster area information into the game server;
the fusion module is used for fusing the monster regions, namely adding the monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container with the ID and the monster regions;
the screening module is used for analyzing the monster regions of all IDs of the fused pixel set container, disassembling a screened rectangular region set and outputting a monster region reset information file;
the monster brushing processing module is used for importing a monster area resetting information file into the game server, and the game server controls a monster brushing according to the monster area resetting information file. The brush strange processing module is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area.
Wherein, the import module further specifically is: and importing the game map into a game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
The fusion module further comprises: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is converted into a mapping table formed by adding an ID and a pixel point set container, for example, one ID in all IDs of the monster region information is specifically used for converting each rectangle under one ID of the monster region information into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing the object mask for the pixel set container, wherein the removed object mask specifically comprises: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
The screening module is further specifically: constructing a rectangular area container, namely, according to a pixel set container obtained by fusing odd character areas, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions to output an odd character area reset information file, wherein taking one ID in all IDs of the pixel set container as an example, the method is realized by a diffusion processing unit, a sorting and screening processing unit, a rejection processing unit, a circulation processing unit and an odd character area reset information file obtaining unit:
the diffusion processing unit is used for polling each pixel point from the pixel set container and diffusing from the pixel point, wherein the diffusion mode adopts the outward diffusion in the sequence of upper, left, lower and right, when diffusing, if a plurality of diffused pixel points are also in the pixel set container, a diffusion area is effective, otherwise, the diffusion area is ineffective to indicate that the diffusion in the direction is stopped (namely, finally, the circulation is ended when four directions all touch an obstacle or a boundary), finally, after the diffusion in the four directions is stopped, a rectangular area can be obtained and is added into the rectangular area container in the circulation, so that each pixel point is tried once, and if a tried rectangular block exists in the rectangular area container, the rectangular block does not need to be added into the rectangular area container;
the sorting and screening processing unit is used for sorting and screening the rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain degree to obtain rectangular blocks meeting the requirements;
the sorting and screening of the rectangular blocks in the step sorting and screening processing unit is further specifically as follows:
A. sorting for the first time, if the aspect ratio of the rectangular blocks is less than 0.4f, removing the rectangular blocks from the rectangular area container to obtain a new first rectangular queue;
B. in the first rectangular queue in the step A, sorting is carried out according to the area of the rectangle, and a new second rectangular queue is generated when the area is large and is in front of the queue;
C. b, sorting the second rectangular queue in the step B according to the aspect ratio, taking two rectangular blocks in the queue as an example, if the area of the rectangular block 1 is smaller than the area of the rectangular block 2, but the area of the rectangular block 1 is greater than or equal to 0.75 times of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is greater than the aspect ratio of the rectangular block 2, the rectangular block 1 should be arranged in front of the rectangular block 2, and a final rectangular queue is generated; the aspect ratio represents width to height minimum/width to height maximum.
The eliminating processing unit is used for acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, eliminating the pixel information in the current rectangular block from the pixel set container, and finishing the circulation after the number of the pixel sets in the eliminated pixel set container is less than ten percent of the number of the pixels in the original pixel set container;
if the rectangular region container is constructed through the units in a cycle and no rectangular block is qualified after screening, the circulation processing unit executes the diffusion processing unit and the sorting and screening processing unit again for sorting, directly acquires the first five rectangular blocks and then finishes the cycle to ensure that the condition of dead cycle is not entered;
and acquiring a monster area resetting information file unit, reconstructing area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area resetting information file.
In a word, the method fuses the imported monster region information, adds the region points with the same ID into the same container, and generates a mapping container of the ID and the region; analyzing the areas of the IDs of the fused mapping container, disassembling the most reasonable rectangular area set, outputting a monster area reset information file, importing a new monster area reset information file to a game server, and enabling the server to use the new monster area reset information file to carry out monster brushing control; the invention improves the efficiency and quality of map monster area information output and improves the performance of the game server.
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 (12)

1. A method for resetting a strange area of a game map is characterized in that: the method comprises the following steps:
s1, importing game resource data, namely importing game maps and monster area information into a game server;
s2, fusing the monster regions, namely adding monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container of the ID and the monster region;
s3, analyzing the monster regions of the IDs of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
and S4, importing the monster area resetting information file into a game server, and controlling the monster by the game server according to the monster area resetting information file.
2. The method of claim 1, wherein the method further comprises: the step S1 is further specifically: and importing the game map into the game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
3. The method of claim 1, wherein the method further comprises: the step S2 is further specifically: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is transferred into a mapping table formed by adding an ID and a pixel point set container, one ID in all IDs of the monster region information is operated, specifically, each rectangle under one ID of the monster region information is converted into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing an object mask for the pixel set container, wherein the object mask for removing is specifically as follows: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
4. The method of claim 1, wherein the method further comprises: the step S3 is further specifically: constructing a rectangular area container, namely, according to a pixel set container obtained by fusing odd regions, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions, outputting a odd region reset information file, and operating one ID in all IDs of the pixel set container, wherein the specific steps are as follows:
step S31, polling each pixel point from a pixel set container, and diffusing from the pixel point, wherein the diffusing mode adopts the outward diffusion of the upper, left, lower and right sequences, during diffusing, if a plurality of diffused pixel points are also in the pixel set container, the diffusion area is effective, otherwise, the diffusion area is invalid to indicate that the diffusion in the direction is stopped, finally, after the diffusion in all four directions is stopped, a rectangular area can be obtained, and the rectangular area is added into the rectangular area container of the cycle, so that each pixel point makes an attempt, and if the attempted rectangular block exists in the rectangular area container, the attempted rectangular block does not need to be added into the rectangular area container;
step S32, sorting and screening of rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain extent to obtain rectangular blocks meeting requirements;
step S33, acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, removing the pixel information in the current rectangular block from the pixel set container, and performing the steps S31, S32 and S33 until the number of the pixel sets in the removed pixel set container is less than ten percent of the pixels in the original pixel set container, so as to finish the circulation;
step S34, if the rectangular area container is constructed in a cycle after the steps, and none of the rectangular blocks is qualified after screening, the steps S31 and S32 are executed again for sorting, and the cycle is finished after the first five rectangular blocks are directly obtained, so that the condition that the dead cycle is not entered is ensured;
and step S35, reconstructing the area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area reset information file.
5. The method of claim 4, wherein the method further comprises: the sorting and screening of the rectangular blocks in step S32 is further specifically:
A. sorting for the first time, if the aspect ratio of the rectangular blocks is less than 0.4f, removing the rectangular blocks from the rectangular area container to obtain a new first rectangular queue;
B. in the first rectangular queue in the step A, sorting is carried out according to the area of the rectangle, and a new second rectangular queue is generated when the area is large and is in front of the queue;
C. b, sorting the second rectangular queue in the step B according to the aspect ratio, operating two rectangular blocks in the queue, and if the area of the rectangular block 1 is smaller than that of the rectangular block 2, but the area of the rectangular block 1 is larger than or equal to 0.75 time of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is larger than that of the rectangular block 2, arranging the rectangular block 1 in front of the rectangular block 2 to generate a final rectangular queue; the aspect ratio represents width to height minimum/width to height maximum.
6. The method of claim 1, wherein the method further comprises: the step S4 is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area.
7. A system for resetting a monster area of a game map, comprising: the system comprises an importing module, a fusion module, a screening module and a strange-brushing processing module;
the importing module is used for importing game resource data, namely importing the game map and monster area information into the game server;
the fusion module is used for fusing the monster regions, namely adding the monster region points with the same ID into the same collection container, and unloading the collection container to generate a pixel collection container with the ID and the monster regions;
the screening module is used for analyzing the monster regions of all IDs of the fused pixel set container, disassembling a screened rectangular region set and outputting a monster region reset information file;
the monster brushing processing module is used for importing a monster area resetting information file into the game server, and the game server controls a monster brushing according to the monster area resetting information file.
8. The system for resetting a brush monster area of a game map of claim 7, wherein: the import module is further specifically: and importing the game map into a game server, namely importing the latest mask information and game object information which need to acquire the map into the game server.
9. The system for resetting a monster area of a game map as claimed in claim 7, wherein: the fusion module further comprises: the monster region information is a mapping table formed by adding an ID and a region set container, the mapping table is transferred into a mapping table formed by adding an ID and a pixel point set container, one ID in all IDs of the monster region information is operated, specifically, each rectangle under one ID of the monster region information is converted into a pixel point form, repeated pixels are removed, and a non-repeated pixel set container is generated; and removing the object mask for the pixel set container, wherein the removed object mask specifically comprises: and circularly scanning the current pixel set container, and if the object mask exists on the map at the current pixel coordinate point, eliminating the pixel point from the container to ensure that each pixel point in the finally generated pixel set container is a pixel point which is allowed to be brushed by a monster in the current map.
10. The system for resetting a monster area of a game map as claimed in claim 7, wherein: the screening module is further specifically: constructing a rectangular area container, namely, according to a pixel set container obtained by fusing odd-character areas, disassembling a pixel set corresponding to each ID into a plurality of rectangular blocks meeting conditions, outputting a odd-character area reset information file, operating one ID in all IDs of the pixel set container, and realizing the operation through the following units:
the diffusion processing unit is used for polling each pixel point from the pixel set container and diffusing from the pixel point, wherein the diffusion mode adopts the outward diffusion in the sequence of upper, left, lower and right, when diffusing, if a plurality of diffused pixel points are also in the pixel set container, the diffusion area is effective, otherwise, the diffusion area is invalid to indicate that the diffusion in the direction is stopped, finally, after the diffusion in all four directions is stopped, a rectangular area can be obtained, and the rectangular area is added into the circulating rectangular area container, so that each pixel point makes an attempt, and if the attempted rectangular block exists in the rectangular area container, the attempted rectangular block does not need to be added into the rectangular area container;
the sorting and screening processing unit is used for sorting and screening the rectangular blocks: the rectangular blocks in the rectangular area container need to be screened and sorted to a certain extent to obtain rectangular blocks meeting requirements;
the eliminating processing unit is used for acquiring a first rectangular block meeting the conditions from the rectangular queue after screening and sorting, eliminating the pixel information in the current rectangular block from the pixel set container, and finishing the circulation after the number of the pixel sets in the eliminated pixel set container is less than ten percent of the number of the pixels in the original pixel set container;
if the rectangular region container of the above units is constructed in a cycle and none of the rectangular blocks is qualified after screening, the circulation processing unit executes the diffusion processing unit and the sorting and screening processing unit again for sorting, and directly acquires the first five rectangular blocks and then finishes the cycle so as to ensure that the condition of no dead cycle is entered;
and acquiring a monster area reset information file unit, reconstructing area information of the monster according to the disassembled new rectangular area, and finally exporting a monster area reset information file.
11. The system for resetting a brush monster area of a game map of claim 10, wherein: the sorting and screening of the rectangular blocks in the step sorting and screening processing unit is further specifically as follows:
A. sorting for the first time, if the aspect ratio of the rectangular blocks is less than 0.4f, removing the rectangular blocks from the rectangular area container to obtain a new first rectangular queue;
B. b, in the first rectangular queue in the step A, sorting according to the rectangular area, wherein the area is larger than the area of the first rectangular queue, and the area is in front of the first rectangular queue to generate a new second rectangular queue;
C. b, in the second rectangular queue in the step B, sorting according to the aspect ratio, operating two rectangular blocks in the queue, and if the area of the rectangular block 1 is smaller than that of the rectangular block 2, but the area of the rectangular block 1 is greater than or equal to 0.75 time of the area of the rectangular block 2 and the aspect ratio of the rectangular block 1 is greater than the aspect ratio of the rectangular block 2, arranging the rectangular block 1 in front of the rectangular block 2 to generate a final rectangular queue; the aspect ratio represents width to height minimum/width to height maximum.
12. The system for resetting a brush monster area of a game map of claim 7, wherein: the brush strange processing module is further specifically: and importing the monster area resetting information file into a game server, covering the original monster area of the current map, and performing monster by the game server according to the cut area.
CN201911012967.0A 2019-10-23 2019-10-23 Method and system for resetting strange area of game map brush Active CN110772790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911012967.0A CN110772790B (en) 2019-10-23 2019-10-23 Method and system for resetting strange area of game map brush

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911012967.0A CN110772790B (en) 2019-10-23 2019-10-23 Method and system for resetting strange area of game map brush

Publications (2)

Publication Number Publication Date
CN110772790A CN110772790A (en) 2020-02-11
CN110772790B true CN110772790B (en) 2023-02-10

Family

ID=69386589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911012967.0A Active CN110772790B (en) 2019-10-23 2019-10-23 Method and system for resetting strange area of game map brush

Country Status (1)

Country Link
CN (1) CN110772790B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112044063B (en) * 2020-09-02 2022-05-17 腾讯科技(深圳)有限公司 Game object dynamic change method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866264A (en) * 2005-05-21 2006-11-22 华为技术有限公司 Scene generating method and system for mobile game
CN104063240A (en) * 2013-05-20 2014-09-24 腾讯科技(深圳)有限公司 Method and device for displaying map
CN106621335A (en) * 2017-01-12 2017-05-10 珠海金山网络游戏科技有限公司 System and method for monster distribution in game scene
CN108434739A (en) * 2018-01-30 2018-08-24 网易(杭州)网络有限公司 The processing method and processing device of virtual resource in scene of game
CN109011578A (en) * 2018-07-24 2018-12-18 合肥爱玩动漫有限公司 A kind of monster distribution method in scene of game
CN109718550A (en) * 2018-12-29 2019-05-07 福建天晴在线互动科技有限公司 The method for drafting and terminal of more object block spliceosomes in a kind of map

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4137152B2 (en) * 2006-09-21 2008-08-20 株式会社スクウェア・エニックス Video game control system and video game control server
JP4499171B2 (en) * 2008-12-11 2010-07-07 株式会社コナミデジタルエンタテインメント Game system, game machine, and game program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866264A (en) * 2005-05-21 2006-11-22 华为技术有限公司 Scene generating method and system for mobile game
CN104063240A (en) * 2013-05-20 2014-09-24 腾讯科技(深圳)有限公司 Method and device for displaying map
CN106621335A (en) * 2017-01-12 2017-05-10 珠海金山网络游戏科技有限公司 System and method for monster distribution in game scene
CN108434739A (en) * 2018-01-30 2018-08-24 网易(杭州)网络有限公司 The processing method and processing device of virtual resource in scene of game
CN109011578A (en) * 2018-07-24 2018-12-18 合肥爱玩动漫有限公司 A kind of monster distribution method in scene of game
CN109718550A (en) * 2018-12-29 2019-05-07 福建天晴在线互动科技有限公司 The method for drafting and terminal of more object block spliceosomes in a kind of map

Also Published As

Publication number Publication date
CN110772790A (en) 2020-02-11

Similar Documents

Publication Publication Date Title
CN109994038B (en) Method and device for determining interest points in irregular area and electronic equipment
CN109675309B (en) Construction method and device of game scene
US20130136351A1 (en) Information processing apparatus having wireless communication function and method of controlling the apparatus
CN107133909B (en) Method and device for recombining shaders
CN110772790B (en) Method and system for resetting strange area of game map brush
CN112419498A (en) Scheduling rendering method of massive oblique photography data
CN104331883B (en) A kind of image boundary extraction method based on asymmetric inversed placement model
CN108596840B (en) Data set enhancement method for deep learning evaluation of vascular network development level
CN111914846B (en) Layout data synthesis method, equipment and storage medium
CN115952252B (en) Semantic tile data processing method and device based on dynamic rendering and electronic equipment
CN105654017B (en) Two-dimentional decoding transmission method and system
CN104361090B (en) Data query method and device
CN111258558A (en) Coloring processing method and device for motion trail
CN105631810A (en) Printing method and printing system based on pixel gridding dot multiplexing
CN110175661A (en) The generation method and device in two dimensional code sharing path
CN110176057A (en) Three-dimensional house type model generating method, device, equipment and storage medium
CN115457581A (en) Table extraction method and device and computer equipment
CN111375208B (en) Two-dimensional Euler diagram generation method and device for one-stroke game
CN113763240B (en) Point cloud thumbnail generation method, device, equipment and storage medium
CN117611472B (en) Fusion method for metaspace and cloud rendering
CN115225588B (en) Data processing method and device
KR101684355B1 (en) Patern design system and control method using cellular automaton and iterative relocation system
CN108510563A (en) A kind of pattern rapid generation for imitating Art Deco Style Art-Deco and carrying out
CN101290679A (en) Optimizing data-transmission system and method
CN113535174B (en) Information searching method, device, equipment and storage medium

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