The International Simutrans Forum

 

Author Topic: Narrowgauge tram track  (Read 788 times)

0 Members and 1 Guest are viewing this topic.

Offline Phystam jp

  • *
  • Posts: 222
  • Pak256.Ex developer
  • Languages: JP, EN, EO
Narrowgauge tram track
« on: March 14, 2019, 01:57:51 AM »
Hello everyone,
I am developing a patch for simutrans-extended. Narrowgauge tram track—narrowgauge track on road.
Is this needed also for standard?
https://forum.simutrans.com/index.php/topic,18759.0.html

Offline Leartin at

  • Devotee
  • *
  • Posts: 1197
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Narrowgauge tram track
« Reply #1 on: March 14, 2019, 05:39:12 AM »
If only you had suggested it earlier, P192C would not have needed to switch track and narrowgauge internally to achieve it...

Personally, I don't think a complete narrowgauge-tram (with it's own waytype, depot, vehicles,...) is strictly required. Paksets probably won't have two tram systems of different gauge, and it's technically possible to choose which gauge it is already (although a bit of work to retrofit).

However, there is not only the actual "tram_track", there is also the subtype 7 for tracks which works the same, and could be reused in narrowgauge (or other track types, for that matter). Not quite a narrowgauge tram, more to be used as less frequented tracks in industrial districts, when they get a delivery once a month.

I would be more interested in your "decoration"-waytype to be used for walls, and for those larger stations. I experimented with them before, but it seemed not feasable for a basic Pakset - perhaps that can change with proper waytypes.

To make sure it's used as such I'd extend your feature list:
  • not connected with other waytype such as track, road and so on
  • the stop for new waytype acts like an extension of station
  • can be constructed above existing station
  • does not allow for depot or vehicles

And while we are at potential waytypes: Perhaps another waytype that works like roads (bi-directional) to be used for suspension railways? Perhaps you could find use for it in Extended too.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2628
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Narrowgauge tram track
« Reply #2 on: March 14, 2019, 10:22:24 AM »
Yeah, ng tram should be a subtype for ng, (type 7) just like it is for normal track.

A bidirectional waytype for cable cars is also my long time wishlist item.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18560
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Narrowgauge tram track
« Reply #3 on: March 14, 2019, 11:42:47 AM »
There is probably much to be said for the implementation of narrow gauge trams (even if not every pakset would use them); but there is also probably also much to be said for implementing them in the same way as standard gauge trams. I cannot immediately remember how the code differentiates tram and rail at a low level in Simutrans (it is unchanged between Standard and Extended), but it would certainly make sense for this to be the same for the different types of trams.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1197
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Narrowgauge tram track
« Reply #4 on: March 14, 2019, 02:22:13 PM »
Yeah, ng tram should be a subtype for ng, (type 7) just like it is for normal track.

Because I think that it's a bit confusing, I'd like to reiterate:
Trams exist as both, subtype 7 and as it's own tram_track waytype. The tram_track waytype is what allows us to have tram-bridges, tram-tunnels, tram-signals, tram-elevated-ways, tram-way-objects, tram-depots and tram-vehicles. The subtype 7 only allows us to place tracks on roads.
Not sure how it works internally, but I don't think we need a tram_narrowgauge_track waytype and all it encompasses, just subtype 7 - just tracks on road.
« Last Edit: March 14, 2019, 02:34:50 PM by Leartin »

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2628
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Narrowgauge tram track
« Reply #5 on: March 14, 2019, 02:26:38 PM »
Yeah nice summary. I'd just like to say that tram signals do not work...

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9459
  • Languages: De,EN,JP
Re: Narrowgauge tram track
« Reply #6 on: March 14, 2019, 02:59:24 PM »
Many narrowgauge mainline trains run on roads too, like in Montreux or the Furka-Oberalp.

The Tram track was a one off hack introduce a month before Hajo quit and left me with everything. At that time we did not even had narrowgauge, only a rudimentary monorail track.

Using system_type would allow to run run all kinds of mainline narrowgauge trains on tram tracks. However, if the speed limit is low enough, those mainline trains could never make any money on such slow track. (Experimental may use some weight constraits to avoid this problem.)

Extending the number of waytypes is certainly possible (there is no reason to use them as bitmasks like now). This would be needed to have a separate depot, jsut lke now (bridges and tunnels could either use normal narrowgauge track, like in reality, or is built on roads if sharing.)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18560
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Narrowgauge tram track
« Reply #7 on: March 14, 2019, 06:06:53 PM »
Yeah nice summary. I'd just like to say that tram signals do not work...

If this is a bug in Extended, I should be grateful if you could open a new bug report thread in the Extended development subforum.

Many narrowgauge mainline trains run on roads too, like in Montreux or the Furka-Oberalp.

Indeed - and there is a small section of tramway in Porthmadoc used by the Welsh Highland Railway, which is 2ft narrow gauge.

Using system_type would allow to run run all kinds of mainline narrowgauge trains on tram tracks. However, if the speed limit is low enough, those mainline trains could never make any money on such slow track. (Experimental may use some weight constraits to avoid this problem.)

Extending the number of waytypes is certainly possible (there is no reason to use them as bitmasks like now). This would be needed to have a separate depot, jsut lke now (bridges and tunnels could either use normal narrowgauge track, like in reality, or is built on roads if sharing.)

What probably needs consideration in this thread is the extent to which is is worthwhile for Phystam to implement this patch for Standard and then backport it to Extended, or whether it would be better for him to produce a patch just for Extended.

Extended does indeed have systems (a different revenue model not based on speed at all) to allow profits to be made by slow vehicles; but even in Standard, small sections of narrow gauge road running for main-line narrow gauge trains, or dedicated narrow gauge electric trams (or  some combination of the two, as in the Isle of Man, where a narrow gauge electric tram runs on dedicated tracks between towns and on the roads in the main towns) might be of use notwithstanding the different method used for calculating revenue there.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2628
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Narrowgauge tram track
« Reply #8 on: March 14, 2019, 07:00:06 PM »
I think this is worth implementing for standard as well. There are many examples of ng trains running part of their way on road worldwide (Switzerland, slovakia) or ng tram running between cities on dedicated track (Liberec, cz)

The problem with tram signals is in standard. Signals with waytype =tram are simply ignored, you have to use train signals. I have not tried that in extended.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18560
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Narrowgauge tram track
« Reply #9 on: March 14, 2019, 11:59:49 PM »
There are no tram signals encoded for Pak128.Britain-Ex, but there is no problem using train signals, so I do not think that this is a bug.

Offline Phystam jp

  • *
  • Posts: 222
  • Pak256.Ex developer
  • Languages: JP, EN, EO
Re: Narrowgauge tram track
« Reply #10 on: March 16, 2019, 01:08:42 PM »
Sorry for late reply. As conclusion of your opinions,
 - narrowgauge tram track should be implemented
 - decoration waytype should also be implemented
And further, if it is possible, user-defined waytype (this is extension of waytype_t number) is needed. waytype_t is defined using enum, so maybe we have to change the descriptions...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18560
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Narrowgauge tram track
« Reply #11 on: March 16, 2019, 02:05:17 PM »
This seems sensible - although whether such a thing is implemented in Standard will depend on the views of the Standard developers. It would be useful to know the appetite for integrating such a patch before Phystam takes the effort to write one for Standard.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9459
  • Languages: De,EN,JP
Re: Narrowgauge tram track
« Reply #12 on: March 16, 2019, 02:42:59 PM »
My guess is that at some places the implicit assumption of system_type=7 means track must be removed; maybe just adding 16 in this case to the waytype and change waytype 7 (the olf tram_track) to 18. That way also maglev etc. could get road tracks. I think the changes might be not so big as that they could not easily ported to experimental. Probaly also with makeobj support (system_type=7 means adding 16 too base waytype.)

I rather expect experimental to have more troubles, since there are much more options to be considered. Or the other way round, if the changes were simple, one could do a similar thing in standard manually.