News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

"Sharp corner" penalties/road transport bug

Started by Carl, July 22, 2011, 10:00:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Carl

First off, a big thank you to all the developers for their hard work in bug-fixing the latest versions of Experimental -- 9.12 is a truly excellent release!

I have one minor qualm with a recent feature: the increased penalty for sending a convoy around a sharp corner. While I think that in principle this is a good idea (sharp corners should be avoided where possible), there's one aspect of the implementation of the feature that could be improved.

Currently convoys are slowed when they go around a sharp corner, but more than that -- they are prevented from accelerating for some time (around 500m-1km) after the whole vehicle has passed around the corner. This means that a vehicle could be a couple of squares past the corner and still crawling along at a very low speed. This doesn't have too bad an effect on trains*, but for city buses it is very problematic. City buses often turn sharp corners every couple of squares, and the consequence of this is that they can never accelerate above 16kph. As such the average speed of many city bus lines is below 10kph. (While this may be realistic in highly-congested areas, the game already simulates congestion in other ways: the simluation of congestion should not be built into how vehicles corner.)

(Edit 1: Actually, having observed the phenomena some more, the situation seems to be even worse for buses. A bus will not accelerate beyond 16kph (which seems to be the 90 degree cornering limit) even after travelling over 4 kilometres in a straight line!)

(Edit 2: On further observation still, I cannot get a bus to travel faster than 16kph under any circumstances. Even coming straight out of a depot onto a straight road (max speed 100kph), the bus still travels at 16kph. So perhaps this isn't just a cornering problem! This isn't a pakset-specific problem since I've observed it in both pak64 and pak128.)


My proposed revision is to allow a vehicle to accelerate from "cornering speed" as soon as the whole vehicle has passed through the corner. Once the vehicle has cleared the corner there's no reason for it not to begin accelerating immediately. (However, if I was right in 'edit 2' above, this problem may require more than just this tweak.)

Thoughts/feedback?







* There is one exception here. When a train does a 180 degree turn (which only ever happens because of some error, obviously) the train will travel the corner at 4kph. This in itself is not problematic, but the train will then continue at 4kph for 500m-1km after the whole vehicle has cleared the corner. Obviously this takes a long time and has potential to cause severe network problems.

Carl

The above report could be stated far more simply, in hindsight:

In 9.12 road vehicles appear to be unable to travel faster than 16kph. Is this a bug or have I broken something? :)

ӔO

it seems to work just fine on my copy.

but I've notice that overtaking is not working.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Carl

Quote from: AEO on July 23, 2011, 08:34:07 PM
it seems to work just fine on my copy.


How strange! Could this be a bug which only occurs on 64-bit Windows?

ӔO

#4
let me try on my win7 64bit netbook.

nope, it works fine in win7 64bit
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

I also can't reproduce the 16km/h bug reported by Carl. The settings relating to vehicle cornering can be altered in simuconf.tab, including the number of tiles taken into account in determining what a corner is.

The reasoning behind the current arrangement is that it takes into account how far that a vehicle has turned in the last X tiles (X being able to be set in simuconf.tab, and varying with speed), and, if that is a non-zero number, reduces the speed limit according to settings in simuconf.tab. The idea is to smooth the effect of the one or two tile sharp corners in the game (trains never actually turn 90 degrees in a few hundred meters, for example).

I may well look into changing this a little when I implement a system for having vehicles slow down in advance of reductions in speed on the basis of the convoys' braking characteristics.
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.

Carl

#6
Ok, here's some more data.

The 16kph error does not occur in Pak-Britain Experimental.

However, it does occur in both pak128 and pak64 -- even when the main simuconf.tab used is the same as the one used in Pak-Britain Experimental.

Edit: Further testing is beginning to suggest that simuconf might be to blame for this after all. I'll investigate some more. Hopefully there will at least be a "what not to do with Simutrans" lesson at the end of all this :)

Carl

I've found the culprit: the distance_per_tile setting:

If this value is set above 33, then road vehicles will not go faster than 16kph.
If the value is set at 33 or lower, road vehicles will behave as normal.

(Once again, Pak-Britain Experimental does not appear to be sensitive to this, strangely.)

Can others reproduce this cut-off point?

elthore

I notice the same delay in acceleration when trains are going over inclines. Even after the entire train is on level ground it takes a couple tiles for it to begin accelerating.

jamespetts

#9
Elthore - this is intentional, as it is necessary to spread out the effect of the hill in order to give a realistic effect (in reality, hills are longer and less severe). Carl - I shall look into that issue in due course.

Edit: Having looked into this briefly, it appears that the >33 distance per tile bug is indeed reproducable, but is not related to any sort of speed limit: rather, it seems that it is associated with the physics calculations, although I have not yet tracked down how.
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.


Carl

Just to note for the record that the 16kph bug for road vehicles in >33 distance-per-tile environments appears to still occur on the 10.x branch.


jamespetts

Excellent! Glad that things are working now.
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.