[Mod] Incredible Maze Generator [incrediblemaze]

Post Reply
User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

[Mod] Incredible Maze Generator [incrediblemaze]

by orwell » Post

This mod is a maze generator
I started this to implement a maze generation algorithm that I use when I draw mazes on paper. The result is not exactly this algorithm since computers are apparently too dumb for it, but it's worth to be shared anyway.

Things you need to know about the mazes:
- Start at one corner and find your way to the opposite corner
- There is exactly one way
- Big mazes will drive you crazy
- Mazes do not have a floor or a top cover by default, add this using WorldEdit if you want.

Generating a maze:
- Use WorldEdit to define 2 opposing corners. The maze is spawned between them and all walls are as high as the height difference between the two positions.
- Execute this chatcommand:

Code: Select all

/maze <any random number as seed>
Note: the maze always has odd dimensions, if the x/z distance between pos1 and pos2 is even, the dimension is just rounded down.

Changing maze materials:
- On top of init.lua, you find some content id assignments. Change the node names in there.
- Alternatively, you can just replace the generated nodes with the WorldEdit //replace command.

Dependencies:
default
worldedit

Download:
https://content.minetest.net/packages/o ... diblemaze/

License: LGPLv2.1
Last edited by orwell on Thu Mar 25, 2021 08:23, edited 2 times in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by azekill_DIABLO » Post

has it an esape?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by orwell » Post

It does not generate entry and exit by itself, just create it at the corners
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by azekill_DIABLO » Post

hah. still cool for mapmakers!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by paramat » Post

If it's this incredible i would like to see a screenshot.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by azekill_DIABLO » Post

too much incredibility to post on forums IMHO.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by ErrorNull » Post

I'M BLIND! Oh wait.... no, there's in fact no screenshot.

User avatar
SaKeL
Member
Posts: 743
Joined: Tue Apr 14, 2015 18:39
GitHub: JurajVajda
IRC: SaKeL
In-game: SaKeL

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by SaKeL » Post

Looks nice thanks.

21x21
Image

43x43
Image
Attachments
screenshot_20170731_194747-min.jpg
screenshot_20170731_194747-min.jpg (532.56 KiB) Viewed 1700 times
screenshot_20170731_194356-min.jpg
screenshot_20170731_194356-min.jpg (447.58 KiB) Viewed 1700 times

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by Codesound » Post

+1

Thanks a lot!!

R

MT_Dad
Member
Posts: 10
Joined: Sun Oct 25, 2020 14:10

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by MT_Dad » Post

Good afternoon,

I ran into a little problem when using your nice maze generator. I tried to change the nodes for walls, pillars etc. and found that I was not able to use "ethereal:bush" for the walls. It always used some sort of cobble instead. I figured out that some mods (like ethereal in my case) may not have been loaded at the time, when init.lua is executed and "minetest.get_content_id()" will fail (or return the id for cobble, respectively).

So I changed the code of init.lua by changing the values in the config part into strings, which then get translated into ids by the newly inserted function set_nodes() when run_cmd is invoked and all mods are loaded.

I will attached the altered version of init.lua. You may want to check (I am a lua newbie ;) ) and incorporate the changes into your mod.

Best regards
Attachments
init.lua.zip
(2.12 KiB) Downloaded 68 times

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by orwell » Post

MT_Dad wrote:
Sun Mar 21, 2021 14:18
Good afternoon...
Thank you for your contribution. I added your changes and made a new release.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Hybrid Dog
Member
Posts: 2828
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by Hybrid Dog » Post

For your interest, here's another maze mod: https://github.com/HybridDog/maze
It was originally written by Echo: viewtopic.php?f=11&t=2814

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

wsor4035
Member
Posts: 182
Joined: Sun Aug 11, 2019 21:23
GitHub: wsor4035
IRC: wsor
In-game: wsor

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by wsor4035 » Post

Hello, I have patched this mod so that it works, as well as added in a worldedit command that takes three optional arguements to generate a maze, as well as making the mod game agnostic(removing non declared dependency on default, etheral). my changes can be found at https://github.com/wsor4035/worldedit_maze
j5uBLfc6NxgersvVj5D5dIsiKDkoQb0o

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by j0j0n4th4n » Post

Is it possible to make a maze with the exit at the center or other node on an boundary wall?
cdb_894a100ddd76

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 19 guests