Portfolio of game developer Oskar Stålberg, with browser demos of procedural generation, wave function collapse, and his game Townscaper.
Commenters enjoy Townscaper as a relaxing toy and link his demos as clear examples of wave function collapse and WebGL work.
I am a huge fan of Sandspiel, which Max described in this article from 2019, and recently I was delighted to discover that he and TodePond have been doing a huge amount of wonderful work since then.
What happens when you combine Sandspiel with a Scratch-like blocks based visual programming language that lets you look inside and see how rules work, tweak and modify them, and even define your own rules for different types of particles? And then form a community around it for sharing
Here is Max's and TodePond's brilliantly ambitious visually programmable sequel, Sandspiel Studio!
https://studio.sandspiel.club/
Here's my profile, where you can play with the version of Max's flower growing rule that he shows here:
https://www.youtube.com/watch?v=ifyYITDq1oo
...to grow underground potatoes and fancy flowers:
https://studio.sandspiel.club/user/clanzgor8006109mtjooi348t
I've written more about Sandspeil Studio and related topics of artificial life, cellular automata, and visual programming, and quoted some interesting discussion with Max and TodePond from their Discord server (they actually already knew about most of this stuff, but they love it as much as I do), in the "Ask HN: What weird technical scene are you fond/part of?" discussion, in reply to api's comment about Digital Artificial Life:
https://news.ycombinator.com/item?id=33698163
api 67 days ago | parent | context | favorite | on: Ask HN: What weird technical scene are you fond/pa...
Digital Artificial Life --…
This uses the "wave function collapse" algorithm. Oskar Stalberg also made a great demo of how it works[0], but it might not make sense just from that. Martin Donald made a really nice youtube video on how it works[1]. The name "wave function collapse" can be off putting but it's pretty straightforward, and an algorithm that can come in handy for many uses both in game development and just general software development.
I'm actually procrastinating on HN from working on a GPU parallelised version that can generate millions of positions every frame. In Townscaper you can actually see that the algorithm runs quite slow and lags behind the players input, there's just a bunch of animation to hide it. I'm hoping to eventually get a version that can run in log2(mapsize) time.
[0]http://oskarstalberg.com/game/wave/wave.html
[1]https://www.youtube.com/watch?v=2SuvO4Gi7uY
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
Not sure why, but whenever I'm presented with something like this, I always seem to want to build the least functional, least utilitarian, most maddening and stupidest structure I can.
http://oskarstalberg.com/Townscaper/#IzhCuCAJioFFB00CAajRAN2AiWdAR32DI6zcARP_hGSABtoIAaaBA0GjIoyGQfxjI6jcEt9Ii_YDQDJggWU0GjIoyGBQwPCoP5AUNhAg2cA9hHAoPtA0QiIqFVB00iAajRUt6AimfUXmhoBEB0jcKgu1CRwmAo9TDpggWUNtCAajRA0YDIq5HU1TSIatEANbAg2PABNkAaRFENtIi2YERjNCgmfQQPlg2mENSb2AE0_BAaIFAtoopFB0GjIasBA0qDAa_BB9MyJJR12kAakSAtWJCa2S7XAohMtoBg2YERjNgoWdAQwPonAQLBabAANSACa2AAtfohMA0iCAajREN2AA6JAERtEACaSAE12AIoRCQQrFgomNEBtfJiaaBAtyIasBE0TJAakAEtWoZLQ0_hIohEAQLKoqNGRQjNggeCIRQLRigmk02kIoRKtWBa-QE0QCAqFFANtoNGQQPBgIoJBQQbDatCU1_hIqFFBNtAo6JAUBtEAAaSAE02gAoRCAQr1ZDR0_BohEtoAonSAE02sAoR6ahIa-Q1
You already can, Unity has their own section of Unity on the web games you can play. They aren't graphically impressive usually but comes down to lack of development resources.
Then there's examples like Townscraper (https://oskarstalberg.com/Townscaper/) which are graphically nice and already playable on the browser. There are also many games on itch.io of varying quality, but IMO Townscraper is the nicest.
The problem of storage is also quite important, it's hard to push a high quality game on the browser when a lot of people won't stick around for the 10GB+ download needed, not like they would if they're downloading from the Xbox store or something like that. So it's a bit of a cultural issue as well on that front.
That was my immediate reaction as well. Some part of my brain just prefers building walkways. In the web version, you apparently have to keep adding walkways above a building to convert it to a walkway. Super satisfying.
https://oskarstalberg.com/Townscaper/#IzhCuIQmN6b832-HkACCzFNQQQOtACCzbAnkkkT_b-fi_0_GDBB58-ncAAAzbaDAgcjjkkc_-zMAAA5A_vWAAAz97pFAAzy_V-nkAAAkr173LaAAkT7P3AAAIXrHSAAIX0AAInWABIfKBAAQuNvWvoACQ_MBAAgcbekAEkrVggc2AEk7XgggcIBkkcRBkPBAAAIXiAAA5kAAAI3mXLAIntAAA5QCAI5iCIfCIAAQuEBAAzJBAAQuNBAAzRCACQuWBAAzZDAAQufAAQuoAznACAAkTCAAgcbAgcketswGAgkcRBkPB8SAAAInEAI3mHpJXLAIA5sBAAI3PAAIHSA5iCIfCIAAQuEQQAzJpICQuNBRAzRaCCQuWAQObASQz9DQuoAznAAAAkLBAEgcSKAAkbTAEgckCAAkrFAEgc2AEAk7HgcIBkD