r/webdev • u/BlaiseLabs • Oct 31 '26
Showoff Saturday Procedural Almanac - A JavaScript library of procedural generation techniques with citations for every function
For week 2 of r/hacktoberfest I cataloged all the procedural generation techniques I could find online and put them into a library using vanilla JavaScript. Every technique in the library includes a citation and it has no dependencies. Works in the browser or Node.
The island in the GIF was generated using just the library.
GH repo: procedural-almanac
Demo: Random Island Generator
All stars on Github are appreciated!
267
Upvotes
6
u/real_billmo Oct 31 '26
This is awesome. Well done.
4
u/kugelblitz010 Oct 31 '26
This is amazing and could see this having really cool applications! Is it limited to a generated world map or could this be applied to an indie platformer? Also are you doing anything to make sure that pixels stay a consistent size?
Again this is really really cool and thanks for sharing
3
u/captain_obvious_here back-end Oct 31 '26
I wish I could have a few months off, just to play with that kind of stuff and make fun stuff based on it!
1
u/pencilUserWho Oct 31 '26
How hard would it be to add typescript on top?
2
u/kukoscode Oct 31 '26
Cool I could use this for my project
2
u/Deep-Secret Oct 31 '26
That's so fucking sick!
2
u/Vertigras_Dev Oct 31 '26
Wow - really impressive. Love the night/day inclusion and the colour selection for it... Especially hwo the contours add depth to the water as well.
We have dabbled in procedural generation of sprites and such too ... trying to close the loop on base asset forging via prodedural gen.
2
u/Outside-Wall-2807 Nov 02 '26
the names scrolling along the bottom of that gif (leafCrown, barkTrunk, bitSway, swayingChain) read like a Pokemon moveset. i want to know what a swayingChain does to a water type.
2
u/Naufal_Dev 29d ago
wowwwww
2
u/Realistic_Repeat_576 27d ago
so cool
1
u/workhuofficial 28d ago
Love that you cited the sources. Is there one function you’d recommend starting with?
3
u/RecallProtocol Oct 31 '26
Genuinely interesting documentation. I don't do this stuff but I may go play with all of these neat toys, thank you for sharing!
2
u/[deleted] Nov 01 '26
[removed] — view removed comment
1
u/[deleted] Nov 02 '26
[removed] — view removed comment
1
u/[deleted] Oct 31 '26
[removed] — view removed comment
2
u/[deleted] Oct 31 '26
[removed] — view removed comment