Finite world with no/infinite borders in 2D

Hi, it’s my first post here, i was not sure if it is the right place but i thought you would be of a great help for me.
I was wondering if it was possible to make in a 2D game a finite world with no border : basically, the 3D equivalent would be a sphere as a ground.
(Then, if we start from a point A and go straight up, we would reach the same position at the end).
You have any idea or exemple of projects that use it?
My first thought was dividing the map in squares and “teleport them” to the position of the player if he travels across the whole map, but it does not feel quite right and in multiplayer it would have some issues.
Thank you for reading and perhaps responding!
Max

The dividing the map into squares thing is a good solution but one common issue that you’d probably fall into is floating point precision errors , specifically when the player - for example - keep running left for hours/mins straight (depends on the players speed) , the player’s x position might be something in the millions (along with the objects surrounding him), that can lead to floating errors compounding with every calculation related to the positions (rendering , physics , collision) , one of the most noticeable ones is visible shaking with the graphics.

A pretty common solution to this is called origin shifting , the idea is to pretty much move the world instead of moving the player whenever the player “moves” , that way the player would always be in (0,0) calculation wise so your math wont have to deal with floating point issues.

Okay, thank you a lot! :slight_smile: