CN113633980A - Data generation method and device, computer equipment and storage medium - Google Patents

Data generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113633980A
CN113633980A CN202110890017.9A CN202110890017A CN113633980A CN 113633980 A CN113633980 A CN 113633980A CN 202110890017 A CN202110890017 A CN 202110890017A CN 113633980 A CN113633980 A CN 113633980A
Authority
CN
China
Prior art keywords
room
map
preset
module
maze
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
CN202110890017.9A
Other languages
Chinese (zh)
Other versions
CN113633980B (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.)
Beijing Zhong Qing Long Tu Network Technology Co ltd
Original Assignee
Beijing Zhong Qing Long Tu Network 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 Zhong Qing Long Tu Network Technology Co ltd filed Critical Beijing Zhong Qing Long Tu Network Technology Co ltd
Priority to CN202110890017.9A priority Critical patent/CN113633980B/en
Publication of CN113633980A publication Critical patent/CN113633980A/en
Application granted granted Critical
Publication of CN113633980B publication Critical patent/CN113633980B/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/50Controlling the output signals based on the game progress
    • A63F13/53Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game
    • A63F13/537Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen
    • A63F13/5378Controlling the output signals based on the game progress involving additional visual information provided to the game scene, e.g. by overlay to simulate a head-up display [HUD] or displaying a laser sight in a shooting game using indicators, e.g. showing the condition of a game character on screen for displaying an additional top view, e.g. radar screens or maps
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/30Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device
    • A63F2300/303Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by output arrangements for receiving control signals generated by the game device for displaying additional data, e.g. simulating a Head Up Display

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Processing Or Creating Images (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a data generation method, a data generation device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point; selecting at least one preset room to be added to the maze map according to the preset map rule; and marking the maze map according to the service attribute information to generate game interaction information. The embodiment of the invention realizes the dynamic generation of the maze map, so that the maps of users logged in each time are different, the use experience of the users can be enhanced, the error probability of random generation of the map is reduced, and the stability of the generation of the maze map can be improved.

Description

Data generation method and device, computer equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a data generation method and device, computer equipment and a storage medium.
Background
In recent years, the game industry has been rapidly developed, and more users have made higher demands on the game quality. As a high-quality game, the maze has a very important effect on the game quality, the maze generation mode directly has a direct influence on the operation efficiency of the game, if the maze real-time calculation usually needs to spend a large amount of equipment calculation performance, if the maze adopts a fixed mode to carry out calculation, although the calculation expense of game equipment is saved, the loading efficiency of the maze is improved, the map generation is fixed, higher freshness cannot be provided for users, and the game experience is greatly reduced.
However, the existing game has two main ways of generating the maze, one is to directly design a fixed maze map, and the other is a maze map generated completely at random. However, the two schemes have great defects in terms of computational overhead and game experience respectively, wherein the fixedly generated maze map has low device computational overhead but lacks sufficient playability, and the randomly generated maze map has rich playability but costs high device computational overhead and is easy to generate map errors. At present, a maze data generation method with randomness and rationality is urgently needed, and the use experience of game users is improved on the basis of reducing the calculation expense of equipment.
Disclosure of Invention
The invention provides a data generation method, a data generation device, computer equipment and a storage medium, which are used for realizing random generation of maze map data, reducing the calculation expense of the equipment, providing rich map data for game players and improving the use experience of users.
In a first aspect, an embodiment of the present invention provides a data generation method, where the method includes:
acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point;
selecting at least one preset room to be added to the maze map according to the preset map rule;
and marking the maze map according to the service attribute information to generate game interaction information.
In a second aspect, an embodiment of the present invention further provides a data generating apparatus, where the apparatus includes:
the rule obtaining module is used for obtaining a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point;
the room adding module is used for selecting at least one preset room to be added to the maze map according to the preset map rule;
and the service information module is used for marking the maze map according to the service attribute information to generate game interaction information.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data generation method according to any one of the embodiments of the present invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the data generating method according to any one of the embodiments of the present invention.
According to the method and the device, the preset map rule for generating the maze is obtained, the preset rooms are selected according to the preset map rule and added to the maze map, the service data information is marked for the maze map to serve as game interaction information, the calculation cost of map real-time generation is reduced through the preset rooms, the maze map is randomly generated according to the preset map rule, dynamic generation of the maze map is achieved, the maps which are logged by a user at each time are different, the use experience of the user can be enhanced, the random generation errors of the map are reduced based on the preset rooms, and the generation stability of the maze map can be improved.
Drawings
Fig. 1 is a flowchart of a data generation method according to an embodiment of the present invention;
FIG. 2a is an exemplary diagram of a room module provided in one embodiment of the invention;
FIG. 2b is an exemplary diagram of a room module provided in one embodiment of the invention;
FIG. 2c is an exemplary diagram of a room module provided in accordance with an embodiment of the present invention;
FIG. 2d is an exemplary diagram of a room module provided in one embodiment of the invention;
fig. 2e is an exemplary diagram of a room module according to an embodiment of the present invention;
FIG. 3 is an exemplary diagram of a large room module provided in accordance with an embodiment of the present invention;
fig. 4 is a flowchart of a data generation method according to a second embodiment of the present invention;
FIG. 5 is a diagram illustrating an example of labeling a preset room according to a second embodiment of the present invention;
FIG. 6 is an exemplary diagram of a maze map provided by a second embodiment of the present invention;
fig. 7a is an exemplary diagram of a room module provided in the second embodiment of the present invention;
fig. 7b is an exemplary diagram of a room module provided in the second embodiment of the present invention;
FIG. 8a is an exemplary diagram of a maze map provided by a second embodiment of the present invention;
FIG. 8b is an exemplary diagram of a maze map provided by a second embodiment of the invention;
FIG. 9a is an exemplary diagram of a maze map provided by a second embodiment of the present invention;
FIG. 9b is an exemplary diagram of a maze map provided by a second embodiment of the invention;
FIG. 9c is an exemplary diagram of a maze map provided by a second embodiment of the invention;
FIG. 10 is an exemplary diagram of another maze map provided by the second embodiment of the present invention;
fig. 11 is a schematic structural diagram of a data generating apparatus according to the third embodiment of the present invention;
fig. 12 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only a part of the structures related to the present invention, not all of the structures, are shown in the drawings, and furthermore, embodiments of the present invention and features of the embodiments may be combined with each other without conflict.
Example one
Fig. 1 is a flowchart of a data generation method provided in an embodiment of the present invention, where this embodiment is applicable to a game maze generation situation, and the method may be executed by a maze generation apparatus, and the apparatus may be implemented by hardware and/or software, and referring to fig. 1, the method provided in an embodiment of the present invention specifically includes the following steps:
and 110, acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point.
The preset map rule may be a preset rule for generating a maze, the preset map rule may be specified by a game service provider or may be specified by a game participant, for example, a game user may manually input the size of the maze to be generated. The size of the map may be a parameter for controlling the size of the generated maze map, and the size of the map may include the number of cells included in the maze map, and may be a length and width parameter of the maze map. The preset room number may be the number of preset rooms included in the maze map, the preset room may be a preset room module, the room module may be a component of the maze map, and the map starting point may be the entrance and exit position of the maze map, and may specifically be a mark parameter.
In the embodiment of the present invention, the preset map rule may be specified by a game facilitator and/or a game user, and the preset map rule may be obtained when the maze map is generated, where the preset map rule may at least include information such as a map size, a preset number of rooms, and a map starting point. For example, the game facilitator may provide an initial preset map rule, the preset map rule may include a map size, a preset number of rooms, a map starting point, and the like, the user may change the initial preset map rule, adjust specific parameter values of the map size, the preset number of rooms, the map starting point, and the like, and the terminal device may acquire the preset map rule for generating the maze map when loading the game.
And step 120, selecting at least one preset room according to preset map rules to add to the maze map.
The preset room may be a preset room module, the preset room may be a component element of a maze map, the preset room may have different sizes, for example, the preset room may be divided into a 4 × 4 room module, a 5 × 5 large room module, a 3 × 3 small room module, and the like, the preset room may be planned and set by a game facilitator or a game user in advance, the preset room may include one or more cells, and each cell may be marked with different business attributes, for example, a path, a wall, an entrance, and the like.
Specifically, in the process of generating the maze map, one or more preset rooms can be selected and added into the maze map according to the acquired preset map rules, and the preset rooms can be placed in the maze map randomly or according to the preset map rules.
And step 130, marking the maze map according to the service attribute information to generate game interaction information.
The service attribute information may be information related to a game service, the service attribute information may trigger an interaction process of the game, the service attribute information may include attribute information of a treasure box, a door, a monster, a trap, a fire, and other related game interaction services, the service attribute information may specifically be identification information, and the triggering of the corresponding game interaction may be implemented by marking different cells in the maze map with different identification information. The game interaction information can be a trigger effect of a game interaction service and can be pre-referred by a game service provider, and the game interaction information can be bound with the maze map to provide corresponding game interaction experience for a user.
In the embodiment of the invention, the maze map can be marked according to the service attribute information, and the corresponding game interaction information can be obtained according to the service attribute information marked in the game map, so that the game interaction of the maze map can be generated.
According to the method and the device, the preset map rule for generating the maze is obtained, the preset rooms are selected according to the preset map rule and added to the maze map, the service data information is marked for the maze map to serve as game interaction information, the calculation cost of map real-time generation is reduced through the preset rooms, the maze map is randomly generated according to the preset map rule, dynamic generation of the maze map is achieved, the maps which are logged by a user at each time are different, the use experience of the user can be enhanced, the random generation errors of the map are reduced based on the preset rooms, and the generation stability of the maze map can be improved.
Further, on the basis of the above embodiment of the invention, the preset room includes at least one of:
the room module consists of 5-by-5 unit cells and is divided into at least one group according to the connection mode of the included unit cells; the large room module comprises a room consisting of at least one 4 x 4 unit cell, and is marked with an entrance position and/or a map position; a cubicle module consisting of 3 by 3 cells.
In the embodiment of the present invention, the preset room may be divided into a room module, a large room module, and a small room module according to the size, wherein the room module may be composed of 5 × 5 cells, the types of cells connected in each room module for passing through are different, fig. 2a to 2b show 5 room modules with different connection modes, white cells may represent positions for communication, and black cells may represent positions for non-passing through.
Specifically, the large room module may be formed by a plurality of 5 × 5 cells, and the large room module may be provided with an entrance/exit position mark to ensure accessibility of the large room module in the maze map, and further, the large room module may manage and store the position of the large room module in the maze map, for example, the large room module is located in the center, the lower left corner, the lower right corner, the upper left corner, or the upper right corner of the maze map. Fig. 3 is an exemplary diagram of a large room module according to an embodiment of the present invention, and referring to fig. 3, the large room module may also be composed of 3 5 by 5 room modules, an exit may be preset to ensure that the large room module is an accessible module, and further, in order to further reduce the terminal computation overhead, service attribute information, such as a label for generating game interaction information, such as a monster, a campfire, a treasure box, a trap, and the like, may be preset in the large room module.
In the embodiment of the invention, in order to enhance the flexibility of the maze map, the preset room module can further comprise a small room module, the small room module can be composed of 3 × 3 cells, and the maze map can be filled up so as to reduce the error probability of the map and the generation probability of the inaccessible maze.
Example two
Fig. 4 is a flowchart of a data generating method according to a second embodiment of the present invention, which is embodied on the basis of the second embodiment of the present invention, and referring to fig. 4, the method according to the second embodiment of the present invention specifically includes the following steps:
step 210, a preset room is formed based on at least a preset number of cells.
The preset number may be a preset number parameter, and different preset numbers, such as 5 × 5 or 4 × 4, may be set for preset rooms of different sizes.
In the embodiment of the invention, the preset room with different sizes can be formed by using different preset numbers of cells, and the cells in the preset room can comprise passable cells and impassable cells.
Step 220, marking the accessible direction of each unit cell in the preset room.
The accessible direction may be a direction in which the cell can pass, and may represent a connection manner with other adjacent preset rooms, the accessible direction may be marked by using a number, and the numbers with different values may represent different accessible directions, fig. 5 is a diagram illustrating a marking example of a preset room provided in the second embodiment of the present invention, and referring to fig. 5, 1 may represent an upper direction, 2 may represent a right direction, 3 may represent a lower direction, and 4 may represent a left direction.
In the embodiment of the present invention, the communication state of the preset room may be marked as each included cell, so as to generate the communication state in the preset room, and it can be understood that, when the accessible state is marked, one cell may be marked as inaccessible, that is, the cell may be an inaccessible position such as a wall, and the like, and one cell may also be marked as partially accessible in directions, for example, when the marks 1 and 3 indicate that the cell is up or down, the cell may be reached, and further, the cell may be marked as fully accessible in directions, that is, up, down, left, and right directions.
Step 230, add game information indicia to the pre-set room.
The game information marks can be mark information of game interaction services and can represent game interaction which can be triggered by cells in the preset room, the game information marks can be character strings consisting of numbers, letters and special symbols, different character strings can represent different game information marks, it can be understood that part of the game information marks can be added in the process of generating the preset room, the other part of the game information marks can be added in the process of generating the maze map, and the randomness of the game is increased on the basis of ensuring the generation efficiency of the maze map.
Specifically, a corresponding game information mark may be stored for each cell in the preset room, where the game information mark may identify a type of the game interaction service trigger, and further, the game information mark may be added by associating and storing the game information mark with an identification number of the cell.
Further, on the basis of the above embodiment of the invention, the game information mark includes at least one of: obstacle marking, monster marking, treasure box marking, refresh point marking, and entrance and exit marking.
In the embodiment of the invention, the game information marks are divided into obstacle marks, monster marks, treasure box marks, refresh point marks and access marks according to the types of game interaction services, and each cell can be identified by one or more game information marks.
And 240, acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point.
Further, on the basis of the above embodiment of the present invention, the preset map rule includes at least one of:
presetting the appearance position of a room in a maze map; the number of preset rooms included within the maze map; and presetting a connection mode of rooms in the maze map.
In an embodiment of the invention, the preset map rules may include the position of the preset room in the maze map, for example, the large room module is set at a fixed position in the maze map and requires the large room module to have at least one entrance and exit connected with the edge. The preset map rules may also include a number of preset rooms, e.g., a large room module may only include one in a maze map, or a maximum number of room modules in a maze map, etc. The preset map rules may also include the connection of preset rooms within the maze map, for example, the accessible directions of the entrances and exits of adjacent preset rooms are opposite to each other.
And step 250, randomly selecting a room module, a large room module and a small room module according to the size of the maze map.
In the embodiment of the present invention, preset rooms that can be accommodated in a room module, a large room module, a small room module, and the like may be selected according to the size of the maze map, and the room module, the large room module, and the small room module may be simultaneously selected or may be selected as a part, for example, only the room module and the small room module may be selected without selecting the large room module.
And step 260, placing the large room module on the maze map according to the position of the map.
Specifically, the position of the map of the large room module may be obtained, the position of the map may be configured in advance or generated by random calculation, and the large room module may be added to an area corresponding to the position of the map in the maze map.
And 270, randomly selecting a room module and/or a small room module to be placed on the maze map by taking the entrance and the exit of the large room module as a starting point.
In the embodiment of the present invention, the entrance of the large room module may be used as a starting point, one room module or small room module may be randomly selected, and whether the entrance of the selected room module or small room module corresponds to the entrance of the large room module or not may be determined.
And step 280, reselecting the room module or the small room module which is not drawn from the entrance of the room module or the small room module as a starting point, and adding the room module or the small room module to the maze map until the selected room module, the large room module and the small room module are placed completely.
In the embodiment of the invention, after the preset room comprising the room module and the small room module is added to the maze map, the selected room module or the small room module can be continuously obtained and added to the maze map by taking the entrance and the exit of the newly added preset room as the starting point, the above process is repeatedly executed until the selected preset room is completely placed, and further, if the preset room which cannot be placed exists in the maze map, error reporting information corresponding to the preset room is generated to prompt a user that the preset room cannot be added to the maze map.
And 290, marking the maze map according to the service attribute information to generate game interaction information.
The embodiment of the invention forms a preset room by using a preset number of unit cells, marks the accessible direction of each unit cell in the preset room, adds a game information mark to the preset room, obtains a preset map rule, obtains the preset room according to the size of a maze map, the preset room comprises at least one of a room module, a large room module and a small room module, adds the large room module to the corresponding area of the maze map according to the position of the map, selects one or more room modules or small room modules to be added to the maze map by taking the entrance and exit of the large room module as a starting point, selects the preset room to be added to the maze map by taking the entrance and exit of the newly added room module or small room module as a new starting point, repeats the process until all the selected preset rooms are added to the maze map, adds service attribute information to the maze map to generate game interaction information, the dynamic generation of the maze map is realized, so that the maps of users logged in each time are different, the use experience of the users can be enhanced, the random generation error of the map is reduced based on the preset room, and the generation stability of the maze map can be improved.
Further, on the basis of the above embodiment of the present invention, the randomly selecting the room module and/or the small room module to be placed on the maze map by using the entrance and exit of the large room module as a starting point includes:
acquiring an accessible direction mark of an entrance and an exit of the large room module; acquiring the selected room module and the small room module according to the accessible marks, wherein the accessible direction marks of the entrances and exits of the room module and the small room module correspond to the accessible direction marks; and adding the acquired room module to the corresponding position of the maze map.
The accessible direction mark can be mark information reflecting the passing direction of the preset room, the accessible direction mark can be determined in the generation process of the preset room, and the accessible direction marks with different values can represent different accessible directions of different preset rooms.
In the implementation of the present invention, the accessible marks stored in the cells at the entrance and exit of the large room module may be obtained, and then the accessible marks stored in association with the cells at the entrance and exit of the preset room, such as the selected room module or the small room module, may be sequentially obtained, and if the accessible marks correspond to the accessible marks of the large room module, the correspondence may include the direction being just opposite. The preset room may be determined to be a room module to be added, and the room module may be added to an area corresponding to an entrance of a large room module in the maze map, so that the selected entrance of the small room module or the room module is connected to the entrance of the large room module. Fig. 6 is an exemplary view of a maze map according to a second embodiment of the present invention, and referring to fig. 6, the entrance of the large room module may be connected to the entrance of the room module.
In one exemplary embodiment, a data generation method may include the steps of:
(1) generating room modules, and manufacturing a batch of 5-by-5 room modules, wherein each module consists of 25 cells and is used for splicing and inserting a maze map, and each room module can comprise barrier cells and passage cells; each room module needs to mark the accessible direction above the edge cells, and each edge can be marked with a counterclockwise direction 1, 2, 3, 4 to represent up, right, down, left, etc. directions, respectively. Further, a fixed configuration requiring marking in a room module may be configured by a plan, e.g., a treasure box, a door, etc., the room module may be represented as a treasure room module or a trap room module, etc., and the business room module may be as shown in fig. 7a and 7b, showing a monster + treasure room module and a door plus treasure room module, respectively. In the embodiment of the invention, the room modules can be grouped, so that the room modules of a certain group do not exceed the upper limit when the maze is generated, for example, the sum of a monster room and a treasure box room does not exceed 3.
(2) A fixed position big room module, a fixed position small room module and the like are arranged. First, the large room module may consist of fixed size cells, with fixed monsters, treasure boxes, refreshment points in the large room module, and fixed entrances and exits of the large room module, in addition to room obstructions, fixed refreshment areas. The communication between the large room module and other outside room modules only judges whether the inlet is communicated with the outlets of the other room modules. The large room is regularly connected with several 4 x 4 rooms, and the entrance and exit are planned as preset points on several sides of a certain room. The large room module can be placed at a fixed position of the map, or can be randomly placed at a certain position of the maze map in a room combination mode. The random placement of large room modules ensures that at least one of all points in the portal is not connected to the edge. And ensures that only one large room module exists in the maze map. Secondly, appointing a fixed 4 x 4 small room module group, wherein at least n (n is not more than 2) small room modules are arranged in each small room module group, the small room modules can randomly appear in the maze map, and if the appearance positions of the small room modules are fixed, the number of the small room modules does not exceed two.
(3) The preset map rule is obtained, for example, the map is generated by combining 3 × 3 room modules as specified, and each room module can be the 4 × 4 small room module or the room module. Whether the map contains a preset large room module or not. Whether the room location occurs randomly or configures a fixed location. Fixed groups of cubicles and the number of room modules appear within the maze map. The number of rooms included in the maze map, for example, the maze map includes 9 cells, of which 6 cells are rooms, and the other cells are filled with walls.
(4) And generating a maze map route. Referring to fig. 8b, the maze map is 3 × 3 modules, each module is composed of large rooms (fixed room combination) + fixed 4 × 4 preset rooms + randomly selected 4 × 4 preset rooms (rotatable) combination of the above preset rooms. Presetting a placing rule of a large room: a combination of several stationary rooms can be configured manually. The combination may be: the large room combination is manually configured at a fixed position of the module, such as at a middle position of the module. If the fixed positions of the large rooms are not manually configured, a combined module meeting the combination requirement of the large rooms is randomly selected from the modules to place the large rooms. Referring to fig. 8a, if there is no need for a large room, a module is randomly selected from the map as a starting point. The lines between all modules are generated by using a route filling method from a large room. Wherein, the route filling method comprises the following steps: starting from the starting point of the large room (if the starting point of the large room is not configured, a module on a base map is randomly used as the starting point), drawing a module to other adjacent nodes in the grid at random, selecting a module from the drawn module group at random in the next step (comprising the starting point and the new random point which is just generated), selecting the adjacent un-drawn module to draw, and if the modules around the module are all drawn, reselecting other modules, and so on. Fig. 9a is an exemplary diagram of another maze map provided by a second embodiment of the present invention, referring to fig. 9a, a starting point process of a large room is calculated according to small rooms, for example, the large room is composed of 3 small rooms, outlets can be located at upper and lower sides of the large room, all starting points in each small room are regarded as having to lead out a route, it can be seen that the large room is composed of 3 small rooms, an outlet route must be led out from the left small room, an outlet route must be led out from the right small room, if the large room is randomly placed, it should be noticed that the outlet of the left small room and the outlet of the right small room cannot lean against a wall to prevent the outlets from being blocked, referring to fig. 9b, the outlet at the lower right of the large room is blocked, referring to fig. 9c, the outlet at the upper left of the large room is blocked. Fig. 10 is an exemplary diagram of another maze map provided by the second embodiment of the present invention, and referring to fig. 10, the generation of the maze map based on the above-mentioned data generation method may include the following steps:
in the first step, other fixed rooms are filled.
For example, in addition to the large room, a fixed room a is required, and whether each room can satisfy the needs of the fixed room is polled from the road. If the fixed room A can be rotated to meet the communication condition of the room 1, namely, the fixed room A can be connected with a large room, and can also be rotated to reach the conditions of 2 and 3. Then the fixed room combination is set to (rotation 1, room 1), (rotation 2, room 1), (rotation 3, room 1). . . . . (rotation 3, room 3), (rotation 4, room 3) are N in total, and random one of N is generated.
The next stationary room B works the same. Note: the condition for judging connection can be determined by a room edge land block alignment method, if the land blocks 1, 2 and 3 in the land block marks at the adjacent sides of the large room and the room 1 are connectable land blocks, any one of 2 land blocks corresponding to 4, 2, 3 and 3 in the edge land block 1 of the room 1 is a connectable land block, and the room is considered to be connectable.
In the second step, deducing other rooms from the known large room or starting point, if the large room and the fixed room are both determined, the fixed room is room 3, then it can be calculated from the edges of the large room and room 1 which alternative rooms can be filled as room 1 to guarantee to be random with the large room. And then calculate which alternative rooms can be filled as the room 2 from the edges of the large room and the fixed room, and ensure that the large room is communicated with the room 3.
And the rest can be analogized, and all rooms can be filled up.
If one side of a certain room needs to be connected with other rooms in a butt joint mode and the other side needs to be capable of being connected with other rooms in a butt joint mode when the certain room is filled, the other side can be considered to be capable of being connected with other rooms as long as one land block is communicated. Note that preset rooms may have an upper brushing limit, preset rooms may be grouped, and may be set on each level of the map, with the preset rooms in which group being brushed up to a few, to prevent monsters + treasure boxes from being overloaded.
Starting to generate data in the room, wherein the priority is as follows:
1. setting an entrance room, randomly selecting one room as the entrance room, and enabling the entrance point to be matched. If not, the match is not matched in a large room.
2. And setting an exit room, and selecting one room as the exit room. The exit point can match up. If not, the match is not matched in a large room.
3. And selecting one empty land block as an entrance land block in the entrance room, and if the oil lamp is set to be on, selecting another empty land block as an oil lamp module in the entrance module room. The oil lamp needs special settings: brushing in the entrance room. One air parcel is an oil lamp module. The oil lamp needs special settings: brushing in the entrance room.
4. And selecting an empty land block in the room of the outlet module as the outlet module.
5. The method comprises the following steps of selecting a plurality of random monster positions in all the empty blocks. The other is to refresh monsters from 0-2 random plots in each room. If there are monster related combinations already in the room, such as monster + treasure box, then refresh is not performed. The two random modes can be configured according to different maze requirements.
6. The treasure case refreshes, and treasure case global quantity is fixed, only one is brushed in every room, and the treasure case is randomly placed in several module rooms and random plots in the room. The treasure case refreshes has special needs: the random weight becomes larger if the room is close to the edge, (corner rooms are larger than edge rooms than center rooms).
7. Other event refreshes, such as magic monuments, traps, etc., globally limited number of items are the same as the first mode of monster refresh.
8. Doors, lockers, etc. require keys, or similar mechanisms require pairwise random generation.
9. The peculiar substance refreshing rule based on the demand statistics is divided into two types: 1 peculiar substance generation rule and 2 peculiar substance placement rule, wherein each peculiar substance needs to be configured independently.
EXAMPLE III
Fig. 11 is a schematic structural diagram of a data generating apparatus provided in the third embodiment of the present invention, and as shown in fig. 11, the data generating apparatus provided in the embodiment of the present invention may include: a rule acquisition module 301, a room adding module 302 and a service information module 303.
The rule obtaining module 301 is configured to obtain a preset map rule, where the preset map rule at least includes a map size, a preset number of rooms, and a map starting point.
And the room adding module 302 is used for selecting at least one preset room to be added to the maze map according to the preset map rule.
And the service information module 303 is configured to mark the maze map according to the service attribute information to generate game interaction information.
According to the embodiment of the invention, the preset map rule for generating the maze is obtained through the rule obtaining module, the room adding module selects a plurality of preset rooms to be added to the maze map according to the preset map rule, the service information module marks service data information for the maze map as game interaction information, the calculation overhead of map real-time generation is reduced through presetting the preset rooms, the maze map is randomly generated according to the preset map rule, the dynamic generation of the maze map is realized, the maps which are logged by a user at each time are different, the use experience of the user can be enhanced, the random generation error of the map is reduced based on the preset rooms, and the generation stability of the maze map can be improved.
Further, on the basis of the above embodiment of the invention, the apparatus further includes:
the room presetting module is used for forming a preset room based on at least a preset number of cells; marking the accessible direction of each cell in the preset room; and adding game information marks to the preset room.
Further, on the basis of the above embodiment of the invention, the game information mark in the device comprises at least one of the following: obstacle marking, monster marking, treasure box marking, refresh point marking, and entrance and exit marking.
Further, on the basis of the above embodiment of the invention, the preset room in the device includes at least one of the following: the room modules consist of 5-by-5 unit cells and are divided into at least one group according to the connection mode of the included unit cells; the large room module comprises a room consisting of at least one 4 x 4 unit cell, and is marked with an entrance position and/or a map position; a cubicle module consisting of 3 by 3 cells.
Further, on the basis of the above embodiment of the present invention, the preset map rule in the rule obtaining module 301 includes at least one of the following:
the appearance position of the preset room in the maze map; the number of the preset rooms included within the maze map; and the preset rooms in the maze map are connected in a mode.
Further, on the basis of the above embodiment of the invention, the room adding module 302 in the apparatus includes:
and the room acquisition unit is used for randomly selecting the room module, the large room module and the small room module according to the size of the maze map.
And the room adding unit is used for placing the large room module on the maze map according to the position of the map.
And the room initial unit is used for randomly selecting the room module and/or the small room module to be placed on the maze map by taking the entrance and the exit of the large room module as a starting point.
And the room connecting unit is used for reselecting the room module or the small room module which is not drawn to be added to the maze map by taking the entrance and the exit of the room module or the small room module as a starting point until the selected room module, the large room module and the small room module are placed completely.
Further, on the basis of the above embodiment of the invention, the room initialization unit is specifically configured to: acquiring an accessible direction mark of an entrance and an exit of the large room module; acquiring the selected room module and the selected small room module according to the accessible mark, wherein the accessible direction marks of the entrances and exits of the room module and the small room module correspond to the accessible direction marks; adding the acquired room module to a corresponding position of the maze map.
Example four
Fig. 12 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention. FIG. 12 illustrates a block diagram of a computer device 312 suitable for use in implementing embodiments of the present invention. The computer device 312 shown in FIG. 12 is only an example and should not bring any limitations to the functionality or scope of use of embodiments of the present invention. The device 312 is a computing device for update functionality of a typical intelligent robot map.
As shown in FIG. 12, computer device 312 is in the form of a general purpose computing device. The components of computer device 312 may include, but are not limited to: one or more processors 316, a storage device 328, and a bus 318 that couples the various system components including the storage device 328 and the processors 316.
Bus 318 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Computer device 312 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 312 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 328 may include computer system readable media in the form of volatile Memory, such as Random Access Memory (RAM) 330 and/or cache Memory 332. The computer device 312 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, the storage system 334 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 12, and commonly referred to as a "hard drive"). Although not shown in FIG. 12, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 318 by one or more data media interfaces. Storage 328 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
Program 336 having a set (at least one) of program modules 326 may be stored, for example, in storage 328, such program modules 326 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which may comprise an implementation of a network environment, or some combination thereof. Program modules 326 generally carry out the functions and/or methodologies of embodiments of the invention as described herein.
The computer device 312 may also communicate with one or more external devices 314 (e.g., keyboard, pointing device, camera, display 324, etc.), with one or more devices that enable a user to interact with the computer device 312, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 312 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 322. Also, computer device 312 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), etc.) and/or a public Network, such as the internet, via Network adapter 320. As shown, network adapter 320 communicates with the other modules of computer device 312 via bus 318. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 312, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape drives, and data backup storage systems, to name a few.
The processor 316 executes various functional applications and data processing by executing programs stored in the storage 328, for example, to implement the data generation method provided by the above-described embodiment of the present invention.
EXAMPLE five
Embodiments of the present invention provide a computer-readable storage medium on which a computer program is stored, the program, when executed by a processing apparatus, implementing a data generation method as in the embodiments of the present invention. The computer readable medium of the present invention described above may be a computer readable signal medium or a computer readable storage medium 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 comprise a propagated data signal with computer readable program code embodied therein, either 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: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point; selecting at least one preset room to be added to the maze map according to the preset map rule; and marking the maze map according to the service attribute information to generate game interaction information.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
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 and/or flowchart illustration, and combinations of blocks in the block diagrams and/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 hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of data generation, the method comprising:
acquiring a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point;
selecting at least one preset room to be added to the maze map according to the preset map rule;
and marking the maze map according to the service attribute information to generate game interaction information.
2. The method of claim 1, wherein the generating of the preset room comprises:
forming a preset room based on at least a preset number of the cells;
marking the accessible direction of each cell in the preset room;
and adding game information marks to the preset room.
3. The method of claim 2, wherein the game information indicia comprises at least one of: obstacle marking, monster marking, treasure box marking, refresh point marking, and entrance and exit marking.
4. The method of claim 1, wherein the pre-set room comprises at least one of:
the room modules consist of 5-by-5 unit cells and are divided into at least one group according to the connection mode of the included unit cells;
the large room module comprises a room consisting of at least one 4 x 4 unit cell, and is marked with an entrance position and/or a map position;
a cubicle module consisting of 3 by 3 cells.
5. The method of claim 1, wherein the preset map rules comprise at least one of:
the appearance position of the preset room in the maze map;
the number of the preset rooms included within the maze map;
and the preset rooms in the maze map are connected in a mode.
6. The method of claim 4, wherein the selecting at least one preset room to add to a maze map according to the preset map rules comprises:
randomly selecting the room module, the large room module and the small room module according to the size of the maze map;
placing the large room module on the maze map according to the position of the map;
randomly selecting the room module and/or the small room module to be placed on the maze map by taking the entrance and the exit of the large room module as a starting point;
and reselecting the room module or the small room module which is not drawn from the entrance of the room module or the small room module as a starting point, and adding the room module or the small room module to the maze map until the selected room module, the large room module and the small room module are placed completely.
7. The method according to claim 6, wherein the randomly selecting the room module and/or the small room module to be placed on the maze map by taking the entrance and the exit of the large room module as a starting point comprises:
acquiring an accessible direction mark of an entrance and an exit of the large room module;
acquiring the selected room module and the selected small room module according to the accessible mark, wherein the accessible direction marks of the entrances and exits of the room module and the small room module correspond to the accessible direction marks;
adding the acquired room module to a corresponding position of the maze map.
8. An apparatus for generating data, the apparatus comprising:
the rule obtaining module is used for obtaining a preset map rule, wherein the preset map rule at least comprises a map size, a preset room number and a map starting point;
the room adding module is used for selecting at least one preset room to be added to the maze map according to the preset map rule;
and the service information module is used for marking the maze map according to the service attribute information to generate game interaction information.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data generation method as claimed in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the data generation method of any one of claims 1 to 7.
CN202110890017.9A 2021-08-04 2021-08-04 Data generation method, device, computer equipment and storage medium Active CN113633980B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110890017.9A CN113633980B (en) 2021-08-04 2021-08-04 Data generation method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110890017.9A CN113633980B (en) 2021-08-04 2021-08-04 Data generation method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113633980A true CN113633980A (en) 2021-11-12
CN113633980B CN113633980B (en) 2023-12-05

Family

ID=78419574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110890017.9A Active CN113633980B (en) 2021-08-04 2021-08-04 Data generation method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113633980B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060115775A (en) * 2005-05-06 2006-11-10 삼성전자주식회사 Method and apparatus for generating crossword game automatically
CN107050860A (en) * 2017-04-24 2017-08-18 网易(杭州)网络有限公司 Method, device, storage medium and the processor of map generation
CN108108410A (en) * 2017-12-12 2018-06-01 苏州蜗牛数字科技股份有限公司 A kind of online game labyrinth ground drawing generating method
CN111437603A (en) * 2020-03-30 2020-07-24 北京赤金智娱科技有限公司 Method and system for generating map of electronic game
CN112057870A (en) * 2020-09-18 2020-12-11 成都完美天智游科技有限公司 Game level generation method and device, storage medium and computer equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060115775A (en) * 2005-05-06 2006-11-10 삼성전자주식회사 Method and apparatus for generating crossword game automatically
CN107050860A (en) * 2017-04-24 2017-08-18 网易(杭州)网络有限公司 Method, device, storage medium and the processor of map generation
CN108108410A (en) * 2017-12-12 2018-06-01 苏州蜗牛数字科技股份有限公司 A kind of online game labyrinth ground drawing generating method
CN111437603A (en) * 2020-03-30 2020-07-24 北京赤金智娱科技有限公司 Method and system for generating map of electronic game
CN112057870A (en) * 2020-09-18 2020-12-11 成都完美天智游科技有限公司 Game level generation method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN113633980B (en) 2023-12-05

Similar Documents

Publication Publication Date Title
Johnson The NP-completeness column: An ongoing gulde
CN109478184B (en) Identifying, processing, and displaying clusters of data points
Batta et al. Locating facilities on the Manhattan metric with arbitrarily shaped barriers and convex forbidden regions
de Berg et al. Delaunay triangulations: height interpolation
US7024419B1 (en) Network visualization tool utilizing iterative rearrangement of nodes on a grid lattice using gradient method
Dhamala et al. Earliest arrival contraflow problem on series-parallel graphs
CN105241446B (en) A kind of indoor navigation route generation method and user terminal
US10949600B2 (en) Semiconductor package floating metal checks
CN110478898B (en) Configuration method and device of virtual scene in game, storage medium and electronic equipment
US10360263B2 (en) Parallel edge scan for single-source earliest-arrival in temporal graphs
CN109214674A (en) Customer service system management method, customer service system and electronic equipment
Mitzenmacher Some open questions related to cuckoo hashing
Abramsky Contextuality: At the Borders
Bast et al. Metro maps on octilinear grid graphs
CN113633980A (en) Data generation method and device, computer equipment and storage medium
US8429182B2 (en) Populating a task directed community in a complex heterogeneous environment based on non-linear attributes of a paradigmatic cohort member
Denny Solving geometric optimization problems using graphics hardware
US20130007089A1 (en) Distributing points of interest
Carmignani et al. Visualization of the high level structure of the internet with hermes.
Wang Shortest paths and multicommodity network flows
KR100746000B1 (en) Method and apparatus for generating crossword game automatically
Lu et al. Game approach to vulnerability analysis of evacuation highway networks
Wang et al. Landmark-based qualitative reference system
Bhanu et al. Butterfly-Fat-Tree topology based fault-tolerant Network-on-Chip design using particle swarm optimisation
Mantoro et al. Multi-user navigation: A 3D mobile device interactive support

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