[Mod] Hedge Maze [1.2] [maze]

Post Reply
User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

[Mod] Hedge Maze [1.2] [maze]

by thefamilygrog66 » Post

Description:
Here's a mod that is based on an old BASIC script that I used to play around with back in the early 1980s(!).

The player crafts a Maze Generating Block, which when right-clicked, opens an interactive form that allows the player to select wall and floor materials, as well as the width of the maze (odd numbers less than 93). Then the player left-clicks the Maze Generating Block and it randomly generates a 3-block high, hedge maze, complete with a start and finish.

Recipe:

Code: Select all

Maze Generating Block

    +---------------+---------------+---------------+
    |     cactus    |     cactus    |     cactus    |
    +---------------+---------------+---------------+
    |     cactus    |               |     cactus    |
    +---------------+---------------+---------------+
    |  desert stone |  desert stone |  desert stone |
    +---------------+---------------+---------------+
Mod dependencies: default, wool

License:
Sourcecode: WTFPL
Graphics: WTFPL

Thanks to mauvebic for showing me how to replace goto statements with recursive functions, to make the mod work on linux servers as well.

Download:
https://github.com/thefamilygrog66/maze ... master.zip

Browse code on GitHub:
https://github.com/thefamilygrog66/maze

Screenshots:
Image
Maze Generating Block placed on the ground

Image
Menu to change settings, with defaults shown

Image
An aerial view of the default generated hedge maze (39x39 wool:dark_green walls and default:desert_stone floor)

Image
A treetop maze with default:leaves walls and default:tree floor

Image
Walls of default:ice with default:dirt_with_snow floor

Image
Hell maze, with default:obsidian walls and default:lava_source floor!

Image
The original BASIC program (for Commodore 64)
Last edited by thefamilygrog66 on Sat Sep 21, 2013 03:52, edited 1 time in total.

User avatar
Mossmanikin
Member
Posts: 599
Joined: Sun May 19, 2013 16:26
Location: where we don't speak english.

by Mossmanikin » Post

Very cool!

Noob 4 life!
My stuff

User avatar
Casimir
Member
Posts: 1207
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

by Casimir » Post

With a downloadlink it would be even cooler.

User avatar
Inocudom
Member
Posts: 3121
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Post

It would be more interesting if these randomly generated in deserts.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Inocudom wrote:It would be more interesting if these randomly generated in deserts.
Possibly could use a different material depending on the biome: ice in snow biome, leaves in grassland, and cactus in desert?

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

by paramat » Post

^ Nice idea, could put default:tree in the ground to stop leaf decay, would be enough for 3 nodes height.
Good mod, ideal for naughty games in mansion gardens etc.
Last edited by paramat on Sun Sep 15, 2013 01:29, edited 1 time in total.

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

Cool ideas guys, thanks. I'll try to incorporate a few of them in future versions.

I've finished working on it for now, and have uploaded it to GitHub - check out the first post for links!

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Nice.
This could be added to a mansion, by a tennis court or swimming pool ingame.

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

by paramat » Post

Wow PEEK and POKE, i started progamming in BASIC in 1982 on a Sinclair ZX Spectrum 48K.

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

paramat wrote:Wow PEEK and POKE, i started progamming in BASIC in 1982 on a Sinclair ZX Spectrum 48K.
Cool! I started at school in 1981 on a Commodore PET, and my first home computer was also a Sinclair - the Timex Sinclair 1000 (http://en.wikipedia.org/wiki/Timex_Sinclair_1000), before getting a Commodore 64. Good times!

ch98
Member
Posts: 463
Joined: Wed Jan 02, 2013 06:14

by ch98 » Post

maybe few different sized ones too.
I have stopped playing minetest, and may not come back to it again. I would like to thank everyone that made the amazing time I had playing it. This account is not in use anymore, and the email has been linked to a unused account. If any administrator reading this has time, feel free to delete my account. Thank you very much for the great experience.

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

by paramat » Post

Ah i didn't know you had a version of the ZX81 over there. Looks like you got a modified ZX Spectrum as a Timex Sinclair 2068. Unsurprisingly one of my favourite games was Jet Set Willy (platform game kids).
Last edited by paramat on Sun Sep 15, 2013 04:32, edited 1 time in total.

User avatar
LionsDen
Member
Posts: 530
Joined: Thu Jun 06, 2013 03:19

by LionsDen » Post

Wow, I'm not the only old fart on this forum. ;^P

I remember those days. :)

User avatar
rubenwardy
Moderator
Posts: 6977
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

Very nice.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

Does this have a pathfinding code to ensure that mazes are solvable?
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

Thanks for the comments - I'll have a new version on GitHub a bit later today, which will allow players to specify wall and floor materials, as well as maze size.
hoodedice wrote:Does this have a pathfinding code to ensure that mazes are solvable?
As long as the maze is an odd number of nodes wide - a rule that is enforced when the size is selected - the generating algorithm ensures that each corner is open, so there will always be a path from start to end.

User avatar
hoodedice
Member
Posts: 1374
Joined: Sat Jul 06, 2013 06:33
GitHub: hoodedice
IRC: hoodedice
In-game: hoodedice
Location: world
Contact:

by hoodedice » Post

hoodedice wrote:Does this have a pathfinding code to ensure that mazes are solvable?
As long as the maze is an odd number of nodes wide - a rule that is enforced when the size is selected - the generating algorithm ensures that each corner is open, so there will always be a path from start to end.
Sweet.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

I've just made a fairly major update: now the mod includes an interface menu in which the player can choose materials for the walls and floor, as well as the width of the maze (odd numbers, less than 100 blocks).

Enjoy!

User avatar
Element
Member
Posts: 269
Joined: Tue Jun 11, 2013 00:27
IRC: Elementwing4962
In-game: Elementwing4962
Location: New York
Contact:

by Element » Post

nice
Join Me And My Team - thornfyregaming-mc.noip.me:25565

My Server Is 1.7.9

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

by paramat » Post

Hell maze looks good you could have lava under glass as a floor to make it walkable.

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

Just uploaded a new version which replaces the goto statements with recursive functions (thanks mauvebic!), so that the mod will also work on linux servers.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

Another maze mod:
viewtopic.php?id=2814
This one has closing doors, torches and chests with items.

It's nice to see that it can be done differently.

User avatar
thefamilygrog66
Member
Posts: 170
Joined: Mon Jul 09, 2012 19:08
Location: Ontario, Canada

by thefamilygrog66 » Post

Bas080 wrote:Another maze mod:
viewtopic.php?id=2814
This one has closing doors, torches and chests with items.

It's nice to see that it can be done differently.
Yeah, for sure - I saw that mod after I'd made my first version. Looks like it uses a different algorithm to generate the maze, but still very cool.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests