## News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

## Diagonal costings

Started by jamespetts, March 21, 2009, 09:21:33 PM

0 Members and 1 Guest are viewing this topic.

#### jamespetts

The handling of diagonals in Simutrans is somewhat complicated. At one time, diagonals were treated as if they were a series of straight lines and corners, thus:

\
\
\
\

became:

_
|
_
|

internally.

I also understand that, in order to reduce some of the anomalies of that system, the number of internal steps in a diagonal tile was reduced in the fairly recent past from 255 (the standard for straight tiles) to 127, making the time taken to traverse a diagonal tile similar to the time taken to traverse a straight tile (actually, slightly less, I think).

However, a single diagonal road/track still costs as much as a pair of corners, both to build and maintain. Thus, there is a perverse incentive in the game to build straight roads, tracks, etc. over diagonal ones: they cost less. Is there any possibility of doing the same thing with the costs as was done with the internal steps to balance out the diagonal issue?

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

#### prissi

Diagonals have been shorter in the past and become long. But that aside, diagonals cover the same amount of tiles as two staight lines. There is neither punishment nor advance. (The number of tiles is actually the manhattan distance in both cases ... )

#### Isaac Eiland-Hall

So if I understand - diagonals are mainly for the "prettiness" of the game, not so much cared by the internals...

#### jamespetts

The complication is: in reality, a diagonal does not cover the same number of tiles as two straight lines. In the game, they do not look as if they cover the same number of tiles as two straight lines. Now that the number of steps has been reduced from 255 to 127, they do not take as much time to traverse as two straight tiles. It has become, therefore, an anomaly that they cost as much to build and maintain as two straight tiles.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.