MakeMaze

Discuss Chaos Strikes Back for Windows and Linux, an unofficial port of Chaos Strikes Back to PC by Paul Stevens, as well as CSBuild, an associated dungeon editor.

Moderator: Zyx

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

MakeMaze

Post by Paul Stevens »

http://dianneandpaul.net/CSBwin/MakeMaze.exe

I creates a random level. Use 'Setup/CreateMaze'.

I needs a bit of tuning. It does not know when to stop.
It seems to need more wall connections to the edges.
And some parameters to customize the overall shape.
And set the size. And lots more.

It is artifically slow to let you see how the
algorithm works.

If anyone thinks it might be useful we could put
a DSA function to do this.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Bloody hell!

Connectivity too is lacking between the new paths in some points with the main concorce. But this is really cool!

If turned to a DSA could the algorithm break it's operation to allow the opportunity to randomly place an item or monster on a square before the algorithm carries on?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Connectivity too is lacking between the new paths
That should be impossible. I have not seen such a thing.
Could you send a screenshot or something to demonstrate?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Oh wait, I was assuming the circles were 'cleared' squares, but they are walls, aren't they!

Hmm, that would make seeding harder though... maybe....
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

but they are walls, aren't they!
Yes, quite.

But we can install more than one algorithm. If you
can describe yours in detail, I will add it to the
program.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

I posted a new one with adjustable parameters.
Try these parameters to algorithm0 to get a taste of it:

1,100,10,20
1,100,10,60
1,50,2,40
1,0,10,1000
1,90,3,1000
0,0,10,3
0,100,10,1
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

great program! I like these labirynths from the latest algoritm you gave (0,100,10,1)! Maybe I would use it for creating my dungeon.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The last algorithm is very kinked with stubby ends, might be annoying for the dungoen player


The '1' and '0' threw me for a second at the start ...
This is very cool. Is the percentage straight the chance for diviation in the path before hitting a wall, or the change of it going diagonally?
Also, what does the maximum attempts actually mean?

How does the algoritm decide to finish? Is it possible for it to stop before alot of the interetsing 'rooms' (2x2 or greater areas) are wiped out?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Is the percentage straight the chance for diviation
The probability that it will first attempt to go straight.
maximum attempts actually mean?
It it first tries straight with the given probability.
Then it tries random directions 'maximum attempts' times
before giving up and starting a new wall somewhere else.
How does the algoritm decide to finish
When it fails to do anything during one pass. Usually this
means that there is almost nothing left to possibly do although
there may be a couple places that failed simply because
'max attempts' was not sufficient for it to succeed where
something was 'possible' but by chance was passed up.
possible for it to stop before alot of the interetsing 'rooms'
I will add a 'Maximum iterations'. And I will add a 'maximum
filled cells'. One of these might serve your purpose.

I will also add a
'post-generator' operation: You will be able to specify a min and
max size and a count. After the maze is generated, rectangles will
be created with x- and y-sizes randomly selected between
the sizes you specify. These will be placed randomly in the dungeon.
The number placed will be specified by 'count'. This will cause
'rooms' to be created and will also cause the maze to be multiply-
connected (loops) so that it cannot necessarily be solved with
the 'right-hand rule'.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

The lastest version has these things.

If you wnat a simply-connected maze, limit the iterations
or cell count. If you want a multiply connected maze,
put in a few dozen 1x1 cells at the end.

I hope you don't plan to change the maze every
time the player enters the level. That would be MEAN! :evil:
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

That would be mean. Starting potion now...
User avatar
andyboy_uk
On Master
Posts: 647
Joined: Thu Feb 20, 2003 1:51 am
Location: London, UK

Post by andyboy_uk »

an Auto maze gen was a planned feature of Chaos Forge, i havent downloaded this one, but a mate of mine has put an algo together to do this, and back in the day, my old man did one that put rooms and doors in as well (for a DM clone he was working on)

A
Regards,

Andy
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Sounds a lot like the algorithms that the old
text-based dungeon games used. Games like
Rogue. Those sources are available and could
certainly be used. I think they put in the rooms and
then built passagways between the rooms. Very
different algorithm than my 'Algorithm0' and very
different-looking dungeons.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

i much prefer the organic corridors of algoritm0, but sometimes what looks good is hell to play - need to actually walk a few of the shapes to get a feel for them
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Would you like a way to import these levels into
CSBuild? You could make a dozen very different
levels, import them, add a few stairs/teleporters,
and try them out.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Has the program change since you posted the parameters -- there aren't enough to input into all the fields?

Could you post some revised samples if so?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

The first 1/0 is the check box for edges

Yeah, it would be cool to be able to port these into CSBuid - or alternatively just have this engine in CSBuild so that Adamo could have his random level genration for building a dungeon (rather than at run-time). Whichever is easier (guessing the first)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

OK, thanks -- that helped. I found these params create a good balance of random and apparent 'manual' design:

0,85,4,750,450,0 - Post: 1,1,8
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

Yeah, it would be cool to be able to port these into CSBuid
Such a clever fellow that I am. I correectly
anticipated your reply and went ahead and did it.

I posted a new MakeMaze.zip that has all the necessary
ingredients for composing and importing a maze.
It also has an example maze that you can play through.

Adamo will have to create theh maze and import it. I
won't be adding this to CSBuild.

The program is rather ugly. If we want to add additional
algorithms then I will rewrite it mostly from scratch. It
was only a couple hours work.
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

0,85,4,750,450,0 - Post: 1,1,8
I prefer 1,85,4,750,450,0 - post 1,1,8

Your parameters tend to leave an open corridor
around the outside edge. I am going to change
that edges firt parameter to an integer.
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

This seems good for DM-like games:
pre: 1,2,9,78,750,750
post: 1,6,10
You should add several doors of course
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Re: MakeMaze

Post by Adamo »

Bumped. This tool is great, maybe it will be usefull for dungeon designers.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: MakeMaze

Post by ian_scho »

Excellent work. Tried Gambit's parameters and it looks great. Some kind of rudimentary export feature would be good (just 0 and 1s), but hey. I'm not complaining.

Great job! Can I ask where you sourced the algorithm from, please?... Ehhh, this thread is 5 years old, so maybe you've forgotten :)
User avatar
Paul Stevens
CSBwin Guru
Posts: 4318
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Re: MakeMaze

Post by Paul Stevens »

Can I ask where you sourced the algorithm from, please?
I made up the original from my past experience
making mazes. Sixty years of experience. So
I have no idea where the ideas came from.

Then------I added things as people in this forum
made suggestions. Most of the algorithm is
discussed in previous posts. And-----I don't
even remember writing this program.
Post Reply

Return to “Chaos Strikes Back for Windows & Linux (CSBWin) / CSBuild”