Tunnel or bridges for trains

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground rails

Post by mrvn »

Regarding preventing trains from getting stuck in a tunnel:

1) What about manual trains?

1) A tunnel should still use up fuel proportional to the length. And when a train is out of fuel it rolls to a stop. Make it keep rolling at some minimum speed till it exits the tunnel and prevent it entering a tunnel if it doesn't have the minimum speed.

2) The train engine could be anywhere in the train. There can even be multiple engines. So where do you stop the train between 2 tunnels? Do you make it so that at least one forward facing engine is in the visible/reachable part?

3) What about the wagons? What about uncoupling wagons inside the tunnel?


I think bridges would be simpler here. The user could walk under the bridge and then refuel the train. Or take a second engine, drive onto the bridge, connect the trains and pull it off. Entering and exiting trains could even work. Bridges should have support columns and one could climb up/down the nearest column.

That only leaves water crossings. If you have a long bridge with support columns on little island in the water then you might get stuck with no fuel and only able to climb down to such an island. Well ... you can walk up to an alien, punch it in the nose and die, too. I would be OK if one could get stuck like that.
Fahrradkette
Inserter
Inserter
Posts: 45
Joined: Thu Aug 27, 2015 4:37 pm
Contact:

Re: Underground rails

Post by Fahrradkette »

I once saw a mod which disabled/enabled the hitbox on special track tiles but I think that doesn't play nice with the pathfinder.

An Implementation of underground rails would be the OpenTTD way where trains teleport from one portal to the other, therefore no signals or junctions are possible on underground tracks. The whole underground part, including the two portals could be one entity not unlike underground belts. If one wants to interact with the train he'd click or mouse-over one of the portals to make it visible. Since no signals or junctions are possible, there is at maximum one train in an underground section. If a player jumps out of an underground train, he'd end up on the surface, bad luck if there's another rail with a train approaching :P

So yeah, please expose the rail track graph to the mod api so modders can work on some solutions. I guess there is a need for 2 special rail tiles: portal tiles and underground tiles. The later are disjunct from the normal tiles while the former connect them with the normal ones and maybe disable the hitbox if needed.

Would be really great if we had that feature, can't wait for non-interfering mainlines, t-junctions and the like.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground rails

Post by mrvn »

I was just thinking about factorissimo, where you have a factory building that you can enter and inside you have a separate map.

Could one combine that with invisible train tracks? So when a train is in the invisible section and the player leaves then he gets put in a tunnel section as long as the underground tunnel. And there should be a fake train in that section mirroring the real train. So you get killed when you stnd on the rail in the tunnel or can jump back on a train. Or you walk to the end of the tunnel and reenter the normal map.
Engimage
Smart Inserter
Smart Inserter
Posts: 1069
Joined: Wed Jun 29, 2016 10:02 am
Contact:

Re: Underground rails

Post by Engimage »

mrvn wrote:I was just thinking about factorissimo, where you have a factory building that you can enter and inside you have a separate map.

Could one combine that with invisible train tracks? So when a train is in the invisible section and the player leaves then he gets put in a tunnel section as long as the underground tunnel. And there should be a fake train in that section mirroring the real train. So you get killed when you stnd on the rail in the tunnel or can jump back on a train. Or you walk to the end of the tunnel and reenter the normal map.
This won't work. Factorissimo uses "surfaces" game feature which means objects can belong to a single surface and can't be shared between them. Also pathfinding and movement physics can only be implemented within a single surface. There is no way to make that transition between surfaces.

The only possible implementation I can see here is just introducing T-intersection object where while inside trains have no collision or something like that. There is just no way to fully implement tunnels (which is insanely more difficult than bridges).
ItsDarthChaos
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Sep 08, 2017 6:23 am
Contact:

Re: Underground rails

Post by ItsDarthChaos »

I'm going to go ahead and agree that bridges would make a much better solution to this problem.the only downside is that they really wouldn't look very visually appealing (and I feel like they could get confusing very fast) with the top-down 2D grid the developers went with.

If they ever decide to make a Factorio 2.0 with full 3D rendering, then this idea really would be an obvious addition, with the added challenge of hills, cliffs, ravines, and rivers trains would have to traverse. Sadly, I don't think the devs are interested in taking this path. Or at least not as far as I'm aware.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2375
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Underground rails

Post by Jap2.0 »

ItsDarthChaos wrote:I'm going to go ahead and agree that bridges would make a much better solution to this problem.the only downside is that they really wouldn't look very visually appealing (and I feel like they could get confusing very fast) with the top-down 2D grid the developers went with.

If they ever decide to make a Factorio 2.0 with full 3D rendering, then this idea really would be an obvious addition, with the added challenge of hills, cliffs, ravines, and rivers trains would have to traverse. Sadly, I don't think the devs are interested in taking this path. Or at least not as far as I'm aware.
Actually, it's not completely top-down, it's isometric (I think, unless I'm mixing my terms up). I don't know how much better that will make it.
There are 10 types of people: those who get this joke and those who don't.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2375
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Underground rails

Post by Jap2.0 »

Also, as I believe has been pointerd out before, adding all this stuff would take some of the challenge out of making high-throughput rail junctions.
There are 10 types of people: those who get this joke and those who don't.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5207
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Underground rails

Post by eradicator »

Jap2.0 wrote:Also, as I believe has been pointerd out before, adding all this stuff would take some of the challenge out of making high-throughput rail junctions.
Seriously? Go read the OTTD Wiki on junctions then come back and say that again. If anything tunnels and bridges make the puzzle better not worse.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Underground rails

Post by Tekky »

Yes, I agree that adding tunnels would make the puzzle better, not worse. I have had dozens of hours of fun in OpenTTD optimizing junctions in order to achieve maximum throughput.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2375
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Underground rails

Post by Jap2.0 »

eradicator wrote:
Jap2.0 wrote:Also, as I believe has been pointerd out before, adding all this stuff would take some of the challenge out of making high-throughput rail junctions.
Seriously? Go read the OTTD Wiki on junctions then come back and say that again. If anything tunnels and bridges make the puzzle better not worse.
Um... I take it all back. And I kind of want to play Open TTD now, actually. And oh, the posts that would be posted in this post! Also notable is that some of that stuff would be a bit harder to do in Factorio because you can't do a 90 degree turn in 1m here and we only have 2 types of signals, as compared to the 5 or 6 they have. Thanks for the good reading material, by the way. It was quite interesting. And yes, I realize that there is very little proper structure in this paragraph. Also puzzles are fun.
There are 10 types of people: those who get this joke and those who don't.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground rails

Post by mrvn »

PacifyerGrey wrote:
mrvn wrote:I was just thinking about factorissimo, where you have a factory building that you can enter and inside you have a separate map.

Could one combine that with invisible train tracks? So when a train is in the invisible section and the player leaves then he gets put in a tunnel section as long as the underground tunnel. And there should be a fake train in that section mirroring the real train. So you get killed when you stnd on the rail in the tunnel or can jump back on a train. Or you walk to the end of the tunnel and reenter the normal map.
This won't work. Factorissimo uses "surfaces" game feature which means objects can belong to a single surface and can't be shared between them. Also pathfinding and movement physics can only be implemented within a single surface. There is no way to make that transition between surfaces.

The only possible implementation I can see here is just introducing T-intersection object where while inside trains have no collision or something like that. There is just no way to fully implement tunnels (which is insanely more difficult than bridges).
That's why I said "a fake train in that section mirroring the real train". The real train remains on the main game surface and you add a fake train to the tunnel surface.

I agree that the hard part would be to turn the train invisible and collisions off when it enters the tunnel. And then collisions of the fake train have to hurt the real train and so on.

I don't think that tunnels are much different from bridges though. You still have to turn off collisions of trains on the bridge with players under the bridge. And instead of turning the train invisible you have to elevate it. Might be even harder with bridges because there is no picture for the train going up/down a slope.
Jap2.0
Smart Inserter
Smart Inserter
Posts: 2375
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Underground rails

Post by Jap2.0 »

mrvn wrote:
PacifyerGrey wrote:
mrvn wrote:I was just thinking about factorissimo, where you have a factory building that you can enter and inside you have a separate map.

Could one combine that with invisible train tracks? So when a train is in the invisible section and the player leaves then he gets put in a tunnel section as long as the underground tunnel. And there should be a fake train in that section mirroring the real train. So you get killed when you stnd on the rail in the tunnel or can jump back on a train. Or you walk to the end of the tunnel and reenter the normal map.
This won't work. Factorissimo uses "surfaces" game feature which means objects can belong to a single surface and can't be shared between them. Also pathfinding and movement physics can only be implemented within a single surface. There is no way to make that transition between surfaces.

The only possible implementation I can see here is just introducing T-intersection object where while inside trains have no collision or something like that. There is just no way to fully implement tunnels (which is insanely more difficult than bridges).
That's why I said "a fake train in that section mirroring the real train". The real train remains on the main game surface and you add a fake train to the tunnel surface.

I agree that the hard part would be to turn the train invisible and collisions off when it enters the tunnel. And then collisions of the fake train have to hurt the real train and so on.

I don't think that tunnels are much different from bridges though. You still have to turn off collisions of trains on the bridge with players under the bridge. And instead of turning the train invisible you have to elevate it. Might be even harder with bridges because there is no picture for the train going up/down a slope.
Basically an invisible bridge.
There are 10 types of people: those who get this joke and those who don't.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground rails

Post by mrvn »

Jap2.0 wrote:
mrvn wrote:
PacifyerGrey wrote:
mrvn wrote:I was just thinking about factorissimo, where you have a factory building that you can enter and inside you have a separate map.

Could one combine that with invisible train tracks? So when a train is in the invisible section and the player leaves then he gets put in a tunnel section as long as the underground tunnel. And there should be a fake train in that section mirroring the real train. So you get killed when you stnd on the rail in the tunnel or can jump back on a train. Or you walk to the end of the tunnel and reenter the normal map.
This won't work. Factorissimo uses "surfaces" game feature which means objects can belong to a single surface and can't be shared between them. Also pathfinding and movement physics can only be implemented within a single surface. There is no way to make that transition between surfaces.

The only possible implementation I can see here is just introducing T-intersection object where while inside trains have no collision or something like that. There is just no way to fully implement tunnels (which is insanely more difficult than bridges).
That's why I said "a fake train in that section mirroring the real train". The real train remains on the main game surface and you add a fake train to the tunnel surface.

I agree that the hard part would be to turn the train invisible and collisions off when it enters the tunnel. And then collisions of the fake train have to hurt the real train and so on.

I don't think that tunnels are much different from bridges though. You still have to turn off collisions of trains on the bridge with players under the bridge. And instead of turning the train invisible you have to elevate it. Might be even harder with bridges because there is no picture for the train going up/down a slope.
Basically an invisible bridge.
Exactly.
usafphoenix
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Sun Aug 06, 2017 9:42 am
Contact:

Re: Underground Rail

Post by usafphoenix »

mrvn wrote:How about a bridge over water?
there is a mod specifically for this. Check out "Beautiful Bridge Railway".
As for undergrounds, while i agree that it makes signals less important due to simplifying intersections, i do not feel that that, alone is a legitimate reason to keep them out of the game. It should be a matter of balance: Rail undergrounds must be dug up by a slow-digger-vehicle that pollutes and angers nearby biters. The digger will have to be researched, driven to, and dig out the terrain and cannot be undone. this permanent change to terrain may not be very feasible with the way the current engine works, but it's the best idea i could come up with for issuing some sort of "balance", requiring both technology for the machine to dig the terrain, the cost to fuel the machine, the length of time that it pollutes and angers nearby biters, the permanance of the tunnel, all can be reasons to validate it as a balanced option. You can also force a speed-penalty to trains due to slope changes, which would create a similar effect to the cost of intersections normally that force trains to stop and wait. Trains, regardless of traffic would have to slow down due to slope changes, this alone keeps throughput similar, but the cost and size difference of intersections makes it a choice the player can decide how they want to layout their train network. There should not be any argument against new options simply because it trivializes something over-complicated. there are ALWAYS ways to balance out new options a game can add. sometimes, it just takes a bit of time to fine tune.
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Underground Rail

Post by Tekky »

usafphoenix wrote:It should be a matter of balance: Rail undergrounds must be dug up by a slow-digger-vehicle that pollutes and angers nearby biters. The digger will have to be researched, driven to, and dig out the terrain and cannot be undone. this permanent change to terrain may not be very feasible with the way the current engine works, but it's the best idea i could come up with for issuing some sort of "balance", [...]
I like the idea of underground tunnels causing pollution when digging them. However, these changes to terrain should not be "permanent". They should be reversible (possibly causing even more pollution when reversed).
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground Rail

Post by mrvn »

I've been playing a new map with *gasp* Cliffs.

Wouldn't it be cool to blast a tunnel into a cliff so a train can drive through it and come out the other side?
Tekky
Smart Inserter
Smart Inserter
Posts: 1040
Joined: Sun Jul 31, 2016 10:53 am
Contact:

Re: Underground Rail

Post by Tekky »

mrvn wrote:I've been playing a new map with *gasp* Cliffs.

Wouldn't it be cool to blast a tunnel into a cliff so a train can drive through it and come out the other side?
Yes, it would be cool, but it must also be possible to build tunnels in places where there are no cliffs. Otherwise, tunnels would be very limited.
User avatar
olafthecat
Filter Inserter
Filter Inserter
Posts: 476
Joined: Fri Jul 07, 2017 4:37 pm

Re: Underground Rail

Post by olafthecat »

This would be great
Gonna start playing again with 0.16 build.
That's all.
mrvn
Smart Inserter
Smart Inserter
Posts: 5860
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Underground Rail

Post by mrvn »

Tekky wrote:
mrvn wrote:I've been playing a new map with *gasp* Cliffs.

Wouldn't it be cool to blast a tunnel into a cliff so a train can drive through it and come out the other side?
Yes, it would be cool, but it must also be possible to build tunnels in places where there are no cliffs. Otherwise, tunnels would be very limited.
How about buildable cliffs?

Cliffs would make the graphics work out nicely as the train tracks don't have to slope down into the ground but simply go straight into the cliff. So that would be another plus.
ImTheRealSlayer
Inserter
Inserter
Posts: 21
Joined: Fri Dec 14, 2018 4:56 am
Contact:

Bridges And Tunnels for Trains

Post by ImTheRealSlayer »

Hello, my name is ImTheRealSlayer, but you guys can call me Slayer. I have been playing factorio for about 60+ hours now, and I have a few things that I'd like to see implemented into the game.

I would like to see added into factorio a very simple addiion - Bridges and Tunnels for Trains and Players.

Firstly, Bridges and Tunnels for Trains (the title of this forum post)
Sometimes water is scarse in your world, and sometimes it isnt. When water is ubundant, you have to create landfill to get belts and tracks layed down. This is mainly cosmetic, and serves no real purpose other than keeping the water intact. Tunnels, however, are siginicantly more useful. They allow trains to go under your entire factory, avoiding the need to go around or adjust the inside of your factory to suit the train, which can be extremely diffiuclt.

Next, Bridges for Players
I believe the number 1 threat to players (if organised improperly) are trains. Many a time I be looking for something to fix, and a train comes by and hits me. I'm dead. Now, some of you may think that this is laziness speaking, but when a train is going 150+ km/h its difficult to see them coming when you're zoomed in, working on intrecate belt systems and whatnot. This is why bridges over railway lines will be handy. instead of risking your life trying to cross the line where it is unsafe, you put a bridge over the line instead. Other alternatives can be used too, like speed limited zones that can be turned on and off by circut networks, or crossings in general.

I would just like to add that i love this game so much. It really has been an excellent experience, and suprisingly i havent got frustrated with the game once. Despite what my friends say, it was a $25 well spent. (playing the game on high settings is good too, i wasnt expecting such high quality sprites :o )
Image
Post Reply

Return to “Implemented in 2.0”