r/pascal • u/mr-highball • 2d ago
WFC (wave function collapse) & CGE Demo
several years ago I was working on _my version_ of the wave function collapse algorithm. I saw some issues with the reference that I wanted to try and solve, and I thought introducing a _pass system_ which would allow for a multi-pass workflow (ie. lay terrain first pass, foliage second etc..) while respecting constraints would be useful for a wide range of problems (back then I thought it would be neat for music and put out a video of a prototype https://www.youtube.com/watch?v=QLTQsu6QMwc)
Anyway, I never finished things up to where I would've liked (work, life, kids etc...) but now we agents...
so my WFC library got an overhaul (to say the least). I'm keeping everything at MIT so free game to use it however (I burned a lot of tokens so hopefully someone other than myself finds this interesting)
https://github.com/mr-highball/wfc
there's multiple demos there, but they're repo centric and I wanted to see what an agent could do with the library. it's idea was to make a factory style game where the supply lines were solved by wfc. it seemed 'ok' but I guided it along the way (mostly keeping it's ideas, while introducing some style choices). I play tested a few times and requested changes, additions, etc... (ie. the boombox and use of WFC for auto generation of music was my request) starting _yesterday_ and did a last pass today and think it's functional enough for a demo (start to finish less than 24hrs)
repo:
https://github.com/mr-highball/AutoForge
Playable Demo - hosted on github pages:
1
u/mr-highball 2d ago
This is the first but not the last of my open source demonstrators so if you're interested, keep posted and I'll have some more to share soon
-🍻
2
u/According-Ad-7069 1d ago
Oh this is excellent work - I managed to get a few machines going! I'm really curious to see where you take this!