How would you make a 2D world loop?

Godot Version

Godot 4.6

Question

Hi, I’m trying to make a game that takes place on the moon, and as you know, the moon is small and round. The game will have an Undertale-like top-down perspective, and I am coming here to ask how I would make the player appear on the left side of the map if they walk all the way to the right? To make it seamless, I would make the borders be pretty featureless, but I am just asking if this is possible. I would like it to look seamless, as if you walked around the moon in real life.

You could probably do some stuff with a render texture from a camera on the other side of the world and then teleporting the player to the other side with an area.

Of course it’s possible. Draw the map twice (or four times if you wrap in both direction) with the offset of the whole map size. The specifics would depend on how your map is technically implemented.