CN112370790A - Game map drawing method and device, electronic equipment and storage medium - Google Patents

Game map drawing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112370790A
CN112370790A CN202011388461.2A CN202011388461A CN112370790A CN 112370790 A CN112370790 A CN 112370790A CN 202011388461 A CN202011388461 A CN 202011388461A CN 112370790 A CN112370790 A CN 112370790A
Authority
CN
China
Prior art keywords
game
cluster
target type
pixels
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
CN202011388461.2A
Other languages
Chinese (zh)
Other versions
CN112370790B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202011388461.2A priority Critical patent/CN112370790B/en
Publication of CN112370790A publication Critical patent/CN112370790A/en
Application granted granted Critical
Publication of CN112370790B publication Critical patent/CN112370790B/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/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
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention discloses a game map drawing method, a game map drawing device, electronic equipment and a storage medium; the embodiment of the invention can acquire the game thumbnail map; acquiring a target type density value corresponding to each pixel in a game thumbnail map; determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters; when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon; according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain a clustering cluster of the target type game weapon; and drawing a cluster of target type game weapons in the game thumbnail map to show the distribution of engagement hot areas of different types of game weapons in the game scene. The scheme can improve the efficiency of game level design.

Description

Game map drawing method and device, electronic equipment and storage medium
Technical Field
The invention relates to the field of computers, in particular to a game map drawing method and device, electronic equipment and a storage medium.
Background
The design of game stages often greatly affects the balance of the competing game, for example, a shelter is established in a shooting game stage, and the game player closest to the shelter often has a greater probability of killing the game player without the shelter.
These unbalanced designs often exist in current game stages, and game developers cannot find the unbalanced designs in time, which causes problems of game player loss and the like.
Therefore, there is currently a lack of effective means to assist game developers in discovering game level imbalance designs.
Disclosure of Invention
The embodiment of the invention provides a game map drawing method, a game map drawing device, electronic equipment and a storage medium, which can assist a game developer in finding out the unbalanced design of a game level and improve the efficiency of the design of the game level.
The embodiment of the invention provides a game map drawing method, which comprises the following steps:
acquiring a game thumbnail map, wherein each pixel in the game thumbnail map corresponds to a spatial area in a game scene;
acquiring a target type density value corresponding to each pixel in a game thumbnail map, wherein the target type density value represents the frequency of a game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
when the density value of the target type is larger than the density screening threshold value, determining the pixel corresponding to the density value of the target type as a pixel to be clustered of the target type game weapon;
clustering the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one cluster of the target type game weapon;
drawing at least one cluster of the target type game weapons in the game thumbnail map to show the distribution of engagement hot areas of the game weapons of different weapon types in a game scene.
An embodiment of the present invention further provides a game map drawing device, including:
the map acquisition unit is used for acquiring a game thumbnail map, and each pixel in the game thumbnail map corresponds to one spatial area in a game scene;
the density acquisition unit is used for acquiring a target type density value corresponding to each pixel in the game thumbnail map, and the target type density value represents the frequency of a game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
the threshold unit is used for determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
the screening unit is used for determining the pixel corresponding to the target type density value as the pixel to be clustered of the target type game weapon when the target type density value is larger than the density screening threshold value;
the clustering unit is used for clustering the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one clustering cluster of the target type game weapon;
and the drawing unit is used for drawing at least one cluster of the target type game weapons in the game thumbnail map so as to show the distribution of engagement hot areas of the game weapons of different weapon types in a game scene.
In some embodiments, the threshold unit includes:
the sorting subunit is configured to sort, based on the numerical value of the target type density value, each pixel in the game thumbnail map to obtain a sorted pixel;
the target subunit is used for determining a reference pixel in the sorted pixels based on the preset screening parameters;
and the threshold subunit is used for determining the numerical value of the density value of the target type corresponding to the reference pixel as the density screening threshold of the target type game weapon.
In some embodiments, the ordered pixels include a first ordered pixel and a second ordered pixel, and the ordering subunit is configured to:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain a first sorted pixel;
and when N repeated pixels exist in the first sequenced pixels, removing N-1 repeated pixels in the first sequenced pixels to obtain second sequenced pixels, wherein the repeated pixels are pixels with the same target type density value.
In some embodiments, the filtering parameters include a first fraction and a second fraction, the reference pixels include a first reference pixel and a second reference pixel, and the target subunit is configured to:
determining the first sorted pixels as first reference pixels according to the first quantile;
and determining the pixels after the first sorting as second reference pixels according to the second quantile.
In some embodiments, the threshold subunit is configured to:
determining the numerical value of the density value of the target type corresponding to the first reference pixel as a first density screening threshold value of the target type game weapon;
determining the numerical value of the density value of the target type corresponding to the second reference pixel as a second density screening threshold value of the target type game weapon;
determining the first density screening threshold as the density screening threshold for the target type of game weapon when the first density screening threshold is greater than the second density screening threshold;
determining the second density screening threshold as the density screening threshold for the target type of gaming weapon when the first density screening threshold is greater than the second density screening threshold.
In some embodiments, the clustering unit includes:
the maximum number quantum unit is used for determining the preset maximum clustering cluster number M, and the M is a positive integer;
the clustering subunit is used for clustering the pixels to be clustered into i clustering clusters according to the display positions of the pixels to be clustered in the game thumbnail map during the ith clustering process, wherein i is a positive integer not greater than M;
the scoring subunit is configured to perform cluster scoring on the i cluster clusters to obtain an average cluster score of the i-th clustering process;
a determining subunit, configured to determine, when the average cluster score of the ith clustering process is higher than the average cluster scores of the remaining M-1 clustering processes, the i cluster clusters as i cluster clusters of the target type game weapon.
In some embodiments, the scoring subunit is to:
determining a central total point of the i clustering clusters and a cluster central point of a jth clustering cluster in the i clustering clusters;
calculating the intra-cluster compactness of the jth cluster according to the cluster center point of the jth cluster and the display position of each pixel in the i clusters in the game thumbnail map;
calculating the cluster external separation degree of the jth cluster according to the cluster center point of the jth cluster and the total center point of the i clusters;
determining the cluster score of the jth cluster according to the ratio of the cluster inside compactness and the cluster outside separation of the jth cluster;
and performing mean calculation on the cluster score of each cluster in the i clusters to obtain the average cluster score of the ith clustering.
In some embodiments, the rendering unit includes:
a parameter subunit for determining a center point, a length of a major axis, and a length of a minor axis of each cluster of the target type game weapon;
a radius subunit, configured to determine a radius of the cluster based on a mean of the long axis length and the short axis length of the cluster;
and the drawing subunit is used for drawing the clustering cluster of the target type game weapon in the game thumbnail map based on the central point and the radius of the clustering cluster.
In some embodiments, the rendering subunit is to:
determining a target drawing color corresponding to the target type;
and drawing the clustering cluster of the target type game weapon in the game thumbnail map by adopting the target drawing color based on the central point and the radius of the clustering cluster.
In some embodiments, the rendering subunit is to:
determining a preset maximum cluster radius corresponding to the game scene;
and when the radius of the cluster is not larger than the preset maximum cluster radius, drawing the cluster of the target type game weapon in the game thumbnail map.
In some embodiments, the rendering subunit is to:
determining a preset merging distance corresponding to the game scene;
determining the distance between the central points of the cluster clusters according to the central point of each cluster of the target type game weapon;
and carrying out cluster merging processing on the cluster with the distance between the central points smaller than a preset merging distance to obtain a merged cluster, and drawing the merged cluster in the game thumbnail map.
In some embodiments, the parameter subunit is configured to: :
determining a covariance matrix of the clustering cluster according to the display position of each pixel to be clustered in the clustering cluster;
performing matrix characteristic decomposition on the covariance matrix to obtain an eigenvalue and an eigenvector of the covariance matrix;
and determining the length of the long axis and the length of the short axis of the clustering cluster according to the eigenvalue and the eigenvector of the covariance matrix.
The embodiment of the invention also provides the electronic equipment, which comprises a memory, a storage and a control unit, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to perform the steps of any of the game mapping methods provided by embodiments of the present invention.
The embodiment of the invention also provides a computer-readable storage medium, wherein a plurality of instructions are stored in the computer-readable storage medium and are suitable for being loaded by a processor so as to execute the steps in any game map drawing method provided by the embodiment of the invention.
The embodiment of the invention can obtain the game thumbnail map, and each pixel in the game thumbnail map corresponds to one spatial area in a game scene; acquiring a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon; determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters; when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon; according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one cluster of the target type game weapon; at least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
In the invention, the engagement hotspots (i.e. cluster clusters) of different types of game weapons in the actual game scene can be drawn on the game thumbnail map.
In designing a game, in order to increase the game playing performance, a game developer often assumes one or more areas of engagement (i.e., fire points and fighting areas where game hits frequently occur) in a game scene according to a game playing method, and constructs game elements such as a shelter, an obstacle and a road in the game scene according to the assumption. Therefore, the engagement hotspot of the actual game drawn by the method can be used for comparing with the engagement hotspot assumed by the game developer, so as to assist the game developer to find out the unbalanced design of the game checkpoint and visually observe whether the engagement hotspot is consistent with the original design goal on the game thumbnail map, and therefore, the scheme improves the efficiency of the design of the game checkpoint.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1a is a schematic view of a scene of a game mapping method according to an embodiment of the present invention;
FIG. 1b is a schematic flow chart of a method for drawing a game map according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of a scene and a map in the game mapping method according to the embodiment of the present invention;
FIG. 1d is a schematic diagram illustrating the distribution of pixels and depth values in a game map rendering method according to an embodiment of the present invention;
FIG. 2a is a schematic diagram illustrating a drawing result of a game map drawing method according to an embodiment of the present invention;
FIG. 2b is a schematic diagram of a game mapping method applied in a game design scenario according to an embodiment of the present invention;
FIG. 2c is a merged schematic diagram of a game mapping method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a first structure of a game map drawing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a game map drawing method and device, electronic equipment and a storage medium.
The game map drawing device may be specifically integrated in an electronic device, and the electronic device may be a terminal, a server, or the like. The terminal can be a mobile phone, a tablet Computer, an intelligent bluetooth device, a notebook Computer, or a Personal Computer (PC), and the like; the server may be a single server or a server cluster composed of a plurality of servers.
In some embodiments, the game mapping apparatus may be integrated into a plurality of electronic devices, for example, the game mapping apparatus may be integrated into a plurality of servers, and the game mapping method of the present invention may be implemented by the plurality of servers.
In some embodiments, the server may also be implemented in the form of a terminal.
For example, referring to fig. 1a, the electronic device may be a terminal, and the terminal may obtain a game thumbnail map from a game database, and obtain a target type density value corresponding to each pixel in the game thumbnail map, where each pixel in the game thumbnail map corresponds to one spatial area in a game scene, and the target type density value represents how frequently a game character kills other game characters in the spatial area corresponding to the pixel using a game weapon of a target type; then, the terminal can determine the density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters; when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon; according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one cluster of the target type game weapon; at least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
The following are detailed below. The numbers in the following examples are not intended to limit the order of preference of the examples.
Artificial Intelligence (AI) is a technique that uses a digital computer to simulate the human perception environment, acquire knowledge, and use the knowledge, which can make a machine function similar to human perception, reasoning, and decision making. The artificial intelligence technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning, deep learning and the like.
Among them, Computer Vision (CV) is a technology for performing operations such as recognition and measurement on a target image by using a Computer instead of human eyes and further performing processing. Computer vision techniques typically include image processing, image recognition, image semantic understanding, image retrieval, virtual reality, augmented reality, synchronized localization and mapping, and other techniques, such as image rendering, image edge extraction, and other image processing techniques.
In this embodiment, a game map drawing method based on computer vision is provided, and as shown in fig. 1b, a specific flow of the game map drawing method may be as follows:
101. a game thumbnail map is acquired, wherein each pixel in the game thumbnail map corresponds to one spatial area in a game scene.
The game thumbnail map is an image for displaying a game scene in a thumbnail mode, and the game thumbnail map can provide a position reference of each game element in the game scene for a user. For example, a game thumbnail map can show numerous game elements such as roads, structures, shelters, obstacles, rivers, bushes, and nests in a game scene from a top view.
For example, referring to fig. 1c, the left part of fig. 1c is a position relationship between a player and a wall in a game scene, and the right part of fig. 1c is a game thumbnail map which can show the position relationship between the left part of fig. 1c and the wall in a top view.
It should be noted that, since the actual space of most game scenes is large, each pixel in the game thumbnail map often corresponds to a spatial area in the game scene, where the pixel (pixel) refers to the smallest unit constituting the game thumbnail map, i.e., the game thumbnail map may be composed of a plurality of pixels.
For example, the pixels in the game thumbnail map located at 1022 from left to right and 527 from top to bottom may correspond to a square area [ (0, 0), (0, 20), (20, 20), (20, 0) ] of 20m × 20m in the game scene.
Among them, there are various methods for acquiring a game thumbnail map, for example, the method may be read from a game application installed in a terminal, or the method may be acquired by communicating with a game server via a network.
102. And acquiring a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in killing other game roles by using a target type game weapon in the space area corresponding to the pixel.
In this embodiment, a target type density value corresponding to each pixel in the game thumbnail map may be obtained, where the target type density value is a ratio of the number of times that a game character uses a target type game weapon to kill other game characters in a space area corresponding to the pixel to a space size of the space area.
The game weapon is a virtual weapon prop in the game, and the player can operate the game character to use the game weapon to kill other game characters in the game scene.
The game weapon may have a variety of weapon types, for example, the game weapon may be classified into a sniper gun type, a shotgun type, a rifle type, a projectile type, a carrier type, a drone type, a close-war cold weapon type, and the like.
For example, if the target type is a sniping gun type, the sniping gun type density value is a ratio of the number of times that the game character uses the sniping gun to kill other game characters in the space region corresponding to the pixel to the space size of the space region.
For example, assuming that the pixel x corresponds to a 20m by 20m square region [ (0, 0), (0, 20), (20, 20), (20, 0) ] in the game scene, it is statistically known by the game server that the number of times the game character uses the sniping gun to kill other game characters in the square region in the past week is 80422, and the density value D of the sniping type of the pixel x is 80422/20m by 20 m.
The density value of the target type corresponding to each pixel of each weapon type in the game thumbnail map can be stored in a game database, and the density value of the target type corresponding to each pixel in the game thumbnail map can be acquired through communication with the game database through a network.
103. And determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters.
Understandably, because game developers design game elements such as shelters and props for different positions of game scenes to influence the balance of the game, the density value of the target type corresponding to each pixel is different in the game thumbnail map.
For the pixels with higher density values of the target types, the spatial regions corresponding to the pixels in the game scene are battle hot regions, namely the spatial regions with higher probability of killing other game characters.
For example, referring to fig. 1d, the horizontal axis of fig. 1d is the density value of the target type, and the vertical axis is the number of pixels, and as can be seen from fig. 1d, the density value of the target type of only a few pixels in the game thumbnail map is much higher than that of other pixels.
In this embodiment, a preset screening parameter is provided, which may be used to determine a reference pixel having a reference value most among pixels of a game thumbnail map, and determine a target type density value corresponding to the reference pixel as a density screening threshold of a target type game weapon, so as to determine a to-be-clustered pixel having a target type density value far higher than other pixels according to the density screening threshold.
For example, in some embodiments, step 103 may include the steps of:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain sorted pixels;
determining reference pixels in the sorted pixels based on preset screening parameters;
and determining the numerical value of the density value of the target type corresponding to the reference pixel as the density screening threshold value of the target type game weapon.
The method for determining the reference pixel in the sorted pixels based on the preset screening parameters includes:
in some embodiments, the filtering parameter may be a preset sequence number parameter, which is used to determine the reference pixel in the sorted pixels, for example, assuming that the filtering parameter is 62, the pixel at 62 th in the sorted pixels may be determined as the reference pixel.
In some embodiments, the screening parameter may be a predetermined Quantile (Quantile) which refers to the number of aliquots of a sequence. For example, assuming that the filtering parameter is 90, the sorted pixels may be equally divided into 90 shares, and the first pixel in the last share may be determined as the reference pixel.
Referring to fig. 1d, the target type density value of a portion of pixels is much higher than that of other pixels, but the target type density value distribution among the portion of pixels may be uniform, and there may be a case where a certain pixel still has a higher density value than that of other pixels.
The pixels with lower target type density values are often distributed more uniformly, even a large part of the pixels have the same target type density values, so that the part of the pixels has a larger influence on the sorting during the sorting, and therefore, in order to simultaneously consider the above-mentioned situations of uniform distribution and non-uniform distribution and reduce the influence of the pixels with lower target type density values on the sorting, the pixels with the same target type density values can be removed before or after the sorting.
Thus, in some embodiments, the step of "ordering each pixel in the game thumbnail map based on the value of the target type density value to obtain the ordered pixels" may include the steps of:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain a first sorted pixel;
and when N repeated pixels exist in the first sequenced pixels, removing N-1 repeated pixels in the first sequenced pixels to obtain second sequenced pixels, wherein the repeated pixels are pixels with the same target type density value, and N is a positive integer greater than 1.
For example, assuming that 40 repeated pixels with the target type density value of 6621 exist in the first-ordered pixels, 39 of the repeated pixels are removed, and only one pixel with the target type density value of 6621 is reserved.
If only one screening parameter is set to solve the problem of uneven distribution, the target type density value of a part of the pixels to be clustered obtained by screening in step 104 may be too low when the distribution is even, and the pixels with the low target type density value are clustered into a war hot area.
If only one screening parameter is set to solve the problem of uniform distribution, a part of pixels to be clustered may be missed when the distribution is not uniform, and pixels with high target type density values are not clustered in a war hot area.
Therefore, in order to accommodate the above-mentioned case of uniform distribution and non-uniform distribution, in some embodiments, the filtering parameter may include a first score and a second score, the first score is used for solving the case of non-uniform distribution, the second score is used for solving the case of uniform distribution, the reference pixel may include a first reference pixel and a second reference pixel, and the step of "determining the reference pixel in the sorted pixels based on the preset filtering parameter" may include the steps of:
determining the pixels after the first sorting as first reference pixels according to the first quantile;
and determining the second reference pixel in the first sorted pixels according to the second quantile.
Then, the influence of the pixels with lower density values of the target type on the sorting when the distribution is uniform is reduced, and the pixels with the same density values of the target type are removed before or after the sorting, for example, in some embodiments, the step "determining the value of the density value of the target type corresponding to the reference pixel as the density screening threshold of the target type game weapon" may include the following steps:
determining the numerical value of the density value of the target type corresponding to the first reference pixel as a first density screening threshold value of the target type game weapon;
determining the numerical value of the density value of the target type corresponding to the second reference pixel as a second density screening threshold value of the target type game weapon;
when the first density screening threshold is larger than the second density screening threshold, determining a density screening threshold as the density screening threshold of the target type game weapon;
and when the first density screening threshold value is larger than the second density screening threshold value, determining the second density screening threshold value as the density screening threshold value of the target type game weapon.
The first quantile and the second quantile can be set according to actual application scenarios, and the first quantile and the second quantile can be identical in value or different in value.
104. And when the density value of the target type is larger than the density screening threshold value, determining the pixel corresponding to the density value of the target type as the pixel to be clustered of the target type game weapon.
For example, all pixels in the game thumbnail map with the density value of the target type greater than the density screening threshold are determined as pixels to be clustered.
105. And according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one clustering cluster of the target type game weapon.
For example, the display position of the pixels to be clustered in the game thumbnail map can be marked as (x, y), and the pixels to be clustered can be divided into a plurality of cluster clusters (i.e. war hot areas) according to the position relationship between the pixels to be clustered.
Because the play design concepts of different game scenes are different, the number of Cluster clusters (Cluster) in different game scenes is different, and therefore, in this embodiment, the optimal number of Cluster clusters can be determined first, and then the pixels to be clustered are clustered into the Cluster clusters with the number of the Cluster clusters.
The best clustering number may be determined by setting a maximum clustering number M, sequentially clustering pixels to be clustered according to the clustering number of 1, 2, 3 … M, scoring clustering clusters obtained by each clustering process, and determining the clustering cluster number used in the clustering process with the highest score as the best clustering cluster number, for example, in some embodiments, step 105 may include the following steps:
determining the number M of preset maximum clustering clusters, wherein M is a positive integer;
clustering the pixels to be clustered into i clustering clusters according to the display positions of the pixels to be clustered in the game thumbnail map during the ith clustering process, wherein i is a positive integer not greater than M;
performing cluster scoring on the i cluster clusters to obtain an average cluster score of the ith clustering process;
and when the average cluster score of the ith clustering process is higher than the average cluster scores of the rest M-1 clustering processes, determining the i cluster clusters as i cluster clusters of the target type game weapon.
The clustering cluster scoring method has various modes, for example, the clustering effect can be judged to be good or poor by judging the closeness between pixels in the clustering cluster and the separation degree between the clustering clusters.
For example, using the Calinski-harabaz (CH) index, the closeness within a cluster can be measured by calculating the sum of squares of the distances between each pixel in the cluster and the center of the cluster, the separation outside the cluster can be measured by calculating the sum of squares of the distances between the center points of each cluster, and the CH index is obtained by the ratio of the separation to the closeness.
Therefore, in some embodiments, the step of "performing cluster score on i cluster clusters to obtain an average cluster score of the ith clustering process" may include the steps of:
determining a central total point of the i clustering clusters and a cluster central point of a jth clustering cluster in the i clustering clusters;
calculating the intra-cluster compactness of the jth cluster according to the cluster center point of the jth cluster and the display position of each pixel in the i clusters in the game thumbnail map;
calculating the cluster outer separation degree of the jth clustering cluster according to the cluster center point of the jth clustering cluster and the total center point of the i clustering clusters;
determining cluster score of the jth cluster according to the ratio of the cluster inside compactness and the cluster outside separation of the jth cluster;
and carrying out mean value calculation on the cluster score of each cluster in the i clusters to obtain the average cluster score of the ith clustering.
Wherein i is a positive integer, and j is a positive integer not greater than i.
106. At least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
After clustering, each cluster of clusters can be drawn as a geometric figure in a game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in a game scene.
Wherein the geometric figure may be a circle, a square, a hexagon, etc.
The drawing method has various methods, for example, the distance between each pixel in a cluster and the center of the cluster can be averaged, the average value is used as a radius, and a circle is made by taking the center of the cluster as a circle center; for another example, the longest distance and the shortest distance between the pixels in the cluster and the center of the cluster may be averaged, the average is used as a radius, and a circle is made around the center of the cluster.
In some embodiments, a Gaussian Mixture Model (GMM) may be used for clustering.
The GMM is a probabilistic clustering method, and is composed of a plurality of gaussian distributions, each gaussian distribution is called a Component (Component) in a gaussian mixture model, pixels are clustered by a parameter estimation method according to the number K of given cluster clusters, and parameters such as a mean vector, a covariance matrix and weights of each Component (i.e. cluster) are determined.
The mean vector is the vector that is the average of the multidimensional random samples.
When the gaussian distribution is two-dimensional gaussian distribution, and the random samples are correlated in the two dimensions, the gaussian distribution is elliptical.
The covariance matrix of the cluster is formed by the covariance between every two pixels in the cluster, the covariance is a measure of the linear correlation degree of the joint distribution of two random variables (namely pixels), and the more linear correlation of the two random variables, the larger the covariance.
In some embodiments, the clustering of pixels may be achieved by using Expectation-Maximization (EM) method for Maximum Likelihood Estimation (MLE), as follows:
1. initializing K Gaussian distributions and weights thereof;
2. estimating a posterior probability of each pixel generated by each component;
3. updating the mean vector, the covariance matrix and the weight according to the mean vector, the covariance matrix and the posterior probability of Gaussian distribution;
4. and repeating the steps 2-3 until the added value of the likelihood function is smaller than a preset convergence threshold value or the repetition times is larger than a preset maximum iteration time.
After the parameter estimation process is completed, for each pixel, the posterior probability of the pixel belonging to each cluster can be calculated according to the Bayesian theorem, and the pixel is divided into the cluster with the maximum posterior probability.
Because the pixels in the scheme are related, the cluster obtained by the GMM is presented in a flat ellipse, and therefore, the cluster of the ellipse obtained by the GMM can be drawn in a thumbnail map.
In some embodiments, the major and minor axes of the ellipse may also be averaged, and a circle may be drawn on the game thumbnail with the average as a radius and the center of the ellipse as a center point.
Thus, in some embodiments, step 106 may include the steps of:
determining a center point, a major axis length, and a minor axis length for each cluster of target-type game weapons;
determining the radius of the clustering cluster based on the mean value of the long axis length and the short axis length of the clustering cluster;
and drawing the cluster of the target type game weapon in the game thumbnail map based on the center point and the radius of the cluster.
Wherein, the length of the long axis refers to the length of the long axis of the elliptical cluster obtained by adopting GMM, and the length of the short axis refers to the length of the short axis of the elliptical cluster obtained by adopting GMM.
By taking the center point of the cluster as the radius and taking the mean value of the length of the long axis and the length of the short axis as the circle, the distribution of the engagement hot areas of the game weapons of different weapon types in the game scene can be more accurately shown.
In some embodiments, in order to distinguish the distribution of the engagement hot zones of the game weapons of different weapon types in the game scene, different drawing colors may be selected for drawing according to the weapon types during drawing, and therefore, step 106 may include the following steps:
determining a target drawing color corresponding to the target type;
and drawing the cluster of the target type game weapon in the game thumbnail map by adopting the target drawing color based on the central point and the radius of the cluster.
For example, in order to distinguish the distribution of the engagement hot zones of the sniping gun type game weapons and the shotgun type game weapons in the game scene, a cluster of yellow sniping gun type game weapons and a cluster of red sniping gun type game weapons may be drawn in the game thumbnail map.
In addition, when the density value of the target type corresponding to the pixel in the game thumbnail map is less, the clustering result may be not ideal enough, and the situation that the cluster drawn in the game thumbnail map is too huge occurs, therefore, in some embodiments, the validity check needs to be performed on the cluster before drawing, the cluster with the too large radius is determined as an illegal cluster, and the illegal cluster is rejected to be drawn, so the step "drawing the cluster of the target type game weapon in the game thumbnail map based on the center point and the radius of the cluster" may include the following steps:
determining a preset maximum cluster radius corresponding to a game scene;
and when the radius of the cluster is not larger than the preset maximum cluster radius, drawing the cluster of the target type game weapon in the game thumbnail map.
For example, for a game thumbnail map with the size of 1024 × 1024, the preset maximum cluster radius may be 200, and when drawing is performed, all cluster clusters with the radius larger than 200 are rejected to be drawn.
When a plurality of engagement hotspots (cluster clusters) are close to each other, these engagement hotspots can be regarded as one large engagement hotspot, and therefore, in some embodiments, cluster clusters close to each other can be merged, so that the step of "drawing cluster clusters of target-type game weapons in the game thumbnail map based on the center points and radii of the cluster clusters" may include the steps of:
determining a preset merging distance corresponding to a game scene;
determining the distance between the central points of the cluster clusters according to the central point of each cluster of the target type game weapon;
and performing cluster merging processing on the cluster with the center point distance smaller than the preset merging distance to obtain a merged cluster, and drawing the merged cluster in a game thumbnail map.
In some embodiments, a merge control may be provided in the game thumbnail map, and a user may trigger the merge control to cause a pre-merged cluster or a post-merged cluster to be drawn in the game thumbnail map.
Therefore, the game thumbnail map can be obtained, and each pixel in the game thumbnail map corresponds to one spatial area in a game scene; acquiring a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon; determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters; when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon; according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one cluster of the target type game weapon; at least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
Therefore, the scheme can assist game developers to find the unbalanced design of the game level, so that the efficiency of the design of the game level is improved.
The method described in the above embodiments is further described in detail below.
The game thumbnail map drawing scheme provided by the embodiment of the invention can be applied to level optimization scenes of various games. For example, the method of the embodiment of the present invention will be described in detail by taking a shooting game as an example.
The scheme can simultaneously display the fighting hot areas of all weapons on one map, so that whether the structural design of the map is consistent with the behavior of a player or not can be conveniently and visually verified, and then whether the detailed position needs to be adjusted or not can be judged by combining a specific thermodynamic diagram. Therefore, the scheme can be used for verifying the balance of the game map and the consistency of the game map and the game design.
For example, a player in the battle a can generate a suppression advantage for the player in the battle B by using the sniping gun at the position a in the game scene, and at the position B which is a mirror image of the position a, the player in the battle B cannot generate the suppression advantage for the player in the battle a by using the sniping gun at the position B.
According to the scheme, the unbalanced game scene design can be displayed by only displaying the sniping gun battle hot area of the game scene position a on the map.
The present solution may show the engagement hotspots of different weapon types on the game map at the same time, for example, referring to fig. 2a, the engagement hotspots of a shot gun may be represented in a black circle, the engagement hotspots of a sniper gun may be represented in a white circle, etc.
Referring to fig. 2b, in the present scheme, a game developer can plan and communicate for different game scenes, implement design therein, and configure various parameters, such as screening parameters pa (first score) and pb (second score), the maximum cluster number M, and so on; then, the density value of each weapon type in each pixel in a game thumbnail map is screened, clustering scoring is carried out according to the screened pixels to be clustered to obtain the number K of clustering clusters corresponding to the highest score, the pixels to be clustered are clustered into K clustering clusters, then legality verification and combination are carried out on the K clustering clusters, the finally obtained clustering clusters are subjected to data storage, and when drawing is needed, the data are read from the local to generate a drawn map.
Some of the steps will be exemplified in detail below:
density value (one):
weapon type the density value corresponding to each pixel in the game map can be noted as (x-axis coordinate, y-axis coordinate, density value, weapon type). The density value can be the sum of the killing times appearing in the space area in the game scene corresponding to the pixel, or the space area can be extended by the radius R, and the sum of the killing times appearing in the extension range is taken as the density value.
Therefore, in some embodiments, the density value may be obtained by obtaining the occurrence positions of killing events in the game server, and performing statistics according to the occurrence positions of the killing events to obtain the density value.
The occurrence positions of the killing events can be uniformly the positions of the killers, and can also be uniformly the positions of the killers.
(II) density screening:
the scheme can show the fighting hot areas of different weapon types, and the fighting hot areas are formed by pixels with density values obviously higher than those of other pixels on the map.
Therefore, it is first necessary to determine a density threshold value, and determine pixels having a density value higher than the density threshold value as pixels constituting a battle hot area, i.e., pixels to be clustered.
The density threshold may be determined from the screening parameters pa and pb, where:
the screening parameters pa can be used for:
sorting all pixels according to the density values, dividing the number of the pixels into pa parts, determining the first pixel in the last part as a reference pixel, and determining the density value corresponding to the reference pixel as a first density threshold value, thereby realizing the screening of high-density pixels.
In addition, the screening parameters pb can be used for:
before sorting, performing deduplication processing on pixels with the same density value, sorting all pixels according to the density value, dividing the number of the pixels into pb parts, determining the first pixel in the last part as a reference pixel, and determining the density value corresponding to the reference pixel as a second density threshold value, so that screening of high-density pixels is achieved, and the phenomenon that other pixels are covered due to the fact that individual pixels take a dominant role in sorting is avoided.
Then, the maximum of the first density threshold value and the second density threshold value is taken as a threshold value, thereby filtering the high density points.
(III) clustering cluster scoring, cluster number calculation and clustering:
in this embodiment, a gaussian mixture model algorithm may be adopted to cluster the pixels to be clustered into 2M and 3 … M clusters (gaussian distribution), determine the CH index of each cluster obtained by clustering, and determine the cluster obtained by the clustering corresponding to the largest CH index as the cluster finally obtained.
After clustering is completed, a mean vector and a covariance matrix of a cluster can be obtained, the center of the cluster is determined by the mean vector, and the shape of the cluster can be determined by the covariance matrix. Therefore, in the present embodiment, each cluster can be plotted on the game thumbnail map in the form of an ellipse according to the covariance matrix of the cluster.
In some embodiments, the shape of the cluster may be determined from a covariance matrix of the cluster.
For example, the eigenvalues v and eigenvectors w of the covariance matrix Covariances can be calculated using the eigh function of the linear library (a linear algebraic function library) in the Numerical Python (an open-source Numerical computation extended library of Python):
v,w=np.linalg.eigh(Covariances)
where w includes the major and minor axis information of the gaussian distribution (i.e., cluster).
Then, the direction of the long axis u [0] is calculated from the long axis w [0] in the feature vector w, and the direction of the short axis u [1] is calculated from the short axis w [1 ]:
u[0]=w[0]/np.linalg.norm(w[0])
u[1]=w[1]/np.linalg.norm(w[1])
where the norm () function is used to compute the norm.
Determining the angle of the ellipse according to the directions u [0] and u [1] of the long axis and the short axis:
angle=np.arctan2(u[0],u[1])
therefore, ellipses (cluster clusters) with u 0 and u 1 as major and minor axes and angle as an ellipse angle can be drawn on the game thumbnail map.
In some embodiments, the ellipse angle may also be ignored, and a circle may be drawn in the game thumbnail map based on the average of the major and minor axes as a radius.
In some embodiments, the covariance matrix may be decomposed into eigenvalues v and eigenvectors w, and then the distance dmin between the cluster center point and the nearest pixel in the cluster and the distance dmax between the cluster center point and the farthest pixel in the cluster are determined according to v and w, and then the radius r is determined to be (dmin + dmax)/2. Thus, in some embodiments, the step of "determining the center point, major axis length, and minor axis length of each cluster of target-type game weapons" may include the steps of:
determining a covariance matrix of the clustering cluster according to the display position of each pixel to be clustered in the clustering cluster;
performing matrix characteristic decomposition on the covariance matrix to obtain an eigenvalue and an eigenvector of the covariance matrix;
and determining the length of the long axis and the length of the short axis of the clustering cluster according to the eigenvalue and the eigenvector of the covariance matrix.
(IV) legality checking:
for example, for a 1024 by 1024 map, cluster clusters with diameter >200 are determined to be illegal and discarded.
And (V) merging:
for example, referring to fig. 2c, three clusters indicated by arrows in fig. 2c belong to a design point of a battle hot area, and may be shown by being combined into one.
In some embodiments, the user may select whether to perform a merged display on the plurality of cluster clusters belonging to one engagement hot zone.
For example, a merge button may be provided, and when the user clicks the merge button, whether to merge and display the plurality of cluster clusters belonging to a war hot zone may be displayed.
And (VI) data storage:
and finally, storing the cluster clusters in a local memory so as to read from the local memory and draw when drawing.
Wherein, the data structure can refer to table 1:
name of field Type (B) Description of the invention
Map_id bigint Map name (Game scene)
Weapon_type text Weapon type
heat_xloc int Clustered center point x coordinate
heat_yloc int Y coordinate of cluster center point
radius int Radius of
TABLE 1
(seventh) drawing:
finally, the cluster is drawn on a map.
The scheme is suitable for any multi-player competitive game, including but not limited to shooting multi-player games, role playing multi-player games and the like. For example, the scheme can be used for a first-person shooting game, such as a csgo-like shooting game; for example, the scheme can be used for third-person named shooting games, such as large-fleeing and killing type shooting games, and the like.
The engagement hot area drawn on the game thumbnail map can be used for comparing with the engagement hot area pre-imagined by the developer, so as to judge whether the actual game playing method is the same as the playing method pre-designed by the developer.
Therefore, the scheme can assist game developers to find the unbalanced design of the game level, so that the efficiency of the design of the game level is improved.
In order to better implement the method, an embodiment of the present invention further provides a game map drawing device, where the game map drawing device may be specifically integrated in an electronic device, and the electronic device may be a terminal, a server, or other devices. The terminal can be a mobile phone, a tablet computer, an intelligent Bluetooth device, a notebook computer, a personal computer and other devices; the server may be a single server or a server cluster composed of a plurality of servers.
For example, in the present embodiment, a game map drawing device is specifically integrated in a terminal, and the method of the present embodiment will be described in detail.
For example, as shown in fig. 3, the game map drawing apparatus may include a map acquisition unit 301, a density acquisition unit 302, a threshold unit 303, a filtering unit 304, a clustering unit 305, and a drawing unit 306, as follows:
a map acquisition unit 301.
The map acquisition unit 301 is configured to acquire a game thumbnail map, where each pixel in the game thumbnail map corresponds to a spatial area in a game scene.
(II) a density acquisition unit 302.
The density obtaining unit 302 is configured to obtain a target type density value corresponding to each pixel in the game thumbnail map, where the target type density value represents how frequently a game character kills other game characters using a game weapon of a target type in a spatial area corresponding to the pixel.
(iii) threshold unit 303.
Threshold unit 303 is configured to determine a density screening threshold for the target type game weapon based on the target type density value and preset screening parameters.
In some embodiments, the threshold unit 303 includes:
(1) the sorting subunit is configured to sort, based on the numerical value of the target type density value, each pixel in the game thumbnail map to obtain a sorted pixel;
(2) the target subunit is used for determining a reference pixel in the sorted pixels based on a preset screening parameter;
(3) the threshold subunit is used for determining the value of the density value of the target type corresponding to the reference pixel as the density screening threshold of the target type game weapon.
In some embodiments, the ordered pixels include a first ordered pixel and a second ordered pixel, and the ordering subunit is to:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain a first sorted pixel;
and when N repeated pixels exist in the first sequenced pixels, removing N-1 repeated pixels in the first sequenced pixels to obtain second sequenced pixels, wherein the repeated pixels are pixels with the same target type density value.
In some embodiments, the screening parameter comprises a first quantile and a second quantile, the reference pixel comprises a first reference pixel and a second reference pixel, and the target subunit is to:
determining the pixels after the first sorting as first reference pixels according to the first quantile;
and determining the second reference pixel in the first sorted pixels according to the second quantile.
In some embodiments, the threshold subunit is to:
determining the numerical value of the density value of the target type corresponding to the first reference pixel as a first density screening threshold value of the target type game weapon;
determining the numerical value of the density value of the target type corresponding to the second reference pixel as a second density screening threshold value of the target type game weapon;
when the first density screening threshold is larger than the second density screening threshold, determining a density screening threshold as the density screening threshold of the target type game weapon;
and when the first density screening threshold value is larger than the second density screening threshold value, determining the second density screening threshold value as the density screening threshold value of the target type game weapon.
And (iv) a screening unit 304.
The screening unit 304 is configured to determine, when the density value of the target type is greater than the density screening threshold, a pixel corresponding to the density value of the target type as a pixel to be clustered of the target type game weapon.
(V) clustering section 305.
The clustering unit 305 is configured to perform clustering processing on the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map, so as to obtain at least one cluster of the target type game weapon.
In some embodiments, the clustering unit 305 includes:
the maximum number quantum unit is used for determining the preset maximum clustering cluster number M, and M is a positive integer;
the clustering subunit is used for clustering the pixels to be clustered into i clustering clusters according to the display positions of the pixels to be clustered in the game thumbnail map during the ith clustering process, wherein i is a positive integer not greater than M;
the scoring subunit is used for performing cluster scoring on the i cluster clusters to obtain an average cluster score of the ith clustering process;
and the determining subunit is used for determining the i cluster clusters as the i cluster clusters of the target type game weapon when the average cluster score of the ith clustering process is higher than the average cluster scores of the rest M-1 clustering processes.
In some embodiments, the scoring subunit is to:
determining a central total point of the i clustering clusters and a cluster central point of a jth clustering cluster in the i clustering clusters;
calculating the intra-cluster compactness of the jth cluster according to the cluster center point of the jth cluster and the display position of each pixel in the i clusters in the game thumbnail map;
calculating the cluster outer separation degree of the jth clustering cluster according to the cluster center point of the jth clustering cluster and the total center point of the i clustering clusters;
determining cluster score of the jth cluster according to the ratio of the cluster inside compactness and the cluster outside separation of the jth cluster;
and carrying out mean value calculation on the cluster score of each cluster in the i clusters to obtain the average cluster score of the ith clustering.
And (six) a rendering unit 306.
The drawing unit 306 is used for drawing at least one cluster of the target type game weapons in the game thumbnail map so as to show the distribution of the engagement hot areas of the game weapons of different weapon types in the game scene.
In some embodiments, the rendering unit 306 includes:
the parameter subunit is used for determining the center point, the length of the long axis and the length of the short axis of each cluster of the target type game weapon;
the radius subunit is used for determining the radius of the clustering cluster based on the mean value of the long axis length and the short axis length of the clustering cluster;
and the drawing subunit is used for drawing the cluster of the target type game weapon in the game thumbnail map based on the central point and the radius of the cluster.
In some embodiments, the rendering subunit is to:
determining a target drawing color corresponding to the target type;
and drawing the cluster of the target type game weapon in the game thumbnail map by adopting the target drawing color based on the central point and the radius of the cluster.
In some embodiments, the rendering subunit is to:
determining a preset maximum cluster radius corresponding to a game scene;
and when the radius of the cluster is not larger than the preset maximum cluster radius, drawing the cluster of the target type game weapon in the game thumbnail map.
In some embodiments, the rendering subunit is to:
determining a preset merging distance corresponding to a game scene;
determining the distance between the central points of the cluster clusters according to the central point of each cluster of the target type game weapon;
and performing cluster merging processing on the cluster with the center point distance smaller than the preset merging distance to obtain a merged cluster, and drawing the merged cluster in a game thumbnail map.
In some embodiments, the parameter subunit is to: :
determining a covariance matrix of the clustering cluster according to the display position of each pixel to be clustered in the clustering cluster;
performing matrix characteristic decomposition on the covariance matrix to obtain an eigenvalue and an eigenvector of the covariance matrix;
and determining the length of the long axis and the length of the short axis of the clustering cluster according to the eigenvalue and the eigenvector of the covariance matrix.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, the game map drawing apparatus of the present embodiment acquires, by the map acquisition unit, a game thumbnail map in which each pixel corresponds to one spatial area in a game scene; the density obtaining unit obtains a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in a space area corresponding to the pixel for killing other game roles by using a game weapon of a target type; determining a density screening threshold value of the target type game weapon according to the target type density value and preset screening parameters based on the threshold value unit; determining pixels corresponding to the density values of the target types as pixels to be clustered of the target type game weapons when the density values of the target types are larger than the density screening threshold value by the screening unit; clustering pixels to be clustered by the clustering unit according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one clustering cluster of the target type game weapon; and drawing at least one cluster of the target type game weapons in the game thumbnail map by a drawing unit so as to show the distribution of the engagement hot areas of the game weapons of different weapon types in the game scene.
Therefore, the embodiment of the invention can assist game developers to find the unbalanced design of the game level, thereby improving the efficiency of the design of the game level.
The embodiment of the invention also provides the electronic equipment which can be equipment such as a terminal, a server and the like. The terminal can be a mobile phone, a tablet computer, an intelligent Bluetooth device, a notebook computer, a personal computer and the like; the server may be a single server, a server cluster composed of a plurality of servers, or the like.
In some embodiments, the game mapping apparatus may be integrated into a plurality of electronic devices, for example, the game mapping apparatus may be integrated into a plurality of servers, and the game mapping method of the present invention may be implemented by the plurality of servers.
In this embodiment, the electronic device of this embodiment is described in detail as an example, for example, as shown in fig. 4, it shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 4 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. In some embodiments, processor 401 may include one or more processing cores; in some embodiments, processor 401 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device also includes a power supply 403 for supplying power to the various components, and in some embodiments, the power supply 403 may be logically coupled to the processor 401 via a power management system, such that the power management system may manage charging, discharging, and power consumption. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may also include an input module 404, the input module 404 operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
The electronic device may also include a communication module 405, and in some embodiments the communication module 405 may include a wireless module, through which the electronic device may wirelessly transmit over short distances, thereby providing wireless broadband internet access to the user. For example, the communication module 405 may be used to assist a user in sending and receiving e-mails, browsing web pages, accessing streaming media, and the like.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application program stored in the memory 402, thereby implementing various functions as follows:
acquiring a game thumbnail map, wherein each pixel in the game thumbnail map corresponds to a space area in a game scene;
acquiring a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon;
according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one cluster of the target type game weapon;
at least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Therefore, the scheme can assist game developers to find the unbalanced design of the game level, so that the efficiency of the design of the game level is improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present invention provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute steps of any one of the game map drawing methods provided by the embodiments of the present invention. For example, the instructions may perform the steps of:
acquiring a game thumbnail map, wherein each pixel in the game thumbnail map corresponds to a space area in a game scene;
acquiring a target type density value corresponding to each pixel in the game thumbnail map, wherein the target type density value represents the frequency of the game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
when the density value of the target type is larger than the density screening threshold value, determining pixels corresponding to the density value of the target type as pixels to be clustered of the target type game weapon;
according to the display position of the pixel to be clustered in the game thumbnail map, clustering the pixel to be clustered to obtain at least one cluster of the target type game weapon;
at least one cluster of target type game weapons is drawn in the game thumbnail map to show the distribution of engagement hotspots of game weapons of different weapon types in the game scene.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various alternative implementations of the game development aspect or the mapping aspect of the engagement hot zone provided in the above embodiments.
Since the instructions stored in the storage medium can execute the steps in any of the game map drawing methods provided in the embodiments of the present invention, the beneficial effects that can be achieved by any of the game map drawing methods provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The game map drawing method, the game map drawing device, the electronic device and the computer-readable storage medium according to the embodiments of the present invention are described in detail, and the principles and embodiments of the present invention are described herein by applying specific examples, and the description of the embodiments is only used to help understanding the method and the core ideas of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (15)

1. A game map drawing method, comprising:
acquiring a game thumbnail map, wherein each pixel in the game thumbnail map corresponds to a spatial area in a game scene;
acquiring a target type density value corresponding to each pixel in a game thumbnail map, wherein the target type density value represents the frequency of a game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
when the density value of the target type is larger than the density screening threshold value, determining the pixel corresponding to the density value of the target type as a pixel to be clustered of the target type game weapon;
clustering the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one cluster of the target type game weapon;
drawing at least one cluster of the target type game weapons in the game thumbnail map to show the engagement hotspot distribution of the game weapons of different weapon types in a game scene.
2. The game mapping method of claim 1, wherein determining the density screening threshold for the target-type game weapon based on the target-type density value and preset screening parameters comprises:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain sorted pixels;
determining reference pixels in the sorted pixels based on the preset screening parameters;
and determining the numerical value of the density value of the target type corresponding to the reference pixel as the density screening threshold value of the target type game weapon.
3. The game map rendering method of claim 2, wherein the sorted pixels comprise a first sorted pixel and a second sorted pixel, and wherein the sorting each pixel in the game thumbnail map based on the numerical magnitude of the target type density value resulting in a sorted pixel comprises:
sorting each pixel in the game thumbnail map based on the numerical value of the target type density value to obtain a first sorted pixel;
and when N repeated pixels exist in the first sequenced pixels, removing N-1 repeated pixels in the first sequenced pixels to obtain second sequenced pixels, wherein the repeated pixels are pixels with the same target type density value.
4. The game mapping method of claim 3, wherein the filter parameter includes a first score and a second score, the reference pixel includes a first reference pixel and a second reference pixel, and the determining the reference pixel among the sorted pixels based on the preset filter parameter includes:
determining the first sorted pixels as first reference pixels according to the first quantile;
and determining the pixels after the first sorting as second reference pixels according to the second quantile.
5. The game mapping method of claim 4, wherein determining the numerical size of the target-type density value corresponding to the reference pixel as the density screening threshold for the target-type game weapon comprises:
determining the numerical value of the density value of the target type corresponding to the first reference pixel as a first density screening threshold value of the target type game weapon;
determining the numerical value of the density value of the target type corresponding to the second reference pixel as a second density screening threshold value of the target type game weapon;
determining the first density screening threshold as the density screening threshold for the target type of game weapon when the first density screening threshold is greater than the second density screening threshold;
determining the second density screening threshold as the density screening threshold for the target type of gaming weapon when the first density screening threshold is greater than the second density screening threshold.
6. The game map drawing method of claim 1, wherein the clustering the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one cluster of the target type game weapon comprises:
determining a preset maximum clustering number M, wherein M is a positive integer;
clustering the pixels to be clustered into i clustering clusters according to the display positions of the pixels to be clustered in the game thumbnail map during the ith clustering process, wherein i is a positive integer not greater than M;
performing cluster scoring on the i cluster clusters to obtain an average cluster score of the ith clustering process;
and when the average cluster score of the ith clustering process is higher than the average cluster scores of the rest M-1 clustering processes, determining the i cluster clusters as i cluster clusters of the target type game weapon.
7. The game mapping method of claim 6, wherein the clustering score of the i clusters to obtain the average clustering cluster score of the ith clustering process comprises:
determining a central total point of the i clustering clusters and a cluster central point of a jth clustering cluster in the i clustering clusters;
calculating the intra-cluster compactness of the jth cluster according to the cluster center point of the jth cluster and the display position of each pixel in the i clusters in the game thumbnail map;
calculating the cluster external separation degree of the jth cluster according to the cluster center point of the jth cluster and the total center point of the i clusters;
determining the cluster score of the jth cluster according to the ratio of the cluster inside compactness and the cluster outside separation of the jth cluster;
and performing mean calculation on the cluster score of each cluster in the i clusters to obtain the average cluster score of the ith clustering.
8. The game mapping method of claim 1, wherein said mapping at least one cluster of the target-type game weapons in the game thumbnail map comprises:
determining a center point, a major axis length, and a minor axis length for each cluster of the target type game weapon;
determining the radius of the cluster based on the mean of the long axis length and the short axis length of the cluster;
and drawing the clustering cluster of the target type game weapon in the game thumbnail map based on the central point and the radius of the clustering cluster.
9. The game mapping method of claim 8, wherein the mapping cluster of the target type game weapon in the game thumbnail map based on the center point and radius of the cluster comprises:
determining a target drawing color corresponding to the target type;
and drawing the clustering cluster of the target type game weapon in the game thumbnail map by adopting the target drawing color based on the central point and the radius of the clustering cluster.
10. The game mapping method of claim 8, wherein the mapping cluster of the target type game weapon in the game thumbnail map based on the center point and radius of the cluster comprises:
determining a preset maximum cluster radius corresponding to the game scene;
and when the radius of the cluster is not larger than the preset maximum cluster radius, drawing the cluster of the target type game weapon in the game thumbnail map.
11. The game mapping method of claim 8, wherein the mapping cluster of the target type game weapon in the game thumbnail map based on the center point and radius of the cluster comprises:
determining a preset merging distance corresponding to the game scene;
determining the distance between the central points of the cluster clusters according to the central point of each cluster of the target type game weapon;
and carrying out cluster merging processing on the cluster with the distance between the central points smaller than a preset merging distance to obtain a merged cluster, and drawing the merged cluster in the game thumbnail map.
12. The game mapping method of claim 8, wherein the determining a center point, a major axis length, and a minor axis length for each cluster of target-type game weapons includes:
determining a covariance matrix of the clustering cluster according to the display position of each pixel to be clustered in the clustering cluster;
performing matrix characteristic decomposition on the covariance matrix to obtain an eigenvalue and an eigenvector of the covariance matrix;
and determining the length of the long axis and the length of the short axis of the clustering cluster according to the eigenvalue and the eigenvector of the covariance matrix.
13. A game map drawing apparatus, comprising:
the map acquisition unit is used for acquiring a game thumbnail map, and each pixel in the game thumbnail map corresponds to one spatial area in a game scene;
the density acquisition unit is used for acquiring a target type density value corresponding to each pixel in the game thumbnail map, and the target type density value represents the frequency of a game role in a space area corresponding to the pixel for killing other game roles by using a target type game weapon;
the threshold unit is used for determining a density screening threshold value of the target type game weapon based on the target type density value and preset screening parameters;
the screening unit is used for determining the pixel corresponding to the target type density value as the pixel to be clustered of the target type game weapon when the target type density value is larger than the density screening threshold value;
the clustering unit is used for clustering the pixels to be clustered according to the display positions of the pixels to be clustered in the game thumbnail map to obtain at least one clustering cluster of the target type game weapon;
and the drawing unit is used for drawing at least one cluster of the target type game weapons in the game thumbnail map so as to show the distribution of engagement hot areas of the game weapons of different weapon types in a game scene.
14. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions; the processor loads instructions from the memory to perform the steps of the game mapping method of any of claims 1-12.
15. A computer readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the game mapping method according to any of claims 1 to 12.
CN202011388461.2A 2020-12-01 2020-12-01 Game map drawing method and device, electronic equipment and storage medium Active CN112370790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011388461.2A CN112370790B (en) 2020-12-01 2020-12-01 Game map drawing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011388461.2A CN112370790B (en) 2020-12-01 2020-12-01 Game map drawing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112370790A true CN112370790A (en) 2021-02-19
CN112370790B CN112370790B (en) 2022-05-17

Family

ID=74589574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011388461.2A Active CN112370790B (en) 2020-12-01 2020-12-01 Game map drawing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112370790B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113209620A (en) * 2021-05-21 2021-08-06 珠海金山网络游戏科技有限公司 Heatmap generation method and device and scene management method and device
CN117788873A (en) * 2024-02-26 2024-03-29 山东和润恒建筑工程有限公司 Engineering building BIM data security management method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106621336A (en) * 2015-10-30 2017-05-10 网易(杭州)网络有限公司 FPS (first-person shooting) game scene map design visual verification method and system
US20180133599A1 (en) * 2016-11-17 2018-05-17 Activision Publishing, Inc. Systems and Methods for the Real-Time Generation of In-Game, Locally Accessible Heatmaps
CN110209808A (en) * 2018-08-08 2019-09-06 腾讯科技(深圳)有限公司 A kind of event generation method and relevant apparatus based on text information
CN110322694A (en) * 2019-07-16 2019-10-11 青岛海信网络科技股份有限公司 A kind of method and device of urban traffic control piece Division
CN110489340A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 A kind of map balance test method, device, equipment and storage medium
CN110766770A (en) * 2019-10-16 2020-02-07 腾讯科技(深圳)有限公司 Thermodynamic diagram generation method and device, readable storage medium and computer equipment
CN110913172A (en) * 2018-09-18 2020-03-24 华为技术有限公司 Management method and device of video analysis equipment
CN111356074A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Method and device for positioning bus station, server and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106621336A (en) * 2015-10-30 2017-05-10 网易(杭州)网络有限公司 FPS (first-person shooting) game scene map design visual verification method and system
US20180133599A1 (en) * 2016-11-17 2018-05-17 Activision Publishing, Inc. Systems and Methods for the Real-Time Generation of In-Game, Locally Accessible Heatmaps
CN110209808A (en) * 2018-08-08 2019-09-06 腾讯科技(深圳)有限公司 A kind of event generation method and relevant apparatus based on text information
CN110913172A (en) * 2018-09-18 2020-03-24 华为技术有限公司 Management method and device of video analysis equipment
CN111356074A (en) * 2018-12-21 2020-06-30 腾讯科技(深圳)有限公司 Method and device for positioning bus station, server and medium
CN110322694A (en) * 2019-07-16 2019-10-11 青岛海信网络科技股份有限公司 A kind of method and device of urban traffic control piece Division
CN110489340A (en) * 2019-07-29 2019-11-22 腾讯科技(深圳)有限公司 A kind of map balance test method, device, equipment and storage medium
CN110766770A (en) * 2019-10-16 2020-02-07 腾讯科技(深圳)有限公司 Thermodynamic diagram generation method and device, readable storage medium and computer equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113209620A (en) * 2021-05-21 2021-08-06 珠海金山网络游戏科技有限公司 Heatmap generation method and device and scene management method and device
CN117788873A (en) * 2024-02-26 2024-03-29 山东和润恒建筑工程有限公司 Engineering building BIM data security management method
CN117788873B (en) * 2024-02-26 2024-05-03 山东和润恒建筑工程有限公司 Engineering building BIM data security management method

Also Published As

Publication number Publication date
CN112370790B (en) 2022-05-17

Similar Documents

Publication Publication Date Title
CN111111204B (en) Interactive model training method and device, computer equipment and storage medium
US11938403B2 (en) Game character behavior control method and apparatus, storage medium, and electronic device
US20210365782A1 (en) Method and apparatus for generating neural network model, and computer-readable storage medium
CN111111220B (en) Self-chess-playing model training method and device for multiplayer battle game and computer equipment
CN112370790B (en) Game map drawing method and device, electronic equipment and storage medium
CN110489340B (en) Game map balance testing method, device, equipment and storage medium
CN106267822A (en) The method of testing of game performance and device
CN106228188A (en) Clustering method, device and electronic equipment
CN109794065B (en) Game role creating method and device, electronic equipment and storage medium
CN111274151B (en) Game testing method, related device and storage medium
CN111111203B (en) Robot training method and device and skill releasing method and device
CN108211363A (en) A kind of information processing method and device
CN112905013A (en) Intelligent agent control method and device, computer equipment and storage medium
CN113230650B (en) Data processing method and device and computer readable storage medium
CN111389004A (en) Control method of virtual role, storage medium and processor
CN108815850B (en) Method and client for controlling path finding of analog object
CN115022067B (en) Network security defense method and device under game-based asymmetric information
Chai et al. Amazons Evaluation Optimization Strategy Based on PSO Algorithm
US20240189718A1 (en) Game character behavior control method and apparatus, storage medium, and electronic device
CN115400431A (en) Method and device for distinguishing abnormal drawing of model, server and storage medium
CN111437605A (en) Method for determining virtual object behaviors and hosting virtual object behaviors
CN110598182A (en) Information prediction method and related equipment
CN116808590B (en) Data processing method and related device
CN115935280A (en) Training method of shooting result prediction model, storage medium and electronic equipment
CN113181635B (en) Virtual prop assembling method, device, terminal 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40037969

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant