Hacker News new | past | comments | ask | show | jobs | submit login
Procedural Dungeon Generation: A Drunkard's Walk in ClojureScript (jrheard.com)
75 points by tosh on Nov 5, 2016 | hide | past | favorite | 9 comments



Even though the results are inconsistent if you can save a random seed for each you could store a list of the good ones.


That seems to be the secret of good proc-gen game design. Curate the good randomness.


My ClojureScript-fu is not strong, could someone add a rule to prevent the script walk too close to already carved blocks? Edit: I mean, I've been trying add a rule so it checks the candidate blocks neighbours and couldn't. And I wanna see how it would work.


I don't know if this is what you want, but I made a version that prefers to carve out blocks with many full neighbours (and thus avoids already carved-out areas).

https://gist.github.com/Haspaker/74f124859633edeb8d04465ce00...


Yeah that's more or less what I was trying to do, thank you.


Nice!


I love things like this, and I always appreciate the people who take the time to write them up and explain them.

It can take significantly more time to articulate how an algorithm works, break it down, and supply concise code for them than it takes to get them working in the first place. Reading code is great and all, but having someone take the time to walk you through it is fantastic.


It's awesome to see the blogosphere's landscape finally changing from "Oh, look how awesome Clojure is" to "Here's the thing I build with Clojure(script), I think it's really cool". Language, tooling, community, market around Clojure have really matured and reached a tipping point. In just a few years from a toy thing it grew into a serious player. I am so glad I'm on this train, it's moving super-fast. You compare any JavaScript stack or set of libraries with what's possible in Clojurescript and it's hard not to conclude that the latter is always a few steps ahead.


I like all of these gaming posts today!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: