Infinite backrooms!

World link: Here!

Get lost in an infinity of yellow wallpaper and equally yellow carpets. You can keep walking forever, but I promise you, you will never reach the end!

A world I made to prove that realtime procedural world generation is indeed possible using only Udon. No shaders or CRTs were used in the process of creating the world generation code.
For a full explanation of how it works, plus a link to download the world files, scroll down past the images.

Pics

How it works

The world consist of a 5 by 5 grid of chunks centered on the player. If the player moves, the chunks are moved in the same direction to give the appearance of an infinite world.
Whenever you cross a chunk border, a row or column or both (depending on your walking direction) of chunks are taken from behind you, and moved to be in front of you. They are actually moved instead of GameObjects being destroyed and new ones being created to reduce any chance of a memory leak, as each chunk object has a lot of stuff attached to it.

Although, to be more precise, this chunk loading only occurs if the chunk coordinate on the axis the border crossing happens on is odd or even, depending on the direction the border is being crossed on. Even if crossing in the positive direction, odd in the negative.
This is to prevent scenarios of repeated chunk loading by a player repeatedly walking back and forth over a chunk border.

The actual world generation algorithm is a modified version of the "Recursive subdivision" maze generation algorithm, that is explained well enough on Wikipedia.
I modified it to be more playable. The original algorithm generates a maze with only one possible solution. This would mean players would most likely become stuck in the spawn chunk for ages, looking for a way to progress, only to then get stuck in the next chunk. So, my algorithm inserts at least two holes in each wall (more if the wall is very long), to offer multiple paths out.
To make the space look more backrooms-y, I also added an additional exit condition for the recursion, where it will simply exit by a random chance that increases as the segments get smaller, causing a sizeable distribution of open spaces, which are connected either directly or by tight corridors.
Lastly, of course, I ditched using recursion immediately and am instead using a stack and loop.

After the maze generation step, the maze exists as a array of ints, representing a grid of cells, where each of the first 4 bits represents wether a wall is present on one of the 4 sides of the cell. This needs to be turned into a mesh now.
Luckily enough, Udon exposes all the functions required to procedurally generate a mesh. And generating a flat plane for each present cell wall is fairly trivial. Though putting the entire chunk in one mesh is a bad Idea, as it causes lighting issues in Unity. So the mesh is split into a 4 by 4 grid of connecting meshes.

To make sure everything is synced properly, the RNG used by the maze generator is seeded using a combination of a network-synced world seed, and a local chunk seed that is derived from the chunk coordinates.
Finally, I just need to make world generation trigger whenever a chunk is moved (or initially on world load), and we got our infinite backrooms!

Well, very laggy ones. Obviously doing all this in one pass on a single frame is going to lag your game. A lot. So, everything needs to be split up over multiple frames! Luckily, this is easy as all the algorithms I described so far run in either a while or a for loop, making it trivial to split execution up over multiple frames by only running a maximum number of loop iterations per frame before breaking and waiting for the next frame to resume.

Fun fact: Udon is slow. So slow, infact, that the preparation step for the mesh generation lags the game if not split up over multiple frames as well. All this step does is count the number of present walls in the maze, so the arrays holding the mesh data can be initialized to the correct size. Yes, just counting things will cause a lagspike in Udon if you do it more then a few times.
Infact, I tried entering just an empty for-loop into one of my scripts that ran 10,000 times but was literally empty, and even that caused a lagspike! Unbelievable!

Unfortunately, I significantly lack the free time to continue work on this and turn it into a proper game or anything like that, so I made the Unity project files public, and hopefully, someone can make use of them, even partially. The chunk loading script alone should be helpful to someone out there, I hope.
If you want to take a look, here: GitHub link!