your current location:首页 > news>[Advanced] Generate a maze [REC] Recurren Complex (Recurrent Complex) Minecraft Game

[Advanced] Generate a maze [REC] Recurren Complex (Recurrent Complex) Minecraft Game

2024-12-10 17:55:47|Myriagame |source:minecraft skins

In addition to some basic generation, the module also provides a way to generate a maze.

The generation logic of the maze can be abstracted as: planning a three -dimensional matrix, each element (room) in the matrix has the same length, width, and height, and define which side can be connected to other elements (the walls of the room and entrance), and these elements are connected to the tone matrixTwo points in.

You can also be understood as two machines with pipelines.

Please make sure you are familiar with this tutorial.

The tutorial is planned for the maze: a plane maze with a length and width of 15 rooms, and each room is 3 blocks and a height of 1 block.

In order to avoid the trouble of determining the direction, the graphic of the tutorial is unified above the direction of the north, and press F3 to determine the face facing the direction.

To build a maze component, the basic components required are straight roads, Sancha Road, corner, cross -road, and dead road.The red part is abstract here as a wall.(These parts can be rotated in this tutorial. If you do not want to rotate the parts, you need to set up every direction that may be connected)

To build a maze -based board, although a script can be generated by a maze, it is still recommended to build a structure to cover the maze.

Place a script square in the northwest corner, click to open right, click green, and switch to "generate maze".

Mystery ID: You can fill in it at will, and the maze ID in the room component later needs to be consistent with this.

Shift: The overall structure of the maze compared to the shift of the script block.

Editor next to the maze ID: Define the size of the room unit.

Maze: The default connector: The wall of the room wall is not recommended to change in order to maintain unity.

Room: Define the size of the maze matrix.If the maze matrix is ​​15 and height in this tutorial, it is counted from 0 here.

Changing "increase" to "cutting" can define where it is not involved in generation, such as letting a labyrinth central in this case.

Click "Visualization" to view the space for the maze to generate participation.

Exit: Define the connection point of the maze matrix. In this example, the middle point of the four sides needs to be connected to the center.

The default connector is PATH, you can also define other names to achieve special connections such as door -to -door. Only when the names of the two connectors are the same.The three values ​​represent the location where the matrix is ​​located.If the center is defined at the center of the matrix, the north is the PATH connection point.

Rules: Define which two exit connections are defined here, or you can directly define the exit of all definitions.

Save, use the block selection tool to save the structure without additional special settings.

Mystery components: One of the components built at the beginning of the tutorial, the preservation interface is as follows:

Enter generation, select "maze accessories", and enter the editor.

Generate ID: Fill in freely.

Mystery ID: Line ID defined in the script block.

Weight: The probability of this part is used in the maze.

Default connector: It is not recommended to change the unity.

Room: If your parts want to be larger than the size of the definition, you can increase the value defined here, and you can only amplify the proportion.Using "increase" and "cutting" can also be used for alien rooms.

Exit: Define the connector of each surface. Here is the definition of a straight -line room (North and South Unicom), which will make corresponding changes with the rotation of the room.

save.The remaining rooms define and save in the same way, pay attention to the connection of each side.

After all parts are saved, it is performed/#RELOAD, and then it can generate a maze structure/#GEN.


Postscript: During the previous use, it was found that the maze production structure was too simple (there was only one line connection at the two exits, almost no fork roads), and no similar problems were found when testing.If you encounter similar problems, you can define several exports in the matrix, or you can choose to delete one of the components so that the maze generates integrity test and try to fill the entire matrix.