News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Better handling of gradients

Started by jamespetts, July 06, 2011, 11:53:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have just pushed a new Github branch - "gradients" - with code to make gradients more significant for land vehicles, and also to make their effect cumulative. Would some people who are able to compile from source be able to test it before I release it to see whether the calibration is sensible, etc.? I have opted for quite a simple but I hope effective way of achieving this, and I should be interested in any feedback on how well that it works. Thank you all in advance for any input!
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.

dustNbone

Linux 32 Bit SDL Client and Posix Server binaries:

http://www.megaupload.com/?d=QDR2SLM7

I'll do some testing of the patch over the next couple days.

Dustin

sdog

Could you also explain in what you changed? Simplest way to go is by kinetic and potential energy of the train.  It automatcially makes gradients cumulative. Always thought that was what Bernd made.

So far gradients felt quite right in the game. Definitely more so than in standard.
(It has been very effective to build stations one level higher for steam powered local trains. it gives them quite a boost when accelerating.)

(sorry for commenting without actually testing, but i shan't be able to do so until the summer is over)

jamespetts

#3
The previous system checked to see whether a vehicle was on a gradient, then added 65 to its friction (for rail, its base friction would be 1). If the vehicle is not on a gradient, the friction would return immediately to normal. For every tile, the friction would be reset and calculated afresh. The new system that I am testing does not reset and calculate the friction afresh. Instead, it is possible for the friction to be cumulative (up to a maximum of +120 or minimum of -45 downhill). For every tile that the vehicle is on the level, 22 is subtracted from the friction until it reaches the base friction level for that waytype. That way, the physical effect of a gradient is spread over a number of tiles, giving it a greater impact on the performance of convoys, even those already going at speed.

Edit: I have tweaked the figures a little to give better performance.
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.

jamespetts

This feature is now in 9.12, which has just been released.
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.