How Townscaper Works: A Story Four Games in the Making
Townscaper is an amazing little toy, my kids (and myself) love it. Perfect for distracting them on a car journey. We will pass them an iPad and three minutes later you hear the little “sploosh” sounds of them building something having picked it to play.
There are so many little hidden detail to find (look for “round” grid areas, build a tower in the middle then delete the bottom of it and see what happens)
I have been following Oskar on Twitter [0] for last few years, he is such a good communicator. It’s always a joy when one of his posts turned up with the details of the latest thing he is working on. Even if you aren’t interested in game design he is such a good follow.
You can play a demo of Townscaper in your browser here: https://oskarstalberg.com/Townscaper/
I didn't know about wave collapse functions before stumbling about Townscaper. Still, I found them hard to understand until I found this video by Martin Donald: https://www.youtube.com/watch?v=2SuvO4Gi7uY
Now, I'm just looking for a use-case to implement them myself sometime.
Townscaper is a wonderful toy! I have a five year old who absolutely loves it. But she is constantly asking me how she can add people to her town. I tell her its a world with no people, and she then says, why am I building a town then?
For anyone interested, I put together a golang version of the WFC algorithm used by townscaper: https://github.com/zfedoran/go-wfc
And a live WASM demo if you’re into that: https://zfedoran.github.io/go-wfc-algorithm/
It's rare to see such a well-written article, which manages to distill complex ideas into something approachable without becoming non-technical.
I've come to expect with articles like this that at a certain point, the author stops fully understanding, and switches to metaphors or analogies that ultimately fail to explain the central concept. While plenty of detail was skipped, the switch to the non-technical never came and I happily read it the whole way through.
I've shared a project featuring wave function collapse here the other day and people got frustrated with me, cause they thought the project was about quantum mechanics.
I always see wave function collape used on squares/cubes with constant size. Are other applications possible, for example with triangularization or Voronoi diagrams?
Apparently procedural generation and constraint solvers are AI now? I thought they were just algorithms. (I love Townscaper, btw, but this article—whew.)