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

Previous topic - Next topic

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?
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

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.
Download Simutrans-Extended.

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

Follow Simutrans-Extended on Facebook.

Dwachs

Quote from: Isaac.Eiland-Hall on March 22, 2009, 05:12:40 AM
So if I understand - diagonals are mainly for the "prettiness" of the game, not so much cared by the internals...

One diagonal is as expensive as two straight track tiles both in building and maintenance. However, depending on the parameter 'diagonal_multiplier' a vehicle driving on a diagonal is faster going on diagonals than on straight tracks.

That is, diagonals can increase transportation due to shorter travelling times, but are as expensive to build as strightly orthogonal tracks.
Parsley, sage, rosemary, and maggikraut.