[Mod] Incredible Maze Generator [incrediblemaze]

Post Reply
User avatar
orwell
Member
Posts: 882
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: 7502
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?

User avatar
orwell
Member
Posts: 882
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: 7502
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!

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: 7502
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.

User avatar
ErrorNull
Member
Posts: 222
Joined: Thu Mar 03, 2016 00:43

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by ErrorNull » Post

I'M BLIND! Oh wait.... no, there's in fact no screenshot.
My Villagers Mod: [villagers]

User avatar
SaKeL
Member
Posts: 660
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
(532.56 KiB) Not downloaded yet
screenshot_20170731_194356-min.jpg
(447.58 KiB) Not downloaded yet

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

Re: [Mod] Incredible Maze Generator [incrediblemaze]

by Codesound » Post

+1

Thanks a lot!!

R

MT_Dad
New member
Posts: 8
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 4 times

User avatar
orwell
Member
Posts: 882
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...

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests