2
\$\begingroup\$

I'm beginning to make a tile-based 4x game, but I ran into a conceptual issue: My inspiration for this game are the Civilization games, particularly Civ 2, and I noticed something I was interested in mimicking, but I was wondering how it was done.

This is that while the map is isometric, it is not square. I was wondering how it does this. My first thought would be to use an array, but then you have the corners being basically unused space.

To give an example of what I'm talking about:

The tops are cut of the map, but if the array is square, those would be blank

One idea I have is that there are really two arrays, and whenever a diagonal is made (which would be up, down, left, and right to the player), it moves on one array, and any non-diagonal movement (which to the player is diagonal) moves to the other array.

This is illustrated by this picture (the mountains are one array and the hills are another array):

Array example

\$\endgroup\$
7
  • \$\begingroup\$ legendofmazzeroth.wikidot.com/staggered-isometric-maps \$\endgroup\$
    – Jimmy
    Commented Jan 7, 2013 at 18:34
  • 1
    \$\begingroup\$ Interesting link; too bad it doesn't say anything about how to represent the data for such a map. \$\endgroup\$
    – jhocking
    Commented Jan 7, 2013 at 18:40
  • \$\begingroup\$ Of course, the arrays have no defined visual layout. You could easily make "up" go up and to the left if you wanted to. So going "up" would be mountain->hill->mountain->hill. The two arrays is an interesting approach, but could get confusing. If you were able to abstract it away well enough, it would work as well as anything else. What's your actual question? \$\endgroup\$
    – House
    Commented Jan 7, 2013 at 18:48
  • \$\begingroup\$ My question would be how to implement a staggered isometric map, and I was offering my idea for criticism/suggestions. \$\endgroup\$ Commented Jan 7, 2013 at 18:51
  • \$\begingroup\$ Even though it doesn't directly answer the question it's a good pointer in the right direction. If he wanted to say how it was done in greater detail he'd have likely made a full explanation and not a comment. If one searches for staggered isometric maps there's quite a bit of information. \$\endgroup\$
    – Tony
    Commented Jan 7, 2013 at 18:52

1 Answer 1

2
\$\begingroup\$

I would follow this guide which works exactly the same for isometric as hexagonal.

To summarize. You want to treat the map like a traditional square map and offset the tiles visually. Then account for the different movements with a simple switch based on if the tile is even/odd.

\$\endgroup\$
1
  • \$\begingroup\$ This seems like a good guide, I'll try to implement something similar. I noticed that the way it does the co-ordinate system is the same that Civilization 2 uses (4,1 is next to 4,2; 5,0; 4,0; 5,1; 3,1; 4,2; and 5,2). \$\endgroup\$ Commented Jan 7, 2013 at 20:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .