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.
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?
I recommend this talk to learn more about the approach; this part specifically talks about the lack of the typical gaming elements:
https://youtu.be/5xrRTOikBBg?t=1170
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?
There's nothing stopping you from using it on all sorts of wild-shaped grids. E.g. the townscaper grid isn't a rectangular grid at all. It only happens to use squareish cells. IIRC it's a distorted subdivision of a hexagonal grid.
As soon as your model has nodes and edges you can use wave function collapse on it. Your grid doesn't even need to have every cell be the same shape. Square(ish) cells just happen to be easy to design graphics for.
Apparently procedural generation and constraint solvers are AI now? I thought they were just algorithms. (I love Townscaper, btw, but this article—whew.)
That might be reading too much into it. IIRC, hasn't gaming been referring to any kind of computer opponents as "AI" since at least the '80s? I'd almost call the games industry usage of AI as its own independent (albeit related) jargon at this point; games "AI" may use ML, NN, and other AI techniques but isn't required to.
I always found it weird when SNES-era console games would refer to the built-in opponent as the "computer". Like, it kind of makes sense, but it wasn't aligned to my understanding of what a computer was.
In any case, since around the release of Unreal Tournament in the late nineties, I've always just referred to them as bots— that feels for me like it strikes the right balance in terms of expressing that it's a non-human participant in the game, and one whose behaviours may be varying degrees of intelligent, as far as leveraging pre-scripted actions and potentially cheats.
"Bot" is an interesting adaptive use of Robot. Robot traditionally describing something mechanical with gears and made of steel. Something pretty different that the computer controlled characters in Unreal.
AI is a lot of things. It's essentially just the category of algorithms, control theory, and machine learning.
If you are just referring to AI as in ML, even then ML is at its core a series of processes for tuning control systems. Those ML models are just complex versions of traditional systems from control theory with the tuning handled by the training process.
So yes in a sense, procedural generation, constraint solvers, wave collapse, etc can all be seen as AI since they are just different ways of solving the problem of "how do I believably make/do X in a useful or believable way".
Yes, these days it's most commonly used to describe something that we can't quite understand the inner-workings of (huge neutral networks; big data), but A* pathfinding and decision trees are also AI.
Game development has long used the term for anything that pretends to have intelligent behavior. It's not quite the same as other parts of tech use it.
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/
0: https://twitter.com/OskSta