vertical lines (Wesnoth geometry)

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
denispir
Posts: 184
Joined: March 14th, 2013, 12:26 am

vertical lines (Wesnoth geometry)

Post by denispir »

This is not a feature request, rather curiosity. Why was it chosen to have vertical lines?, while obviously (see below) horizontal ones seem more intuitive. What were the reasons? A long time ago, I coded a game with hex geometry (although with square tiles for simplicity, see below illustration). I then had to choose horizontal or vertical lines, and talked about that with friends (non-coders). The following arguments popped out:
  1. There are horizontal lines everywhere in nature, and even more horizontal movements (even in the sky!).
  2. We write horizontally, indeed an arbitrary cultural choice, but maybe influenced by point 1.
  3. Maps are described as series of horizontal lines of codes, and stored that way as data files.
  4. We are used to process horizontal lines (my argument only, since friends were non-coders).
Overall, while both choices seem indeed logically equivalent, horizontal lines look more intuitive, thus easier to think, which is important in my view. Below an example in my case, when I tried to understand the logic to get adjacent tiles:

Code: Select all

The line #1 and all lines with odd horizontal index (i) are placed a little on the left.
Thus, tiles on adjacent lines (even number) with same i are a little on the right:

      -------------------------------------------------------------
32    |   |   |   |   |   |   |i-1| i |   |   |   |   |   |   |   |   
    -------------------------------------------------------------
33  |   |   |   |   |   |   |   | i |   |   |   |   |   |   |   | 
    -------------------------------------------------------------
34    |   |   |   |   |   |   |i-1| i |   |   |   |   |   |   |   | 
      -------------------------------------------------------------

Adjacent tiles on adjacent lines thus have indexes i-1 and i. Conversely,
from a tile on an even line, adjacent tiles on adjacent lines have indexes i and i+1.
(It is also easier to make illustrations to help us think right ;-))

So, I am rather surprised of the choice made in Wesnoth. What were the reasons?
Post Reply