25 ms·
How Townscaper Works: A Story Four Games in the Making
- samwillis 4y agoTownscaper 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/ https://oskarstalberg.com/Townscaper/ 0: https://twitter.com/OskSta https://twitter.com/OskSta
- nick__m 4y agoI tried the demo, bought the toy and had an hour of meditative fun. Thanks!
- tedyoung 4y agoApparently procedural generation and constraint solvers are AI now? I thought they were just algorithms. (I love Townscaper, btw, but this article—whew.)
- wodenokoto 4y agoIt’s _all_ just algorithms.
- iancmceachern 4y agoBut if you call it AI you get more investment
- detaro 4y agoGame 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.
- cookie_monsta 4y agoMy Netflix recommendation engine appears to be about as intelligent as those wolfenstein guards from back in the day
- baq 4y agoback when maze solving algorithms were unknown, BFS was AI. AI is magic, algorithms are what AI turns into when problems are actually figured out.
- duxup 4y agoIn the context of gaming I used to call it: “the computer” Later I called it: “AI” Such as “Is the AI still brain dead in Civilization VI?” In a gaming context I think of it as entirely different from a more computer science definition of AI.
- SamBam 4y agoAI is literally just algorithms. 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.
- alexcnwy 4y agoIt’s called AI until it works, then it’s called an algorithm.
- skybrian 4y agoWhen I took an artificial intelligence class in college a long time ago, it covered things like path finding and breadth first search.
- CuriousCosmic 4y agoAI 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".
- sebastialonso 4y agoConstraints solvers was literally half of my AI university course lol
- ThrowawayR2 4y agoThat 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.
- mikepurvis 4y agoI 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.
- ethbr0 4y agoAlso, it didn't hurt that UT bots were pretty impressive for the era (1999?) tech. I.e. generally behaving pretty similar to players, minus the environment-exploitation
- WillPostForFood 4y ago"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.
- p1necone 4y agoIn video games, smoke and mirrors is an acceptable solution to any problem :)
- V__ 4y agoI 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 https://www.youtube.com/watch?v=2SuvO4Gi7uY Now, I'm just looking for a use-case to implement them myself sometime.
- zimpenfish 4y ago> Now, I'm just looking for a use-case to implement them myself sometime. I'm using them to try and generate stencils (for artwork purposes.) Also currently failing to generate PacMan mazes with them but I suspect that's more easily solved with some simple if/then/else trees...
- cridenour 4y agoWent down a rabbit hole with that creator's videos. He has a lot of good ones, all done with Blender and Godot.
- TheMagicHorsey 4y agoTownscaper 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?
- sigg3 4y agoYes, it's pointless as a game IMO. Personally, it reminds me of the "interactive screensavers" kind of apps for win95. I love the aesthetics and don't regret the purchase, but it feels more like a tech demo than a game.
- omega3 4y agoI 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 https://youtu.be/5xrRTOikBBg?t=1170
- samwillis 4y agoI think thats the reason Oska (the creator) refers to it as a "toy" rather than a "game".
- jansan 4y agoI always see wave function collape used on squares/cubes with constant size. Are other applications possible, for example with triangularization or Voronoi diagrams?
- Doxin 4y agoThere'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.
- arriu 4y agoFor anyone interested, I put together a golang version of the WFC algorithm used by townscaper: https://github.com/zfedoran/go-wfc https://github.com/zfedoran/go-wfc And a live WASM demo if you’re into that: https://zfedoran.github.io/go-wfc-algorithm/ https://zfedoran.github.io/go-wfc-algorithm/
- unholiness 4y agoIt'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.
- atum47 4y agoI'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. https://news.ycombinator.com/item?id=31384676 https://news.ycombinator.com/item?id=31384676