
Townscaper – A building game inspired by the design of Scandinavian cities - bschne
https://www.bloomberg.com/news/articles/2020-07-24/the-video-game-where-you-build-an-empty-town
======
polytely
The most interesting part of this is _how_ it works, which this article is
kinda light on.

It uses the "wave function collapse" procedural generation technique (has been
on the frontpage before if I recall correctly) to select fitting tiles when
the player clicks on the map to build something.

[https://github.com/mxgmn/WaveFunctionCollapse](https://github.com/mxgmn/WaveFunctionCollapse)

In the section about _notable forks, ports and spin-offs_ there are some links
to Oskar Stalsberg's twitter showing various points along the development of
this digital toy.

[https://github.com/mxgmn/WaveFunctionCollapse#notable-
ports-...](https://github.com/mxgmn/WaveFunctionCollapse#notable-ports-forks-
and-spinoffs)

I've been following this for years and it is really inspiring to see this be
so successful.

I have the feeling that digital toys will become more common when gamedevs get
access to things like GTP-3 seens like a really natural fit to me, supporting
the creativity of the player by filling in blanks in a sufficiently advanced
way.

~~~
OneGuy123
The name "wave function collapse" is such a overcomplicated academic term.

In reality this algorith is very simple:

1) try to randomly place a part at X if it fits

2) try to pick the random part in such a way that once it will be placed we
will maximize that probability that we will be able to build further on (so
you just pick the part that reduces the chance of blocking the build in the
next step in case nothing can fit anymore).

Then you just have to provide all combination of possible connection in terms
of 2d/3d graphics.

~~~
jmiskovic
"Everything should be made as simple as possible, but no simpler." I think
your version would run into dead ends very soon. You need to keep track for
all grid positions what are remaining possible blocks (this is
'superposition') and eliminate them as you place blocks ('collapsing'). You
also need a good strategy in which order to place blocks, and also how to
backtrack if you run out of options.

The Townscaper seems to be using non-rectangular grid, so it's maybe more like
a 2D graph of distributed nodes, with perhaps Voronoi algorithm to assign 2D
geometry to each node. You make it sound trivial, it's a lot of work to make
it work (and probably quite a few discarded prototypes along the way).

~~~
91edec
Oskar gave a technical talk about how he implements the grid and other
interesting bits in this video:
[https://www.youtube.com/watch?v=1hqt8JkYRdI](https://www.youtube.com/watch?v=1hqt8JkYRdI)

~~~
jmiskovic
Thanks for the link. The grid generation is so much more complicated than I
assumed.

------
zadjii
I remember seeing this on r/proceeduralgeneration a while back - it's hard to
forget an art style as distinct as that. I'm really glad he did end up putting
it on steam, because it does look like a really interesting toy, even if
there's not much game to it yet.

People often forget the first versions of Minecraft weren't much more than a
toy either, and look at it now.

~~~
plorntus
Minecraft (before survival mode was added) was a free game though to be fair

~~~
ido
IIRC minecraft was only free for a very short while (a few weeks into
development)?

~~~
grenoire
Creative mode, where you have infinite blocks and just build stuff, was free
to play online through the Java applet. That was I think until beta came out.

~~~
lazycouchpotato
They brought it back last year. It's now at
[https://classic.minecraft.net/](https://classic.minecraft.net/)

------
alextheparrot
I recently purchased Islanders [0] which is a similar incremental building
game. Really peaceful to play and just zen out for a bit. Might grab
Townscaper too, looks nice.

[0]
[https://en.wikipedia.org/wiki/Islanders_(video_game)](https://en.wikipedia.org/wiki/Islanders_\(video_game\))

~~~
kibwen
I can second Islanders, it's a lovely and relaxing game. After playing a level
to completion I'd find myself just gazing at it for half an hour or more just
imagining life and society on the island. Any game that can so playfully
stimulate my imagination is an instant recommendation.

My only complaint when last I played was that they didn't let you save a
previous island after moving on to the next level, which makes progression
somewhat bittersweet.

~~~
Quequau
My friend gifted me this and I really struggled to get it. My conclusion was
that it was solely about finding the right spot to place things, given the
constraints of the tile and the world.

Is that right?

~~~
cdirkx
Mostly, yes. It's a simple but neat game.

There is however some strategy involved in planning ahead. In the early game
you might want to place buildings less optimally, to leave room for later game
buildings that are worth more points, or set up large bonuses from other
buildings.

------
leetrout
Related discussion the other day on his webgl toy Brick Block

[https://oskarstalberg.com/game/house/index.html](https://oskarstalberg.com/game/house/index.html)

[https://news.ycombinator.com/item?id=23904991](https://news.ycombinator.com/item?id=23904991)

------
236dev
Unfortunately less and less of Scandinavia and all of Europe is looking like
this. It's a shame what has happened to architecture in my opinion.

~~~
Dahoon
I live in Scandinavia. Doesn't look anything like what style we have or had to
me at all. Looks more like something from Germany or Austria.

------
timcameron
For anyone on Mac who is keen to try it out, there is a public Beta available.

How to play the beta: 1\. Buy the game on Steam 2\. Once the game is in your
Steam library, right-click on it and select 'properties' 3\. Click the 'BETAS'
tab and select the beta from the dropdown list 4\. Install the game 5\. Enjoy
:)

------
jamestimmins
This looks awesome!

Heads up that it's only available for Windows at the moment.

~~~
ishanjain28
Works fine on Linux with proton 4.11 or 5.09 but you do have to add the WINE
D3D env variable in launch options otherwise it keeps locking up every few
seconds

~~~
rudilee
Thank you so much, can confirm to works great. In case anyone looking for how
to, follow the instructions on
[https://github.com/ValveSoftware/Proton#runtime-config-
optio...](https://github.com/ValveSoftware/Proton#runtime-config-options),
uncomment the PROTON_USE_WINED3D=1 line.

------
matthewhartmans
This looks super neat! Love the animation styles, just looks so satisfying!

------
soared
While reading I though this would be perfect for the Japanese market if he
included an art style for the country - and then the author mentioned it
himself.

------
simurg
Looks awesome. Would be fun to play it now as I actually live in Stockholm
from last year.

I wonder would it be possible to extend the game with more city types.
Cyberpunk-city builder would quite interesting.

------
bluehazed
Oskar Stålberg makes some great games. Dude did Bad North before this one.

------
winrid
Great, well designed little game.

What engine is this made with, if any?

~~~
mwill
Almost certainly Unity3d, the developers previous games and toys are made with
Unity3d, and use the same technique of wave function collapse, I can't imagine
he changed engine since since.

~~~
binarycrusader
It's Unity; I just checked my local copy.

------
jdshaffer
I picked this up on Steam as well. Definitely a fun way to relax and spend a
few minutes. Really well designed and implemented!

------
mildzebrataste
My fourth grade son loves this game. As do I. It’s like meditation

------
foota
Wow, this looks great!

------
abafazi
I picked this up on Steam and its quite fun for a while, I just hope it
continues to see development

------
XCSme
Is this a game or a "video toy"? A game should have a goal and maybe a
win/lose condition. I saw a streamer playing this a couple weeks ago and it
seemed that the only thing you can/have to do is to build random towns.

EDIT: Nevermind, it is mentioned in the first paragraph:

> When Oskar Stalberg announced the release of Townscaper a few weeks ago, he
> made a point of calling it a “toy” rather than a video game — because it has
> no goal apart from the sheer enjoyment and satisfaction you get from seeing
> a pretty town rising from the sea as you click.

~~~
freehunter
Personally I prefer “toys” to real video games. I’m not very good at video
games that have a win/lose condition, and when I lose I get upset because I’m
just trying to have fun. My favorite games are actually toys, like BeamNG
Drive, Euro Truck Simulator, Cities Skylines, etc. Games where I can create my
own win/lose conditions and maybe even create my own narratives.

I’ve gotten more enjoyment from GTA V and Red Dead 2 from just random playing
after I had already finished the story missions, because there was no stress
to be good and no punishment if you make a mistake. You can just _be_ , rather
than having to be perfect.

~~~
082349872349872
> _You can just be, rather than having to be perfect._

Shorter existentialism: life is a massive multiplayer open world game.

~~~
Hyolobrika
You have a ridiculously complicated name. Can I just call you 'numbers'?

~~~
082349872349872
By all means. Pleased to meet you.

