Water Tunnels

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

Actually it doesn't work like this.
Tramways are a feature implemented in the game's code. However, to be activated, it needs a tramway vehicle.
In that case, the tramway NewGRFs you have only implement tram vehicles, not the tramway track.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Water Tunnels

Post by Eddi »

raw implementation-wise, it's almost trivial to get ship tunnels into the game, just add graphics for the tunnel portals and adjust a few lines here and there to allow construction.

the hard part is making:
  1. the ship graphics not glitch while going into the tunnel
  2. a meaningful distinction between "small" and "large" ships, especially in the default set, that doesn't confuse the players "hey i built this tunnel and my ships won't go through it"
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Water Tunnels

Post by Pyoro »

Eddi wrote:
  1. the ship graphics not glitch while going into the tunnel
Well, tunnel glitches, aren't we all used to those already anyway? ;)
glitchyglitch.png
glitchyglitch.png (11.84 KiB) Viewed 4493 times
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

Eddi wrote:raw implementation-wise, it's almost trivial to get ship tunnels into the game, just add graphics for the tunnel portals and adjust a few lines here and there to allow construction.

the hard part is making:
  1. the ship graphics not glitch while going into the tunnel
  2. a meaningful distinction between "small" and "large" ships, especially in the default set, that doesn't confuse the players "hey i built this tunnel and my ships won't go through it"
The second point can be done quite easily by adding ship classes and classing those who don't have any as Large by default (NewGRF ones particularly).
It has been done for aircraft after all.
leifbk
Chairman
Chairman
Posts: 810
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: Water Tunnels

Post by leifbk »

acs121 wrote:The second point can be done quite easily by adding ship classes and classing those who don't have any as Large by default (NewGRF ones particularly).
This appears to be rather trivial. Squid Ate Fish (Fish 2) already has a distinction between small ships which can run full speed on rivers and canals, and larger ships which have limited speed on those.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Water Tunnels

Post by CazadorSirenas »

acs121 wrote:Actually it doesn't work like this.
Tramways are a feature implemented in the game's code. However, to be activated, it needs a tramway vehicle.
In that case, the tramway NewGRFs you have only implement tram vehicles, not the tramway track.
Ooohhh... I certainly didn't know this! Since this time has been my first ever adding NewGRFs. Only road building always appeared in the box until I got a tram set.

And I don't really understand what you people are talking about ship classes. I mean, it's not like there are that many in the game... Why would they need to be classified in any way in order to allow them through water tunnels? Standard game temperate only has 7. I feel like there's something here I'm missing. Are the boats coded each differently or something? Cannot all them simply go through a tunnel in case there would be one?
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

Ship classes mean classification between ships, small and large for example. Only small ones would be able to get in water tunnels then.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Water Tunnels

Post by CazadorSirenas »

Oh, I think I get it. Ship sprites are certainly bigger than buses and trains... A water tunnel could possibly need a 2x2 tiles entrance/exit to look good enough. Is that the problem?
leifbk
Chairman
Chairman
Posts: 810
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: Water Tunnels

Post by leifbk »

CazadorSirenas wrote:Oh, I think I get it. Ship sprites are certainly bigger than buses and trains... A water tunnel could possibly need a 2x2 tiles entrance/exit to look good enough. Is that the problem?
You've got part of it, yes. The more fundamental poblem, as I see it, is that there's no real difference in the OTTD world between small ships and large ships. All ships fit in a 1 tile width canal, regardless of its perceived size. There are no problems finding water tunnels in the real world which will allow small vessels to pass, but tunnels accomodating big ships is a different matter altogether. Even if the water tunnel is practically implementable in OTTD, there's still a conceptual challenge with regards to eg a Nieuwpoort passing through what for all practical purposes should be a hole at most allowing say, a Whitgift barge.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Water Tunnels

Post by Eddi »

CazadorSirenas wrote:Oh, I think I get it. Ship sprites are certainly bigger than buses and trains... A water tunnel could possibly need a 2x2 tiles entrance/exit to look good enough. Is that the problem?
that will not solve the drawing problem, however. for that, the big ship sprites must be chopped up into smaller sprites that each have a separate bounding box and can be shown/hidden separately. like individual wagons that move in sync.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

Most canal tunnels (or actually, almost all, if not all) are not meant to have huge passenger ferries or massive oil tankers passing through them. Same thing as in OpenTTD, where even the canals are only meant for small ships such as the small passenger ships in redFISH.
As for aircraft classes we could possibly implement ship classes.
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Water Tunnels

Post by kamnet »

Whether or not these tunnels exist in real life doesn't matter. And whether or not we have any graphical glitches or apparent mismatch with how the graphics are displayed is relatively immaterial. The primary issue is whether or not somebody is actually going to make this possible in the code. Until that happens, everything else is moot.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

Well we are talking about a graphical issue here.
Roujin managed to make a patch for water tunnels with road tunnel graphics. We would eventually need proper graphics for water tunnels and as you say we just don't care about this graphical glitch.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Water Tunnels

Post by CazadorSirenas »

acs121 wrote:Well we are talking about a graphical issue here.
Roujin managed to make a patch for water tunnels with road tunnel graphics. We would eventually need proper graphics for water tunnels and as you say we just don't care about this graphical glitch.
THERE IS ACTUALLY A PATCH FOR WATER TUNNELS?! 8o
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 »

There is one here. However you must compile it. Means you have to get the game code and update it with this patch.
User avatar
CazadorSirenas
Engineer
Engineer
Posts: 63
Joined: 09 Aug 2018 14:18
Location: Spain

Re: Water Tunnels

Post by CazadorSirenas »

Oh my Chuck, as crappy as that image is, it only convinces me even more how awesome would be to have real, good water tunnels in the game :)

I also thank you all people for taking the time to explain everything to this newbie here!
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Water Tunnels

Post by TopTechDreamer »

This suggestions is IMPLEMENTED now (as prototype - DOWNLOAD .EXE file) ! - Look in the topic
IMPLEMENTED some suggestions - Independence day of Ukraine 20190824 release (viewtopic.php?f=32&t=85845).
There also is description, including "How to use?" and about some restrictions.
Be happy. :)
Image
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 6 guests