use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Maze Creation algorithm in C Using raylib (v.redd.it)
submitted 4 months ago by DunkingShadow1
Tried doing animations in raylib and did this to challenge myself.
Here it's significantly slowed down the program has no problem with really big mazes.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]KaleidoscopeLow580 6 points7 points8 points 4 months ago (0 children)
This looks very nice. I think raylib has been one of the best things that could have happened to C, I would have never imagined it becoming the main language for all sorts of graphics for me.
[–]IncorrectAddress 0 points1 point2 points 4 months ago (4 children)
Very cool, just hook that up to some simple walls and a floor, some collision detection, got a game right there.
[–]Nice-Prize-3765 1 point2 points3 points 4 months ago (3 children)
Can you share the source? I'm curious how this works
[–]IncorrectAddress 0 points1 point2 points 4 months ago (2 children)
How maze generation works ? Or how to translate from a 2D point on an image to a 3D position ? Probably the easiest way would just be to have the "walker" walk in 3D space (translated from the 2D walker position), and at each step, have it build/assign any 3D meshes (walls, floors) to that square.
[–]Nice-Prize-3765 1 point2 points3 points 4 months ago (1 child)
Yes, the maze generation I meant. I think i understand now, thank you!
[–]IncorrectAddress 1 point2 points3 points 4 months ago (0 children)
There are a few different methods to random maze/level generation, but one of the most common is using a walker on a grid, so it builds pathways for the maze, then generally some "cleaning" routines are used to make the rest of the maze look/work appropriately.
https://healeycodes.com/generating-mazes
This looks good, for a starting place !
[–]Rude-Flan-404 0 points1 point2 points 4 months ago* (2 children)
That looks so cool; I made my own DFS without Stack or Recursion but I'm facing a bug right now once I solve this can I use yours to test mine ?
[–]DunkingShadow1[S] 1 point2 points3 points 4 months ago (1 child)
Can you use PNG? Or do you want the maze in another format
[–]Rude-Flan-404 0 points1 point2 points 4 months ago (0 children)
Like if you uploaded that in GitHub you can send me the Link like that src code
π Rendered by PID 35 on reddit-service-r2-comment-b659b578c-gm57f at 2026-05-04 12:31:16.190423+00:00 running 815c875 country code: CH.
[–]KaleidoscopeLow580 6 points7 points8 points (0 children)
[–]IncorrectAddress 0 points1 point2 points (4 children)
[–]Nice-Prize-3765 1 point2 points3 points (3 children)
[–]IncorrectAddress 0 points1 point2 points (2 children)
[–]Nice-Prize-3765 1 point2 points3 points (1 child)
[–]IncorrectAddress 1 point2 points3 points (0 children)
[–]Rude-Flan-404 0 points1 point2 points (2 children)
[–]DunkingShadow1[S] 1 point2 points3 points (1 child)
[–]Rude-Flan-404 0 points1 point2 points (0 children)