Sign in to follow this  
Followers 0
MadJik

Random mazes (ymd:100725)

12 posts in this topic

Mazes Effects Plugins

What's this?

Having a discussion with Ego Eram Reputo (EER):

EER: "I'm using a modified Prim maze algorithym

http://en.wikipedia.org/wiki/Maze_generation_algorithm

http://en.wikipedia.org/wiki/Prim%27s_algorithm

which creates strings of cells."

Digging these links, I've found some ascii programs creating mazes

with / or \ and | or _

As for now EER kindly made me some suggestion for these plugins, and

permitted me to post them.

Thanks Ego Eram Reputo!

(we could expect some good stuff sooner or later from EER...)

These plugins are added to the menu Effects, submenu Render.

___________________________________________________

Downloads:

Plugin Random Maze1.dll

ar.pngHere is the DLL for Maze 1al.png

Plugin Random Maze2.dll

ar.pngHere is the DLL for Maze 2al.png

The sources are available with the plugins package!

http://forums.getpaint.net/index.php?showtopic=7186

___________________________________________________

How to install

Close Paint.net

Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects

___________________________________________________

MAZE 1:

MAZE 1: http://homepages.cwi.nl/~tromp/maze.html

I must admit I don't understand very well the all logic of this code.

It doesn't use a table for the whole maze, and it could create maze

without closed area. It means every randomized maze could be solved.

Spot a green circle somewhere in the maze for the start point and a

red circle elsewhere (far enough) for the end point and you could be

sure a path exists!

The User interface

pdnv330014.png

Quantity of cells: set the size in cell of the maze. Same size for height and width.

Margin: set the margin in pixel from the top-left corner.

Brush width: set the width of the walls.

Select the ends of the lines: choose the finition of the walls.

Reseed: generate another maze.

Anti-aliasing: as it says!

Show Start/End: off: the maze is closed; on: the corners (top-left & bottom-right) are open!

Square maze: on: the maze is square; off: the maze fits with the image size, but the quantity of cells is still the same for height and width!

___________________________________________________

MAZE 2:

MAZE 2: http://www.edepot.com/algorithm.html see the section: Simplest (and smallest code size) Maze Generator

This one is more a graphical plugin than a maze generator.

It just draw randomly diagonal walls.

There are a lot of closed areas, no path could be certain.

But I like the result. And the use of the end-caps for the lines

could give some good texture as like as electronic card, maze (of course), etc...

The User interface

pdnv330015.png

Cell size X: set the horizontal size in pixel for one cell of the maze.

Cell size Y: set the vertical size in pixel for one cell of the maze.

% Chance for a wall: increase/dicrease to have more/less walls.

Brush width: set the width of the walls.

Select the ends of the lines: choose the finition of the walls.

Reseed: generate another maze.

Anti-aliasing: as it says!

___________________________________________________

Some examples:

maze1-1.jpg

maze2-1.jpg

0

Share this post


Link to post
Share on other sites

Thanks Madjik - this is pretty cool! You can create some weird mazes depending on the settings chosen!

0

Share this post


Link to post
Share on other sites
As for now EER kindly made me some suggestion for these plugins, and

permitted me to post them.

Thanks Ego Eram Reputo!

(we could expect some good stuff sooner or later from EER...)

(Completely humbled)

MadJik certainly deserves all the praise for these excellent plugins. His code is not only elegant but extremely fast too. I really like the UI's as well.

Thanks MadJik.

0

Share this post


Link to post
Share on other sites
MadJik, it is pretty cool.

You always deliver good job! :D

Thank you for this comment.

I hope I won't have to way the next 29 Fev for more comments ;)

0

Share this post


Link to post
Share on other sites

I love this plug in Madjik. any idea on how to make this into a round maze, guessing perhaps a chain algorithm function?

0

Share this post


Link to post
Share on other sites

In PDN 3.30 i get the message

File: C:\Program Files\Paint.NET\Effects\Random Maze2.dll

Effect Name: RandMaze2Effect.RandMaze2Fx

Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.DivideByZeroException: Attempted to divide by zero.

at RandMaze2Effect.RandMaze2Fx.RenderRI(Surface dst, Surface src, Rectangle rect)

at RandMaze2Effect.RandMaze2Fx.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length)

at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length)

at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)

at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction()

--- End of inner exception stack trace ---

at PaintDotNet.Effects.BackgroundEffectRenderer.Join()

at PaintDotNet.Effects.BackgroundEffectRenderer.Start()

at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClassa.b__8(Object sender, EventArgs e)

White canvans 600x800.

When cell size on Random Maze 2 Y is set to zero.

PC Config: XP home edition, SP2, 512 RAM, 2.40 GHz.

0

Share this post


Link to post
Share on other sites

Confirmed

When Y=0 and move X slider.

File: C:\Program Files\Paint.NET\Effects\Random Maze2.dll
     Effect Name: RandMaze2Effect.RandMaze2Fx
     Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.DivideByZeroException: Attempted to divide by zero.
  at RandMaze2Effect.RandMaze2Fx.RenderRI(Surface dst, Surface src, Rectangle rect)
  at RandMaze2Effect.RandMaze2Fx.OnRender(Rectangle[] rois, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.Effect`1.Render(Rectangle[] renderRects, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.Effect`1.Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, Int32 startIndex, Int32 length)
  at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction()
  --- End of inner exception stack trace ---
  at PaintDotNet.Effects.BackgroundEffectRenderer.Join()
  at PaintDotNet.Effects.BackgroundEffectRenderer.Start()
  at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClassa.b__8(Object sender, EventArgs e)

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0