News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

(useful) way construction glitches

Started by Mariculous, September 17, 2019, 09:46:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mariculous

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.

freddyhayward

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.

freddyhayward

Well for better or worse, this has enabled me to recreate a certain level crossing from my hometown:

Mariculous

#3
 :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.

DrSuperGood

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.

Mariculous

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.

freddyhayward

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?

Vladki

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.

Mariculous

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 :/

Matthew

Quote from: Freahk 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

I am guessing that freddyhayward means e93f72b6eb773d26077834ed3691e2a087de4096, the commit which broke the Bridgewater-Brunel server game for a couple of weeks this summer.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Vladki

Quote from: Matthew on September 18, 2019, 12:43:40 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.

Mariculous

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.

freddyhayward

Quote from: Freahk 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.
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.

jamespetts

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.
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.

prissi

The diagonal crossing does not build in standard. So with integrating more error fixes. that will go away at some point.

Mariculous

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.