Difference between revisions of "Design Document:Railroad Vehicles"

From Transport Empire
Jump to: navigation, search
(Copied from http://tempire.phoenixscripts.co.uk/wiki/index.php?title=Trains)
 
(No difference)

Latest revision as of 23:37, 7 May 2009

Track – Definition

Track is the utility that allows trains to move (:D). Track is defined by several properties – which are:

   * name – name of the track
   * next – name of the next track in the series 

(tracks are defined in series – these are used for track allocation for vehicles – they can ride on all tracks that are lower in the series of track definitions

example:

name -> next

Track1 -> Track2

Track2 -> UltraTrack

UltraTrack -> Turbotrack

Trains assigned to Track1 will be able to ride all tracks. Trains assigned to Track2 will be able to ride track2, ultratrack and turbotrack etc.)

   * speed – maximum speed that can be attained on this track
   * price – price that needs to be paid for 1 meter of single track
   * maintenance – cost of monthly maintenance of 1m of track
   * raze – cost of taking 1m of track off
   * age – how many years it will take before the track starts to deteriorate (deterioration – causes max speed to drop up to 10 km/h after some time – around 5 years)
   * startyear – year of presentation
   * endyear – year of obsoletion
   * shader – name of the shader script of this track
   * masts – boolean, does it use electric masts for the catenery
   * incline – maximum slope this track can be built on 

mental note – make a tool to distinguish track types – like colour clause, also showing track age/deterioration/max speed)

mental note – provide an example spreadsheet of track definition

Track – Directions and Building

Internally The Game stores track on a single tile as a stretch between two points distributed along the edges of the tile – like in the picture below.

[Insert Picture]

Thick red – track axis

Thick black – track right of way

Dots – tile border snap points

Building track is first done in ‘survey’ mode. All landscaping and track laying is first projected, and then it is approved (by player and local authorities in areas the track will run through) and construction starts

Track is laid using drag-and-drop method.

Curves are created by smoothing track elements using bezier curves or b-splines.

Track – Grades

Grades are used in speed calculations. Height difference between two ends of a track (on a single, one square section of track) sets grade for speed calculations:

   * 0.5 m rise – 1%
   * 1 m rise – 2%
   * 1.5 m rise – 3%
   * 2m rise – 4% 

The game uses realistic speed calculations – alike those from TTDpatch. These calculations are used for braking and accelerating.

The formulas for tractive/braking effort will be provided in the time to come.

Track – Switches

Switches are places that allow trains to split a path. Speed is restricted depending on track and curvature involved. If a track is a switch then it causes extra maintenance – depending on a type of switch.

Track – Curves

Curves are places where trains change direction. Curves are built automatically and smoothed by using bezier or b-spline curves (:D). Curves cause extra drag and impose speed limits – depending on curvature.

Track – Signals

Signals are used to steer traffic.

There are two types of signals:

Two way signals

Signals allowing two way entry.

[Insert Image]

How does it work?

Arrow shows a signal for the traffic in the direction of the arrow. Two way signals will block traffic that is opposing current direction to the nearest junction. If there are two ‘two way’ stretches of track then trains will try to occupy the one that is free both ways (3-4 aspect signalling – trains will choose the lowest aspect avalible?)

One way signals.

These signals allow entry only from the one direction. They work like 1-way signals in TTD.

Presignals – presignals are signals that protect a line before a train enters. If a train before presignal cannot proceed on one of the routes it wants (of which come out of the given junction) to use then it will get ‘red’ presignal.

Junctions – junctions are places where 3 or more tracks meet. Junction will always try to secure ‘exit’ – eg green path out of the junction. This will ensure that for instance 3 trains will not crowd 3 way junction by approaching from all directions.

Path Based Signalling – a train will enter a junction despite having ‘stop’ signal if it has a free path to its destination through the junction.

Stations – General

Stations are entities that load/unload and service trains. Stations are composed of: platforms, loading/unloading installations, workshops and warehouses.

Stations – Platforms

Platforms are facilities that allow trains to load. Just like warehouse a platform services certain types of cargo. Platforms are built as a structure parallel to the track (using track Right-of-way as a reference). Platforms MUST be level.

Platform may be for loading or unloading only – or for both.

Platform is for a certain type and then specified for a certain cargo – just like warehouses.

Stations – Movement

Trains need to change direction on a station (reverse that is).

Normally trains cannot ‘warp’ back like in TTD. The train will slowly go into ‘reversing’ mode in which leading locomotives are re-coupled to the forward and rest of the locomotives have reversed facing (if they are single direction – such as steam locos). The whole reversing takes around 2-5 seconds for each locomotive that needs to be re-coupled.

If there is a locomotive on both ends then the train does not need to reverse. Train also do not need to reverse if the whole consist is made of push-pull equipment and there is a cab-car or locomotive on both ends of the train.

If a train can continue without reversing then it will do so (so a RoRo setup is possible).

Ghost mode: To relieve traffic jam a train can be put into ‘ghost mode’ when it becomes translucent and other trains can pass through it at 20 km/h.

Stations – Workshops

Workshops are special buildings which accompany stations. If a train needs a service and the station has the workshop, then the train will enter ‘service’ mode in which it will serviced.

If there is a need to change the consist of a train (like replace a locomotive, or cars) or there is a need to store the train then the train can enter the depot – where those operations are possible.

Workshops are built as a separate building and may store up to 3 times their length of trains. A workshop requires to have a connection to the station and a track(s) leading into it. Several workshops can be built next to each other creating a bigger entity.

Trains can be moved between two workshops even if workshops are not connected with a track. The movement speed is about 15-50 km/h depending on the year.

Rolling Stock – Definitions

Vehicles are defined in two parts. First part is ‘vehicle’ part that stores data that is global for the vehicle (like price or running cost). Models part is the part that defines ‘per vehicle’ properties – like power or tractive effort.

Vehicle part

   * name – text name of the vehicle
   * year – Year of design
   * price – base price
   * maintenance – cost of yearly maintenance (fuel excluded).
   * fuel† – type of fuel used (coal, heavy oil, diesel, petrol, LPG, kerosene, * electric (normal), electric (regenerative), fuel cell)
   * time – time in seconds (real-time) it takes to deliver a ready vehicle from the manufacturer to the workshop it was ordered from
   * speed – maximum speed of the vehicle
   * accelmodel‡ – model of acceleration for this vehicle (steam, diesel/electric, linear,none)
   * service cost – cost of single service
   * service time – time of servicing
   * track – up to 8 types of track this vehicle can run on (and all of it’s derivatives)
   * type – type of this vehicle (hopper, platform, van, tanker, carriage, etc – type must be defined before)
   * locomotive – boolean, is this vehicle a locomotive (a locomotive is required on the tip of the train to achieve max speed)
   * singledirection – boolean, is this locomotive a single direction one (thus needing reversing when train facing changes)
   * pushpull – boolean is this vehicle suitable for push-pull operation 

Models part

   * sndlight – sound when vehicle is at or below 1/4 power (blank for vehicles without power)
   * sndmedium – sound when vehicle is between 1/4 and 1/2 power (blank for vehicles without power)
   * sndheavy – sound when vehicle is between 1/2 and 3/4 power (blank for vehicles without power)
   * sndfull – sound when vehicle is between 3/4 and full power (blank for vehicles without power)
   * sndover – sound when vehicle is above full power (blank for vehicles without power)
   * sndlowspeed – sound when vehicle is running at low speed (0 for cars – only ‘rail song’ for instance, or sanding).
   * Loopsound – sound that is supposed to be looped (like steam puffs – it is dependant on speed – the faster it goes – the faster the puffing – also length of this sound is used for determining steam puffs)
   * sndhorn - sound of the whistle
   * power – power (in kW) of the vehicle
   * capacity – what amount of goods this vehicle can carry
   * weight – mass associated with this model
   * next – Next model in class (used for multi-part vehicles – none for single or last vehicle in a consist)
   * maxTE – maximum tractive effort (0 = do not display, for wagons for instance)
   * maxBE – maximum braking effort (0 = do not display, for wagons for instance)
   * reverse – is the model reversed or normal (0/1) 

†fuel – type of fuel used by the vehicle. Fuel prices vary during the game. Fuel used is proportional to power produced.

‡accelmodel: accelmodel sets type of the locomotive.

Steam: Power starts at minimum*1.5 at 1 m/s to achieve max TE, then linearly grows to full value at 3/5 of max speed. Then it drops to 3/5 max value. When final speed is reached then power us cut to minimum value needed to keep that speed.

Diesel/Electric: Power is at the beginning throttled to minimum required for max TE until it reaches max. Then it is kept until max desired speed is achieved. Then The power is throttled to the minimum needed to keep that speed.

Linear: acceleration is linear to power.

None: this vehicle has no acceleration model and is idle (used for wagons).

Rolling Stock – Ordering

Vehicles are ordered, delivered and modified in the Workshops (Depots).