Monday, December 7, 2009

The Geometry of D&D

Alright, this post is about both D&D and math; that's your cue to click over to some other tab or window before you get bored to death.

4th edition D&D uses non-Euclidean spaces to simplify combat. Rules-wise, this means that moving along the diagonal counts as the same distance as moving vertically or horizontally on the battle mat. If you know anything about math, you will quickly realize that this is stupid; moving five feet along the x axis and then five feet along the y axis does not make you five feet away from the origin - it makes you the square root of 50 away from the origin (about 7 feet and some change).

What this means is that everything is completely wonky when you extrapolate for a little bit. Take, for example, travel times. To your left you will find a handy MSPaint map, showing the settlements of Aberforth, Baelish, and Codwyn. Now then, the distance between these towns can't actually be determined by looking at where they are on the map. Instead, you need another piece of information - which direction is the grid of the world is aligned?

If the grid runs due north, then Baelish is twice as far away from Aberforth as Codwyn. In fact, it takes just as long for me to go to Baelish whether I travel through Codwyn or take the direct route. That's because there is no single direct route; so long as I'm moving up the y-axis (aka north), it doesn't matter where I am on the x-axis (aka east and west). This means that if you're traveling from one point to another, and the line between points is aligned to the battle grid, the shortest distance between two points is not the single solution it is in the real world (a line) but a whole host of solutions which are confined to a square with one corner at your destination and one corner at your origin.

However, if the grid were to be rotated 45 degrees, to be pointing north-east, the distances between the towns change dramatically. At this alignment, Aberforth, Baelish, and Codwyn are all equidistant from each other. That's right - they now form an equilateral triangle, albiet not one that's equiangular. We now have the opposite problem we had before; the shortest distance between two points which are 45 degrees offset from the grid is, in fact, a straight line - and any deviation from that straight line takes comparatively long than a real-world deviation.

This is weird; geometry now depends not only on angles and distances, but alignment to the grid as well. In our ABC triangle, the AB side can shrink by half depending on which way the grid is aligned.

Let's take another example; let's say you're standing in the center of a 25ft. x 25ft. room. In the real world, the corners are further away than the sides. But in D&D world, every point on the wall is equidistant. Some thought on the matter will reveal that this doesn't describe a square, but a circle; a circle is composed of those points which are equidistant from the center. But again, this depends on how the grid is aligned. A square offset from the grid would translate more properly into a four-pointed star; the sides are all bowed in.

Imagine that you built a box that spun in D&D world. As it went through its rotation, its alignment to the grid would change, causing the physical properties of the box to change as well. At full alignment, the inside observer would see the walls as a circle; as the box kept turning, the walls would start to shrink inwards, until the box resembled more of a box - at which point it would keep going, the walls bending inwards until there was less than a quarter the original space, the corners seemingly distant.

Of course, it's likely that the observer would be undergoing similar effects, so it would probably just work out to be a not-too-exciting spinning cube. Sadly, I lack the higher math to figure out more of this world; if you happen to have high level math that can help me, post a comment.

No comments: