Make a Labyrinth Generator!
in any language, go!
Is there some sort of algorithm?
>labyrinth
>single straight path
You are literally retarded. Kill yourself.
>>58906606
this sounds like homework.
Are you looking for walls like pic related or rooms and connecting hallways?
>>58908057
a labyrinth isnt a maze you stupid moron
>>58910277
> Daedalus had so cunningly made the Labyrinth that he could barely escape it after he built it.
> Thinking it is a straight path
>>58910338
>A labyrinth is unicursal i.e. has only a single, non-branching path, which leads to the center then back out the same way, with only one entry/exit point.
btfo
...or this bird is gonna stab you?
>>58910356
> Til Daedalus was dumber than a literal rock
That's the design of the symbol
>>58910390
or maybe it was a really complicated labyrinth with weird lighting and mirrors and stuff so you get turned around and lost you giant pseud
<--- me
>>58906606
GNU bashyes 'printf \\u$[2571+RANDOM%2]' | bash
This is a problem that I attempted to do however it appears to be a different beast compared to a maze since a maze can be represented a a tree and hence can be done using recursive methods such as DFS and Backtracking but a labyrinth has no branching so i'm like wtf
>>58910470
Neat trick.
>>58910277
Yes, it is.
>>58910470
>\\u$[2571+RANDOM%2]
mind to explain this part?
>>58910877
not >>58910470
but
http://www.fileformat.info/info/unicode/char/2571/index.htm
>>58910877
\u says "print some unicode here", 2571 is ╱ and 2472 ╲, +RANDOM%2 will pick on of them randomly
>>58910877
\\u is the escape sequence for unicode chars.
U+2571 is "BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT"
U+2572 is "BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT"
The RANDOM%2 part pics a random number smaller than 2 (i.e. 0 or 1) which would make the resulting character either U+2571 or U+2572.
>>58910862
your and idiot
>>58911042
noun
labirint
labyrinth
Definitions of labyrinth
noun
a complicated irregular network of passages or paths in which it is difficult to find one's way; a maze.
"a labyrinth of passages and secret chambers"
synonyms: maze, warren, network
>>58911056
that's not the mathematic definition brainlet
>>58910401
>>58910356
>>58911042
> Weebs are invitation spergs
Who could have guessed?
>>58910470
Pretty.
>>58910470
I don't suppose you knew of this book?
http://10print.org/
http://pastebin.com/LcsrjExG
>>58911968
not a labyrinth
you're disqualified
see:
>>58910356
>>58912018
that's not the mathematical definition
you're disqualified
>>58911968
Who's got the one that makes your CPU stall when using the paint bucket in MS paint?
>>58912028
>mathematical definition
Only you give a shit
>>58912064
this is a computer SCIENCE thread you pseudo-intellectual go back to r eddit now
you're disqualified from further posting
>>58912084
>he doesn't even know what a labyrinth is
It's explained here >>58911056
>>58912116
it's almost like the entire field of mazeological topology doesnt bend to your every whim pajeet
the real definition is here:
>>58910356
>>58912125
You didn't define in the OP what the thread is exactly about, and yet you call yourself a mathematician. Your further arguments are irrelevant.
>>58910470
how do i write u2571 in Win console? When i writeConsole.WriteLine("\\u2571");
i receive ? in Console
>>58912298
>windows
here's your problem
>>58912351
Fuck you Stallman
>>58910470
Finally met one hacker here. Impressive.
#include <iostream>
#include <math.h>
using namespace std;
int main(){
int OP = 0, faggot = 0;
if( OP == faggot ){
cout << "Do your fucking homework you lazy prick!" << endl;
}
else{
cout << "there's nothing else you freaking moron." << endl;
}
cout << "Disgard that i suck cocks" << endl;
return 0;
}
>>58912443
It really is a nice trick
>>58912298
You can't. Windows supports only the basic ASCII.
>>58912465
I think cmd supports unicode also with different fonts but when i change it in properties, the change isn't reflecting in Visual Studio
>>58906747
Kinda. Like you can just make a start and end point in a all wall thing and have it search for end and mark along path. Then make it randomly take paths that dont create loops.
So like DFS is the algo basically. Specifically not BFS cuz it will make a route thats super obvious
here is my first game : https://github.com/pexeen/myfirstgame
>>58912490
post screenshot
>>58912573
>>58912573
It changes every 0.2 s
>hey guys do my homework for me
>>58912687
Literally /g/
>>58912490
This is also pretty cool.
>>58911042
cute!
I tried a thing.
>>58914055
This shit is interesting.
Will come back to this thread later. People actually hacking out some interesting maths. Please post interesting code fragments, maths and sources of ideas.
Challenge ^ 3 : 3D labyrinth
Challenge ^ N : Nth dimensional labyrinth generation
>>58912462
>using namespace std;
oh wow
>>58914055
Doom level generator
>>58914175
The only reason not to is if you're learning or naming completely different functions cout
Note: if you do the latter you deserve death
>>58914055
I like how this looks but I can't slow it down, are you taking a straight line and then generating right angles?
>>58914055
That is very cool! Can you post some of the code?
>>58914336
>>58914496
A labyrinth is essentially a string containing the characters 'r', 'l', 'd', and 'u' representing moving one pixel right, left, down or up respectively.
The initial line is something like "rrrrrrrrrrrrrrrrrr". Each step it randomly inserts either an equal amount of 'u's and 'd's, or an equal amount of 'l's and 'r's in this string and checks if the resulting labyrinth is still valid (doesn't bump into itself). For example a second string could be "rrrruuuurrrrrddddrrrrrrrrr".
Code (requires love2d to run):
http://pastebin.com/UkKacDh1
>>58914730
That's really cool. Here's my C# implementation
http://pastebin.com/ERW9dNJf
>>58910338
Daedalu's Labyrinth was a maze, the same way Pandora's Box was actually a jar
>>58915981
> One of the most famous Greek authors misused a Greek word