Page 4 of 5
Re: Chunnel v11 r17206
Posted: 03 Feb 2010 03:12
by petert
Here is quite a big update:
Re: Chunnel v1 r15422
Posted: 26 Mar 2010 14:46
by HackaLittleBit
planetmaker wrote:
An evil person could use this to totally sabotage your shipping routes without you having the possibility to undo it.
Sorry Planetmaker I took it out again because I think the argument is not valid.
An evil person could raise the land and put track on it.

But then you have aqueducts no?
Terkhen wrote:The problem is less intense with these changes, but it is still there. The diff is attached here. Don't worry, optimize it when you have time

I had a look at it and changed some code. I dunno if I really solved it.

Re: Chunnel v12 r19518
Posted: 27 Apr 2010 08:35
by ashaw
why not re-architecture tunnels so that they are treated the same as roads under bridges, that is that is that you can lay them under the ground with a viewer that cuts through the surface?
Re: Chunnel v12 r19518
Posted: 22 Apr 2011 16:17
by HackaLittleBit
Update of chunnel patch to trunk.
Chunnel building has now a more strict behavior.
Changes:
Terraforming upwards and downwards not allowed over existing tunnel.
Only one stretch of water can be crossed.
Building along shore over small islands etc not allowed anymore.
Building only possible on water-tiles with slope SLOPE_NW = 4, SLOPE_SW = 3, SLOPE_SE = 2, SLOPE_NE = 1

- valid slopes.png (48.54 KiB) Viewed 6840 times
Terra forming:
The procedure 'IsTunnelInWayDir' was slightly changes in order to be able to correctly
detect a water passing tunnel.
Only at sea-level (z == 0) this will have effect on performance.
I was not able to detect significant decrease in performance while terra forming.
See first post for updated patch.
Regards
Re: Chunnel v12 r19518
Posted: 23 Apr 2011 14:30
by HackaLittleBit
Small change.
The moment tunnel construction reaches water shore a test is initiated to see
if under water tunnel construction is possible.
If not found suitable site normal tunnel construction will be applied.
Bugs not known!
See first post for updated patch.
Re: Chunnel v14 r22373
Posted: 23 Apr 2011 15:16
by romazoon
awesome patch you made here ! (and i haven t tested the latest versions)
i hope to see this soon in trunk

Re: Chunnel v14 r22373
Posted: 23 Apr 2011 17:34
by HackaLittleBit
romazoon wrote:i hope to see this soon in trunk
Hmmm. I doubt it.
Just found bug.
Dinamite water and terra forming over tunnel is possible.

Re: Chunnel v14 r22373
Posted: 01 May 2011 14:35
by HackaLittleBit
Update patch.
More and more strict.

- wt.png (92.54 KiB) Viewed 6916 times
Construction:
Tunnel can only be build in places that have minimal 2 tiles between shore and entrance/exit.
Tunnel will only pass over "flat" shore.
Only one stretch of water can be crossed.
Only passes water tiles.
Only when these conditions are met you will be able to build under water tunnel else normal building is assumed.
Only buoy can be build on underwater tunnel.
Terra forming:
Only on sea level "z == 0" some speed penalty will occur.
Searching for tunnel will race out of map border if not encountered.
However raising map level from sea level to one level above is something that not often happens.
I do not know if this will have any effect when starting new game.
I will have a look at that.
Tile clearing;
It should not be possible to remove water while tunnel exists.
See first post for patch
Regards HackaLittlBit
Re: Chunnel v15 r22402
Posted: 02 May 2011 06:42
by Sensation Lover
this souds good, thanks!
Re: Chunnel v15 r22402
Posted: 08 May 2011 19:12
by HackaLittleBit
Update Patch
Improved IsTunnelInWayDir proc with small helper function to limit amount of
coast tiles to 2 when searching for crossing water tunnel.
This improves terra forming speed.
And proc stops on next inclined tile with z == 0.
This limits the amount of times the procedure keeps on looking for tunnel until map border.
I hardly notice difference now.
see first post
PATCH
Re: Chunnel v17 r22472
Posted: 18 May 2011 03:10
by HackaLittleBit
Updated
patch
mostly rewritten.
previous version still had bugs.
When trees grow on shore tile it is no longer water tile therefore Terra forming was still possible.
Building on slopes is now allowed.
Now even more strict behavior.
Reason for doing so is limit the amount of iterations for tunnel detection.(eg Terra forming)
procedure has very controlled behavior now.(not so much racing of the map any more).
You can only build tunnel when situation is the same as this photo.

otherwise building behaves in classic way.
see also first post
Re: Chunnel v17 r22472
Posted: 09 Jun 2011 11:10
by 2007Alain2007
great work and its looking A LOT nicer
Re: Chunnel v17 r22472
Posted: 09 Jun 2011 16:15
by Wasila
Nice!
Trunk inclusion?
Re: Chunnel v17 r22472
Posted: 09 Jun 2011 17:13
by Leanden
Please!
Also i wondered if anyone had had a crack at it yet or thought about it. But i was thinking about custom tunnels where you choose the location of the two tunnel entrances and they done neccessarily have to be in line or on the same level. The vehicle will just disappear into the tunnel and then move in a straight line under the map as it does now to the tunnel exit. Would something like this even be possible?
Re: Chunnel v17 r22472
Posted: 09 Jun 2011 17:43
by Kogut
What with no-crossing-with-other tunnels?
Re: Chunnel v18 beta r23127
Posted: 07 Nov 2011 04:04
by HackaLittleBit
Released new version.
Now instead of 2 tiles between shore and entrance you can choose between 2 and 4 tiles.
Not fully tested yet.
Please report bugs.
See first post for download patch.
Thanks
Re: Chunnel v19 r23168
Posted: 09 Nov 2011 01:45
by HackaLittleBit
Code change
IsCrossableWater helper function is now more readable.
Note that you can also use this patch for road vehicles and trams.
have fun.
Re: Chunnel v19 r23168
Posted: 07 Apr 2012 02:03
by boohey
hi, im wanting to make the channel tunnel with is patch but ive not got know clue as to how to add it to ttd or even if it works with the new version of openttd.
has anyone got this already added to the openttd, lates version and could just vip the files to drop into folder cos i dont have the foggyist on VB and that!!!
thanks!

Re: Chunnel v19 r23168
Posted: 07 Apr 2012 03:24
by handrake
boohey wrote:hi, im wanting to make the channel tunnel with is patch but ive not got know clue as to how to add it to ttd or even if it works with the new version of openttd.
has anyone got this already added to the openttd, lates version and could just vip the files to drop into folder cos i dont have the foggyist on VB and that!!!
thanks!

Try
Chill's patch pack
Re: Chunnel v19 r23168
Posted: 07 Apr 2012 09:12
by Alberth
handrake wrote:boohey wrote:hi, im wanting to make the channel tunnel with is patch but ive not got know clue as to how to add it to ttd or even if it works with the new version of openttd.
has anyone got this already added to the openttd, lates version and could just vip the files to drop into folder cos i dont have the foggyist on VB and that!!!
thanks!

Try
Chill's patch pack
Chill's patch pack is the latest working version probably, but not the 'newest version of openttd' by a long shot.
As for understanding patches, you may want to read
http://wiki.openttd.org/Patches for an overiview of what they are.