Prim's Labyrinth

479 views
Skip to first unread message

Jere Majava

unread,
Jan 23, 2015, 8:36:43 AM1/23/15
to puzzle...@googlegroups.com
I've been playing around with procedural level generation lately. Here's a simple labyrith based on Randomized Prim's algorithm, might use it on an actual game at some point.

jonjonpuz...@gmail.com

unread,
Jan 23, 2015, 4:49:14 PM1/23/15
to puzzle...@googlegroups.com
Good job; it worked for me, and I got to the end.

If there was a progressive difficulty, I may have played several rounds.

I'm glad the footprints were there so that it wasn't too hard.

Ivan Koswara

unread,
Jan 24, 2015, 12:58:28 PM1/24/15
to puzzle...@googlegroups.com
First, because I'm pedantic, it should be a maze instead of a labyrinth.

More importantly, randomized Prim's shouldn't give any cycle. At the moment I just found a cycle generated, so there might be something wrong.

Jere Majava

unread,
Jan 25, 2015, 7:51:43 AM1/25/15
to puzzle...@googlegroups.com
There's actually a rule that creates one shortcut in each labyr.. I mean maze, the algorithm should be solid. I'm now planning to use this as a base for a classic rogulike dungeon generator, carving out rooms and setting up doors here and there.

Ivan Koswara

unread,
Jan 25, 2015, 10:24:34 AM1/25/15
to puzzle...@googlegroups.com
Whoops, I didn't notice that.

Interestingly, in the first playthrough, I think I couldn't find the exit, but when I removed the zoom in I could always find the way to the exit. Probably me just failing a maze.

Jere Majava

unread,
Jan 26, 2015, 8:56:15 AM1/26/15
to puzzle...@googlegroups.com
New version with rooms and doors. The rooms will make a lot of more loops and shortcuts, on the othe hand the doors will block your view.

Jere Majava

unread,
Jan 27, 2015, 6:52:50 AM1/27/15
to puzzle...@googlegroups.com
Line of sight implemented, it's now really easy to get lost. :)

jonjonpuz...@gmail.com

unread,
Jan 27, 2015, 1:59:29 PM1/27/15
to puzzle...@googlegroups.com
Good stuff; I made it out.

It would be awesome if it was all Castle Wolfenstein'd up with monsters, chests, and maybe some of the monsters have maps that give some type of permanent visibility to a part of the map, etc. Just my thoughts.

Anna Anthropy

unread,
Jan 27, 2015, 2:58:25 PM1/27/15
to puzzle...@googlegroups.com

i find this really soothing for some reason

Connorses _

unread,
Jan 28, 2015, 12:49:45 AM1/28/15
to puzzle...@googlegroups.com
I wanna make a Puzzlescript that looks this good :P

Alan Hazelden

unread,
Jan 28, 2015, 6:43:31 AM1/28/15
to Connor McHarney, puzzle...@googlegroups.com

Yeah, this is a fantastic rendering style, looking forward to what it turns into!

--
You received this message because you are subscribed to the Google Groups "PuzzleScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puzzlescript...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jere Majava

unread,
Jan 28, 2015, 6:46:49 AM1/28/15
to puzzle...@googlegroups.com, jonjonpuz...@gmail.com
Working on something exactly like that. :)

Connorses _

unread,
Jan 28, 2015, 4:30:30 PM1/28/15
to puzzle...@googlegroups.com
I looked up Prim's algorithm and it was really simple so I made my own version.
Couldn't quite figure out how you made rooms, though. (This was without looking at your code. I think I'll go look now)
http://www.puzzlescript.net/play.html?p=b4329cac6528471848d3


On Friday, January 23, 2015 at 6:36:43 AM UTC-7, Jere Majava wrote:

Jere Majava

unread,
Feb 1, 2015, 7:30:02 AM2/1/15
to puzzle...@googlegroups.com
I tried to strip down the maze algorithm to bare minimum and this is what I got:

One rule inside a loop. :)

startloop
random [ maze | wall | wall ] -> [ maze | | maze ]
endloop

Rob Glazebrook

unread,
Feb 5, 2015, 11:57:44 AM2/5/15
to puzzle...@googlegroups.com
That's amazing, Jere. A single line. Brilliant.

Rob Glazebrook

unread,
Feb 5, 2015, 2:54:53 PM2/5/15
to puzzle...@googlegroups.com
You inspired me to write a depth-first maze algorithm: http://www.puzzlescript.net/play.html?p=6d8704482fe9f1f0db74

I can't come up with an 'instant' version without needing a nested loop, so my workaround is to use 'again' and set the 'again_interval' to a ridiculously low number so that the maze builds quickly. I've made my markers visible for insight into how the script works, but the magic all happens here:

startloop
random [mazemaker | wall | wall] -> [maze visited | maze | maze mazemaker] 
endloop
random [mazemaker | no wall | visited] -> [maze | no wall | mazemaker] again

Let me know if anyone has an idea on how to do this without requiring 'again'!

Jere Majava

unread,
Feb 21, 2015, 6:25:35 PM2/21/15
to puzzle...@googlegroups.com
Ok, this is a finished game now: http://realtimeinterval.tumblr.com/prim

Rob Glazebrook

unread,
Feb 22, 2015, 12:25:55 PM2/22/15
to puzzle...@googlegroups.com

Success! Took many tries. :)

Nigel Scott

unread,
Feb 23, 2015, 4:37:34 AM2/23/15
to puzzle...@googlegroups.com


On Saturday, 21 February 2015 23:25:35 UTC, Jere Majava wrote:
Ok, this is a finished game now: http://realtimeinterval.tumblr.com/prim

The link on your page seems to be broken... 8-( 

Jere Majava

unread,
Feb 23, 2015, 8:36:05 AM2/23/15
to puzzle...@googlegroups.com
Sorry, fixed!

Jere Majava

unread,
Feb 26, 2015, 2:08:36 PM2/26/15
to puzzle...@googlegroups.com
Procrastinating drafting harder roguelike mechanics for 7 day roguelike challenge I made another procedural dungeon algorithm: http://www.puzzlescript.net/editor.html?hack=e89a269a4bd2fbac4289

This one is sort of drunken version of of the Randomized Prim's algorithm, where instead of neat ordered intersections there are different sized rooms and the maze can expand from any wall in the room. Thus the rooms don't align  so and sometimes break into existing rooms. The result is a mix of "built" rooms and messier "natural" caves.

Anna Anthropy

unread,
Feb 26, 2015, 6:10:37 PM2/26/15
to puzzle...@googlegroups.com

i like the cat but not the skeletons :(

i get that you've been interested in taking this in a dungeon hacky sort of direction but i found the original version calming and kind of meditative and getting murdered by skeletons makes it a little bit less so. though the selective attention of the skeletons, the ability to close doors on them and try and find ways to sneak around them is pretty interesting.

Jere Majava

unread,
Feb 27, 2015, 2:25:52 AM2/27/15
to puzzle...@googlegroups.com
Actually, I think I agree with you. It did change the game quite drastically. I'm in the process of making a more classic roguelike based on this, should've saved the monsters for that.

You know what, I'll make another version without skeletons. I'll leave the slime and skulls just for fun.

Jere Majava

unread,
Feb 27, 2015, 2:59:20 AM2/27/15
to puzzle...@googlegroups.com
Ok, there are now two versions, one without and one with skeletons:


On Friday, February 27, 2015 at 1:10:37 AM UTC+2, Anna Anthropy wrote:

Anna Anthropy

unread,
Feb 27, 2015, 3:37:11 PM2/27/15
to puzzle...@googlegroups.com

you're fantastic!
Message has been deleted

Stephen Lavelle

unread,
Mar 13, 2015, 3:50:56 PM3/13/15
to Jeremy Adinolfi, puzzle...@googlegroups.com
zoomscreen  ( search for the term here - http://www.puzzlescript.net/Documentation/prelude.html )

On Fri, Mar 13, 2015 at 5:52 PM, Jeremy Adinolfi <jeris...@gmail.com> wrote:
how did you make the camera stay on the player?
can it go out any farther?
I'd like to use it in my game.

On Friday, January 23, 2015 at 8:36:43 AM UTC-5, Jere Majava wrote:
I've been playing around with procedural level generation lately. Here's a simple labyrith based on Randomized Prim's algorithm, might use it on an actual game at some point.

--

Zeigfreid Okugawa

unread,
Mar 14, 2015, 8:45:56 PM3/14/15
to puzzle...@googlegroups.com
This was amaaaazing! I played the version without skeletons, and I thought it was so much richer for all the weird garbage strewn around. You are an artiste of the puzzlescripts.

(this was supposed to be here, not there)

Connorses _

unread,
May 9, 2015, 1:42:39 AM5/9/15
to puzzle...@googlegroups.com
I hadn't played this in a while and it's looking incredible, now. Has a lot of the necessary details for a roguelike already. I'm impressed.

Jere Majava

unread,
May 11, 2015, 5:43:54 AM5/11/15
to puzzle...@googlegroups.com
All this positive feedback actually means a lot to me. So, thank you everyone!

Might just as well share my actual very preliminary roguelike project, based on Prim's. This is how far I got during the 7 Day Roguelike Challenge in March and I haven't gotten time to get back to it since. :(


It has simple combat system with skills, armors and weapons (some work and some do not), inventory (poison and potion of healing work so far), mapping and secret doors. Buttons next to the inventory for resting, closing a door and skipping a turn (you can just walk towards a wall as well) should work, looking around doesn't. Going down the stairs currently just restarts the game.

Anna Anthropy

unread,
May 12, 2015, 4:26:22 PM5/12/15
to puzzle...@googlegroups.com

are you supposed to be able to have three weapons equipped at the same time?

it's a little unclear what items are supposed to be what, too. i thought the potions were helmets.

this is neat though.

Anna Anthropy

unread,
May 12, 2015, 4:28:00 PM5/12/15
to puzzle...@googlegroups.com

i got trapped in the menu :(

James T. Perconti

unread,
May 12, 2015, 4:57:43 PM5/12/15
to Anna Anthropy, puzzle...@googlegroups.com
I eventually figured out that you can press up to escape from the menu.

--

Connorses _

unread,
May 12, 2015, 5:06:21 PM5/12/15
to puzzle...@googlegroups.com

Yep, I thought the menu setup was clever it works with minimal buttons. 

Anna Anthropy

unread,
May 13, 2015, 3:59:45 AM5/13/15
to puzzle...@googlegroups.com
playing this a little more: i figured out that down in the menu unequips things, while up quits the menu. i like how the protagonist turns to look toward the camera while you're in the menu. and i like thinking that this is what prim grew up to do after a childhood of exploring mazes with her cat.

Jere Majava

unread,
May 15, 2015, 2:45:36 AM5/15/15
to puzzle...@googlegroups.com
Being able to equip more than one weapon is a bug. The currently unimplemented look feature should help identify objects (designing potions in 5x5 pixels proved especially tricky). I first had x to initiate and cloes the menu, up to use/equip, down to unequio/drop, but that proved surprisingly unintuitive. Will make a new thread for this when I have more.

and i like thinking that this is what prim grew up to do after a childhood of exploring mazes with her cat.

Love this! The protagonist uses basically the same sprite, although he overall atmosphere is quite different I think. Maybe I will add some clues that this might be the case. :)
Reply all
Reply to author
Forward
0 new messages