Curtis Lemay
Posts: 12969
Joined: 9/17/2004 From: Houston, TX Status: offline
|
Having established the superiority of the Matrix solution for the bridge-blowing problem about as well the Law of Gravity, I’m sure that if and when this issue is addressed, it will be done with the Matrix. I now want to move on to the other matrix I mentioned earlier. This would address a more difficult problem mentioned earlier by Colin: A unit can enter a river hex by road, then cross the river without paying the river cost, even if the hex didn’t actually contain a bridge. For example, look at the targeted hex in the map section shown before: A unit that entered that hex via the road can then move west from it as if it is on the western side of the river, even though there is no bridge in that hex. But, if it had entered via the road, then it was on the eastern side of the river, and, since there is no bridge, it should pay the river cost to move west out of it. To solve this, another, though more complex, matrix is required. In the first matrix, each matrix element was only a yes/no value (one bit). In the second, each element would hold a code representing which surrounding hexes were on the “road” side of the river. Since there are six surrounding hexes, that code would require six bits. To be practical, that means a full byte has to be used for each element. For example, the top (N) hex would be the 1 bit, the NE hex would be the 2 bit, the SE hex would be the 4 bit, the bottom (S) hex would be the 8 bit, the SW hex would be the 16 bit, and the NW hex would be the 32 bit. But the 64 x 64 map required would be the same as the one required for the previous matrix. So, for the example hex in the map section, the N, NE, SE, and S hexes are on the road-side. Therefore the code for that hex would be 0F in hexadecimal (15 in decimal). To use this, each unit would need to add a flag representing whether it entered its current hex via road or not (this could be useful for other issues, too). If it was false, the unit has already paid the river cost. Therefore, it can leave the hex without paying it again in any direction (just like now). But, if it was true, the unit hasn’t paid it yet. It can still leave in any “road-side” direction without paying it, but not in any other direction. Of course, the unit must pay the terrain cost of whatever hex it is entering. This only affects whether it has to pay the river cost (including any ferry requirements) of the hex it is currently in. The matrix shows the program which directions are “road-side”. Note that this would be applied to the supply trace as well. Obviously, this is a more complex matrix and will be harder to develop. And the coding task will be more difficult as well. But it is the only solution to this issue. And, note that it only makes sense if the other, first, Matrix is implemented. Just one more reason to implement that.
|