[HN Gopher] How Townscaper Works: A Story Four Games in the Making
       ___________________________________________________________________
        
       How Townscaper Works: A Story Four Games in the Making
        
       Author : omega3
       Score  : 105 points
       Date   : 2022-06-19 14:39 UTC (8 hours ago)
        
 (HTM) web link (www.gamedeveloper.com)
 (TXT) w3m dump (www.gamedeveloper.com)
        
       | unholiness wrote:
       | 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.
        
       | V__ wrote:
       | 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.
        
         | zimpenfish wrote:
         | > 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...
        
       | atum47 wrote:
       | 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.
       | 
       | https://news.ycombinator.com/item?id=31384676
        
       | jansan wrote:
       | I always see wave function collape used on squares/cubes with
       | constant size. Are other applications possible, for example with
       | triangularization or Voronoi diagrams?
        
       | arriu wrote:
       | 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/
        
       | samwillis wrote:
       | 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/
       | 
       | 0: https://twitter.com/OskSta
        
         | nick__m wrote:
         | I tried the demo, bought the toy and had an hour of meditative
         | fun. Thanks!
        
       | TheMagicHorsey wrote:
       | 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?
        
         | sigg3 wrote:
         | Yes, 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.
        
           | samwillis wrote:
           | I think thats the reason Oska (the creator) refers to it as a
           | "toy" rather than a "game".
        
           | omega3 wrote:
           | 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
        
       | tedyoung wrote:
       | Apparently procedural generation and constraint solvers are AI
       | now? I thought they were just algorithms. (I love Townscaper,
       | btw, but this article--whew.)
        
         | detaro wrote:
         | 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.
        
           | cookie_monsta wrote:
           | My Netflix recommendation engine appears to be about as
           | intelligent as those wolfenstein guards from back in the day
        
         | ThrowawayR2 wrote:
         | 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.
        
           | mikepurvis wrote:
           | 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.
        
             | ethbr0 wrote:
             | Also, 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
        
         | SamBam wrote:
         | AI 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 wrote:
           | It's called AI until it works, then it's called an algorithm.
        
         | baq wrote:
         | back when maze solving algorithms were unknown, BFS was AI. AI
         | is magic, algorithms are what AI turns into when problems are
         | actually figured out.
        
         | skybrian wrote:
         | When I took an artificial intelligence class in college a long
         | time ago, it covered things like path finding and breadth first
         | search.
        
         | p1necone wrote:
         | In video games, smoke and mirrors is an acceptable solution to
         | any problem :)
        
         | jacoblambda wrote:
         | 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".
        
         | sebastialonso wrote:
         | Constraints solvers was literally half of my AI university
         | course lol
        
         | wodenokoto wrote:
         | It's _all_ just algorithms.
        
           | iancmceachern wrote:
           | But if you call it AI you get more investment
        
         | duxup wrote:
         | In 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.
        
       ___________________________________________________________________
       (page generated 2022-06-19 23:00 UTC)