CN111135574A - Game scene generation method and device, computer readable medium and electronic equipment - Google Patents

Game scene generation method and device, computer readable medium and electronic equipment Download PDF

Info

Publication number
CN111135574A
CN111135574A CN201911358210.7A CN201911358210A CN111135574A CN 111135574 A CN111135574 A CN 111135574A CN 201911358210 A CN201911358210 A CN 201911358210A CN 111135574 A CN111135574 A CN 111135574A
Authority
CN
China
Prior art keywords
scene
path
target
divided
game scene
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
CN201911358210.7A
Other languages
Chinese (zh)
Other versions
CN111135574B (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201911358210.7A priority Critical patent/CN111135574B/en
Publication of CN111135574A publication Critical patent/CN111135574A/en
Application granted granted Critical
Publication of CN111135574B publication Critical patent/CN111135574B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The present disclosure provides a game scene generation method, a game scene generation apparatus, a computer-readable medium, and an electronic device; relates to the technical field of computer application. The game scene generation method comprises the following steps: acquiring a plurality of scene blocks containing a path finding path; acquiring scene demand parameters, and splicing the scene blocks according to the scene demand parameters and the path types of the path-finding paths contained in the scene blocks to acquire a target game scene; dividing the target game scene to obtain a plurality of divided areas; and determining the distribution of the interactive characters in the target game scene according to the divided areas. The game scene generation method can overcome the problem of high labor cost for generating the scene to a certain extent, and further improves the scene generation efficiency.

Description

Game scene generation method and device, computer readable medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer application technologies, and in particular, to a game scene generation method, a game scene generation apparatus, a computer-readable medium, and an electronic device.
Background
The game scene is a virtual space in which the player plays the game experience. A game developer can pre-make a game scene in a development stage, and when a player plays an actual game, the pre-made scene can be loaded for the player to experience. The interactive objects in the scene, such as non-player-controlled characters, articles and the like, are important interactive units for the game experience of the player, and can bring rich and coherent experience to the player.
Generally, a game scene is made together with the whole scene, and the scene is fixed after the scene is made. Developers need to derive path finding data of the scene according to the walkable area of the whole scene, and then manually select a proper position to arrange interactive objects in the scene. However, manually arranging the interactive objects in the scene in advance takes a lot of time and labor, and is inefficient.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a game scene generation method, a game scene generation apparatus, a computer-readable medium, and an electronic device, which can overcome the problem of low efficiency in artificially creating a scene to a certain extent, and further improve the scene generation efficiency.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to a first aspect of the present disclosure, there is provided a game scene generation method, including:
acquiring a plurality of scene blocks containing a path finding path;
acquiring scene demand parameters, and splicing the scene blocks according to the scene demand parameters and the path types of the path-finding paths contained in the scene blocks to acquire a target game scene;
dividing the target game scene to obtain a plurality of divided areas;
and determining the distribution of the interactive characters in the target game scene according to the divided areas.
In an exemplary embodiment of the present disclosure, the splicing the scene segments according to the scene requirement parameter and the path types of the routing paths included in the scene segments to obtain a target game scene includes:
determining a target path type according to the scene demand parameters;
acquiring a target block corresponding to the target path type from a plurality of scene blocks according to the path type of the routing path contained in the scene block;
and randomly splicing the target blocks according to the path finding paths contained in the target blocks to generate the target game scene containing complete path finding paths.
In an exemplary embodiment of the present disclosure, the dividing the target game scene to obtain a plurality of divided areas includes:
extracting the complete path finding path in the target game scene;
gridding the complete path-finding path to obtain a plurality of grid units;
determining boundary information according to the position relations of the grid cells;
and dividing the complete path-finding path according to the boundary information to obtain a plurality of divided areas.
In an exemplary embodiment of the present disclosure, the determining boundary information according to the position relationship of the plurality of grid cells includes:
determining weights respectively corresponding to the grid units according to the position relations of the grid units;
and taking the target grid unit corresponding to the weight meeting the preset condition as a boundary to obtain the boundary information.
In an exemplary embodiment of the present disclosure, after dividing the complete routing path according to the boundary information and obtaining a plurality of divided areas, the method further includes:
aiming at each divided region, acquiring two adjacent regions of the divided region to determine the adjacent boundaries of the adjacent regions and the divided region;
determining the center point of each adjacent boundary according to the weight of the target grid unit contained in each adjacent boundary;
calculating the distance between the central points to obtain the width of the divided regions;
and dividing the divided area with the width exceeding the preset value again to obtain the divided area again.
In an exemplary embodiment of the present disclosure, the dividing the divided region having the width exceeding the preset value again includes:
and dividing the divided areas with the widths exceeding the preset value again according to the vertical direction of the connecting line between the central points.
In an exemplary embodiment of the present disclosure, further comprising:
the width or height of each of the divided regions is calculated based on the number of mesh units included in each of the divided regions.
In an exemplary embodiment of the present disclosure, the determining the distribution of the interactive characters in the target game scene according to the division areas includes:
determining a role distribution group in each divided region according to the role density of each divided region, wherein the role distribution group comprises a plurality of interactive roles;
and determining a target area of the character distribution group according to the central position of the divided area so as to distribute the interactive characters in the character distribution group in the target area, wherein the target area does not exceed the divided area.
In an exemplary embodiment of the present disclosure, the scenario requirement parameter includes at least one of:
the number of scene blocks, the number of branches and the number of loops.
According to a second aspect of the present disclosure, a game scene generating device is provided, including a segment obtaining module, a scene splicing module, a scene dividing module, and a role distribution module, wherein:
the block acquisition module is used for acquiring a plurality of scene blocks containing the path finding path;
the scene splicing module is used for acquiring scene demand parameters, and splicing the scene blocks according to the scene demand parameters and the path types of the path-finding paths contained in the scene blocks to acquire a target game scene;
the scene dividing module is used for dividing the target game scene to obtain a plurality of divided areas;
and the role distribution module is used for determining the distribution of the interactive roles in the target game scene according to the divided areas.
In an exemplary embodiment of the present disclosure, the scene splicing module may specifically include a path type determining module, a target block obtaining module, and a block splicing module, where:
and the path type determining module is used for determining the type of the target path according to the scene demand parameters.
And the target block acquisition module is used for acquiring a target block corresponding to the target path type from a plurality of scene blocks according to the path type of the routing path contained in the scene blocks.
And the block splicing module is used for randomly splicing the target blocks according to the path finding paths contained in the target blocks so as to generate the target game scene containing complete path finding paths.
In an exemplary embodiment of the present disclosure, the scene division module may specifically include a way finding extraction module, a gridding module, a boundary determination module, and a path division module, where:
and the path searching extraction module is used for extracting the complete path searching path in the target game scene.
And the gridding module is used for gridding the complete path finding path to obtain a plurality of grid units.
And the boundary determining module is used for determining boundary information according to the position relation of the grid units.
And the path dividing module is used for dividing the complete path-finding path according to the boundary information to obtain a plurality of divided areas.
In an exemplary embodiment of the present disclosure, the boundary determination module may include a weight determination module and a grid selection module, wherein:
and the weight determining module is used for determining the weights corresponding to the grid units according to the position relations of the grid units.
And the grid selection module is used for taking the target grid unit corresponding to the weight meeting the preset condition as a boundary to obtain the boundary information.
In an exemplary embodiment of the present disclosure, the apparatus further includes an adjacent area determining module, a center point determining module, an area width calculating module, and an area updating module, wherein:
and the adjacent region determining module is used for acquiring two adjacent regions of each divided region so as to determine the adjacent boundaries of each adjacent region and the divided regions.
And the central point determining module is used for determining the central point of each adjacent boundary according to the weight of the target grid unit contained in each adjacent boundary.
And the first width calculation module is used for calculating the distance between the central points to obtain the width of the divided regions.
And the area updating module is used for dividing the divided areas with the widths exceeding the preset value again so as to obtain the divided areas again.
In an exemplary embodiment of the present disclosure, the area update module may be specifically configured to: and dividing the divided areas with the widths exceeding the preset value again according to the vertical direction of the connecting line between the central points.
In an exemplary embodiment of the present disclosure, the apparatus further includes a second width calculation module for calculating a width or a height of each of the divided regions according to the number of mesh units included in each of the divided regions.
In an exemplary embodiment of the present disclosure, the role distribution module may include a density determination module and a location determination module, wherein:
the density determining module is used for determining a role distribution group in each divided region according to the role density of each divided region, wherein the role distribution group comprises a plurality of interactive roles;
and the position determining module is used for determining a target area of the role distribution group according to the central position of the divided area so as to distribute the interactive roles in the role distribution group in the target area, wherein the target area does not exceed the divided area.
In an exemplary embodiment of the present disclosure, the scene requirement parameter includes at least one of: the number of scene blocks, the number of branches and the number of loops.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any one of the above via execution of the executable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
Exemplary embodiments of the present disclosure may have some or all of the following benefits:
in the game scene generation method provided by an example embodiment of the present disclosure, on one hand, different game scenes can be flexibly composed by splicing scene blocks, and the richness of the scenes can be improved, thereby improving the user experience; meanwhile, the scene manufacturing efficiency can be improved; on the other hand, the path-finding path of the scene can be determined when the scene is generated according to the path-finding path contained in the scene block, so that the path-finding efficiency of the scene can be improved; on the other hand, the distribution of the interactive roles in the scene can be automatically arranged by dividing the target game scene, so that the labor cost required by the arrangement of the interactive roles in the scene is saved, and the generation efficiency of the scene can be further 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 disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically shows a flow diagram of a game scene generation method according to one embodiment of the present disclosure;
FIG. 2 schematically illustrates a schematic diagram of a scene partition in one embodiment in accordance with the present disclosure;
FIG. 3 schematically illustrates a schematic diagram of another scene partition in one embodiment in accordance with the present disclosure;
FIG. 4 schematically illustrates a schematic diagram of another scene partition in one embodiment in accordance with the present disclosure;
FIG. 5 schematically shows a flow diagram of a game scene generation method in one embodiment of the present disclosure;
FIG. 6 schematically illustrates an interface diagram for stitching scene tiles in one embodiment of the present disclosure;
FIG. 7 schematically shows a flow diagram of a method of game scene generation in accordance with an embodiment of the present disclosure;
FIG. 8 schematically shows another flow diagram of a game scene generation method in accordance with an embodiment of the present disclosure;
FIG. 9 schematically illustrates a diagram of determining weights for grid cells in accordance with an embodiment of the present disclosure;
FIG. 10 schematically shows a flow diagram of a method of game scene generation in accordance with an embodiment of the present disclosure;
FIG. 11 schematically illustrates a schematic diagram of determining center points of adjacent boundaries in one embodiment according to the present disclosure;
FIG. 12 schematically illustrates a schematic diagram of dividing regions in one embodiment according to the present disclosure;
FIG. 13 schematically shows a flow diagram of a method of game scene generation in accordance with an embodiment of the present disclosure;
fig. 14 schematically shows a display effect diagram of a game scene generation method according to an embodiment of the present disclosure;
FIG. 15 schematically shows a block diagram of a game scene generation apparatus according to one embodiment of the present disclosure;
FIG. 16 schematically illustrates a system architecture diagram for implementing a game scene generation method according to one embodiment of the present disclosure;
FIG. 17 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different 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 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 disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description 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 the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The technical solution of the embodiment of the present disclosure is explained in detail below:
the present exemplary embodiment first provides a game scene generation method. Referring to fig. 1, the method may include the steps of:
step S110: a plurality of scene partitions containing the seek path are obtained.
Step S120: acquiring scene demand parameters, and splicing the scene blocks according to the scene demand parameters and the path types of the path finding paths contained in the scene blocks to acquire a target game scene.
Step S130: and dividing the target game scene to obtain a plurality of divided areas.
Step S140: and determining the distribution of the interactive characters in the target game scene according to the divided areas.
In the game scene generation method provided by an example embodiment of the present disclosure, on one hand, different game scenes can be flexibly composed by splicing scene blocks, and the richness of the scenes can be improved, thereby improving the user experience; meanwhile, the scene manufacturing efficiency can be improved; on the other hand, the path-finding path of the scene can be determined when the scene is generated according to the path-finding path contained in the scene block, so that the path-finding efficiency of the scene can be improved; on the other hand, the distribution of the interactive roles in the scene can be automatically arranged by dividing the target game scene, so that the labor cost required by the arrangement of the interactive roles in the scene is saved, and the generation efficiency of the scene can be further improved.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S110, a plurality of scene partitions including the seek path are acquired.
The scene block refers to a virtual scene previously created by a developer, and the scene includes an area where a character controlled by a player can walk, that is, a path finding path, and the path finding path included in each scene block may be different. And, attribute information such as the size and shape of a plurality of scene blocks can be set according to actual conditions, for example, the size and specification of a plurality of scene blocks can be the same, and the shape rule can be square or cube, can make things convenient for the concatenation more. The created scene blocks may be stored in a database or a specific file directory, so that the scene blocks are obtained by accessing the database or a file object. Alternatively, the scene block may be stored in a server or other terminal device, so that the scene block may be obtained by sending a request. For example, all scene partitions may be displayed for the user to select, so as to obtain the scene partitions selected by the user.
In step S120, a scene requirement parameter is obtained, and the scene segments are spliced according to the scene requirement parameter and the path types of the routing paths included in the scene segments, so as to obtain a target game scene.
The scene requirement parameter is data used for configuring the target game scene, and may specifically include a plurality of parameters, such as the number of nodes in the routing path of the target game scene, the length of the routing path, and the like, and further, for example, the number of routing paths of all the routable paths in the scene. Optionally, the scene requirement parameter may include one or more of the number of scene blocks, the number of branches, and the number of loops. For example, the scene requirement parameter may be obtained through a graphical user interface, for example, a graphical user interface is displayed, a plurality of input boxes are respectively displayed in the interface, and a user may respectively input the number of scene blocks, the number of branches, and the number of loops in each input box, so that the content input by the user is obtained through the graphical user interface, and the scene requirement parameter is obtained. In addition, the present embodiment may also obtain the scene requirement parameters in other manners, for example, a user may write all the parameters in a file in advance and store the parameters in the file, and obtain the scene requirement parameters by reading the file; for another example, a default value is respectively predetermined for each parameter, so that the default value of each parameter is directly obtained as a scene demand parameter, and the like; all falling within the scope of the present disclosure.
The path type is attribute information of the scene block, and after the scene block is manufactured, a developer can identify the path type of the routing path contained in the scene block and store the identification information as the attribute information of the scene block. The path types may include the number, direction and type of the openings of the path finding path, for example, the path types of the path finding path may be divided into an entrance, an exit and an opening according to the type of the entrance and the exit of the path finding path, and the directions of the openings passing through the path finding path may be divided into north, south, east, west, and the like; for example, as shown in fig. 2, where the scene partitions 201, 202, 203, and 204 are all entrances and the entrance directions are east, north, south, and west, respectively, and for example, as shown in fig. 3, the scene partitions 301, 302, 303, and 304 are all four scene partitions with different exit directions; furthermore, the number of the openings of the seek path in the scene block can be further divided into a single opening, a double opening, a triple opening, a quadruple opening, and the like, as shown in fig. 4, where 401 is a triple opening, and 402, 403, and 404 are all double openings; in addition, the path type may also include other types, for example, a loop, which may refer to that a winding of the seek path in a scene partition may return to the origin, and this embodiment is not particularly limited thereto.
And splicing the scene blocks according to the scene demand parameters and the path types of the path finding paths contained in the scene blocks to obtain the spliced target game scene. Specifically, the number of openings, the opening direction, and the opening type of the path finding path in the scene block may be determined according to the path type of the scene block, so that two scene blocks may be randomly obtained first, and whether the two scene blocks can be spliced or not may be judged according to the type of the path finding path, and if the two scene blocks can be spliced, for example, if the path type of the scene block a is an east opening, the scene block B with a west opening as the path type may be spliced with the west opening, and then the next scene block may be obtained for judgment, and so on, until the number of the spliced scene blocks meets the scene requirement parameter, for example, if the number of the scene blocks in the scene requirement parameter is 10, 10 scene blocks may be spliced to form a complete target game scene. And a plurality of openings can be arranged in one scene block, the direction of each opening is different, so that the opening can be extended and spliced from the direction of each opening to form a branch, the number of the branches of the path-finding path can be determined according to the scene requirement parameters, if the number of the branches is 2, the scene blocks with three openings can be selected for splicing, and two path-finding paths are formed from the scene blocks with the three openings, so that the final target game scene comprises the branches.
For example, assuming that the scene requirement parameters include 10 scene blocks and 3 scene branches, one of the scene blocks at the entrance may be randomly selected as a first spliced scene block according to the path type of the scene block, the last scene block as a target game scene may be randomly selected from the scene blocks at the exit, and then the first scene block and the last scene block may be spliced in the middle of the selected scene blocks with multiple openings according to the number of the scene blocks to obtain the target game scene. The coordinates of the path-finding paths in each scene block can be determined through the coordinate information corresponding to the scene blocks, so that the path-finding paths of the two scene blocks are spliced according to the coordinates; or the path finding paths can be identified, then the ports of the path finding paths of the two scene blocks are aligned according to the identification, and the two scene blocks are spliced together to obtain the target game scene.
In other embodiments of the present disclosure, after completing the splicing of the scene blocks, other processing may be performed, for example, to increase the aesthetic sense of the target game scene, one or more blocks that do not include a routing path may also be spliced, for example, scene blocks, and the like; for another example, the target game scene is subjected to illumination effect processing, and the atmosphere sense of the target game scene is created; all falling within the scope of the present disclosure.
In an exemplary embodiment, the method for obtaining a target game scene by splicing scene segments may include the following steps S501, S502 and S503, as shown in fig. 5, where:
in step S501, a target path type is determined according to the scene requirement parameter. The target path type refers to a path type of the complete seek path, and may specifically include a path type of a scene partition required for forming the complete seek path, and may also include the number of the scene partitions required for forming the complete seek path, for example, the target path type may be that the number of the three-opening scene partitions is 5, the number of the entrance scene partitions is 1, the number of the exit scene partitions is 2, and the like. For example, after the scene requirement parameter is obtained, the type or number of paths of the required scene partitions may be determined according to values of each parameter included in the scene requirement parameter, for example, if the scene requirement parameter is 2 in number of branches, the scene partitions requiring three openings may be determined, and for example, if the scene requirement parameter is 4 in number of loops, the scene partitions requiring 4 in number of paths may be determined. For example, the corresponding relationship between each item in the scene requirement parameters and the path type may be predetermined, and then the path types corresponding to each item in the scene requirement parameters are used as the target path types.
In step S502, according to the path type of the routing path included in the scene segment, a target segment corresponding to the target path type is obtained from the plurality of scene segments. The target block is one or more of the scene blocks. For example, the target path type may include an entry type, an exit type, and a three-opening type, one or more of the entry type scene partition, the exit type scene partition, and the three-opening type scene partition may be randomly extracted, and the extracted scene partition is the target partition. Also, if the number of scene partitions of a specific type in the target type is large, the same scene partition may be repeatedly extracted, that is, there are repeated scene partitions in the target partition, for example, the target partition includes two 401 partitions, 3 402 partitions, and the like shown in fig. 4.
In step S503, randomly splicing the target blocks according to the routing paths included in the target blocks to generate the target game scene including a complete routing path. For example, the position relationship between the target blocks may be determined according to the path types corresponding to the target blocks, so as to generate block topology information of the target game scene, and then the target blocks may be loaded according to the block topology information during running to generate the target game scene. Since only one end of the scene blocks of the entry type and the exit type can be spliced, a target block of one entry type or exit type can be obtained as a first block, and then a next target block which can be spliced with the first block is determined according to the direction of the end of the first block which can be spliced, for example, 201 in fig. 2 is determined as a first target block, and then one of the remaining target blocks is randomly selected to determine whether the first target block can be spliced with 201, if so, the target block can be a second target block, for example, 401, 403, and 404 in fig. 4 can be spliced with 201, if not, another target block is selected again, and so on, the position relationship among all the target blocks is determined, and the block topology information of the target game scene is obtained. And when each target block is loaded according to the block topology information, each target block can be moved by a specific offset, so that gaps among the target blocks are avoided, and the target blocks are connected more closely.
And splicing the scene blocks containing the path finding path to obtain a complete path finding path. The complete routing path refers to an area which can be passed by all players in a target game scene and is composed of routing paths in all target blocks. In the embodiment, scene makers do not need to make a complete target game scene, but determine the target game scene in a mode of splicing scene blocks, so that different game scenes can be obtained through combination of different scene blocks, the scene generation efficiency can be improved, and meanwhile, richer scene experience is provided for players. In addition, after the scene is generated, the complete path-finding path of the target game scene can be directly determined according to the splicing sequence of the scene blocks, calculation is not needed through a path-finding algorithm, and the path-finding efficiency can be improved.
In other embodiments of the present disclosure, the scene segments may be further spliced in other manners to obtain the target game scene, for example, all the scene segments are displayed through a graphical user interface for the user to select, and the position of each scene segment is determined according to the dragging of the scene segment by the user, so as to obtain the target game scene; for another example, as shown in fig. 6, a scene demand parameter required by a user is acquired through an area shown by a graphical user interface 601, and then a target block is determined, so that the user can splice the target block in the acquired area shown by 602 to finally obtain a target game scene and the like; all falling within the scope of the present disclosure.
Next, in step S130, the target game scene is divided, and a plurality of divided regions are obtained.
In this embodiment, the target game scene may be divided in various ways, for example, after the target game scene is obtained, a coordinate system of the target game scene may be re-established, so that the target game scene is uniformly divided according to the coordinate system, and is uniformly divided into a plurality of divided regions. Or, the target game scene is divided according to the complete route-seeking path in the target game scene, for example, the target game scene is divided according to a specific road segment length, so that the lengths of the route-seeking paths contained in each divided area are equal. It is to be understood that the demarcated regions, although also referred to as local regions in the target game scene, may be different from the scene segmentation.
In an exemplary embodiment, the method of dividing the target game scene may include the following steps S701 to 704, as shown in fig. 7, wherein:
in step S701, the complete routing path in the target game scene is extracted. According to the coordinate information of the target game scene, the coordinates of the path-finding path in the target game scene can be determined, so that the complete path-finding path can be extracted from the target game scene; or the target game scene can be manually marked, and the complete path-finding path in the target game scene is extracted through a graphic processing tool after the path-finding path is marked.
In step S702, the complete routing path is gridded to obtain a plurality of grid cells. The size of the grid cells may be set according to actual situations, for example, 1 grid cell may represent an area of 1 × 1 meter in an actual game scene, and the embodiment is not particularly limited thereto. Illustratively, the complete path finding path is scaled according to a certain proportion, and then a partition unit with a proper size is selected for partitioning, so as to obtain a grid unit.
In step S703, boundary information is determined according to the positional relationship of the plurality of grid cells. The boundary information may include position information of a specific grid cell, or may include a relative position relationship of each grid cell, or other attribute information of the grid cell, such as identification information, number, and the like, which is not particularly limited in this embodiment. Since the full seek path is not regular, there may be a plurality of boundary information in the full seek path. For example, after the complete routing path is gridded, the coordinate information of each grid cell may be determined, and the grid cell located at the edge is determined according to the coordinates of the multiple grid cells, so that the information of the grid cell located at the edge is used as the boundary information; or, a grid unit is selected, a certain number of grid units are extended to the periphery by taking the grid unit as the center, and the information of the grid unit which is extended finally is determined as the boundary information. Illustratively, the method may include the following steps S801 and S802, as shown in fig. 8, wherein:
in step S801, weights corresponding to the plurality of grid cells are determined according to the positional relationships of the plurality of grid cells. For example, according to the position relationship of the grid cells, it can be determined that the grid cells are farther from the edge, the weight is larger, the grid cells at the edge are firstly set with a weight, then the grid cells are extended towards other grid cells along the direction perpendicular to the edge, and the weights of the extended grid cells are sequentially increased until all the grid cells in the direction are determined. As shown in fig. 9, assuming that the complete routing path is a regular rectangle, after all the grid cells located at the edge are weighted, the grid cells at the inner layer are extended according to the rectangle, and the weights are sequentially increased to finally cover all the grid cells, thereby obtaining the weights of all the grid cells. In addition, the weight of each grid cell may also be obtained in other manners, for example, a grid cell is randomly determined, 4 grid cells adjacent to the grid cell are determined according to the neighboring relationship, the weight of the grid cell is increased by 1 unit, then the grid cells adjacent to the 4 grid cells are determined, the weight is determined to be increased by one unit, and so on until the current grid cell does not have the grid cell adjacent to the current grid cell.
In step S802, the target grid cell corresponding to the weight meeting the preset condition is used as a boundary, and the boundary information is obtained. In setting the weight, the grid cells toward the center may be set to have a larger or smaller weight, and therefore, the grid cell with the smallest weight may be used as the boundary information, or the grid cell with the largest weight may be used as the boundary information. In this embodiment, the boundary information may be acquired by other methods, for example, by manually labeling the boundary information, and for example, a mesh cell with the largest weight is selected, and mesh cells within a certain range from the mesh cell are used as the boundary information, with the mesh cell being the center, and the present embodiment is not limited to this.
In the embodiment, the target game scene can be obtained by splicing the path finding paths in the scene blocks, the scene generation and the path finding are combined, the operation flow is simplified, the generated complete path finding paths are used for obtaining the divided areas, and then the interactive roles are arranged in the interactive areas, so that the players can interact with the interactive roles when passing through the path finding paths, the operation of manually selecting the areas for arranging the interactive roles is avoided, the scene making flow can be optimized, and the scene generation efficiency is improved.
Next, with continuing reference to fig. 7, in step S704, the complete routing path is divided according to the boundary information to obtain a plurality of divided regions. Specifically, the grid cells included in the boundary information may be identified in the complete routing path, and then the path may be segmented from the identified location to obtain a plurality of partitioned areas. In addition, in other embodiments of the present disclosure, the divided region may be obtained by other methods, for example, a certain number of grid cells are used as one divided region, the division is performed according to the density of the grid cells, and the like, which all belong to the protection scope of the present disclosure.
In the present exemplary embodiment, each divided region may be optimized after the complete seek path is divided, for example, an excessively large divided region is divided again, an excessively small divided region is merged to form a new divided region, and the like. Illustratively, the width or height of each divided region is calculated according to the number of mesh units included in each divided region, and the divided regions having a width or height exceeding a preset value are divided again. Here, the width or height of each divided region may refer to the total number of mesh units included in the divided region, or may refer to the number of mesh units included in a certain direction, for example, if the divided region is circular, the number of mesh units in the diameter direction may be used. Further, the method may further include steps S1001 to S1004, as shown in fig. 10, wherein:
in step S1001, for each divided region, two adjacent regions of the divided region are acquired to determine adjacent boundaries of each of the adjacent regions and the divided region. The adjacent boundary refers to a boundary of adjacent parts included in the adjacent region. Each divided region may have a plurality of adjacent regions, for example, 4, 5, 7, 8, etc., and illustratively, two adjacent regions may be arbitrarily selected; or, for the divided region a, first determine a plurality of regions B adjacent to a, and then select two of the plurality of regions B having the largest adjacent regions as the adjacent regions of a, for example, for the divided region S, in the region Z, X, C adjacent to S, the number of adjacent regions of Z is 2, the number of adjacent regions of X is 1, and the number of adjacent regions of C is 2, then Z and C are selected as the adjacent regions of S. After determining the two adjacent regions of each divided region, the adjacent boundaries of the adjacent regions may be determined according to the coordinates of the mesh units of the divided region.
In step S1002, the center point of each of the adjacent boundaries is determined according to the weight of the target grid cell included in each of the adjacent boundaries. Specifically, the grid cell with the highest weight in the adjacent boundaries may be determined as the center point of the adjacent boundaries, as shown in fig. 11, the adjacent area of B is a, the weights of the grid cells included in the adjacent boundaries of a are 1, 2, 3, 2, and 1, respectively, where the weight is 3, and then the grid cell 1101 may be the center point of the adjacent boundaries of B and a. Similarly, two center points of two adjacent regions of each divided region can be obtained.
In step S1003, the distance between the center points is calculated to obtain the width of the divided region. Each grid cell in the divided region has corresponding coordinates, and the distance between the central points can be calculated by the coordinates of two central points, for example, the coordinates of the central points are (x, y), (q, z), respectively, and the distance between the two central points is (x, y), (q, z), respectively
Figure BDA0002336520680000151
In step S1004, the divided regions having the widths exceeding the preset value are divided again to reacquire the divided regions. After the widths of the divided regions are respectively calculated, whether the widths of the divided regions exceed a preset value or not is judged, the divided regions with the widths exceeding the preset value are divided again, and the divided regions obtained after the division again can be used as final divided regions of the target game scene. For example, if the width of the B region exceeds a preset value, B may be divided in the vertical direction of the line connecting the two center points obtained when the width of the B region is calculated, as shown in fig. 12. In addition, the preset value may be determined according to actual requirements, for example, the preset value may be 100, 120, 50, or the like, or may be other numbers, for example, 30, 35, 40, or the like, which is not particularly limited in this embodiment.
Then, in step S140, the distribution of the interactive characters in the target game scene is determined according to the divided regions.
An interactive character refers to a virtual object that is capable of interacting with a player-controlled character, such as a prop, monster, etc. in a game scene. For example, after the divided regions are obtained, a certain number of interactive roles may be arranged in each divided region, so that the number of interactive roles in each divided region is uniformly distributed; different numbers of interactive roles can be randomly determined in each divided area; also, a greater number of interactive characters may be arranged in a greater number of divided regions, and a lesser number of interactive characters may be arranged in a lesser number of divided regions, using the number of grid cells in each divided region. In the embodiment, after the target game scene is obtained through splicing, the target game scene can be divided according to the target game scene, so that interactive characters are automatically launched in each divided area, the labor cost required by manual arrangement of the interactive characters can be saved, and the generation efficiency of the game scene is improved.
In an exemplary embodiment, as shown in fig. 13, the distribution of the interactive roles may be determined through step S1301 and step S1302, specifically:
in step S1301, a character distribution group in each of the divided regions is determined according to the character density of each of the divided regions, where the character distribution group includes a plurality of interactive characters. The character density refers to the number of interactive characters in a unit area or the number of interactive character distribution groups. Generally, interactive characters in a game may appear in groups, so that a certain number of interactive characters may be determined as a group, thereby obtaining a character distribution group. The number and types of the interactive characters in the character distribution group may be different, and character distribution groups of various specifications, for example, a monster pile including 6 monsters, a monster pile including 7 monsters, and the like may be determined in advance. The character density of each divided region may be different, and the character density may be any value within a range. Specifically, the range of the character density, that is, the maximum value and the minimum value of the character density, may be predetermined, and then after the divided regions are obtained, a character density may be randomly determined within the range for each divided region. Illustratively, the density may be 20, for example, and three character distribution groups corresponding to 6, and 8, respectively, may be determined.
In step S1302, a target area of the character distribution group is determined according to the central position of the divided area, so as to distribute the interactive characters in the character distribution group in the target area, wherein the target area does not exceed the divided area. According to the coordinate information of each divided region, the center position of each divided region may be calculated, or the grid unit with the highest weight in each divided region may be used as the center position, or the center position may be determined in other manners, for example, a circular region is determined as the center position in each divided region, and the central point connecting line of the adjacent regions of each divided region is used as the center position. Then, the center position may be determined as a target position of the character distribution group, or an area may be determined as a target position according to the center position. Illustratively, a line is selected through the center position, optionally a coordinate is selected as a center on the line, a circular area of a certain size is determined as the target position, and then the character distribution cluster is placed in the circular area. And, if the character distribution group includes a plurality of character distribution groups, a plurality of target positions may be determined from the divided regions, for example, if the number of the character distribution group is 3, after a line passing through the center position is determined, 3 circle centers are determined on the line, then a radius of a certain size is randomly selected to obtain 3 circular regions, and the sizes of the circular regions may be different, and finally the character distribution group is placed in the three circular regions, respectively. By the embodiment, the scene blocks can be spliced to form rich game scenes, and the spliced game scenes can be divided to determine the distribution of interactive characters in the scenes, so that the game scenes with complete processes are formed for the experience of players.
In the exemplary embodiment, as shown in fig. 14, the distribution of the interactive characters in the target game scene can be displayed through a graphical user interface for the user to verify. Specifically, a producer may perform custom splicing on scene segments in the region shown in the graphical user interface 1401, and form a complete target game scene after splicing; then, automatically dividing the complete path-finding path in the target game scene to obtain a plurality of divided areas, and displaying the divided result, as shown in 1402; after the divided regions are obtained, corresponding character densities can be determined for the divided regions, and the corresponding character densities are identified in 1402 by different colors, for example, red, blue, and the like, wherein darker colors can indicate that the character densities are larger, and the same colors can indicate that the character densities are the same; and then displaying the interactive characters according to the character density in the complete routing path, as shown in 1403, labeling each interactive character at a corresponding position, so that the distribution situation of the interactive characters can be displayed more intuitively. In addition, the producer may also customize the distribution of the interactive characters in the graphical user interface, for example, determine the positions of the interactive characters through operations such as clicking, dragging and the like in the complete routing path, and input the character density of each divided area in the graphical user interface. In addition, other interactive functions may also be provided through the graphical user interface, for example, the complete routing path is displayed for the manufacturer to perform customized division, and the manufacturer may determine each divided area through operations such as frame selection, click, or coordinate input, and the like.
Further, in the present exemplary embodiment, a game scene generating device is further provided, which is configured to execute the game scene generating method of the present disclosure. The device can be applied to a server or terminal equipment.
Referring to fig. 15, the scene generation apparatus 1500 may include: a block obtaining module 1510, a scene splicing module 1520, a scene dividing module 1530, and a role distribution module 1540, wherein:
a block obtaining module 1510, configured to obtain a plurality of scene blocks including the way finding path.
And the scene splicing module 1520 is configured to obtain a scene requirement parameter, and splice the scene partitions according to the scene requirement parameter and the path types of the scene partitions to obtain a target game scene.
The scene division module 1530 is configured to divide the target game scene to obtain a plurality of divided regions.
A role distribution module 1540, configured to determine, according to the divided regions, distribution of the interactive roles in the target game scene.
In an exemplary embodiment of the present disclosure, the scene splicing module 1520 may specifically include a path type determining module, a target block obtaining module, and a block splicing module, where:
and the path type determining module is used for determining the type of the target path according to the scene demand parameters.
And the target block acquisition module is used for acquiring a target block corresponding to the target path type from a plurality of scene blocks according to the path type of the routing path contained in the scene blocks.
And the block splicing module is used for randomly splicing the target blocks according to the path finding paths contained in the target blocks so as to generate the target game scene containing complete path finding paths.
In an exemplary embodiment of the present disclosure, the scene division module 1530 may specifically include a way finding extraction module, a gridding module, a boundary determination module, and a path division module, wherein:
and the path searching extraction module is used for extracting the complete path searching path in the target game scene.
And the gridding module is used for gridding the complete path finding path to obtain a plurality of grid units.
And the boundary determining module is used for determining boundary information according to the position relation of the grid units.
And the path dividing module is used for dividing the complete path-finding path according to the boundary information to obtain a plurality of divided areas.
In an exemplary embodiment of the present disclosure, the boundary determination module may include a weight determination module and a grid selection module, wherein:
and the weight determining module is used for determining the weights corresponding to the grid units according to the position relations of the grid units.
And the grid selection module is used for taking the target grid unit corresponding to the weight meeting the preset condition as a boundary to obtain the boundary information.
In an exemplary embodiment of the present disclosure, the apparatus further includes an adjacent area determining module, a center point determining module, an area width calculating module, and an area updating module, wherein:
and the adjacent region determining module is used for acquiring two adjacent regions of each divided region so as to determine the adjacent boundaries of each adjacent region and the divided regions.
And the central point determining module is used for determining the central point of each adjacent boundary according to the weight of the target grid unit contained in each adjacent boundary.
And the first width calculation module is used for calculating the distance between the central points to obtain the width of the divided regions.
And the area updating module is used for dividing the divided areas with the widths exceeding the preset value again so as to obtain the divided areas again.
In an exemplary embodiment of the present disclosure, the area update module may be specifically configured to: and dividing the divided areas with the widths exceeding the preset value again according to the vertical direction of the connecting line between the central points.
In an exemplary embodiment of the present disclosure, the apparatus further includes a second width calculation module for calculating a width or a height of each of the divided regions according to the number of mesh units included in each of the divided regions.
In an example embodiment of the disclosure, the role distribution module 1540 may include a density determination module and a location determination module, wherein:
the density determining module is used for determining a role distribution group in each divided region according to the role density of each divided region, wherein the role distribution group comprises a plurality of interactive roles;
and the position determining module is used for determining a target area of the role distribution group according to the central position of the divided area so as to distribute the interactive roles in the role distribution group in the target area, wherein the target area does not exceed the divided area.
In an exemplary embodiment of the present disclosure, the scene requirement parameter includes at least one of: the number of scene blocks, the number of branches and the number of loops.
As each functional module of the game scene generating device of the exemplary embodiment of the present disclosure corresponds to the steps of the exemplary embodiment of the game scene generating method, please refer to the embodiment of the game scene generating method of the present disclosure for details that are not disclosed in the embodiment of the device of the present disclosure.
Referring to fig. 16, fig. 16 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a game scene generation method and a game scene generation apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 16, the system architecture 1600 may include one or more of terminal devices 1601, 1602, 1603, a network 1604, and a server 1605. The network 1604 is the medium used to provide communications links between the terminal devices 1601, 1602, 1603 and the server 1605. The network 1604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 1601, 1602, 1603 may be various electronic devices having display screens including, but not limited to, desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 16 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 1605 may be a server cluster comprised of a plurality of servers, or the like.
The game scene generation method provided by the embodiment of the present disclosure is generally executed by the server 1605, and accordingly, the game scene generation apparatus is generally disposed in the server 1605. However, it is easily understood by those skilled in the art that the game scene generating method provided in the embodiment of the present disclosure may also be executed by the terminal devices 1601, 1602, 1603, and accordingly, the game scene generating apparatus may also be disposed in the terminal devices 1601, 1602, 1603, which is not particularly limited in this exemplary embodiment.
FIG. 17 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present disclosure.
It should be noted that the computer system 1700 of the electronic device shown in fig. 17 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 17, the computer system 1700 includes a Central Processing Unit (CPU)1701 which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1702 or a program loaded from a storage portion 1708 into a Random Access Memory (RAM) 1703. In the RAM 1703, various programs and data necessary for system operation are also stored. The CPU 1701, ROM 1702, and RAM 1703 are connected to each other through a bus 1704. An input/output (I/O) interface 1705 is also connected to bus 1704.
The following components are connected to the I/O interface 1705: an input section 1706 including a keyboard, a mouse, and the like; an output portion 1707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 1708 including a hard disk and the like; and a communication section 1709 including a network interface card such as a LAN card, a modem, or the like. The communication section 1709 performs communication processing via a network such as the internet. A driver 1710 is also connected to the I/O interface 1705 as necessary. A removable medium 1711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1710 as necessary, so that a computer program read out therefrom is mounted into the storage portion 1708 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via the communication portion 1709, and/or installed from the removable media 1711. The computer program executes various functions defined in the method and apparatus of the present application when executed by a Central Processing Unit (CPU) 1701.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer 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. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 1 and 2, and so on.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (12)

1. A game scene generation method, comprising:
acquiring a plurality of scene blocks containing a path finding path;
acquiring scene demand parameters, and splicing the scene blocks according to the scene demand parameters and the path types of the path-finding paths contained in the scene blocks to acquire a target game scene;
dividing the target game scene to obtain a plurality of divided areas;
and determining the distribution of the interactive characters in the target game scene according to the divided areas.
2. The method according to claim 1, wherein the splicing the scene segments according to the scene requirement parameter and the path types of the routing paths included in the scene segments to obtain the target game scene comprises:
determining a target path type according to the scene demand parameters;
acquiring a target block corresponding to the target path type from a plurality of scene blocks according to the path type of the routing path contained in the scene block;
and randomly splicing the target blocks according to the path finding paths contained in the target blocks to generate the target game scene containing complete path finding paths.
3. The method of claim 2, wherein said dividing the target game scene into a plurality of divided regions comprises:
extracting the complete path finding path in the target game scene;
gridding the complete path-finding path to obtain a plurality of grid units;
determining boundary information according to the position relations of the grid cells;
and dividing the complete path-finding path according to the boundary information to obtain a plurality of divided areas.
4. The method according to claim 3, wherein determining boundary information according to the position relationship of the plurality of grid cells comprises:
determining weights respectively corresponding to the grid units according to the position relations of the grid units;
and taking the target grid unit corresponding to the weight meeting the preset condition as a boundary to obtain the boundary information.
5. The method of claim 4, wherein after dividing the complete routing path according to the boundary information to obtain a plurality of divided regions, the method further comprises:
aiming at each divided region, acquiring two adjacent regions of the divided region to determine the adjacent boundaries of the adjacent regions and the divided region;
determining the center point of each adjacent boundary according to the weight of the target grid unit contained in each adjacent boundary;
calculating the distance between the central points to obtain the width of the divided regions;
and dividing the divided area with the width exceeding the preset value again to obtain the divided area again.
6. The method according to claim 5, wherein the dividing the divided area whose width exceeds the preset value again comprises:
and dividing the divided areas with the widths exceeding the preset value again according to the vertical direction of the connecting line between the central points.
7. The method of claim 5, further comprising:
the width or height of each of the divided regions is calculated based on the number of mesh units included in each of the divided regions.
8. The method of claim 1, wherein the determining the distribution of the interactive characters in the target game scene according to the division areas comprises:
determining a role distribution group in each divided region according to the role density of each divided region, wherein the role distribution group comprises a plurality of interactive roles;
and determining a target area of the character distribution group according to the central position of the divided area so as to distribute the interactive characters in the character distribution group in the target area, wherein the target area does not exceed the divided area.
9. The method of claim 1, wherein the scene requirement parameters comprise at least one of:
the number of scene blocks, the number of branches and the number of loops.
10. A game scene generation apparatus, comprising:
the block acquisition module is used for acquiring a plurality of scene blocks containing the path finding path;
the scene splicing module is used for acquiring scene demand parameters and splicing the scene blocks according to the scene demand parameters and the path types of the scene blocks to acquire a target game scene;
the scene dividing module is used for dividing the target game scene to obtain a plurality of divided areas;
and the role distribution module is used for determining the distribution of the interactive roles in the target game scene according to the divided areas.
11. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-9.
12. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-9 via execution of the executable instructions.
CN201911358210.7A 2019-12-25 2019-12-25 Game scene generation method and device, computer readable medium and electronic equipment Active CN111135574B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911358210.7A CN111135574B (en) 2019-12-25 2019-12-25 Game scene generation method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911358210.7A CN111135574B (en) 2019-12-25 2019-12-25 Game scene generation method and device, computer readable medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111135574A true CN111135574A (en) 2020-05-12
CN111135574B CN111135574B (en) 2023-04-07

Family

ID=70520038

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911358210.7A Active CN111135574B (en) 2019-12-25 2019-12-25 Game scene generation method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111135574B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111773713A (en) * 2020-06-19 2020-10-16 网易(杭州)网络有限公司 Method, device and system for generating game object in game scene
CN112023401A (en) * 2020-09-11 2020-12-04 北京冰封互娱科技有限公司 Processing method and device for path searching recovery and electronic equipment
CN112494937A (en) * 2020-12-16 2021-03-16 北京冰封互娱科技有限公司 Game scene building method and device, storage medium and computing equipment
CN112642148A (en) * 2020-12-30 2021-04-13 北京像素软件科技股份有限公司 Game scene generation method and device and computer equipment
CN113269853A (en) * 2021-06-02 2021-08-17 福建天晴在线互动科技有限公司 Method and system for dividing game interface area
CN113546416A (en) * 2021-08-16 2021-10-26 网易(杭州)网络有限公司 Game scene processing method and device, computer equipment and storage medium
WO2023240884A1 (en) * 2022-06-15 2023-12-21 网易(杭州)网络有限公司 Game scene generating method and device, storage medium, and electronic device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180012403A1 (en) * 2016-07-07 2018-01-11 Netease (Hangzhou) Network Co., Ltd. Method and device for computing a path in a game scene
CN109771951A (en) * 2019-02-13 2019-05-21 网易(杭州)网络有限公司 Method, apparatus, storage medium and the electronic equipment that map generates
CN109806584A (en) * 2019-01-24 2019-05-28 网易(杭州)网络有限公司 Scene of game generation method and device, electronic equipment, storage medium
CN110523081A (en) * 2019-08-08 2019-12-03 腾讯科技(深圳)有限公司 The method and device for planning in navigation pathfinding path

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180012403A1 (en) * 2016-07-07 2018-01-11 Netease (Hangzhou) Network Co., Ltd. Method and device for computing a path in a game scene
CN109806584A (en) * 2019-01-24 2019-05-28 网易(杭州)网络有限公司 Scene of game generation method and device, electronic equipment, storage medium
CN109771951A (en) * 2019-02-13 2019-05-21 网易(杭州)网络有限公司 Method, apparatus, storage medium and the electronic equipment that map generates
CN110523081A (en) * 2019-08-08 2019-12-03 腾讯科技(深圳)有限公司 The method and device for planning in navigation pathfinding path

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111773713A (en) * 2020-06-19 2020-10-16 网易(杭州)网络有限公司 Method, device and system for generating game object in game scene
CN111773713B (en) * 2020-06-19 2024-01-19 网易(杭州)网络有限公司 Method, device and system for generating game object in game scene
CN112023401A (en) * 2020-09-11 2020-12-04 北京冰封互娱科技有限公司 Processing method and device for path searching recovery and electronic equipment
CN112494937A (en) * 2020-12-16 2021-03-16 北京冰封互娱科技有限公司 Game scene building method and device, storage medium and computing equipment
CN112642148A (en) * 2020-12-30 2021-04-13 北京像素软件科技股份有限公司 Game scene generation method and device and computer equipment
CN113269853A (en) * 2021-06-02 2021-08-17 福建天晴在线互动科技有限公司 Method and system for dividing game interface area
CN113269853B (en) * 2021-06-02 2023-09-22 福建天晴在线互动科技有限公司 Game interface region division method and system
CN113546416A (en) * 2021-08-16 2021-10-26 网易(杭州)网络有限公司 Game scene processing method and device, computer equipment and storage medium
WO2023240884A1 (en) * 2022-06-15 2023-12-21 网易(杭州)网络有限公司 Game scene generating method and device, storage medium, and electronic device

Also Published As

Publication number Publication date
CN111135574B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111135574B (en) Game scene generation method and device, computer readable medium and electronic equipment
CN111467806B (en) Method, device, medium and electronic equipment for generating resources in game scene
EP3882865A1 (en) Object loading method, device, storage medium, and electronic device
US10300382B1 (en) Three dimensional terrain modeling
KR102216749B1 (en) Method, apparatus and computer program for coloring of a target image
CN110478898B (en) Configuration method and device of virtual scene in game, storage medium and electronic equipment
CN113486437B (en) General diagram generating method, device, equipment and storage medium based on exhaustion
CN110559665A (en) Game map processing method and device, terminal device and storage medium
CN110433495B (en) Configuration method and device of virtual scene in game, storage medium and electronic equipment
CN112717414B (en) Game scene editing method and device, electronic equipment and storage medium
CN116522552A (en) Machine room wiring method and system
CN110515690A (en) Node layout's method and device, storage medium, electronic device
CN105957133B (en) A kind of method and apparatus for loading textures
CN112734900B (en) Baking method, device and equipment for shadow map and computer readable storage medium
CN112121437B (en) Movement control method, device, medium and electronic equipment for target object
CN112827177B (en) Method, device and equipment for generating surface vegetation in virtual environment and storage medium
CN112604280B (en) Game topography generation method and device
CN109985386B (en) Method and device for generating map
CN117398685A (en) Virtual scene construction method and device, electronic equipment and storage medium
CN111790151A (en) Method and device for loading object in scene, storage medium and electronic equipment
CN111569418A (en) Rendering method, device and medium for content to be output and electronic equipment
CN115794400A (en) Memory management method, device and equipment of deep learning model and storage medium
CN111790152A (en) Method and device for loading object in scene, storage medium and electronic equipment
CN114528305A (en) Vector data updating range determining method and device, electronic equipment and storage medium
US20130090162A1 (en) Match 3 Game Across Non-Coplanar Objects

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant