When you think of the term “open world”, most times I bet you’d imagine either an action sandbox like GTA V or an emergent realm like Minecraft. But despite the compelling nature of these games, neither of them have a crucial element: the feeling of a circular world.

Before we get any further, though, let’s make some semantics clear. Sidescrolling games like Starbound easily take advantage of wraparound because they only need to connect one axis. This will be specifically talking about anything that takes advantage of the full horizontal plane, whether top-down, isometric, or 3D.

Advertisement

Also, let’s discount space/planet exploration games like Elite: Dangerous and the upcoming No Man’s Sky. Because they rely heavily on simulating an entire spherical planet from multiple perspectives, they’re not really practical for games that stick with ground-level action.

Finally, something to preface the stitching approaches: in practice, you wouldn’t literally copy the whole world at the seams. You’d set up a whole subsystem that would copy the view on the other side and simulate physics.

Baby’s First World

As outlined in the video, there are a few naive approaches that have been done in the past.

Advertisement

The quickest way is to simply tile up a rectangular world as-is, and stitch the ends together. It makes for hassle-free world generation and easy map reading, but it makes mathematicians cringe. Try to put some emphasis on the “as-is”, because that’s the crucial problem with this approach. Simply wrapping the opposite ends distorts the shape and creates an entirely new shape - the torus.

Rolling Dice

The video also puts emphasis on an unwrapped box as a potential candidate. Cubes in particular are one of the five platonic solids - shapes familiar to most folks as the perfect candidates for dice - and these are the most promising candidates for a seamless open world.

Picture: Unwrapping of the world onto Platonic solids, the first stage of the little-known myriahedral projection.

That’s because when unwrapped, the shapes on the surface form what is called a net. This is what the engine and the player will see. The problem is, the nets as they stand don’t really make for easy world generation. Computers prefer right angles and no wasted space.

However, let’s take a look at the tetrahedron net, which incidentally resembles the Triforce. It’s the simplest of the Platonic solids, and on the surface it looks like it won’t be any more acceptable than the cube. But this is where the pyramid tea bag in the video comes in handy.

Tea Time

Contrary to the credit given to Lipton for being the brand that happened to create the lightbulb above my head, the design of the pyramid tea bag is actually credited to the Japanese company FUZO International.

Picture: Diagram from original patent. The dotted fold lines are upside-down compared to the implementation.

Advertisement

Back on topic, something about these tea bags resembles the net of the tetrahedron. The one difference is that the topmost triangle was split down the middle and rotated to fit the sides of the rest of the net, making a rectangle. And not just any rectangle - one twice as wide as it is tall, making two squares!

This is important because not only will a generator or designer be able to easily cope with this, it’s easy to understand that the two squares essentially make two hemispheres.

The Moment of Truth

Okay, we’ve made two squares, great! But the question now is, how to we get the computer to wrap them around? We can’t simply tile the squares like the naive approach above - we’d be right back where we started.

Advertisement

No, what we need to do is mark where the edges meet each other. This is explained in the video, so a simple diagram will suffice. In this case, a couple new elements were added for clarity purposes: circles denoting the west/east hemispheres, and a horizontal bar further connecting the squares.

The real genius in this is realizing that instead of a straight tile pattern, the actual solution is much more wonderful. The central piece is left with a white background for reference, and you can imagine the pieces around this being the way a game engine lays out the wraparound.

This grid is everything you need to know about the wraparound. Every second row is rotated upside-down relative to the first, and every two rows is shifted one hemisphere to the side.

Advertisement

And an even greater part is that the actual world can feasibly be any size, from a modest deathmatch map to an ungodly expansive landscape. Theoretically, a rectangle of any proportion could work too, but two squares just makes more sense.

As of today, this is untested in any practical software, and I don’t really plan on doing experiments anytime soon. However, since I’m putting this out in the open, I do encourage plenty of creativity with this approach.

Perhaps you may find a brand new approach that’s even easier to implement. Or you could find an extra feature to add on and enrich the experience. In the end, hopefully the next big open-world game will truly feel complete.

Follow the author’s DirectTAYry.