Doughnut-shaped universesOriginally published 2007 in Atomic: Maximum Power Computing
Last modified 03-Dec-2011.
A lot of serious science goes into determining the topology, or "shape", of the universe. But it often gets boiled down into newspaper-science factoids that tell you just enough to leave you dumber than you were when you started reading.
Oh, the universe is "saddle-shaped", is it? We're living on a giant Pringle, huh? What's that mean, then?
The journalist writing the piece has no more idea than you, so don't expect a comprehensible answer.
(Actually, current thinking is that the universe is pretty much "flat", with space behaving in huge scales in the same way as it behaves in the everyday world of car trips and tennis games. The saddle-shaped thing came from early findings from the Wilkinson Microwave Anisotropy Probe, which, I kid you not, suggested that the overall shape of the universe was a "Picard topology". I think it's a great shame that that didn't pan out.)
The notion that the whole fabric of space-time may, itself, be describable as having a shape, is initially rather confusing. Until you realise that practically every player of video games already has experience with funny-shaped universes, and even with exotic stuff like quantised space-time.
A quantum is the minimum possible unit of something (so, yes, using the phrase "a quantum leap" when you mean "a really big change" is exactly wrong). And both space and time, in most board games, are quantised - you generally have a flat and tightly bounded playfield with a quite small finite number of places in which pieces can be, and the minimum unit of time is the turn.
The actual real-world physical location of a chess piece can be anywhere you like on the board, and a turn can take a microsecond or ten years. But for gameplay purposes there are exactly 64 possible locations on the board, with no such thing as "in between" or "to the left a bit", or movement rates of some fraction of a square per turn, and all turns are precisely identical in duration and effect, and indivisible. So the movement quantum is the board-square, and the time quantum is the turn.
The most straightforward board layout for turn-based games is the square grid. But grids only work equitably if your game is very highly stylised - like chess, and just about any other "classic" board game you care to name - or if it prohibits anything from happening on diagonals.
If your pieces can move in any of the eight compass directions in one turn, diagonal moves on a square board all allow them to go root-two (1.414...) times as far as they can if they move north, south, east or west. That's fine for chess, but it breaks down horribly in "realistic" turn-based strategy games, because now you've arbitrarily decided that the direction in which somebody walks determines how far they can walk per turn.
That's why so many war and role-playing games, computer and tabletop, have hexagonal grids. Then you've only got six possible movement directions, but at least they're all the same distance per hex.
Questions about the shape of space start to come into focus when you look at common games, too.
A chessboard, or the "board" on which you play a real time strategy game, is a simple bounded shape. Units can't go past the edge. Things get slightly fuzzy in RTS games when people start sneaking high-flying aircraft around the edge of the map so you can't see them, but the basic idea remains.
But lots of games have wraparound, and that's your gateway into cosmological topology. Wraparound allows you to make a finite, but unbounded, playfield.
The simplest unbounded playfield design used in computer games is the cylinder. That's Pac-Man wraparound, where what goes off the left side of the screen comes back on the right, as if the two edges were connected together with the playfield bent around into a tube.
More common, though, is the torus, or doughnut. Toroidal wraparound is your basic "Spacewar" or "Asteroids" layout, with left connected to right and top connected to bottom. Topologically speaking, you're playing your game on the surface of a doughnut.
The advantage of toroidal "space" is that, from the point of view of the little dudes on the screen, it's still "flat". Geometry works normally on it. Squares still have 90-degree corners, and the angles of the corners of triangles still sum to 180 degrees. Nothing tricky has to be done in the programming, no internal doughnut-surface-model needs to be maintained - just transfer coordinates between the connected edges, and you're done.
This means you can map a toroidal playfield perfectly onto a flat display, and everything will work intuitively. It's a bit weird when you fly upward and to the right off the edge of the screen and briefly see your little ship appear in the top left corner before it shows up again at the bottom left, but it doesn't take long to get the hang of it.
Almost all humans, in contrast, live on the surface of a sphere.
A sphere's surface is not, geometrically speaking, flat. It's curved. Draw a little triangle on the surface of a sphere and its angles will very nearly sum to the 180 degrees you expect, but the further you extend the sides, the larger the sum will become. If the triangle covers a quarter of a hemisphere - go ahead and try it with a balloon and a marker, I'll wait - its angles will each be 90 degrees!
If nothing else, this sort of thing plays hob with navigation. Look how quickly you can get turned right around when you're just cruising around on Google Earth.
And this, in essence, is why it's geometrically impossible to properly map a sphere onto the flat square display devices we use for games, or indeed onto a paper map. That's why there are so many different kinds of world-map "projections" out there. Each projection has a different set of tricks and compromises for stretching, squishing or tearing the surface of the real planet to fit it onto a flat map, putting the worst of the distortion where it doesn't matter too much. Like the poles, or the middle of the ocean, or Adelaide.
All of this is a bit too much trouble to go to in a game, particularly when you realise that all it buys you is confusion when, for instance, a unit goes as far north as is possible and now faces a wide selection of possible "souths". So practically every game with a wraparound world just uses a good old doughnut.
It's perfectly possible to make a computer game in which the play-board is a sphere, rendered in 3D on your screen. See Spore, for instance, or Populous 3 for that matter - though I think both of those games might be cheating, and just rendering a toroidal-wraparound world in a sphere-looking way.
(A reader's now pointed me to this Siggraph presentation, in which a Spore developer talks about the challenges of apparently-spherical playfields in detail. It turns out that Spore's planets may be spheres, but the textures that cover them are warped cube maps. He also mentions Super Mario Galaxy, which is another very impressive-looking upcoming weird-topology game.)
You can even make a spherical game board in the real world, by using a globe as your play-surface and attaching pieces to it with magnets or something.
Any time you want to see the whole thing at once, though, you're back to some kind of projection. And one of the basic tradeoffs of sphere-to-flat projections is that you can have a good idea of what things really look like, or you can use your display space efficiently, but not both.
Plus, a genuinely spherical play area makes some other gaming things pretty darn tricky. Like pathfinding, for instance - the bane of the RTS player's life.
It's bad enough that some of your RTS units elect to go from England to France via Spain whenever the direct route is blocked by too many of their fellows. How would you like a spherical play field that gave them the further option of going via the USA?
All of this is why everybody very much prefers flat playfields, and flat bounded playfields for games with pathfinding units.
Anyway, thanks to computer games, lots of ordinary people already understand the basic concepts of cosmological topology. Questions about the shape of this universe or any other hypothetical one are actually questions about its flatness, finiteness and boundedness.
It's perfectly possible for space to be unbounded but not infinite, if we have a "closed" universe that wraps around in one way or another. And it's also perfectly possible for space to not be flat, so that the simple Euclidian geometry that works fine for us on the small scale of our everyday lives - drawing small triangles on the balloon - comes apart when we start measuring in light-years.
So the next time you read some muddled article about how the universe is shaped like a tuba or something, you can explain it to anyone who asks in terms of Command and Conquer, Asteroids, and the Mercator Projection.
At least you'll know what you mean.