The International Simutrans Forum

 

Author Topic: Tunnel length  (Read 1531 times)

0 Members and 1 Guest are viewing this topic.

Offline AP

  • Devotee
  • *
  • Posts: 1202
  • Languages: EN
Tunnel length
« on: July 31, 2016, 05:43:32 PM »
Hi All

Had a thought about rail tunnel length which I wanted to share, in case it was of interest.

I know there has been concern about vastly long tunnels in server games, especially underwater tunnels.

In the age of steam, rail tunnels required intermediate ventilation at intervals, so the drivers and passengers didn't suffocate from lack of oxygen and steam/smoke was taken away. You can still find railway tunnel vents dotted throughout the English countryside and cities.   With diesel traction, the same consideration applied. Only electric traction is exempt from this requirement.

I propose that a simultrans rail tunnel should also require ventilation points at, say, every 10 tiles. This would ensure that tunnels very deep under mountains were proportionally more expensive than shallow tunnels. It would neatly ensure that underwater tunnels longer than 10 tiles could not be built. It would require a buildable (at cost) vertical tunnel component.

I would think you could code the tunnel so that it wasn't "complete" until the ventilation parameter was met or the track was electrified - absent one of those a train should not be able to find a valid path through the tunnel.

In the UK, the longest tunnel without intermediate ventilation was at Combe Down, Bath (1.6km) and apparently it was not very pleasant for the footplate crew!

Below is a ventilation shaft from Chipping Sodbury Tunnel.

Offline Carl

  • Devotee
  • *
  • Posts: 1571
    • Website
  • Languages: EN
Re: Tunnel length
« Reply #1 on: July 31, 2016, 06:40:14 PM »
If this were to be implemented, the limit for ventilation points would presumably have to scale with tile size. At the scale of my current London map, for instance, the underwater Channel Tunnel would be about 2500 tiles long...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Tunnel length
« Reply #2 on: July 31, 2016, 07:55:51 PM »
This has been suggested before, and may be implemented one day, but it would take a lot of work to code it, as there would have to be a way of telling, for any given tile of tunnel, whether it is part of a tunnel that had ventilation shafts at the requisite distances, a way of communicating this to the player effectively, as well as an entirely new ventilation shaft object, and a graphical way of showing it both above and below ground (which is a totally new thing for graphics in Simutrans to do).

Offline Ves

  • Devotee
  • *
  • Posts: 1611
  • Languages: EN, SV, DK
Re: Tunnel length
« Reply #3 on: July 31, 2016, 09:08:06 PM »
Couldnt this somehow be done with way/vehicle constraints?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Tunnel length
« Reply #4 on: July 31, 2016, 10:18:15 PM »
The detection of the length of a tunnel could not be done this way (way constraints have complete logic on a per tile level, and ventilation shafts would still need to be encoded as specific objects.

Offline Spenk009

  • *
  • Posts: 227
Re: Tunnel length
« Reply #5 on: August 01, 2016, 09:54:06 AM »
What about a catchment area for Tunnel entrances and vents (similar to stops' catchment areas), where building is prohibited if not within an area. Selecting the correct height/depth is done by building in the sliced underground view. The problem here is differentiating between normal and electrified track and allowing one to be built while disallowing the construction of the other. Maybe some would welcome building track and electrification simultaneously (by somehow selecting both in the build menu).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18422
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Tunnel length
« Reply #6 on: August 01, 2016, 10:05:13 AM »
How would the program know whether any given entrance catchment area is connected to any given tunnel segment without a whole new pathfinding algorithm, which would take a lot of work to write? There is no use in one tunnel at -4 tiles being near the catchment area of an unconnected tunnel at -2 tiles.

This is a worthwhile thing in principle to have eventually, but I doubt that there is any easy way of doing this that simulates the reality well enough to be worth implementing.