Maps are 63x63 instead of 64x64

Recommended Posts

Hey Stefan,

Today I noticed the skirmish map you supplied says the map data is in a 64x64 matrix, but it's actually a 63x63 matrix. Also, the game doesn't add an extra row and column to the map. When I make the matrix 64x64, the game ignores the last row and column. Did you do this intentionally or is it a bug, as 64x64 sound more logical to me.

Mr. nagger signing off  :P

Share on other sites

Ah, this is not really a bug, it is to support Dune 2.

Dune 2 has 64x64 maps, but the first and last rows/columns are not shown.

So basically you have 1,1 till 62,62. (fixed)

D2TM is 0-63 based. But it simply does not show row/column 0 and 63. The reason is to make fluid entrances for reinforcements (instead of 'popping up' at the borders, but make them 'walk in' the map.

When the engine is modified to support larger maps this means that a 128x128 map is actually 126x126 (1,1 till 127, 127).

Share on other sites

So basically you have 1,1 till 63,63.

Do you mean 1,1 till 62,62 (since all marginal cells are not shown)?

Share on other sites

ah yes, you are right 1,1 till 62,62. And yes, because of the marginal cells.

I will fix my post.

Share on other sites

Ok, the reinforcements thing sound logical to me.

So if I'm correct, the game uses map data with dimensions 64x64, but you don't see the first and last row/column. But then I still wonder why the data provided in the skirmish map is 63 rows of 63 characters. Does the came just 'make up' the last row/col as it doesn't matter what it is?

Share on other sites

I have checked the code. Looks like the  length of those maps are 63 characters, where X is character position + 1. Y is also row nr + 1.

In short, the very first character is positioned at 1,1 (and not 0,0)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.