Chunnel V23 r27765

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

petert
Tycoon
Tycoon
Posts: 3008
Joined: 02 Apr 2009 22:43
Location: Massachusetts, USA

Re: Chunnel v11 r17206

Post by petert »

Here is quite a big update:
Attachments
chunnel_v10_r18988.diff
(3.86 KiB) Downloaded 177 times
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v1 r15422

Post 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. :|
ashaw
Engineer
Engineer
Posts: 16
Joined: 07 Aug 2008 11:53

Re: Chunnel v12 r19518

Post 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?
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v12 r19518

Post 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
valid slopes.png (48.54 KiB) Viewed 3504 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
Last edited by HackaLittleBit on 06 May 2011 20:53, edited 1 time in total.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v12 r19518

Post 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.
User avatar
romazoon
Tycoon
Tycoon
Posts: 1292
Joined: 20 Jun 2010 23:16

Re: Chunnel v14 r22373

Post by romazoon »

awesome patch you made here ! (and i haven t tested the latest versions)

i hope to see this soon in trunk ;)
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v14 r22373

Post by HackaLittleBit »

romazoon wrote:i hope to see this soon in trunk
Hmmm. I doubt it. :wink:

Just found bug.

Dinamite water and terra forming over tunnel is possible. :cry:
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v14 r22373

Post by HackaLittleBit »

Update patch.

More and more strict. :)
wt.png
wt.png (92.54 KiB) Viewed 3580 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
Last edited by HackaLittleBit on 02 May 2011 19:23, edited 1 time in total.
User avatar
Sensation Lover
Transport Coordinator
Transport Coordinator
Posts: 338
Joined: 26 Feb 2009 09:17
Skype: Aron Bogdan Silviu
Location: Torino, Italy
Contact:

Re: Chunnel v15 r22402

Post by Sensation Lover »

this souds good, thanks!
I was in:
Austria,Belgium,Brazil,China,France,Germany,Hungary,Indonesia,Italy,Luxemburg,Malaysia,Mexico,Netherlands,Norway,Panamà,Poland,Romania,
Saudi Arabia,Singapore,Slovenia,Spain,Switzerland,Thailand,U.K.,Ukraine,U.S.A.
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v15 r22402

Post 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
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v17 r22472

Post 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.
Image
otherwise building behaves in classic way.


see also first post
Attachments
chn1.png
(158.12 KiB) Downloaded 3 times
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Chunnel v17 r22472

Post by 2007Alain2007 »

great work and its looking A LOT nicer
For Community Integrated Version http://code.google.com/p/civopenttd/
Wasila
Tycoon
Tycoon
Posts: 1498
Joined: 15 Mar 2008 07:02

Re: Chunnel v17 r22472

Post by Wasila »

Nice!

Trunk inclusion?
User avatar
Leanden
Tycoon
Tycoon
Posts: 2620
Joined: 19 Mar 2009 19:25
Location: Kent

Re: Chunnel v17 r22472

Post 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?
Image
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: Chunnel v17 r22472

Post by Kogut »

What with no-crossing-with-other tunnels?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v18 beta r23127

Post 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
User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: Chunnel v19 r23168

Post 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.
boohey
Engineer
Engineer
Posts: 15
Joined: 16 Mar 2006 17:14

Re: Chunnel v19 r23168

Post 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! :oops: :?: :D
handrake
Engineer
Engineer
Posts: 55
Joined: 26 Mar 2012 10:23

Re: Chunnel v19 r23168

Post 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! :oops: :?: :D
Try Chill's patch pack
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Chunnel v19 r23168

Post 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! :oops: :?: :D
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.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 23 guests