Live data from Hacker News

Infinite procedurally-generated city with the Wave Function Collapse algorithm

marian42.itch.io

31–40 of 145 posts

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

#31

This is great. Can you Please and thank you port it to the vive? Edit: this might not be too hard. It’s open source and has instructions for loading it into unity. You might just have to add the vive camera and toolkit.

I don't currently have access to a Vive, but I worked with it earlier. All that needs to be done is add SteamVR to the project and hook up teleportation. That's it.

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

#32
post #10
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?!

Are the combatants channelled into the same area? If not you end up with a game of “needle in the (forever growing) haystack”.

You could throw in some magnets there, like a flag whose position is known and has to be captured before the other team does it.

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

#33
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?!

As someone who already has an abysmal sense of direction (I basically never play 3D games because I'm just always lost), this is my nightmare.

If the playable area was small enough, this could actually reduce your disadvantage: nobody else would know what the map looked like, either.

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

#34
So, does this algorithm need to remember all already decided tiles forever to be consistent? Or to recalculate everything from the start each time you teleport?

I've been working on similar (but much simpler and 2d) algorithm, and the gist of it was:

- divide infinite world into 2d chunks of constant size that easily fit in memory

- when player is nearby - deterministicaly generate edges of the visible chunks basing on perlin/simplex noise and random number generator seeded with the world coordinates of the chunk

- fill the chunks basing on 2d markov chains trained on hand-crafted map, starting with the edges going inwards

It needed a lot of training data to produce something that makes sense with even small number of possible tiles, so in the end I just generated everything with simplex/perlin noise and some heuristics.

I guess instead of markov chains I could use explicit rules to fill the chunks, like this seems to do.

But it had the advantage that it was very fast - because you didn't need to remember everything from the starting place of the player. You could teleport 1000 screens left, and then back, and everything worked fast and regenerated everything the exact same way.

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

#35
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?!

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!

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

#36

Does this remember what’s been generated if you come back to an area you’ve been before?

Yes, it does. However the algorithm is not deterministic. If you close the game and start it again, you will see a different world.

If you want to shoot me an email I could help port it to the vive? I might just need a few detailed instructions and I can figure it out from there.

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

#37
post #20

Here's a collection of relevant links for the lazy: * Animated gif: https://twitter.com/marian42_/status/1061785383057440768 * GitHub page (demo in Unity): https://github.com/marian42/wavefunctioncollapse * Original Wave Function Collapse Algorithm: https://github.com/mxgmn/WaveFunctionCollapse

I’m too lazy to copypasta the links. Can you please reformat to make them clickable?

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

#38
post #37
post #20

Here's a collection of relevant links for the lazy: * Animated gif: https://twitter.com/marian42_/status/1061785383057440768 * GitHub page (demo in Unity): https://github.com/marian42/wavefunctioncollapse * Original Wave Function Collapse Algorithm: https://github.com/mxgmn/WaveFunctionCollapse

I’m too lazy to copypasta the links. Can you please reformat to make them clickable?

Animated gif https://twitter.com/marian42_/status/1061785383057440768

GitHub page (demo in Unity) https://github.com/marian42/wavefunctioncollapse

Original Wave Function Collapse Algorithm https://github.com/mxgmn/WaveFunctionCollapse

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

#39
post #32
post #10

Earlier quoted context omitted.

Are the combatants channelled into the same area? If not you end up with a game of “needle in the (forever growing) haystack”.

You could throw in some magnets there, like a flag whose position is known and has to be captured before the other team does it.

Doesn't have to be a stationart target. Just mark the position of the leader in a deathmatch scoreboard on the map and tge problem solves itself while the game can keep moving over the map.

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

#40
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?!

couple that with some mirrors edge like free running mechanic. maybe a team vs 1 chase so all players would be running toward the same thing. reminiscent of a chase scene from a movie through an unfamiliar city, where a dead end could be just around the corner.
Post reply on HN