The International Simutrans Forum

 

Author Topic: (useful) way construction glitches  (Read 812 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
(useful) way construction glitches
« on: September 17, 2019, 09:46:12 AM »
Well, i was asked how to build diagonal level crossings so I will answer to this but as there are many more useful glitches that i sometimes use, I will create a whole new thread for all of them.
I have also added some images showing parts of the process in the attachments.
So letzt's start with diagonal level crossings, which is one of many glitches using the same effect: connecting existing ways is often possible, where creating new ones in the same situation is not.

Diagonal level crossings
It is possible to connect existing ways to each other in many cases where directly building that piece of way would not be possible:
1. Build a straight road.
2. Build a diagonal track that ends at the road.
3. Build another diagonal track that starts on the road adjacent to the other track.
3. Drag a rail in between these two tracks on the road.
There is your diagonal level crossing.

Note that there is no diagonal level crossing graphics so this looks a bit strange but sometimes it is pretty useful.
For sure you can adapt this to build diagonal roads over straight tracks or even diagonal roads over diagonal tracks, however, in that case I always straighten the road as this does not effect travel times of road vehicles pretty much.
You can use this for any other kind of way that supports level crossings with other waytypes e.g. rail and narrow gauge.
This way, yo can even create absolutely well working dual gauge tracks but this will be visually absolutely awful so don't do it!

Diagonal tunnels:
Tunnel portals just behave like normal rails at the ground level, so you can use this to create diagonal tunnel portals:
1. create a tunnel portal by ctrl+click
2. make sure that the ground left or right to the tunnel portal is at least a full height above the way.
3. Drag a tunnel from the tunnel portal to the side.
Note that such a portal can't be upgraded directly. You have to remove the connection to the side before upgrading. Apart from that, it behaves just as any other diagonal piece of way.
It is also possible to enter a tunnel portal from the side when the ground is at the same height as the way instead of at least one full height above but this looks pretty ugly.


Bridges over tunnel portals
As said, tunnel portals just behave like normal rails at the ground level. Well, not exactly. Bridges in between slopes won't work, but it is still possible creating a bridge in between two flat grounds.
1. Create a tunnel portal.
2. Make sure that at least on one side of the tunnel there is a flat ground one full height above the ground of the tunnel portal
3. Make sure that on the other side of the bridge the ground is not at the same height as the tunnel portal and the ground would accept bridges over normal ways
4. build a bridge above the tunnel

Note that this will not work if there is anything except a flat ground with either nothing  or a plain way of the same waytype you want to build the bridge with. his is not specific to bridges over tunnel portals but does also apply to any other bridge starting at a flat at the same height as the bridge.
Also note that the target ground can be anything that would accept bridges over normal ways except a flat at the same height as the tunnel portal.

Offline freddyhayward au

  • *
  • Posts: 63
  • Languages: EN
Re: (useful) way construction glitches
« Reply #1 on: September 17, 2019, 01:05:26 PM »
Fantastic! thus far I had only used diagonal tunnel portals. These glitches should all be considered visual bugs rather than gameplay bugs however, as they enhance gameplay and realism rather than detract from it. In fact the dual gauge problem discussed elsewhere can be considered sold, as standard+narrow gauge trancks can be overlaid (as in reality) with a lower maximum speed (as in reality). Although I did manage to crash the game by building a "dual gauge" + road level crossing.

Offline freddyhayward au

  • *
  • Posts: 63
  • Languages: EN
Re: (useful) way construction glitches
« Reply #2 on: September 17, 2019, 01:59:38 PM »
Well for better or worse, this has enabled me to recreate a certain level crossing from my hometown:

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
Re: (useful) way construction glitches
« Reply #3 on: September 17, 2019, 02:13:14 PM »
 :o This looks awful!

About the dual gauge+road crash: I guess this is because the game is not designed to support more than two types of way on a single grund. So don't do this.
This given, actually implementing dual gauge tacks that way would not be straight forward as we have to do something special for level crossings with dual gauge tracks or completely forbid these.

However, we should add a check if there are already two eaytypes on a grund to prevent such crashes, even though this _should_ never happen, there seem to be veeeery crazy stuff happening when cities build roads. I have already seen bridges without a bridge, simply a road using some hovertech. Or a bridge through another bridge. Or even a bridge jumping a half height up on the bridge.
« Last Edit: September 17, 2019, 02:25:12 PM by Freahk »

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2732
  • Languages: EN
Re: (useful) way construction glitches
« Reply #4 on: September 17, 2019, 06:21:52 PM »
It would be best if these were officially supported features. Currently there is no telling how Simutrans might break when interacting with such bugged ways as it clearly was not designed with this in mind.

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
Re: (useful) way construction glitches
« Reply #5 on: September 17, 2019, 06:58:44 PM »
Well at least diagonal tunnel portals and bridges over tunnel portals don't seem to cause any issues. I use these for many years now and apart from not being able to directly upgrade such tunnel portals, I didn't have any problems with it yet.

Offline freddyhayward au

  • *
  • Posts: 63
  • Languages: EN
Re: (useful) way construction glitches
« Reply #6 on: September 18, 2019, 05:00:41 AM »
I've just found that all of these behaviors apart from diagonal tunnel portals are only possible in builds later than the infamous e9 commit. As much as I would hate to lose these abilities, wouldn't it be best to start a bug report thread on this?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2724
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: (useful) way construction glitches
« Reply #7 on: September 18, 2019, 06:37:29 AM »
I tried those and it works even on server: diagonal tunnel entrance and diagonal road crossing diagonal track... Instead of removing this feature I would prefer to have the ability to specify proper graphics and building behavior for these.

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
Re: (useful) way construction glitches
« Reply #8 on: September 18, 2019, 11:02:26 AM »
Nooooooooooooooooooo, don't remove it! :P
I don't know how old that infamous e9 commit is but I'm quite sure I have already used tunnels over bridges years ago.
And I couldn't find out how old that e9 commit is as i don't know which one you mean? There are 58 of these.

The only thing I can't say for sure these already exist for a long time are diagonal level crossings and related stuff.

However, when fixing these, we should not remove this but instead add it as a feature.
What we need would be a way to provide diagonal level crossing and tunnel graphics.
Building these will be possible when there is such a grapics defined.
For bridges over tunnel portals we have slight graphical glitches. Drawing bridges directly after tunnel portals should fix this.
Additionally, we should generally handle tunnel portals just the same as any normal way on the ground level.

Diagonal bridges would also be extremely useful, but I guess there needs to be more work done for these. Maybe we could allow for half height elevated tracks?

However, I guess we are getting off topic here :/

Offline Matthew gb

  • *
  • Posts: 227
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: (useful) way construction glitches
« Reply #9 on: September 18, 2019, 12:43:40 PM »
Nooooooooooooooooooo, don't remove it! :P
I don't know how old that infamous e9 commit is but I'm quite sure I have already used tunnels over bridges years ago.
And I couldn't find out how old that e9 commit is as i don't know which one you mean? There are 58 of these

I am guessing that freddyhayward means e93f72b6eb773d26077834ed3691e2a087de4096, the commit which broke the Bridgewater-Brunel server game for a couple of weeks this summer.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2724
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: (useful) way construction glitches
« Reply #10 on: September 18, 2019, 01:02:57 PM »
I am guessing that freddyhayward means e93f72b6eb773d26077834ed3691e2a087de4096, the commit which broke the Bridgewater-Brunel server game for a couple of weeks this summer.

I don't think so. I knew about the diagonal tunnel entrance earlier - at least half a year, and first time saw it on bridgewater-brunel server.

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
Re: (useful) way construction glitches
« Reply #11 on: September 18, 2019, 01:07:58 PM »
As I said, diagonal level crossings are relatively new to me but diagonal tunnel portals and bridges over tunnel portals are definitely much older than that commit. I used both years ago in Simutrans standard already.

So if you think one of these is related to e93f72b6eb773d26077834ed3691e2a087de4096, please carefully check this again as I am really sure it is not. Maybe it was fixed some commits ago and came back in e93f72b6eb773d26077834ed3691e2a087de4096.

Offline freddyhayward au

  • *
  • Posts: 63
  • Languages: EN
Re: (useful) way construction glitches
« Reply #12 on: September 18, 2019, 01:23:45 PM »
As I said, diagonal level crossings are relatively new to me but diagonal tunnel portals and bridges over tunnel portals are definitely much older than that commit. I used both years ago in Simutrans standard already.

So if you think one of these is related to e93f72b6eb773d26077834ed3691e2a087de4096, please carefully check this again as I am really sure it is not. Maybe it was fixed some commits ago and came back in e93f72b6eb773d26077834ed3691e2a087de4096.
I tested using the first build prior to e9 (I believe starting with f3): diagonal portals and bridges over portals do work, but diagonal level crossings do not.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18752
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: (useful) way construction glitches
« Reply #13 on: September 22, 2019, 01:06:59 PM »
Thank you for this interesting discussion. In principle, it would indeed be better if these were officially supported things, but I am unlikely to have the time to code these myself in the foreseeable future. Given that these are not balance breaking (in that they allow things that, whilst not intended, are not unrealistic), I am not minded to remove them except in so far as they can cause crashes, which can be very disruptive and so that must be prevented. I will look into the crash bugs when I have a chance.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9584
  • Languages: De,EN,JP
Re: (useful) way construction glitches
« Reply #14 on: October 15, 2019, 01:35:31 PM »
The diagonal crossing does not build in standard. So with integrating more error fixes. that will go away at some point.

Offline Freahk

  • *
  • Posts: 210
  • Languages: DE, EN
Re: (useful) way construction glitches
« Reply #15 on: October 19, 2019, 04:11:14 PM »
It was never possible in standard, so I'm not sure if it isn't related to some point in code that doesn't exist in standard and thus won't get fixed by ports from standard.