[Mod] Hedge Maze [1.2] [maze]

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

[Mod] Hedge Maze [1.2] [maze]

by thefamilygrog66 » Sat Sep 14, 2013 20:06

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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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/archive/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

by Mossmanikin » Sat Sep 14, 2013 20:20

Very cool!

Noob 4 life!
My stuff
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Sat Sep 14, 2013 20:24

With a downloadlink it would be even cooler.
 

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

by Inocudom » Sat Sep 14, 2013 22:13

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

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

by mauvebic » Sat Sep 14, 2013 23:41

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?
"Fuck the hat." - Paulie Gualtieri
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sun Sep 15, 2013 01:28

^ 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.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Sun Sep 15, 2013 02:07

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

by Josh » Sun Sep 15, 2013 02:58

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

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sun Sep 15, 2013 03:36

Wow PEEK and POKE, i started progamming in BASIC in 1982 on a Sinclair ZX Spectrum 48K.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Sun Sep 15, 2013 04:11

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!
 

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

by ch98 » Sun Sep 15, 2013 04:17

maybe few different sized ones too.
Mudslide mod Click Here
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Sun Sep 15, 2013 04:31

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.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

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

by LionsDen » Sun Sep 15, 2013 06:06

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

I remember those days. :)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Sep 15, 2013 15:50

Very nice.
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sun Sep 15, 2013 17:21

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: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Mon Sep 16, 2013 14:48

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: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Mon Sep 16, 2013 17:05

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: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Tue Sep 17, 2013 19:18

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

by Element » Wed Sep 18, 2013 01:03

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

My Server Is 1.7.9
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

by paramat » Wed Sep 18, 2013 04:33

Hell maze looks good you could have lava under glass as a floor to make it walkable.
I rely on donations to help provide an income https://forum.minetest.net/viewtopic.php?f=3&t=14935
 

User avatar
thefamilygrog66
Member
 
Posts: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Sat Sep 21, 2013 03:38

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

by Bas080 » Sat Sep 21, 2013 08:36

Another maze mod:
https://forum.minetest.net/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: 169
Joined: Mon Jul 09, 2012 19:08

by thefamilygrog66 » Sat Sep 21, 2013 14:37

Bas080 wrote:Another maze mod:
https://forum.minetest.net/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.
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 13 guests

cron