News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

New feature: range

Started by jamespetts, April 12, 2014, 09:27:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

The next major version of Simutrans-Experimental will have a new feature: range. It will be possible for a pakset creator to specify a vehicle's maximum range in the .dat files with a "range=x" statement, where "x" is a number in kilometres representing the maximum distance between stops that that vehicle is permitted to travel. In convoys of more than one vehicle, the lowest range prevails. This is based on the straight line distance between stops for simplicity, and this number is shown in the schedule window so that it is easy to see when range is exceeded. Waypoints do not count: what is measured is the distance between stops; however, this feature does not enforce any minimum time spent at stops. It is mainly intended for aircraft and horse transport, and is somewhat less suitable for rail and road transport as there is no way to enforce a minimum refuelling time or the sort (long distance air and horse based vehicles in any event have long loading times). This should enforce realistic behaviour for stagecoaches (with staging posts at regular intervals - I have given a value of 24km in the Pak128.Britain-Ex .dat files, but if anyone has more accurate data, please let me know) and ensure that aircraft can balance correctly.

Anyone producing aircraft for Pak128.Britain-Ex should now add a "range" parameter to the .dat files. I am in the process now of adding this parameter to all existing aircraft.
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.

Sarlock

Interesting.  Though in practice, any airplanes beyond the most early ones will be able to traverse the map without issue as even a 6400 tile journey is only 800km.  I think even the DC-3 was able to fly 2000km +/- before refueling.  Great addition for stage coaches, however.
Current projects: Pak128 Trees, blender graphics

jamespetts

Ahh, this will become more relevant for aircraft when I introduce portals...
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.

sdog

Portals sounds promising.

Range is an excellent feature. I'm thinking mostly of tank engine here.

Perhaps in a later step you can introduce a costly refueling station extension?

jamespetts

Quote from: sdog on April 12, 2014, 09:58:14 PM
Portals sounds promising.

Range is an excellent feature. I'm thinking mostly of tank engine here.

Perhaps in a later step you can introduce a costly refueling station extension?

I did wonder about that sort of thing, but decided against it for the time being because of the extent to which it would increase the complexity of the code relating to range, as it would be necessary to check the facilities at each station, have a way of keeping track of those facilities, indicate to the player which stops do and do not have the facilities, measure the distance between those stops that do have the facilities, ignoring those that do not (and display this information to the player), have a minimum time at each stop that has these facilities (but only for those convoys that actually need to use them) and so forth. This might be something for the future, but the main aim of the feature at present was to balance aircraft and fast horse-drawn vehicles such as stagecoaches and flyboats.
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.

Zeno

I'm looking forward testing the new range feature. Thank you James for your efforts on this feat :)

ӔO

this feature might be useful to early steam ships as well.

AFAIK, steam ships were faster, especially in canals, but on long distances, the fuel could take up a considerable amount of cargo space.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Sarlock

Indeed, and one thing that isn't simulated is that a ship might hit a few days of calm seas and move only a few kilometers in that time... or the wind blows in the opposite direction and they also make little headway.
Current projects: Pak128 Trees, blender graphics

jamespetts

AEO - interesting: do you have any data on the maximum range of specific sorts of steam ships? That would be easy to add if there are data.

Sarlock - that would be much harder to simulate, I think, than range, as it involves a great multiplicity of variables and inconsistent timing.
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.

Vladki

Quote from: Sarlock on April 13, 2014, 04:31:56 PM
Indeed, and one thing that isn't simulated is that a ship might hit a few days of calm seas and move only a few kilometers in that time... or the wind blows in the opposite direction and they also make little headway.

Hmmm, I have seen that airplanes tend to takeoff and land in the same direction. Is that because winds in simutrans blow always from the same side? How about sail ships having different top speed based on direction?


jamespetts

Quote from: Vladki on April 13, 2014, 05:21:48 PM
Hmmm, I have seen that airplanes tend to takeoff and land in the same direction. Is that because winds in simutrans blow always from the same side? How about sail ships having different top speed based on direction?

That is a completely different feature - but this would add complexity and reduce realism at the same time, since winds do not always blow in the same direction.
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.

AP

Fo
Quote from: Sarlock on April 13, 2014, 04:31:56 PM
Indeed, and one thing that isn't simulated is that a ship might hit a few days of calm seas and move only a few kilometers in that time... or the wind blows in the opposite direction and they also make little headway.
We'd need trade winds to be added. They played an important role in the age of sail. E.g to australia via south africa, back via argentina (roaring fourties etc).


Regarding steam locomotives and range, personally I think it fair to assume every station has water provision. I think trying to co-ordinate coaling and water stops for everything would be a layer of micromanagement too far. On that logic we'd have to set up oil tankers and distribution and petrol stations before being able to operate lorrries...

jamespetts

Quote from: AP on April 13, 2014, 05:26:56 PM
Regarding steam locomotives and range, personally I think it fair to assume every station has water provision. I think trying to co-ordinate coaling and water stops for everything would be a layer of micromanagement too far. On that logic we'd have to set up oil tankers and distribution and petrol stations before being able to operate lorrries...

Steam locomotives are actually extremely complicated in this regard: every station would probably have had a water tower, but then there is the question of coal: steam locomotives would run out of water far faster than coal, and would have to take on coal at a separate coaling stage, not during its normal journey, but uncoupled from the train. Similarly, a diesel locomotive would have to take on diesel fuel in a depot away from its working route. These things cannot be simulated by a simple range parameter.
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.

kierongreen

Also water can be picked up from troughs without stopping...

jamespetts

Ahh, yes, which feature requires equipment on the track at strategic points, special equipment on the locomotive (which might be able to be retrofitted to some classes but not others), and was only invented after a certain date....
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.

kierongreen