In 3D, just generalize from the 2D case.
It's not that simple. "Flat" is not a topological property, it's a metrical property. The correct statement is not that "the" 2D torus is flat, but that it is possible to put a flat metric on the 2D topological space that is called a "torus". That's what the "Asteroids" space does.
But it is also possible to put a curved metric on the same topological space--for example, just use the obvious metric derived from the embedding in 3D Euclidean space that we're all familiar with. The "torus" topological space in itself has no metric, and both the flat "Asteroids" metric and the curved "doughnut" metric are valid metrics on that topological space.
Interesting, I thought it would be like the surface of a sphere. What's the difference?
(Also, in Mercator it looks like you can approach the top or bottom edge diagonally, but this is an illusion, an artifact caused by the projection. You can only ever approach the north pole directly from the south, and once you cross it, you find yourself having "rotated" exactly 180° and are now facing south, in addition to having jumped to the opposite longitude. And vice versa for the south pole.)
The equirectangular projection does map the top and bottom edges to their respective poles, but Mercator just keeps going up (and down).
Well dang, I just realized that maybe I've based my homebrew D&D world on a Mercator projection.
There's "continuity" between two points that, in the 3D rectangle representation, don't appear to have continuity. This continuity is possible because spacetime may be all warpy like that... You can't exit the space at the boundaries. The door out of the room walks you into the same room from a different door.
eg. exit Face C at some point, and re-enter from Face A, because Faces C and A are aligned at that point.
I'm lost beyond that point though.
In 3d: take a solid cube and glue the three pairs of opposite sides together. Maybe a bit difficult to visualize, but the idea is that if you live in the cube and try to exit it on one side then you re-emerge into the cube from the opposing side.
https://en.wikipedia.org/wiki/3D_projection#Limitations_of_p...
You don’t have to do such geometric contortions though. The surface of a sphere is a two dimensional space that is finite but unbounded.