Asymmetric Tunnel Entrances

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
Typhoone
Engineer
Engineer
Posts: 1
Joined: 04 Feb 2011 21:52

Asymmetric Tunnel Entrances

Post by Typhoone »

Hi all;

I did the obligatory scan of suggestions and hadn't come across this before. It was an idea that just came to me as I was playing a very mountainous Canadian Set themed game. I try to mimic realism and have my own house-rules for playing like no-90deg turns and at least 5 tiles before elevation change in track level (climb/descend). This means I get a lot of fun to construct mountain climbing helixes to reach those snowy towns on Arctic maps, with bridges going over tracks and tracks going over tunnels as trains climb and hug the ridges to ascend big mountains.

I've never looked at the oTTD codebase or done any modding of the game, but as a programmer but understand how some of the oTTD systems work mostly from discussions on the forums. I know that the traditional implementation of rail and road tunnels are using 'warps' where the vehicles disappear from the map somehow and proceed from entry to exit point? (I'm not sure how they remain track-able in the vehicle info windows). My suggestion, or question really, is how feasible is it to implement asymmetric tunnel entrance/exit points? My question revolves around three primary cases for the 'asymmetric tunnel entrances' suggestion.

1.) Straight tunnels that can exit at +1/-1 elevation change (similar to how, using bridge heads, bridges can span a section that has a +1/-1 elevation change).
2.) Tunnel portals that are not built on a straight line. For example, a tunnel with a 90-degree or 180-degree curve (this idea came to me in trying to create aesthetic 'helixes' for my mountain climbing game). Could tunnels be made in such a way that two portals could be mapped to each other that are not in a straight line?
3.) Tunnel portals that can be both not in a straight line and not on the same elevation level.

I'm not looking to exploit the tunnel mechanic so that i could have a unit enter a tunnel, make a 180, climb 5 units in elevation, and exit right on top without losing speed... though that would certainly be a neat mechanic to play with too. Anyways I just wanted to record this suggestion to the board and see if the experts had any thoughts regarding difficulty or feasibility. Thanks for your time.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Asymmetric Tunnel Entrances

Post by Alberth »

I'd consider it quite complicated, and that is due to missing the piece, namely "how they remain track-able in the vehicle info windows".
In the current implementation, the tunnel does not exist at all, except for both entrances. The vehicle enters one side, notes itself as "in a tunnel", and simply keeps on driving in the same direction until it finds another entrance (ie the exit for that vehicle). At that point, it notes itself as "out of the tunnel", and goes back to finding road or track pieces to follow.

Thus anything that breaks "straight line from the entrance" is complicated :)
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Asymmetric Tunnel Entrances

Post by Eddi »

well, there was a patch that allowed you to place the tunnel entrances totally separate from each other, a long time ago. a part of that went into the "chunnel" patch.

it was rather hack-ish though


a "proper" approach would be to lay underground tracks totally freeform, but that is a really, really difficult task.
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Asymmetric Tunnel Entrances

Post by YNM »

How about draggable tunnels ? While seems silly, I think that this still complies with the "go in straight, go out straight" rules that the current tunnel implements. Most probably, the only obstacle is if the tunnel have a middle section that's lower than the start / the end (that the viewfinder become unrealistic) but I think most player won't even notice it. Chunnel patch would also be obsolete if this is implemented.

EDIT : To avoid wrong exit, the enterance could be paired with a tunnel ID or so ? I just thought of the possibility that another tunnel is created in the same line on top/below another tunnel. Also it will be possible for people to build tunnels that switch the level between the two tunnels.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 3 guests