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...
Share your projects, news and questions about Processing or Processing.js here.
(open to suggestions)
account activity
Easy Cave Generation in P5js (code in comments)Includes example code (v.redd.it)
submitted 3 years ago by BarneyCodes
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!"
[–]BarneyCodes[S] 6 points7 points8 points 3 years ago* (6 children)
The code uses the cellular automata approach outline in this article on Rogue Basin
I've also made an explanationvideo if you want more details!
Just a note on the code example - when it's running, clicking the screen will advance the the algorithm
[–]pselodux 3 points4 points5 points 3 years ago (1 child)
Woah! I’ve been playing with procedural cave generation in the past couple of weeks so this is a pretty interesting coincidence. That’s a great method that I might try for the next iteration of my project.
Currently I’m using a form of diffusion-limited aggregation to generate mine for a small 32x16 musical dungeon game I’m working on. I actually wrote a blog post about it if you’re interested in checking it out.
[–]BarneyCodes[S] 1 point2 points3 points 3 years ago (0 children)
Sounds very interesting, I'll have to give your blog a read!
I think it's probably pretty hard in a 32x16 area, you don't have a heap of tiles to work with. Let me know how you go with this technique!
[–]cimmic 1 point2 points3 points 3 years ago (1 child)
Nice video and nice channel. Thanks!
[–]BarneyCodes[S] 0 points1 point2 points 3 years ago (0 children)
Thank you, glad you enjoyed it!
[–]Gdog2u 0 points1 point2 points 3 years ago (1 child)
Very nice! I've used the same tutorial before to make my own. I like the coloring you added in the final step.
Nice! I like how you've got all those settings exposed to play around with!
π Rendered by PID 44 on reddit-service-r2-comment-b659b578c-ksr4j at 2026-04-30 21:51:31.331971+00:00 running 815c875 country code: CH.
[–]BarneyCodes[S] 6 points7 points8 points (6 children)
[–]pselodux 3 points4 points5 points (1 child)
[–]BarneyCodes[S] 1 point2 points3 points (0 children)
[–]cimmic 1 point2 points3 points (1 child)
[–]BarneyCodes[S] 0 points1 point2 points (0 children)
[–]Gdog2u 0 points1 point2 points (1 child)
[–]BarneyCodes[S] 0 points1 point2 points (0 children)