Page 2 of 6

Re: Underground rails

Posted: Thu May 11, 2017 12:45 pm
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.

Re: Underground rails

Posted: Thu Nov 02, 2017 5:46 am
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.

Re: Underground rails

Posted: Thu Nov 02, 2017 10:32 am
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.

Re: Underground rails

Posted: Fri Nov 03, 2017 8:36 am
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).

Re: Underground rails

Posted: Sat Nov 04, 2017 4:57 am
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.

Re: Underground rails

Posted: Sat Nov 04, 2017 6:14 pm
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.

Re: Underground rails

Posted: Sat Nov 04, 2017 6:15 pm
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.

Re: Underground rails

Posted: Sat Nov 04, 2017 8:36 pm
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.

Re: Underground rails

Posted: Sat Nov 04, 2017 10:06 pm
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.

Re: Underground rails

Posted: Sat Nov 04, 2017 10:24 pm
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.

Re: Underground rails

Posted: Mon Nov 06, 2017 10:57 am
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.

Re: Underground rails

Posted: Mon Nov 06, 2017 10:04 pm
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.

Re: Underground rails

Posted: Tue Nov 07, 2017 12:24 pm
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.

Re: Underground Rail

Posted: Wed Mar 07, 2018 4:36 am
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.

Re: Underground Rail

Posted: Wed Mar 07, 2018 6:41 pm
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).

Re: Underground Rail

Posted: Thu Mar 08, 2018 9:38 am
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?

Re: Underground Rail

Posted: Thu Mar 08, 2018 1:45 pm
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.

Re: Underground Rail

Posted: Thu Mar 08, 2018 1:56 pm
by olafthecat
This would be great

Re: Underground Rail

Posted: Thu Mar 08, 2018 2:09 pm
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.

Bridges And Tunnels for Trains

Posted: Fri Dec 14, 2018 5:16 am
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 )