Monday, September 17, 2018

Diagonal Movement on Squares

In role-playing games, you often have miniatures or figures on a grid of squares. These figures are allowed to move so many squares in a turn. A problem arises when moving diagonally on a square grid. If you allow the same number of squares to be moved diagonally (NW, NE, SE, SW) as you do orthogonally (N, E, S, W), the figure can move a greater distance diagonally than orthogonally.

One of the oldest methods for preventing this was to say that each diagonal movement counted as 2 moves. I'll call this the "1/2 method". Of course, this drastically short-changes you on the distance you can move diagonally compared to the amount of distance you could travel if you did away with the grid and just measured the distance with a ruler or measuring tape. I'll call this the "measure method".

Another method was developed to minimize the difference between diagonal movement on grid and the "off-grid" measuring method. This method involved multiplying your normal maximum allowed moves (MA) in the orthogonal directions by 2. Each square you move in an orthogonal direction costs 2 moves. Each square you move in a diagonal direction costs 3 moves. I call this the "2/3 method". It is a nice method that prevents you from travelling farther diagonally than you would be able to travel in an orthogonal direction and it much more accurate than the "1/2 method". Of course, the most accurate method is "measured method" but the "2/3 method" is very close.

A close approximation to the "2/3 method" is what I call the "1-2 counting method". In this method, you don't multiply or change you MA. Instead, each square of movement in an orthogonal direction costs 1 movement unit (MU). When moving diagonally, the first square costs 1 MU but the second square costs 2 MU. The square after that costs 1 MU. The next costs 2 MU. Repeat. This is a very simple and easy to use method. Nothing wrong with it. Of course, some people may prefer to reverse the counting (i.e. 2 MU, 1 MU, 2MU, 1MU, etc.). That's fine too.

However, I decided to see if a "3/4 method" was acceptable. In this method, I multiply my MA by 3. Squares in the orthogonal directions costs 3 MU. Squares in the diagonal directions costs 4 MU. In general, this method results with a character being able to move one more square in the diagonal direction than "2/3 method". I liked this as I knew (through mathematics and geometry) that the "2/3 method" was and underestimate of the "measured method". I also knew that the "3/4 method" was an overestimate of the "measured method". Upon a closer look at the mathematics, I found that both methods were almost equally "off" from "measure method". My preference is to slightly overestimate the "measured method" than to slightly underestimate it.

Next, I decided to see if I could come up with a counting method like the "1-2 counting method" that would closely approximate the "3/4 method". I could! I call it the "1-1-2 counting method". Basically, all squares in a diagonal direction cost 1 MU except every third square. It costs 2 MU.

Below is a graph of that shows the results of the "2/3 method" (red/pink dots), the "3/4 method" (green squares), and the "measured method" (orange arcs).


UPDATE: I decided to "just be normal" and use the 2/3 method" for movement. The counting methods can lead to exploits (or errors) that grant too much or too little movement. The 1-2 counting method is great for weapon reach/range though.