Page 3 of 6

Re: Maze Thread

Posted: Sat Mar 02, 2013 10:07 pm
by Zer0
Ref wrote:Hi Zer0!.
Hi Ref!.
Ref wrote:Once I weeded out all the threading stuff, it was apparent why we were seeing the same maze being generated..
You needed to call math.randomseed(os.time()) in the thread ( and I forgot to do that )
Ref wrote:Maze generating library is actually very easy to use & stable.
Thanks found that one on http://pcg.wikidot.com/

Anyway here's a couple of mazes I made with the mechanics exmplained from "Algorithm" is not a four-letter word

Re: Maze Thread

Posted: Mon Mar 04, 2013 6:51 pm
by Germanunkol
Zer0, those are very nice! It's very fun to watch. Although my definite favourite one is the recursive backtracer, the others are too biased for my taste.


Inspired by this thread, I wrote a map-creation system (sort of like a map editor except that you write code to generate the map) for my game and tried out a simple modified "Drunkard Walk" on it:
20x20 Map:
Image

40x40 Map:
Image

Edit: and a stress-test: 80x80 Map:
Image
This won't be very practical in the game (pathfinding in realtime would probably be too slow if there's around 40 trains on the map), but I'm really glad it worked!
Edit 2: Try to find the train on the last image :D

Re: Maze Thread

Posted: Mon Mar 04, 2013 8:23 pm
by silver_hawk
Some sample images from my dungeon generator, which will be released soon I hope ;)
It has multiple algorithms implemented, but this one is the maze algorithm tested, in 160 x 160 with tiles.

First one featuring the maze algorithm with tiles, and room creation on:
n0172zM.png
n0172zM.png (93.54 KiB) Viewed 3431 times
Second zoom in on the upper-left corner:
vTvJcVm.png
vTvJcVm.png (182.09 KiB) Viewed 3431 times
Third is a zoom in on the room number 23
GxzW0GM.png
GxzW0GM.png (344 KiB) Viewed 3431 times
The fourth is a maze only shown:
niYO2Jo.png
niYO2Jo.png (79.36 KiB) Viewed 3431 times
Hope to release this to the public soon, there is still some more balances to be done.

Re: Maze Thread

Posted: Mon Mar 04, 2013 9:32 pm
by Zer0
Germanunkol wrote:Zer0, those are very nice! It's very fun to watch. Although my definite favourite one is the recursive backtracer, the others are too biased for my taste.
I like that one to.
EDIT:
I also uploaded ( or my web designer did ) them to my website.
http://www.zer0problem.net/clicks/click.php?id=7 -- Weave Maze ( suprisingly fast )
http://www.zer0problem.net/clicks/click.php?id=8 -- Kruskals Maze ( Very good maps but boring ( not as boring as the binary but still boring ) )
http://www.zer0problem.net/clicks/click.php?id=9 -- Binary Tree ( Very boring to look at )
http://www.zer0problem.net/clicks/click.php?id=10 -- Recursive Backtracker ( It's like a snake trying the get out of a box )
Germanunkol wrote:Inspired by this thread, I wrote a map-creation system (sort of like a map editor except that you write code to generate the map) for my game and tried out a simple modified "Drunkard Walk" on it:
20x20 Map:
Image

40x40 Map:
Image

Edit: and a stress-test: 80x80 Map:
Image
This won't be very practical in the game (pathfinding in realtime would probably be too slow if there's around 40 trains on the map), but I'm really glad it worked!
Edit 2: Try to find the train on the last image :D
FOUND IT.. but I cheated, I replaced all the red and green in the image with blue.
It's visible down to the left under the window saying "map by Germanunkol"

Re: Maze Thread

Posted: Mon Apr 01, 2013 7:39 am
by Sodium
I did one too!! my first one.
it's pretty noob compared to those others in this topic but I rly enjoy making it, so much that I even put some things n shit on it.

changing lg.line for lg.square increased my fps in 100%. weird, ha?!

Re: Maze Thread

Posted: Tue Apr 02, 2013 8:16 am
by pakoskyfrog
Hellö everyone !
I did some experiments as well, and since i really dislike squared grids, guess what ? I tried these on hexagrids ! ^^

I didn't include a love file, since it was just a test/prototype, let's say it was coded with my feet :death: (especially the rendering function)

Re: Maze Thread

Posted: Tue Apr 02, 2013 3:37 pm
by Germanunkol
pakoskyfrog wrote:Hellö everyone !
I did some experiments as well, and since i really dislike squared grids, guess what ? I tried these on hexagrids ! ^^

I didn't include a love file, since it was just a test/prototype, let's say it was coded with my feet :death: (especially the rendering function)
I wonder if I'd find my way faster in a hexa-based maze or a square based one... I really like the looks, well done!
Sodium wrote:I did one too!! my first one.
it's pretty noob compared to those others in this topic but I rly enjoy making it, so much that I even put some things n shit on it.
I like this one as well... looks nice, with the flame "running around" the screen :D

Re: Maze Thread

Posted: Wed Jul 24, 2013 4:54 pm
by Zer0
pakoskyfrog wrote:Hellö everyone !
I did some experiments as well, and since i really dislike squared grids, guess what ? I tried these on hexagrids ! ^^

I didn't include a love file, since it was just a test/prototype, let's say it was coded with my feet :death: (especially the rendering function)
I made one to, The map is probably stored differently though.

I am guessing as the X position in yours increases it move down towards the right and Y moves it down left.

Mine is even more screwed up with X ( actually being X ) and slightly modifying Y up if X is odd.
and Y is ... well it just moves along the Y axis

Mine is also animated!

Re: Maze Thread

Posted: Wed Jul 24, 2013 10:24 pm
by Germanunkol
Nice one!

But it doesn't fill the whole screen. Is this intended? It only draws in the middle of the screen until it reaches the one edge, then it continues a little further around the middle and then ends.

Re: Maze Thread

Posted: Thu Jul 25, 2013 10:26 am
by Zer0
Germanunkol wrote:Nice one!
Thank you
Germanunkol wrote:But it doesn't fill the whole screen. Is this intended? It only draws in the middle of the screen until it reaches the one edge, then it continues a little further around the middle and then ends.
its a recursive backtracker and I didnt put a grid limit ( Because of how my map was saved ) therefore I put a length limit. and when it reaches that length it goes back and then keeps going a little less from another spot.
it goes beyond the edge of the screen and you can move with the arrow keys.

EDIT: I also updated the example in the earlier post.
CHANGES:
Move the map with the mouse. ( hold down 'l' )
Longer mazes.
better looking mazes.
highlights the 3 last hexagons in the path table.

EDIT2: I added a hexagon maze generator with a limited field