Infinite/repeating Terrain

Hello, I’m interested in creating 3D environments that are infinite and repeat (rather than environments that are infinite and randomise differently each time).

An example might be a chain of 3 rooms, where exiting the last room takes you back into the first room until a given puzzle is solved. Another example would be an infinite forest that the player runs through, but always ends up “back at the same house”, again until a given puzzle is solved.

One feature I’d like to have is that if (for example) the player changes something in the house, then runs through the forest and arives back at the house, that thing remains changed. There are some examples of puzzles that use similar mechanics in the game “Antimatiere”

Can anyone offer any script examples, game examples or general opinions on a good way to do this?

You could do any of this if you just use a teleportation system. Make a grid of the area that you need. Attach it all to 1 game object at 0,0,0, you then instantiate it 8 times, front, back left right and corners. When the player exceeds the bounds of the first cube, he is teleported back to the other side of that cube. So he walks off the left side, and winds up on the right side. Thus anything that has “change” in the first cube, remains in the first cube.

Cleverly, you just make the block of terrain tile like a texture, so no seams can be seen.

So using your cabin in a woods theme. You keep walking into the same cabin and doing the same stuff, but when that cabin’s puzzles are complete, you change the north tile to something different, keeping the same trees from the cabin tile and it should tile with the cabin. You walk onto the west, south or east tiles, and you keep going back to the same cabin. You travel north, and as soon as you step foot onto that tile, it removes all cabin tiles and sets the 0,0,0 tile to the next puzzle pieces, teleporting you back to the south side of the new center piece.