CN110772790A - 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
CN110772790A
CN110772790A CN201911012967.0A CN201911012967A CN110772790A CN 110772790 A CN110772790 A CN 110772790A CN 201911012967 A CN201911012967 A CN 201911012967A CN 110772790 A CN110772790 A CN 110772790A
Authority
CN
China
Prior art keywords
area
rectangular
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.)
Granted
Application number
CN201911012967.0A
Other languages
Chinese (zh)
Other versions
CN110772790B (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

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 the game map and monster area information into a game server; step S2, the monster regions are fused, namely, the monster region points with the same ID are added into the same collection container, and the collection container is transferred to generate a pixel collection container with ID and the monster regions; step S3, analyzing the monster regions of each ID of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file; step S4, the monster area reset information file is imported to the game server, and the game server performs a control brushwork according to the monster area reset 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
The method is characterized in that a monster is often found in a game, a player kills the monster to obtain a certain reward, the birth point of the monster is generally brushed randomly in a certain area, in some 2D or 2.5D games, a monster brushing area is generally composed of a plurality of rectangles, a server end conducts random point-taking brush in the area, however, in some long-term maintenance game maps, the maps are often required to be updated, for example, new objects are required to be added in some areas, part of the monster brushing area is covered by the objects, the monster brushing area is often required to be made again, the monster brushing area does not change greatly, and only the number of rectangular blocks in the area can 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 the game map and monster area information into a game server;
step S2, the monster regions are fused, namely, the monster region points with the same ID are added into the same collection container, and the collection container is transferred to generate a pixel collection container with ID and the monster regions;
step S3, analyzing the monster regions of each ID of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
step S4, the monster area reset information file is imported to the game server, and the game server performs a control brushwork according to the monster area reset 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 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 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 to output a odd region reset 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, wherein the diffusing mode adopts the outward diffusion of the upper, left, lower and right sequence, when diffusing, if several diffused pixel points are also in the pixel set container, the diffusion area is valid, 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, 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 after screening meets the conditions, the steps S31 and S32 are executed again for sorting, and the cycle is ended after the first five rectangular blocks are directly acquired, so that the condition that the dead cycle is not entered is ensured;
step S35, reconstructing the area information of the monster based on the new rectangular area, and finally deriving 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 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.
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, 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.
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 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.
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:
step S1, importing game resource data, namely importing the game map and monster area information into a game server;
step S2, the monster regions are fused, namely, the monster region points with the same ID are added into the same collection container, and the collection container is transferred to generate a pixel collection container with ID and the monster regions;
step S3, analyzing the monster regions of each ID of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
step S4, the monster area reset information file is imported to the game server, and the game server performs a control brushwork according to the monster area reset information file.
The step S1 further includes: 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.
The step S2 further 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.
The step S3 further includes: 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 to output a odd region reset 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 mode is outward diffusion in the order of top, left, bottom, and right, and the diffusion mode refers to the diagram in fig. 2, when diffusing, 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 touch 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 block 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 after screening meets the conditions, the steps S31 and S32 are executed again for sorting, and the cycle is ended after the first five rectangular blocks are directly acquired, so that the condition that the dead cycle is not entered is ensured;
step S35, reconstructing the area information of the monster based on the new rectangular area, and finally deriving a monster area reset 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 the 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 extent to obtain rectangular blocks meeting 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 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.
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:
step S1, importing game resource data, namely importing the game map and monster area information into a game server;
step S2, the monster regions are fused, namely, the monster region points with the same ID are added into the same collection container, and the collection container is transferred to generate a pixel collection container with ID and the monster regions;
step S3, analyzing the monster regions of each ID of the fused pixel set container, disassembling a screened rectangular region set, and outputting a monster region reset information file;
step S4, the monster area reset information file is imported to the game server, and the game server performs a control brushwork according to the monster area reset information file.
2. The method of claim 1, wherein the method further comprises: the step S1 further includes: 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 further 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.
4. The method of claim 1, wherein the method further comprises: the step S3 further includes: 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 to output a odd region reset 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, wherein the diffusing mode adopts the outward diffusion of the upper, left, lower and right sequence, when diffusing, if several diffused pixel points are also in the pixel set container, the diffusion area is valid, 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, 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 after screening meets the conditions, the steps S31 and S32 are executed again for sorting, and the cycle is ended after the first five rectangular blocks are directly acquired, so that the condition that the dead cycle is not entered is ensured;
step S35, reconstructing the area information of the monster based on the new rectangular area, and finally deriving 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:
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;
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;
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.
6. The method of claim 1, wherein the method further comprises: the step S4 further includes: 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 the 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 brush monster area of a game map of 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 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.
10. The system for resetting a brush monster area of a game map of 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 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, 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. 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.
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 true CN110772790A (en) 2020-02-11
CN110772790B 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)

Cited By (1)

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

Citations (8)

* 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
US20080076579A1 (en) * 2006-09-21 2008-03-27 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co., Ltd.) Video game control system and a video game control server
US20110201426A1 (en) * 2008-12-11 2011-08-18 Konami Digital Entertainment Co., Ltd. Game system, game machine and game program
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

Patent Citations (8)

* 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
US20080076579A1 (en) * 2006-09-21 2008-03-27 Kabushiki Kaisha Square Enix (Also Trading As Square Enix Co., Ltd.) Video game control system and a video game control server
US20110201426A1 (en) * 2008-12-11 2011-08-18 Konami Digital Entertainment Co., Ltd. Game system, game machine and game program
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

Cited By (1)

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

Also Published As

Publication number Publication date
CN110772790B (en) 2023-02-10

Similar Documents

Publication Publication Date Title
CN109994038B (en) Method and device for determining interest points in irregular area and electronic equipment
US8879839B2 (en) Image processing apparatus, image processing method, and storage medium
CN109117209A (en) Serializing and unserializing method and device
CN101557529A (en) Coding method for moving picture
RU2007144501A (en) COMPARE IMAGES BY BUILDING METRICS
CN112950554B (en) Lung lobe segmentation optimization method and system based on lung segmentation
CN107133909B (en) Method and device for recombining shaders
CN110772790B (en) Method and system for resetting strange area of game map brush
CN108596840B (en) Data set enhancement method for deep learning evaluation of vascular network development level
CN111798558A (en) Data processing method and device
CN107566406A (en) A kind of meeting summary management system based on cloud storage
CN104331883B (en) A kind of image boundary extraction method based on asymmetric inversed placement model
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
CN111914846A (en) Layout data synthesis method, device and storage medium
CN104361090B (en) Data query method and device
CN107257307A (en) A kind of parallelization genetic algorithm for solving multiple terminals collaboration network access method based on Spark
CN110175661A (en) The generation method and device in two dimensional code sharing path
CN105631810A (en) Printing method and printing system based on pixel gridding dot multiplexing
CN111375208B (en) Two-dimensional Euler diagram generation method and device for one-stroke game
CN113032509B (en) Map slicing method, device, equipment and medium based on distributed cluster
Shih et al. An adaptive algorithm for conversion from quadtree to chain codes
CN111077894A (en) Method and device for determining to-be-cleaned area
CN115225588B (en) Data processing method and device
CN109316750B (en) Game scene area dividing method and device

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