Live data from Hacker News

Infinite procedurally-generated city with the Wave Function Collapse algorithm

marian42.itch.io

71–80 of 145 posts

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

#72
post #63
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?!

I’ve worked as a level designer on FPS games. Dynamic generation might suit certain types of games (or something like an event mode), but a huge amount of design work and iteration goes into the layout of multiplayer game levels to make them enjoyable. It’s also important that players/teams can memorise the level layouts in order to form strategies. Still a cool idea though!

You kow what would be more fun - is a game with a squad that needs to advance along a path to a goal co-op style taking out hoardes coming in the opposite direction - and the prize goes to longest life of the team.

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

#73
post #63
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?!

I’ve worked as a level designer on FPS games. Dynamic generation might suit certain types of games (or something like an event mode), but a huge amount of design work and iteration goes into the layout of multiplayer game levels to make them enjoyable. It’s also important that players/teams can memorise the level layouts in order to form strategies. Still a cool idea though!

You could design to have repetitive features, ex. you know that any tunnel will always have stairs to a higher level next to a lamp.

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

#74

Earlier quoted context omitted.

As a physicist who works with quantum mechanics, I have to say, "wave function collapse", is an extremely apt name for what you're describing. Usually when quantumy things are used in names of things it's just 'cause it sounds cool, but this is spot-on.

It's really not. There's no probability field (unless you count booleans as a scalar), no complex numbers, and no entanglement. It's just constraint propogation, optimized for certain conditions and given a fancy name. I guess you could call it a markov random field, but I don't think it does unbiased sampling.

There kind of is entanglement though!

You 'measure' one cell, and then all the other ones 'collapse' to values consistent with the result, because they have a hidden relationship with the cell you measured.

That's what happens in quantum mechanics. When you measure one thing, all the other things its entangled with collapse somewhat too - but not necessarily completely, it depends on the entanglement they had with the measured system.

It's a metaphor, I'm just saying it's very apt, not that it's mathematically equivalent.

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

#77
If this is based on wave-function collapse, what does it do when it hits an impossible/contradictory state?

(See https://github.com/mxgmn/WaveFunctionCollapse where it mentions "It may happen that during propagation all the coefficients for a certain pixel become zero. That means that the algorithm has run into a contradiction and can not continue.")

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

#78

For all those of us not running Windows, is there a video anywhere showing this off?

It's on the page: https://www.youtube.com/watch?v=VqGDxNsAkKE

Thanks! It wasn't before :)

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

#79

Earlier quoted context omitted.

If you (or someone with a Mac) wants to create a build with the Unity Editor, I'll add it to the itch.io page.

I have a vive, but I don't have a mac. I could throw the SteamVR plugin in and get it up on windows, but someone would have to test it on mac

I’d love to try it on windows if you can do it.

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

#80
post #77

If this is based on wave-function collapse, what does it do when it hits an impossible/contradictory state? (See https://github.com/mxgmn/WaveFunctionCollapse where it mentions "It may happen that during propagation all the coefficients for a certain pixel become zero. That means that the algorithm has run into a contradiction and can not continue.")

In the algorithm as it's described on that page, nothing is returned in case of a failure. I first implemented it so that single blocks would fail and a white cube would spawn at that position. Now, it uses backtracking. It keeps a history of its decisions and removes some whenever it reaches a contradiction.
Post reply on HN