CN117919714A - Random map generation method, system and storage medium in game - Google Patents

Random map generation method, system and storage medium in game Download PDF

Info

Publication number
CN117919714A
CN117919714A CN202410016111.5A CN202410016111A CN117919714A CN 117919714 A CN117919714 A CN 117919714A CN 202410016111 A CN202410016111 A CN 202410016111A CN 117919714 A CN117919714 A CN 117919714A
Authority
CN
China
Prior art keywords
map
game
model
random
target
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.)
Pending
Application number
CN202410016111.5A
Other languages
Chinese (zh)
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.)
Beijing Hongtu Xinda Technology Co ltd
Original Assignee
Beijing Hongtu Xinda Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Hongtu Xinda Technology Co ltd filed Critical Beijing Hongtu Xinda Technology Co ltd
Priority to CN202410016111.5A priority Critical patent/CN117919714A/en
Publication of CN117919714A publication Critical patent/CN117919714A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention provides a random map generation method, a random map generation system and a random map storage medium in a game, and relates to the technical field of computers. The method comprises the following steps: in response to detecting a game map updating request, acquiring target geographic position coordinates, extracting a local real scene map corresponding to the target geographic position coordinates, further constructing a map element distribution diagram corresponding to the local real scene map, matching a basic map model in a preset game model database according to the map element type in the map element distribution diagram, constructing a game map model based on the basic map model and the map element distribution diagram, and rendering through the game map model to obtain a three-dimensional random map. According to the invention, by constructing the three-dimensional random map similar to the local real map corresponding to the target geographic position coordinate, the situation that the player lacks of game interest after exploring the random map for many times can be avoided, the game playability is increased, and the game player viscosity is improved.

Description

Random map generation method, system and storage medium in game
Technical Field
The invention relates to the technical field of computers, in particular to a random map generation method, a random map generation system and a random map storage medium in a game.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Before the generation of the three-dimensional game map, the map is laid out by setting related map parameters, then the topographic features of the three-dimensional game map are generated according to the layout of the three-dimensional game map, the entity model is placed on the generated three-dimensional game map, and finally the final three-dimensional game map is constructed through a series of rendering and optimizing operations.
At present, random map generation in games is usually realized through a random number generation algorithm, and although the method improves the randomness of the game map, as players need to repeatedly seek paths and explore processes after each map generation, the interest of the players in the games is gradually reduced, and the viscosity of the players in the games is reduced.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a random map generation method, a random map generation system and a random map storage medium in a game, so that the problem that the viscosity of a game player is reduced due to the fact that the game interest of the player cannot be maintained for a long time in the related art is solved at least to a certain extent.
According to a first aspect of an embodiment of the present invention, there is provided a random map generation method in a game, the method including:
responding to the detected game map updating request, acquiring target geographic position coordinates, and extracting a local real scene map corresponding to the target geographic position coordinates;
Constructing a map element distribution diagram corresponding to the local real scene map;
matching a basic map model in a preset game model database according to the map element types in the map element distribution map;
and constructing a game map model based on the basic map model and the map element distribution diagram, and rendering the game map model to obtain a three-dimensional random map.
According to a second aspect of an embodiment of the present invention, there is provided a random map generation system in a game, including:
The real map acquisition module is used for responding to the detection of the game map updating request, acquiring the target geographic position coordinates and extracting a local real scene map corresponding to the target geographic position coordinates;
the distribution map construction module is used for constructing a map element distribution map corresponding to the local real scene map;
The map model matching module is used for matching a basic map model in a preset game model database according to the map element types in the map element distribution diagram;
The random map generation module is used for constructing and obtaining a game map model based on the basic map model and the map element distribution diagram, and rendering the game map model to obtain the three-dimensional random map.
According to a third aspect of embodiments of the present invention, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the random map generation method in a game in the first aspect of embodiments of the present invention.
The technical scheme provided by the embodiment of the invention can comprise the following beneficial effects:
According to the random map generation method in the game in the example embodiment of the invention, in response to detection of a game map update request, target geographic position coordinates are obtained, a local real scene map corresponding to the target geographic position coordinates is extracted, a map element distribution diagram corresponding to the local real scene map is further constructed, then a basic map model is matched in a preset game model database according to the map element type in the map element distribution diagram, a game map model is constructed based on the basic map model and the map element distribution diagram, and a three-dimensional random map is rendered through the game map model. On the one hand, by acquiring the target geographic position coordinates and extracting the corresponding local real scene map, a more real and specific game scene can be provided for the player, the immersion and substitution sense of the player for the game are increased, and the interest maintenance of the player for the game is stabilized; on the other hand, the map element types in the map element distribution diagram are matched with the basic map model in the preset game model database, so that the map generated randomly is rich and diversified, the game playability and the game challenge are improved, and the game player viscosity is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a scene architecture diagram illustrating a random map generation method in a game according to an exemplary embodiment of the present invention.
Fig. 2 is a flowchart illustrating a random map generation method in a game according to an exemplary embodiment of the present invention.
Fig. 3 is an exemplary diagram of a map element distribution diagram according to an exemplary embodiment of the present invention.
FIG. 4 is a flow chart illustrating matching of base map models in a preset game model database according to map element types in a map element distribution map according to an exemplary embodiment of the present invention.
FIG. 5 is a flow chart illustrating a construction of a game map model based on a base map model and map element distribution diagram according to an exemplary embodiment of the present invention.
FIG. 6 is a flow chart illustrating a build game map model according to another exemplary embodiment of the present invention.
FIG. 7 is a block diagram of an in-game random map generation system according to an exemplary embodiment of the present invention.
Fig. 8 is a schematic structural view of an electronic device according to an exemplary embodiment of the present invention for implementing an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. In other instances, well-known aspects have not been shown or described in detail to avoid obscuring aspects of the invention.
Furthermore, the drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software or in one or more hardware modules or integrated circuits or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 shows a system architecture diagram to which a random map generation method in a game of an embodiment of the present invention can be applied.
As shown in fig. 1, the system architecture may include a server 100 and a terminal device 200. The terminal device 200 may be various electronic devices with interaction functions, and the electronic devices may have a display screen thereon, where the display screen may be used to present a randomly generated three-dimensional map to a player, and may also present various UI interfaces for interaction to the player. In an actual implementation of the present invention, the terminal device 200 may be a mobile terminal, a desktop computer, a handheld device, a virtual reality device, etc., which is not particularly limited in this example embodiment.
It should be understood that the number of servers 100 and terminal devices 200 in fig. 1 is merely illustrative. There may be any number of servers 100 and terminal devices 200 as needed for implementation, for example, the server 100 may be a server cluster formed by a plurality of servers, etc.
The random map generation method in the game provided by the embodiment of the invention can be executed by the terminal device 200, and accordingly, the random map generation system in the game can be arranged in the terminal device 200. However, it will be readily understood by those skilled in the art that the method for generating a random map in a game provided in the embodiment of the present invention may be executed by the server 100, and accordingly, the apparatus for generating a random map in a game may be provided in the server 100, which is not particularly limited in this exemplary embodiment.
In the related art, there are the following problems:
in the process of making related game maps, many games have the function of randomly generating the maps, so that a player can have new experience in the games, but the player needs to search for a path and fumbling again when facing the new maps every time, so that the game experience of the player is tedious, and the interest of the player in the games is reduced.
1. Based on one or more of the above problems, the embodiments of the present invention first provide a random map generation method in a game, which can improve the viscosity of players in the game.
Embodiment 1A random map generating method in a game
Taking the method performed by the server as an example, referring to fig. 2, there is shown a random map generation method in a game, comprising the steps of:
In step S201, in response to detecting the game map update request, acquiring the target geographic position coordinates, and extracting a local real scene map corresponding to the target geographic position coordinates;
step S202, a map element distribution diagram corresponding to a local real scene map is constructed;
in step S203, matching a basic map model in a preset game model database according to the map element type in the map element distribution map;
In step S204, a game map model is constructed based on the basic map model and the map element distribution diagram, and a three-dimensional random map is rendered by the game map model.
According to the random map generation method in the game in the example embodiment of the invention, on one hand, by acquiring the target geographic position coordinates and extracting the corresponding local real scene map, a more real and specific game scene can be provided for the player, the immersion and substitution sense of the player for the game are increased, and the interest maintenance of the player for the game is stabilized; on the other hand, the map element types in the map element distribution diagram are matched with the basic map model in the preset game model database, so that the map generated randomly is rich and diversified, the game playability and the game challenge are improved, and the game player viscosity is improved.
Next, step S201 to step S204 will be described in detail.
In step 201, in response to detecting the game map update request, the target geographic position coordinates are acquired, and the local real scene map corresponding to the target geographic position coordinates is extracted.
In an exemplary embodiment of the present invention, the game map update request refers to an instruction received by the server to execute a random map generation method in the game. In this embodiment, the game map update request may be a real-time map update request triggered by a game player when the game player moves and searches, or may be a game map update request that the player completes a character in the game, unlocks a new area, or reaches a specific progress, etc. to make the system issue by itself, or may be a regular map update task set in the game, and the source of the game map update request is not limited in this example embodiment.
The target geographic location coordinates refer to a set of values that identify and describe a particular location in a geographic coordinate system for providing an accurate positioning reference for game map update requests. The target geographic position coordinates in this embodiment may be real-time positioning of the terminal device 200, or coordinates determined by a target geographic position name manually input by a player, or coordinates fixed by the player manually on a map, and the determination manner of the target geographic position coordinates in this example embodiment is not limited.
A local real scene map refers to a map describing a specific area in the real world. The local real scene map in this embodiment may be an image acquired by a satellite, an image acquired by an unmanned aerial vehicle, an image acquired by a server from map software on a network, or a static map image acquired from a network, and the acquisition mode of the local real scene map is not particularly limited in this example embodiment.
The local real scene map may be randomly extracted in a certain range in the vicinity of the target geographic position coordinates, or may be extracted in the vicinity of the target geographic position coordinates according to a preset pattern, where the shape of the preset pattern may be a regular pattern such as a rectangle, a circle, or other irregular patterns, and the shape of the preset pattern and the extraction manner of the local real scene map are not particularly limited in this exemplary embodiment.
The method has the advantages that the target geographic position coordinates are obtained, the corresponding local real scene map is extracted, a more familiar scene can be provided for a player, the immersion and substitution sense of the player for the game are increased, the interest of the player for the game is maintained stably, meanwhile, the situation that the player lacks exploring initiative when facing a new map can be avoided due to the familiarity of the player with the map, the attraction of the map for the player is improved, and the viscosity of the player for the game can be improved.
In step S202, a map element distribution map corresponding to the local real scene map is constructed.
In an exemplary embodiment of the present invention, map element distribution map refers to an image or visualization tool that shows various map element distribution conditions on a map. In this embodiment, the map elements may be water areas, mountains, roads, railways, buildings, infrastructure, canyons, and the like, and the number of map elements included in the map element distribution map is not limited in this example.
Alternatively, the map element distribution diagram may show business states, population densities, and the like, in addition to the distribution of various map elements, which is not limited by the present exemplary embodiment.
The shape outline of each region in the real scene map can be identified through an image semantic segmentation technology, the size and shape of map elements can be adjusted according to a scale and a map size, further map element distribution diagrams can be generated by using different colors or symbols to represent different regions, topographic data and contour line data in the real scene map can be obtained, and each map element on the map can be drawn by analyzing the topographic data and the contour line data, and the embodiment is not limited in this way.
Map element distribution diagrams constructed through local real scene map can reflect a real world complex road network, building distribution, landform features and the like, and the existence of the map elements adds more challenges and playability to the game, so that players can be more motivated to be put into the game for a long time.
In step S203, the basic map model is matched in a preset game model database according to the map element type in the map element distribution diagram.
In an exemplary embodiment of the present invention, the game model database refers to a database for storing and managing various map element type correspondence models, attributes, and rule information in a game. The game model database in this embodiment may include only models corresponding to various map element types, may include models and attributes corresponding to various map element types, may store model, attribute and rule information only for a part of map element types, and store model and attribute for a part of other map element types, and store model and rule information for another part, and may store rules for another part, so long as the necessary requirement for storing corresponding models is met for each element type.
For example, for a certain closed area, only a model corresponding to the element type of the area needs to be stored in the game model database corresponding to the area, and for a certain task scene triggering area, the area needs to meet the requirements of interaction and task triggering of players, and the model, attribute, task triggering condition rules, logic and the like corresponding to the element type of the area need to be stored in the game model database corresponding to the area.
The basic map model refers to an unmodified and processed original map model stored for various map elements. The number of basic map models corresponding to each type of map element in this embodiment may be 1, 10, 100, etc., which is not limited in this example embodiment.
The basic map model may be randomly matched in the game model database according to the map element type in the map element distribution diagram, the matching of the corresponding basic map model may be performed in the game model database according to the area ratio of each region in the map element distribution diagram, and the basic map model corresponding to the region scene type may be selected according to the specific region scene type.
By matching the basic map model in the preset game model database according to the map element types in the map element distribution diagram, the finally generated three-dimensional map is more similar to the real scene at the target geographic position coordinates, the substitution sense of the player to the generated map is improved, and the player viscosity of the game is improved.
In step S204, a game map model is constructed based on the basic map model and the map element distribution diagram, and a three-dimensional random map is rendered by the game map model.
In an exemplary embodiment of the present invention, selection, splicing and rendering of basic map models may be performed on each region one by one according to a map element distribution map, or selection of basic map models of each region may be performed simultaneously, further, the selected basic map models may be spliced simultaneously, and then, the spliced map may be rendered to obtain a final three-dimensional random map, or, of course, the map element distribution map may be divided into two regions, and adjacent small regions may be divided into one large region, and selection, splicing of basic map models may be performed on the large region first, and then splicing and rendering may be performed on each large region.
The game map is constructed through the basic map model and the map element distribution map, so that the scene layout of the generated map has higher similarity with the real scene, the difficulty of finding ways and distinguishing directions of players is reduced, the interest of the players in continuous games is maintained, meanwhile, the generated game map model is rendered and optimized, the harmony and the attractiveness of the finally generated three-dimensional random map are improved, and the attraction of the games to the players is improved.
The technical solutions involved in step S201 to step S204 are explained in detail below.
In an exemplary embodiment of the present invention, the construction of the map element distribution map corresponding to the local real scene map may be implemented by:
And carrying out semantic segmentation on the local real scene map to obtain map element areas with different map element types, wherein the map element types comprise at least one of buildings, roads, water areas and vegetation, and further generating a map element distribution diagram corresponding to the local real scene map according to the map element areas.
The semantic segmentation of the local real scene map is a technology for dividing the image into different semantic categories according to pixel levels, which can help the server understand the positions and shapes of different areas in the local real scene map and classify the images into predefined semantic categories, namely predefined map element types, specifically, the semantic segmentation of the local real scene map can be performed by adopting deep learning models such as FCN, U-Net, segNe and the like, and the example embodiment is not limited in particular.
Specifically, besides semantic segmentation of the local real scene map, instance segmentation can be further performed on the local real scene map, namely, the region of the same map element type is segmented into independent regions according to individuals, so that map element distribution map generation can be completed more clearly and accurately.
Illustratively, the map element distribution map may be generated by performing semantic segmentation and instance segmentation on the local real scene map by:
image preprocessing: preprocessing the local real scene map, such as normalization, scaling, clipping and the like;
Feature extraction: inputting the preprocessed local real scene map into a pre-trained neural network, and obtaining a corresponding feature map through forward propagation of the network;
Candidate region generation: setting a certain number of candidate frames for each point in the feature map, and acquiring the positions and the sizes of the candidate frames;
screening candidate frames: inputting the candidate frames into a regional suggestion network, carrying out binary classification and bounding box regression, and screening out a part of candidate frames with higher possibility according to the overlapping degree between the candidate frames and the real targets through the regional suggestion network;
Candidate frame alignment: for the screened candidate frames, performing candidate frame alignment operation, namely mapping pixels in an original image onto a feature map, and then aligning the feature map with features with fixed sizes;
Object classification: for the candidate boxes subjected to the candidate box alignment operation, object classification, bounding box regression and mask generation operations are performed. Wherein the classification layer predicts the class of the target and calculates class probability using a softmax function; the bounding box regression operation may accurately determine the location and size of the object in each candidate box; while a full convolution network is applied to each candidate region to generate a pixel-level mask.
Post-processing and visualization: and performing post-processing on the mask, such as removing overlapped bounding boxes, selecting an optimal bounding box by using a non-maximum suppression algorithm, merging adjacent segmentation results, and the like, and finally, visually displaying the results on a map to realize accurate division of different individuals with the same map element type in the local real scene map.
Optionally, for the visual display of the map element distribution chart, different map element areas may be filled with different colors, different map element areas may be filled with different textures, and of course, different gray scales may be used to represent different map element areas. For example, when the preset graphic shape of the local real scene is rectangular, as shown in fig. 3, different gray scales are used to represent different map element areas, as shown in the figure, an area 301 represents a road map element area, an area 302 represents a water area map element area, an area 303 represents a vegetation map element area, an area 304 represents a building map element area, and the server only needs to identify the map element distribution gray scale map to determine the map element type of each area.
The distribution condition of each map element type in the real scene is obtained by carrying out semantic segmentation on the real scene map, so that the generated game map has higher similarity with the real scene, the player has deeper substitution feeling, and the player has greater attraction to stay in the game and search continuously.
In an exemplary embodiment of the present invention, referring to fig. 4, matching a base map model in a preset game model database according to the map element types in the map element distribution map may be implemented:
In step S401, a target map element type corresponding to a target map element area in a map element distribution map is acquired;
in step S402, determining an area scale ranking of the target map element area in a map element area set of the same map element type;
In step S403, the base map model is matched in a preset game model database according to the target map element type and the area scale ranking.
Illustratively, the selection may be sequentially performed in the game model database according to the area proportion ranking according to the size of the game model, or the models of similar proportion may be selected in the game model database according to the ranking according to the proportion of the area proportion ranking in the total area number, which is not particularly limited in this exemplary embodiment. For example, there are 10 sub-areas in the map element distribution map, wherein there are 6 building areas, respectively A, B, C, D, E, F, the area ratio of the 6 building areas is ranked from large to small as B > a > F > C > E > D, and the total number of building models in the game model database is 20, when the corresponding building models are selected for the 6 building areas, 6 continuous building models can be selected in the size ranking order of the 20 building models, the corresponding building models can be sequentially allocated according to the size of the 6 building areas, B, A, F, C, E, D can be selected in proportion, namely, 1/6, 1/3, 1/2, 2/3, 5/6, 1, and the building models with the most similar ranking ratio are respectively 3 rd, 7 th, 10 th, 13 th, 17 th and 20 th.
By matching the basic map model in the preset game model database according to the object map element types and the area proportion ranking, the relative proportion of each area on the generated map can be more attached to the real scene map, the similarity between the generated map and the real scene is improved, so that a more exquisite, more real and familiar game map for a player can be created, and the game experience and participation of the player are improved.
In an exemplary embodiment of the present invention, referring to fig. 5, the game map model may be constructed based on the basic map model and the map element distribution map by:
Step S501, obtaining preset game map proportion parameters;
In step S502, scaling the basic map model according to the shape contour of the target map element area in the map element distribution diagram and the game map scale parameter, to obtain a scaled basic map model;
in step S503, based on the position coordinates of each target map element area, the corresponding scaled basic map models are spliced and combined, and a game map model is constructed.
The game map scale parameter refers to the size scale relation between the constructed three-dimensional game map and the local real scene map. In this embodiment, the game map scale parameter may be obtained from a preset database, may be generated by a server random number, or may be manually input from the UI interaction page by the player, which is not particularly limited in this example embodiment.
Illustratively, in the splicing process of building models with different materials, matching and fusion can be performed according to the materials of different entity building models, so that the appearance of the whole model is more consistent.
Alternatively, texture blending techniques may be used at the junction of the base map models, i.e., blending texture images of two adjacent base map models, by adjusting the transparency or weight of each texture to simulate the material characteristics of the junction of the models, thereby making the transition of the junction of the models smoother.
The proportion relation of each region in the constructed game map is the same as the proportion relation of each map element in the local real scene map according to the preset proportion parameters, so that the generated three-dimensional game map is more similar to the local real scene map, the sense of reality of the three-dimensional game map is improved, and the game experience of a player is improved.
In an embodiment of the present invention, the following steps may also be implemented as shown with reference to fig. 6:
In step S601, a model name corresponding to the scaled basic map model is obtained, and a real map area name of the target map element area in the local real scene map is obtained;
in step S602, fusing the model name and the map area name to obtain a random map area name;
In step S603, the random map area name is displayed at the corresponding scaled basic map model, and a game map model is constructed.
The model names corresponding to the scaled basic map model refer to scene names preset for the scaled basic map model. In the present embodiment, the same basic map model may have the same model name or may have different model names, which is not particularly limited in the present exemplary embodiment. For example, the game model database has two identical scaled base map models for canteens, which may have identical model names, such as "happy canteen", or different model names, such as "happy canteen" and "happy canteen".
For example, the key information in the model name and the map area name can be extracted through a semantic recognition technology, and the key information and the map area name are randomly crossed and combined to generate the area name of the random map. For example, a model name corresponding to a basic map model is named as "happy canteen", a map area name corresponding to the data model database is named as "first middle school", the model name of "happy canteen" can be divided into "happy canteen" and "canteen" through a semantic division technology, the map area name of "first middle school" can be divided into "first" and "middle school", random map names of "happy middle school" and "first canteen" can be obtained through random cross combination, and then one name can be randomly selected from the two random map names, and the two names are displayed at the corresponding zoomed basic map model to construct and obtain a game map model.
Alternatively, the random map area name may be displayed at an arbitrary position on the scaled base map model, or may be displayed only at a central position of the scaled base map model, which is not particularly limited in this exemplary embodiment.
The random map area names are displayed on the zoomed basic map model, so that a player can conveniently and quickly seek paths according to the random map area names, meanwhile, the random map area names also increase interestingness for game contents, the condition that the player feels boring to the game contents due to difficulty and repeatability of the exploration process is avoided, and the viscosity of the player of the game is increased.
In an exemplary embodiment of the present invention, the random map generation method in a game may also be implemented by:
the method comprises the steps of obtaining preset non-player character model generation parameters, wherein the non-player character model generation parameters comprise mapping relations between map element types and non-player character models, and further determining a target non-player character model from a preset game model database according to the map element types and the non-player character model generation parameters, so that the target non-player character model can be placed at corresponding basic map models after scaling, and a game map model is built.
The mapping relationship between the map element types and the non-player character model may be a one-to-one mapping relationship or a many-to-one mapping relationship, which is not limited in this example embodiment.
Illustratively, placing the non-player character model at the corresponding scaled base map model can be accomplished by:
A coordinate system may be set for each location on the non-player character model and the three-dimensional game map to correlate the location of the non-player character model with coordinates on the map, and physical properties, such as gravity, friction, etc., may be set for the non-player character and the three-dimensional game map after the non-player character model is placed at a specific location on the map model, and corresponding collision volumes and triggering conditions, etc., set for the three-dimensional game map, so that the setting of the non-player character model at the base map model may be accomplished by simulating the movement and collision of the non-player character model on the map using the physical engine.
The target non-player character is determined from the preset game model database according to the map element type and the non-player character model generation parameters, so that the determined target non-player character is matched with the map element type, the picture style consistency of the three-dimensional game map is ensured, the richness and the attractiveness of the three-dimensional game map are increased, and the attraction to players is increased.
In an example embodiment of the invention, the following steps may be implemented:
and acquiring a preset map acquisition proportion, and further determining a local real scene map according to the target geographic position coordinates and the map acquisition proportion.
The map acquisition proportion refers to a ratio relation between the three-dimensional game map and the corresponding distance of the real scene. In this embodiment, the preset map acquisition proportion may be randomly generated by the server, or may be obtained from a preset database, or may be manually input by the player through the game UI interaction interface, which is not particularly limited in this example embodiment.
Through the adoption of the real geographic data and the map collection proportion, a player can explore a geographic scene with high sense of reality in a game, the sense of reality can increase the sense of immersion of the player, the player is enabled to be more invested in the game world, and the game experience of the player is improved.
In an example embodiment of the invention, the following steps may be implemented:
And acquiring business period data corresponding to different map element areas according to the local real scene map, acquiring real-time corresponding to the target geographic position coordinates, and determining business states of the map element areas according to the real-time and the business period data, so that the traffic states of basic map models in the three-dimensional random map can be set through the business states.
The traffic state refers to a state of whether the player can enter or exit a certain basic map model, and the traffic state may be a free traffic state or an forbidden traffic state, which is not particularly limited in this example embodiment.
The real-time corresponding to the target geographic position coordinate may be obtained and then used as the real-time in the game, so as to determine the business state of the map element area in the game, or the real-time corresponding to the target geographic position coordinate may be obtained and then converted into the real-time in the three-dimensional game map, so as to determine the business state of the map element area in the three-dimensional game map, which is not limited in this example embodiment. For example, when the real-time corresponding to the obtained target geographic position coordinate is 20:00, the real-time corresponding to the target geographic position coordinate can be used as the real-time in the three-dimensional game map, and then the real-time in the three-dimensional game map is also 20:00, the building is in a no-traffic state, and of course, the three-dimensional game map can be subjected to four day-night alternation in real-world day, namely, the day [0:00,24:00] is divided into four time segments, the 20:00 is in the [18:00,24.00] time segment, the time for converting the 20:00 into the three-dimensional game map is 8:00, and the building is in a free traffic state when the building is in the business period data.
The traffic state of each map element area in the three-dimensional game map is determined by acquiring business hours of each map element at the coordinates of the target geographic position, so that the target geographic position and the three-dimensional game map can be linked, the richness and the fit to real life of the three-dimensional game map are enhanced, and a player has a sense of substitution.
In an example embodiment of the invention, the following steps may be implemented:
Acquiring a vegetation type corresponding to the target geographic position coordinate, constructing a corresponding vegetation parameter space based on the vegetation type, and randomly taking values in the vegetation parameter space to construct a vegetation model.
The vegetation type refers to the plant species grown in different areas on the earth's surface. Such as trees, pine, fir, dwarf, shrubs, and the like.
Alternatively, the vegetation types may be classified by satellite or aviation influence, that is, the vegetation types of the region may be classified by using a remote sensing image classification algorithm based on the information of various wave bands in the image, or the vegetation types of the target geographic location may be inferred by analyzing and integrating the geographic information system data, which is not particularly limited in this example embodiment.
Vegetation parameter space refers to a collection of parameters that describe the appearance, structure, and physiological characteristics of vegetation. The vegetation parameter space in this embodiment may include at least one of tree height, crown width, tree diameter, tree leaf shape, leaf texture, leaf color, branch distribution, degree of branch bending, branch thickness, vegetation density, vegetation distribution pattern, etc., which is not particularly limited in this example embodiment.
By determining the vegetation type corresponding to the target geographic position coordinates, constructing plants with the same vegetation type as the target area, the constructed three-dimensional game map is more attached to the local real scene map, and meanwhile, values are randomly taken in the vegetation parameter space corresponding to the vegetation type, so that the single and high repetition condition of the constructed vegetation model is avoided, and the richness and the authenticity of players to the game map are ensured.
In an example embodiment of the invention, the following steps may be implemented:
Building style data corresponding to the target geographic position coordinates are obtained, and then the building style data can be compared with label data of a preset game model database, and a target building model is obtained through matching.
The building style data refer to characteristic data of different regional building shapes caused by the influence of cultural factors of different regions. For example, gothic, northern Europe modern, asian traditional architectural style, ancient architectural style, and the like.
For example, if the target geographic position is ancient palace by the player through the terminal input, the tag data with highest similarity with the ancient palace style can be matched in the preset game model database, so that the target building model closest to the input of the player is obtained, the generated map is more in line with the expectations of the player, and the interest degree of the player in the game is improved.
Embodiment 2A random map generating System in a game
In an exemplary embodiment of the present invention, as shown in fig. 7, a random map generating system in a game is provided, which includes a real map acquisition module 701, a distribution map construction module 702, a map model matching module 703, and a random map generating module 704, specifically as follows:
the real map acquisition module 701 is configured to acquire a target geographic position coordinate in response to detecting a game map update request, and extract a local real scene map corresponding to the target geographic position coordinate;
The distribution map construction module 702 is configured to construct a map element distribution map corresponding to the local real scene map;
The map model matching module 703 is configured to match a basic map model in a preset game model database according to a map element type in the map element distribution map;
the random map generating module 704 is configured to construct a game map model based on the basic map model and the map element distribution diagram, and render a three-dimensional random map through the game map model.
In an example embodiment of the invention, profile construction module 702 is determined as:
The semantic segmentation module is used for carrying out semantic segmentation on the local real scene map to obtain map element areas with different map element types, wherein the map element types comprise at least one of buildings, roads, water areas and vegetation;
and the map element distribution diagram generation module is used for generating a map element distribution diagram corresponding to the local real scene map according to the map element area.
In an example embodiment of the invention, the map model matching module 703 is determined as:
The target map element type acquisition module is used for acquiring a target map element type corresponding to a target map element area in the map element distribution diagram;
the ranking determining module is used for determining the area proportion ranking of the target map element area in the map element area set with the same map element type;
And the matching module is used for matching the basic map model in a preset game model database according to the type of the target map element and the area proportion ranking.
In an example embodiment of the invention, the random map generation module 704 is determined to:
The proportion parameter acquisition module is used for acquiring preset game map proportion parameters;
The size scaling module is used for performing size scaling on the basic map model according to the shape outline of the target map element area in the map element distribution diagram and the game map scale parameter to obtain a scaled basic map model;
And the model splicing module is used for splicing and combining the corresponding zoomed basic map models based on the position coordinates of each target map element area, and constructing to obtain the game map model.
In an example embodiment of the invention, the random map generation module 704 is determined to:
the name acquisition module is used for acquiring a model name corresponding to the scaled basic map model and acquiring a real map area name of the target map element area in the local real scene map;
the name fusion module is used for fusing the model name and the map area name to obtain a random map area name;
and the name display module is used for displaying the random map area name to the corresponding zoomed basic map model, and constructing to obtain the game map model.
In an example embodiment of the invention, the random map generation module 704 is determined to:
the character parameter acquisition module is used for acquiring preset non-player character model generation parameters, wherein the non-player character model generation parameters comprise mapping relations between each map element type and the non-player character model;
A character model determining module for determining a target non-player character model from a preset game model database according to the map element type and the non-player character model generating parameters;
and the character model placement module is used for placing the target non-player character model at the corresponding scaled basic map models and constructing and obtaining a game map model.
In an example embodiment of the invention, the real map acquisition module 701 is determined as:
The proportion acquisition module is used for acquiring a preset map acquisition proportion;
and the map acquisition module is used for determining a local real scene map according to the target geographic position coordinates and the map acquisition proportion.
In an example embodiment of the invention, the random map generation module 704 is determined to:
the business period data acquisition module is used for acquiring business period data corresponding to different map element areas according to the local real scene map;
The business state determining module is used for obtaining real-time corresponding to the target geographic position coordinates and determining the business state of the map element area according to the real-time and business period data;
and the passing state setting module is used for setting the passing state of each basic map model in the three-dimensional random map through the business state.
In an example embodiment of the invention, the map model matching module 703 is determined as:
The vegetation type acquisition module is used for acquiring vegetation types corresponding to the target geographic position coordinates;
The vegetation model construction module is used for constructing a corresponding vegetation parameter space based on vegetation types, and randomly taking values in the vegetation parameter space to construct and obtain a vegetation model.
In an example embodiment of the invention, the map model matching module 703 is determined as:
The building style acquisition module is used for acquiring building style data corresponding to the target geographic position coordinates;
And the building model matching module is used for comparing the building style data with the label data of the preset game model database and matching to obtain a target building model.
The specific details of each module in the random map generation system in the game are described in detail in the corresponding random map generation method in the game, so that the details are not repeated here.
Embodiment 3a storage medium
Exemplary embodiments of the present invention also provide a computer-readable storage medium having stored thereon a program product capable of implementing the method described in the present specification. In some possible embodiments, the various aspects of the invention may also be implemented in the form of a program product comprising program code for causing an electronic device to carry out the steps according to the various exemplary embodiments of the invention as described in the "exemplary methods" section of this specification, when the program product is run on an electronic device. The program product may employ a portable compact disc read-only memory (CD-ROM) and comprise program code and may be run on an electronic device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C#, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the player's computing device, partly on the player's device, as a stand-alone software package, partly on the player's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the player computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
Example 3 an electronic device
The exemplary embodiment of the invention also provides electronic equipment capable of realizing the method. An electronic device 800 according to such an exemplary embodiment of the present invention is described below with reference to fig. 8. The electronic device 800 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 800 may be embodied in the form of a general purpose computing device. Components of electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one memory unit 820, a bus 830 connecting the different system components (including memory unit 820 and processing unit 810), and a display unit 840.
The storage unit 820 stores program code that can be executed by the processing unit 810, so that the processing unit 810 performs steps according to various exemplary embodiments of the present invention described in the above section of the "exemplary method" of the present specification. For example, the processing unit 810 may perform the method steps in fig. 2.
Storage unit 820 may include readable media in the form of volatile storage units such as Random Access Memory (RAM) 821 and/or cache memory unit 822, and may further include Read Only Memory (ROM) 823.
The storage unit 820 may also include a program/utility 824 having a set (at least one) of program modules 825, such program modules 825 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 830 may be one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 870 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable players to interact with the electronic device 800, and/or any devices (e.g., routers, modems, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 850. Also, electronic device 800 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 over bus 830. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 800, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, the technical solution according to the embodiments of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the exemplary embodiments of the present invention.
Furthermore, the above-described drawings are only schematic illustrations of processes included in the method according to the exemplary embodiment of the present invention, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit in accordance with embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It is to be understood that the invention is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (12)

1. A random map generation method in a game, comprising:
responding to the detected game map updating request, acquiring target geographic position coordinates, and extracting a local real scene map corresponding to the target geographic position coordinates;
Constructing a map element distribution diagram corresponding to the local real scene map;
Matching a basic map model in a preset game model database according to the map element types in the map element distribution map;
and constructing a game map model based on the basic map model and the map element distribution diagram, and rendering the game map model to obtain a three-dimensional random map.
2. The method for generating a random map in a game according to claim 1, wherein said constructing a map element distribution map corresponding to said local real scene map comprises:
carrying out semantic segmentation on the local real scene map to obtain map element areas with different map element types, wherein the map element types comprise at least one of buildings, roads, water areas and vegetation;
and generating a map element distribution diagram corresponding to the local real scene map according to the map element area.
3. The method for generating a random map in a game according to claim 1 or2, wherein said matching a basic map model in a preset game model database according to the map element type in the map element distribution map comprises:
Acquiring a target map element type corresponding to a target map element area in the map element distribution diagram;
determining an area proportion ranking of the target map element area in a map element area set of the same map element type;
And matching a basic map model in a preset game model database according to the target map element type and the area proportion rank.
4. A random map generating method in a game according to claim 3, wherein said constructing a game map model based on said base map model and said map element distribution map comprises:
acquiring a preset game map proportion parameter;
Performing size scaling on the basic map model according to the shape outline of the target map element area in the map element distribution diagram and the game map scale parameter to obtain a scaled basic map model;
And based on the position coordinates of each target map element area, splicing and combining the corresponding scaled basic map models, and constructing to obtain a game map model.
5. The method of random map generation in a game of claim 4, further comprising:
obtaining a model name corresponding to the scaled basic map model, and obtaining a real map area name of the target map element area in a local real scene map;
Fusing the model name and the map area name to obtain a random map area name;
Displaying the random map area name to the corresponding scaled basic map model, and constructing to obtain a game map model.
6. The method of random map generation in a game of claim 4, further comprising:
Acquiring preset non-player character model generation parameters, wherein the non-player character model generation parameters comprise mapping relations between each map element type and a non-player character model;
determining a target non-player character model from a preset game model database according to the map element type and the non-player character model generation parameters;
and placing the target non-player character model at each corresponding scaled basic map model to construct a game map model.
7. The method of generating a random map in a game according to claim 1, wherein the target geographical location coordinates include current geographical location coordinates and specified geographical location coordinates; the extracting the local real scene map corresponding to the target geographic position coordinate comprises the following steps:
acquiring a preset map acquisition proportion;
and determining a local real scene map according to the target geographic position coordinates and the map acquisition proportion.
8. The method of random map generation in a game of claim 1, further comprising:
acquiring business period data corresponding to different map element areas according to the local real scene map;
Acquiring real-time corresponding to the target geographic position coordinates, and determining the business state of the map element area according to the real-time and the business period data;
And setting the traffic state of each basic map model in the three-dimensional random map through the business state.
9. The three-dimensional game map generation method according to claim 1, characterized in that the three-dimensional map generation method further comprises:
Acquiring vegetation types corresponding to the target geographic position coordinates;
Constructing a corresponding vegetation parameter space based on the vegetation type, and randomly taking values in the vegetation parameter space to construct a vegetation model.
10. The three-dimensional game map generation method according to claim 5, characterized by further comprising:
Acquiring building style data corresponding to the target geographic position coordinates;
And comparing the building style data with tag data of a preset game model database, and matching to obtain a target building model.
11. A random map generation system in a game, comprising:
the real map acquisition module is used for responding to the detection of the game map updating request, acquiring the target geographic position coordinates and extracting a local real scene map corresponding to the current geographic position coordinates;
The distribution map construction module is used for constructing a map element distribution map corresponding to the local real scene map;
The map model matching module is used for matching a basic map model in a preset game model database according to each map element in the map element distribution diagram;
and the random map generation module is used for constructing and obtaining a game map model based on the basic map model and the map element distribution diagram, and rendering the game map model to obtain a three-dimensional random map.
12. A storage medium having stored thereon a computer program, which when executed by a processor implements the random map generation method in a game according to any of claims 1 to 10.
CN202410016111.5A 2024-01-05 2024-01-05 Random map generation method, system and storage medium in game Pending CN117919714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410016111.5A CN117919714A (en) 2024-01-05 2024-01-05 Random map generation method, system and storage medium in game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410016111.5A CN117919714A (en) 2024-01-05 2024-01-05 Random map generation method, system and storage medium in game

Publications (1)

Publication Number Publication Date
CN117919714A true CN117919714A (en) 2024-04-26

Family

ID=90762385

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410016111.5A Pending CN117919714A (en) 2024-01-05 2024-01-05 Random map generation method, system and storage medium in game

Country Status (1)

Country Link
CN (1) CN117919714A (en)

Similar Documents

Publication Publication Date Title
Hogräfer et al. The state of the art in map‐like visualization
Haklay Interacting with geospatial technologies
US20180052593A1 (en) Providing visual selection of map data for a digital map
Kim et al. CityCraft: 3D virtual city creation from a single image
CN103390088A (en) Full-automatic three-dimensional conversion method aiming at grating architectural plan
CN113139529B (en) Linear cultural heritage exploration method and system, storage medium and electronic equipment
Tatzgern Situated visualization in augmented reality
Hildebrandt et al. An assisting, constrained 3D navigation technique for multiscale virtual 3D city models
Agrawala Visualizing route maps
CN116012843A (en) Virtual scene data annotation generation method and system
Falcão et al. A real-time visualization tool for forest ecosystem management decision support
US7116341B2 (en) Information presentation apparatus and method in three-dimensional virtual space and computer program therefor
CN109657728B (en) Sample production method and model training method
Parente et al. Integration of convolutional and adversarial networks into building design: A review
Lin et al. Virtual geographic environments
CN117312684A (en) Scenic spot guide element plan generating system and method based on artificial intelligence
Visvalingam Trends and concerns in digital cartography
Chen et al. Generating synthetic photogrammetric data for training deep learning based 3D point cloud segmentation models
WO2023209560A1 (en) Machine learning for vector map generation
Cera et al. Semantically Annotated 3D Material Supporting the Design of Natural User Interfaces for Architectural Heritage.
CN117919714A (en) Random map generation method, system and storage medium in game
Zhang et al. Machine learning methods for Unesco Chinese heritage: Complexity and comparisons
She et al. A building label placement method for 3D visualizations based on candidate label evaluation and selection
WO2002005215A1 (en) 3d virtual landscape database
Xiong Reconstructing and correcting 3d building models using roof topology graphs

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