Jump to content
How to Install Plugins ×

Random mazes (ymd:100725)


MadJik

Recommended Posts

Mazes Effects Plugins

 

big_maze800.jpg

 

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!

 

 

 

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 MadJik's All plugins package is available !

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

 

___________________________________________________

How to install

Close Paint.net

 

Classic version of Paint.net

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

 

Microsoft Store version of Paint.net

Unzip and (re)place the DLL in your Effect folder usually: /My Documents/paint.net App Files/Effects/

You have to adapt for your language My Documents

___________________________________________________

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

maze1_UI.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!

Example:

maze1.jpg

 

___________________________________________________

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

maze2_UI.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!

 

Example:

maze2.jpg

 

Voilà !

  • Upvote 1
Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
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)

The_next_thousand_words_by_0_ASH_0.png

All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]

Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

@Eli

 

Have you tried 

1 Create your maze

2 copy to clipboard

3 select your shape

4 Use Paste from clipboard to resize accordingly?

Saves you from repeated patterns B)

 

pvtvVM.png

Edited by AndrewDavid

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

@AndrewDavid I thought about it but the puzzle is no longer playable :( . 

 

@MadJik I noticed that the Entrance and the Exit are always in the same position. Could it be possible to add options to select the position of the Entrance and the Exit?

random-maze-shape...st-exits-53bba5f.png

Edited by Eli
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...