Live data from Hacker News

Infinite procedurally-generated city with the Wave Function Collapse algorithm

marian42.itch.io

111–120 of 145 posts

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#112

This evokes a deep House of Leaves kind of horror in me when I play it. Similar to when I play No Man's Sky or Zoom in on the Mandelbrot set. Infinite sameness... forever...

The unity game engine and everything worked really well though. It immediately used my HOTAS controllers, which I wasn't expecting. Impressive demo!

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#113

Earlier quoted context omitted.

I get the feeling it's path-dependent. If I start uptown and you start downtown the algorithm could potentially show us two different cities. So we would have to agree on a city beforehand.

This is exacly it. Collapsing one area changes the possible blocks for nearby areas. If you use the same seed, you can still get different results by exploring places in a different order. Maybe there is a way to get around this though.

either you have a server doing the collapse or you could send explored tiles as constraints to the other clients (this also reveals your position, but oh well).

of course tiles would need to be large enough to keep latency reasonable.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#114
post #104

Earlier quoted context omitted.

While a clever interpretation, that's not what copypasta means. It's literally a permutation of the phrase 'copy and paste'; popularized on 4chan, as a term for posts that would be repeatedly copy/pasted.

There's something special about it when applied to code though. Spaghetti code that's been copy/pasted is, in particular, quite worthy of being called "copypasta".

I have never seen the term being used in programming (for code) this way to refer to spaghetti code. Unless your definition caught on, using it that way would just confuse people, because copypasta already means something else.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#115
post #90
post #89

Earlier quoted context omitted.

Minecraft in survival mode is probably the worst. You can very easily get hopelessly lost - especially in the Nether world. Very easy to lose track of your portal which is not fun.

It can be fun. It can also be fun to come up with some sort of breadcrumb system and movement planning. Exploration in proc gen worlds is mostly pointless anyway. Build roads to everywhere you want to go and you'll never get lost.

Yes, solved that by making big arrows out of bright coloured blocks pointing back the way I came. Once you find one arrow you're fine.

I also carried a lot of dirt around for those times when a bridge or stairs were needed to keep moving.

Pointless yes, but you could say that for most games.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#116

Earlier quoted context omitted.

Since the algorithm is not deterministic I imagine it would be a nightmare to make all clients see the same world. But I agree it would be fun!

someone explained above that it’s just a bunch of “tiles” (assume they’re premade), so it’s a fairly simple matrix. it would be much less to transfer than custom maps for example, where clients download a large payload at the start of the game. or, you don’t really care about tiles except that are directly around the players, as long as there’s a reasonable path between them. the city between them can regenerate and…

> generates the same numbers so that it is deterministic.

The problem is, that the algorithm is path-dependent, deterministic PRNG is most likely already used, and doesn't help.

So if 2 players started at (x0, y0, z0) and went to (x1, y1, z1), but took different paths to get there - they would see a different tile :)

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#117
post #64

Earlier quoted context omitted.

This is exacly it. Collapsing one area changes the possible blocks for nearby areas. If you use the same seed, you can still get different results by exploring places in a different order. Maybe there is a way to get around this though.

The server can establish an ordering for the collapse events, and send back to the client that ordering. Edit: depending on how complex the world is, the server could probably just send out the world changes itself, rather than relying on each client to correctly (deterministically) apply the changes. It needs to do so anyhow for late joiners.

You kind of have to have the server doing the collapse anyway, or clients can cheat by biasing the collapse towards tiles that are beneficial to them in some way.

You can partially work around this by requiring the client to use a server-provided PRNG seed, although even then a kind of aim bot could help the player decide which path to explore to get favourable tiles.

So your best bet to avoid cheating is to do the collapse on the server using a hidden RNG.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#118
post #97
post #64

Earlier quoted context omitted.

The server can establish an ordering for the collapse events, and send back to the client that ordering. Edit: depending on how complex the world is, the server could probably just send out the world changes itself, rather than relying on each client to correctly (deterministically) apply the changes. It needs to do so anyhow for late joiners.

Just keep some buffer of generated tiles around the players, and either use a server to asynchronously decide on when which player moved to cause which tile to be generated. You can also use something distributed if you go for peer-to-peer communication. fix the seed and ensure everyone aggrees on the order in which they tell the generatoe that a certain chunk needs yo be fixed or should be freed from memory. Conside…

Peer to peer greatly complicated multiplayer architecture- you _can_ build it like that, but it will be 10 times more difficult.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#119
post #9

I imagine a counter strike scenario where the area of engagement is constantly moving throughout this infinite city, so the fight is waged over a constantly changing landscape. Hecka fun or hecka confusing?!

It's not infinite or procedurally generated, but the basis sounds a little like the Battlefield Rush modes present in the Bad Company 2 (my fav), BF3 and BF4 games. Haven't played the newer games. Maps have only 4-5 "sections" where conflict occurs each with different design, layout and challenges.

Re: Infinite procedurally-generated city with the Wave Function Collapse algorithm

#120
post #9

I imagine a counter strike scenario where the area of engagement is constantly moving throughout this infinite city, so the fight is waged over a constantly changing landscape. Hecka fun or hecka confusing?!

It's not infinite or procedurally generated, but the basis sounds a little like the Battlefield Rush modes present in the Bad Company 2 (my fav), BF3 and BF4 games. Haven't played the newer games. Maps have only 4-5 "sections" where conflict occurs each with different design, layout and challenges.

I knew if I scrolled enough I would find a comment about gaming. I have often wonder if well balanced, authentic looking, fun maps can be generated. This type of research looks to be part of the solution.

Would be fascinating to see if key BF maps concepts can be incorporated.

Post reply on HN