Water Tunnels

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

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

Re: Water Tunnels

Post by acs121 » 27 Aug 2018 12:17

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: 7414
Joined: 17 Jan 2007 00:14

Re: Water Tunnels

Post by Eddi » 27 Aug 2018 13:23

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"
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Pyoro
Tycoon
Tycoon
Posts: 2471
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Water Tunnels

Post by Pyoro » 27 Aug 2018 13:58

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 1248 times

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

Re: Water Tunnels

Post by acs121 » 27 Aug 2018 14:43

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.

User avatar
leifbk
Chief Executive
Chief Executive
Posts: 757
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway
Contact:

Re: Water Tunnels

Post by leifbk » 27 Aug 2018 15:08

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.

CazadorSirenas
Engineer
Engineer
Posts: 29
Joined: 09 Aug 2018 14:18

Re: Water Tunnels

Post by CazadorSirenas » 28 Aug 2018 14:19

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: 1949
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 » 28 Aug 2018 15:13

Ship classes mean classification between ships, small and large for example. Only small ones would be able to get in water tunnels then.

CazadorSirenas
Engineer
Engineer
Posts: 29
Joined: 09 Aug 2018 14:18

Re: Water Tunnels

Post by CazadorSirenas » 31 Aug 2018 21:10

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?

User avatar
leifbk
Chief Executive
Chief Executive
Posts: 757
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway
Contact:

Re: Water Tunnels

Post by leifbk » 31 Aug 2018 21:30

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: 7414
Joined: 17 Jan 2007 00:14

Re: Water Tunnels

Post by Eddi » 31 Aug 2018 21:36

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.
You might not exactly be interested in Ferion, but if you are, have fun :)

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

Re: Water Tunnels

Post by acs121 » 31 Aug 2018 21:37

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: 6775
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Water Tunnels

Post by kamnet » 01 Sep 2018 05:27

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: 1949
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 » 01 Sep 2018 20:44

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.

CazadorSirenas
Engineer
Engineer
Posts: 29
Joined: 09 Aug 2018 14:18

Re: Water Tunnels

Post by CazadorSirenas » 02 Sep 2018 01:11

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: 1949
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Water Tunnels

Post by acs121 » 02 Sep 2018 11:42

There is one here. However you must compile it. Means you have to get the game code and update it with this patch.

CazadorSirenas
Engineer
Engineer
Posts: 29
Joined: 09 Aug 2018 14:18

Re: Water Tunnels

Post by CazadorSirenas » 02 Sep 2018 18:07

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: 48
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: Water Tunnels

Post by TopTechDreamer » 25 Aug 2019 14:34

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 5 guests