[patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

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

Baxtrey
Engineer
Engineer
Posts: 14
Joined: 29 May 2020 03:14

Re: [patch] Terminus Airports v1.47 (OpenTTD 1.10.1)

Post by Baxtrey »

kamnet wrote: 29 May 2020 23:14 Giving this a go with v1.47, and I got myself a nice little tie-up on the Indianapolis airport.
Hello, I hope this is good, do you know if there is a way to make this airport officially?
EG0611
Engineer
Engineer
Posts: 49
Joined: 19 Feb 2012 08:39

Re: [patch] Terminus Airports v1.47 (OpenTTD 1.10.1)

Post by EG0611 »

kamnet wrote: 29 May 2020 23:14 Giving this a go with v1.47, and I got myself a nice little tie-up on the Indianapolis airport.
Ouch that looks horrible. Looks like planes want to go to hangar and planes want to take off deadlock themselves.
Baxtrey wrote: 30 May 2020 02:36
Hello, I hope this is good, do you know if there is a way to make this airport officially?
With these kinds of deadlocks, I don't think this newGRF can be included to base game.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by Vetteman06 »

As far as adding this to the base game...
It will not happen, devs already made that clear.

Kamnet-
Thanks for the report. Fixed and updated to 1.48.

I made a way to recover from a deadlocked airport.
Just open the airport window up and click the "Airport Control" button at bottom.
Click the "Reset Airport" button to start the reset. (May have to click it multiple times to clear completely.)
After the airport is clear, click it one more time to make sure there are no reservations.
Then re-open it.

Baxtrey-
Were you able to get it running? I could not tell from that screenshot what was wrong. Will need the crash.log file.


Airport design info-
Hangars max = 8
Passenger Terminals max = 36
Helipads max = 12 (These share with Cargo Terminals)
Cargo Terminals max = 12 (These share with Helipads.)
Runways max = 8
Taxiways max = 60

128 bits max for blocks. 4 are reserved for closing the airport and Nothing being blocked.
124 above are all that's available without adding an additional 64.

Since it is likely that an airplane will need maintenance in flight, you should have a hangar near the exit of landing runways.
This will allow planes to service before they go to the terminal.
Example: Terminus airports have a hangar right after landing and right before takeoff.
The further a hangar is from any given terminal, means it will be harder for the plane to path to that hangar.

It takes 20+ hours to add a new airport.
I will only add a new airport if it specifically fills a gap others do not fill or that it has some unique characteristic.
EG0611
Engineer
Engineer
Posts: 49
Joined: 19 Feb 2012 08:39

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by EG0611 »

I will go and try to design something with these limitations. Maybe results come good to be added but for now I would entertain myself.

I would also like to ask that, could players add newGRF to default game or to other patches (like JGR) as a newGRF mod? As far as I get is that we can only play with these airports on OpenTTD patches (8 and 32 bbp) you provide.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by Vetteman06 »

omer584-
This is not a NewGRF mod. The only NewGRF stuff is the airport mini views for the selector and the terminal pad itself.
This is a patch.
I have made a lot of changes to the state machine for airports. All of this was done in code.
The movement of planes on the airport are designed around the state machine changes.
The only way to play these airports is using this patch.

The overall desire of the OpenTTD devs is to migrate airports to be NewGRF only.
But the effort involved to make that happen would be massive.
Which is why no one has tried to tackle it that I know of.
At least I have not seen anything for the last 5+ years anyway...

A patch pack owner would have to add this code to their pack in order to use these airports.
I can understand the reluctance to do so as this patch touches a lot of files...
Baxtrey
Engineer
Engineer
Posts: 14
Joined: 29 May 2020 03:14

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by Baxtrey »

Vetteman06 wrote: 30 May 2020 20:35 omer584-
This is not a NewGRF mod. The only NewGRF stuff is the airport mini views for the selector and the terminal pad itself.
This is a patch.
I have made a lot of changes to the state machine for airports. All of this was done in code.
The movement of planes on the airport are designed around the state machine changes.
The only way to play these airports is using this patch.

The overall desire of the OpenTTD devs is to migrate airports to be NewGRF only.
But the effort involved to make that happen would be massive.
Which is why no one has tried to tackle it that I know of.
At least I have not seen anything for the last 5+ years anyway...

A patch pack owner would have to add this code to their pack in order to use these airports.
I can understand the reluctance to do so as this patch touches a lot of files...
But what should be done to be able to migrate those airports to newGRF?

If I had even some data to be able to do it, I would do it with pleasure

I have made a design equal to yours, just add 4 new doors that give a total of 40 passenger terminals and 16 cargo terminals and taxiways.
I would like to know how I can now add the different directions in which the planes can arrive.

http://imgfz.com/i/BmgxWrt.png
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by Eddi »

Baxtrey wrote: 18 Jul 2020 15:35 But what should be done to be able to migrate those airports to newGRF?
oh that is simple, you just need to specify a language to describe state machines that is
  • embeddable into NFO
  • easy to parse
  • easy to verify correctness (i.e. no deadlocks)
  • easy to write
  • easy to debug
Baxtrey
Engineer
Engineer
Posts: 14
Joined: 29 May 2020 03:14

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by Baxtrey »

Eddi wrote: 20 Jul 2020 12:45
Baxtrey wrote: 18 Jul 2020 15:35 But what should be done to be able to migrate those airports to newGRF?
oh that is simple, you just need to specify a language to describe state machines that is
  • embeddable into NFO
  • easy to parse
  • easy to verify correctness (i.e. no deadlocks)
  • easy to write
  • easy to debug
Could you explain to me, is that I hardly know anything about programming?
User avatar
jfs
Tycoon
Tycoon
Posts: 1749
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by jfs »

Eddi's point is that making support for NewGRF-defined airport shapes is a very hard problem to solve. It will need a large amount of careful design and planning, and possibly mathematical analysis and proofmaking. Solving it could possibly even be a university-level research subject for a master's thesis.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: [patch] Terminus Airports v1.01 (r27410)

Post by TopTechDreamer »

Vetteman06 wrote: 31 Oct 2015 11:28 Terminus Airports

13 New Airports.
...
Terminus4, 2010, 8 Hangars, 8 Runways, 36 Terminals, 12 Cargo Terminals, 12 Helipads, Cost is ~80M (USD)
...
Windy, 1970, 1 Hangar, 1 Terminal, 1 Cargo Terminal, 1 Helipad, Normal Cost, Very Windy!!
Indianapolis, 1970, 4 Hangars, 4 Runways, 26 Terminals, 6 Cargo Terminals, 2 Helipads, Normal Cost
...
Screenshot of the 13 airports:
Terminus Airports.png
Vetteman06 wrote: 04 Nov 2015 21:39 ...
212 paths I have to trace for that one airport and just for planes.
This (all) is amazing! Extra super mega excellent! Outstanding! :shock: :D
I want it very strongly! :roll:
Vetteman06 wrote: 31 Oct 2015 11:28 Terminus Airports
...
Zip File:
...
x64 version of it compiled.
patch of the changes.
...
But, why x64 only?! :?
exe for 32 bit works on 64 bit, but exe for 64 bit does not work on 32 bit :cry:
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: [patch] Terminus Airports v1.01 (r27410)

Post by Eddi »

TopTechDreamer wrote: 13 Oct 2020 01:05 But, why x64 only?! :?
exe for 32 bit works on 64 bit, but exe for 64 bit does not work on 32 bit :cry:
just because something "works" doesn't mean it's a good idea.

no up-to-date operating system(*) works on 32bit, and if you're using a not-up-to-date operating system, you should not be on the internet.

plus, this is an open source hobbyist development project, any compiled binaries are a bonus purely out of kindness of the developer. if they think it's too difficult to provide a version that they don't use themselves, then you're not in a position to demand that they do that extra work. also, it gets increasingly difficult to find modern compilers that can compile for old systems.

(*) speaking about mainstream operating systems (aka windows) here. not some niche linuxes.
TopTechDreamer
Engineer
Engineer
Posts: 72
Joined: 22 Feb 2012 12:21
Location: Ukraine
Contact:

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by TopTechDreamer »

Vetteman06 wrote: 30 May 2020 14:37 ...
I made a way to recover from a deadlocked airport.
Just open the airport window up and click the "Airport Control" button at bottom.
Click the "Reset Airport" button to start the reset. (May have to click it multiple times to clear completely.)
After the airport is clear, click it one more time to make sure there are no reservations.
Then re-open it.
...
...
Since it is likely that an airplane will need maintenance in flight, you should have a hangar near the exit of landing runways.
This will allow planes to service before they go to the terminal.
Example: Terminus airports have a hangar right after landing and right before takeoff.
The further a hangar is from any given terminal, means it will be harder for the plane to path to that hangar.
...
Thank You. Interesting ideas.
I downloaded source code from https://github.com/Vetteman06/OpenTTD and compiled it for win32 to see, how it works. ( The title of the window was "OpenTTD 1.10.1 Terminus Airports 1.4.7" .)
There are very interesting parts. For example, beautiful moving down of planes, when they go down to landing. And as a plane can go down but then can jump up again and return to the queue loop, if the runway is not free at that moment. And, of course, it's very interesting, that multiple planes can move simultaneously inside an airport.

But there are also some troubles, that block an airport.
When planes are moving inside an airport, they don't try to wait in a hangar or to go to a hangar to prevent or to fix the blocking state of queue inside the airport. They also don't try to wait on the tiles of terminals, even if they are already there. They don't try to wait to keep free a way for some other plane. Some tiles and some paths between tiles are not used for taxiing at all, it seems. Maybe, this all would be not important, if there would be no blocking states or situations... But...

Let's look at some screenshots:

1. A plane goes from the hangar DH to the runway. But why it goes D2.1 --> D3 --> D1 --> D0 ?
This path is strange a little, because there have to be another - shorter - path D2.1 --> D1 --> D0 , it seems.
Terminus Airports v.1.48 test42, 2031-06-25 + arrows.png
Terminus Airports v.1.48 test42, 2031-06-25 + arrows.png (347.2 KiB) Viewed 5108 times
2. We see here a blocking situation when the airport is almost empty:
The Aircraft11 just came out from the hangar DH to the tile D2.1. As we see above, it tries to go D2.1 --> D3. But D3 is already occupied by the next aircraft, which is trying to go to the hangar DH, the only way where is via the tile D2.1. So, these 2 planes are going to go at the same time to the place, occupied by the neighbor. And they both are waiting, while the queue will go further and the situation will be fixed, but no one tries to do something self to change its own path or behavior to fix the situation (at least, to change the situation). And it is not changing.
If Aircraft11 would go D2.1 --> D1 --> D0, then the queue would be unblocked. I don't understand, why this plane doesn't do so.
If Aircraft11 would go back to the hangar D2.1 --> DH and wait there, the queue would be unblocked too (but this way is not optimal).
Terminus Airports v.1.48 test42, 2031-07-04 + arrows.png
Terminus Airports v.1.48 test42, 2031-07-04 + arrows.png (284.89 KiB) Viewed 5108 times
3. Planes can continue landing even if the next tile A1 is busy (occupied)... even if the runway A0 is occupied! This is interesting. But this leads to blocking of the runway, if some additional conditions are not fulfilled (sufficient conditions for that, to the runway can become free). Obviously, the next plane, which is trying to complete the landing, may get the permission to do it only if there is at least 1 tile free in the next sequence of taxiing from the runway to a terminal or to the hangar AH (if this plane is ready to go to the hangar - I don't see this in the game). It means:
if ( ( A0 is free ) AND (A1 is free) OR { ( A0 is busy, but ) AND } (A1 is free) AND ( A3 is free ) )
( Because planes don't go A1 --> A2.1 or A1 --> A2.2 (I don't understand why), but they go only A1 --> A3 .)
Terminus Airports v.1.48 test42, 2031-08-06 + arrows.png
Terminus Airports v.1.48 test42, 2031-08-06 + arrows.png (244.09 KiB) Viewed 5108 times
EG0611
Engineer
Engineer
Posts: 49
Joined: 19 Feb 2012 08:39

Re: [patch] Terminus Airports v1.48 (OpenTTD 1.10.1)

Post by EG0611 »

Hello Vetteman06,

I wonder if you could help me on something. You can design and add airports to the game. Do you think that these 6X6 airport ideas could be implemented to the game? What do you think of them?

viewtopic.php?f=29&t=88226&p=1239389#p1239389

Cheers.
-EG
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by Vetteman06 »

TopTechDreamer wrote: 17 Oct 2020 23:01
1. A plane goes from the hangar DH to the runway. But why it goes D2.1 --> D3 --> D1 --> D0 ?
This path is strange a little, because there have to be another - shorter - path D2.1 --> D1 --> D0 , it seems.
Terminus Airports v.1.48 test42, 2031-06-25 + arrows.png
Correct, this was a bug in the states of that airport.
I corrected it and the planes should now go direct.
TopTechDreamer wrote: 17 Oct 2020 23:01 2. We see here a blocking situation when the airport is almost empty:
The Aircraft11 just came out from the hangar DH to the tile D2.1. As we see above, it tries to go D2.1 --> D3. But D3 is already occupied by the next aircraft, which is trying to go to the hangar DH, the only way where is via the tile D2.1. So, these 2 planes are going to go at the same time to the place, occupied by the neighbor. And they both are waiting, while the queue will go further and the situation will be fixed, but no one tries to do something self to change its own path or behavior to fix the situation (at least, to change the situation). And it is not changing.
If Aircraft11 would go D2.1 --> D1 --> D0, then the queue would be unblocked. I don't understand, why this plane doesn't do so.
If Aircraft11 would go back to the hangar D2.1 --> DH and wait there, the queue would be unblocked too (but this way is not optimal).
Terminus Airports v.1.48 test42, 2031-07-04 + arrows.png
Bug. When an aircraft leaves a hangar, it is supposed to check to see if the path is clear.
It was not checking for an order of TAKEOFF. All other ones were being checked.
I fixed it in 1.49 so that the check takes place correctly.
TopTechDreamer wrote: 17 Oct 2020 23:01 3. Planes can continue landing even if the next tile A1 is busy (occupied)... even if the runway A0 is occupied! This is interesting. But this leads to blocking of the runway, if some additional conditions are not fulfilled (sufficient conditions for that, to the runway can become free). Obviously, the next plane, which is trying to complete the landing, may get the permission to do it only if there is at least 1 tile free in the next sequence of taxiing from the runway to a terminal or to the hangar AH (if this plane is ready to go to the hangar - I don't see this in the game). It means:
if ( ( A0 is free ) AND (A1 is free) OR { ( A0 is busy, but ) AND } (A1 is free) AND ( A3 is free ) )
( Because planes don't go A1 --> A2.1 or A1 --> A2.2 (I don't understand why), but they go only A1 --> A3 .)
Terminus Airports v.1.48 test42, 2031-08-06 + arrows.png
This is not quite how it works...
But the A1 --> A3 is by design.

When an aircraft exists the runway, they try to directly find a free terminal.
If they find one, they then follow the "main flow" until they get to their terminal.
If an aircraft cannot make a terminal reservation, then they will enter the hangar and wait.

In your pic, there are enough free terminals for aircraft to make their reservations, and therefore try to proceed to the terminal.

I implemented a "main flow" to all airports to maximize their efficiency.
The "main flow" does not need a reservation, and therefore allows many airplanes to move at once.
Last edited by Vetteman06 on 13 Jan 2021 17:26, edited 1 time in total.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by Vetteman06 »

EG0611 wrote: 18 Dec 2020 14:02 Hello Vetteman06,

I wonder if you could help me on something. You can design and add airports to the game. Do you think that these 6X6 airport ideas could be implemented to the game? What do you think of them?

viewtopic.php?f=29&t=88226&p=1239389#p1239389

Cheers.
-EG
Sure, but there are already airports that cover this size.
Commuter is slightly smaller and Commuter Large is slightly bigger.

Your 3rd picture would be horribly inefficient... Only one taxiway in and out for 6 terminals.
Commuter airport with only 3 terminals would be way more efficient.

Also, dual parallel runways that are exactly side by side are very inefficient also.
Either need to be staggered or like the San Fran airport, exit from the top.
EG0611
Engineer
Engineer
Posts: 49
Joined: 19 Feb 2012 08:39

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by EG0611 »

Vetteman06 wrote: 13 Jan 2021 17:25
Sure, but there are already airports that cover this size.
Commuter is slightly smaller and Commuter Large is slightly bigger.
I know that but what I want to show is the efficiency of better designed airports with current 6X6 size. I am not a fan of 3rd airport as well so even just building first airport (one with single runway and 5 side by side gates) would be awesome.
Vetteman06
Engineer
Engineer
Posts: 59
Joined: 03 Aug 2013 16:39

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by Vetteman06 »

EG0611 wrote: 15 Jan 2021 16:55
I know that but what I want to show is the efficiency of better designed airports with current 6X6 size. I am not a fan of 3rd airport as well so even just building first airport (one with single runway and 5 side by side gates) would be awesome.
Show who? Everyone that plays the game can see how inefficient those airports are. And like one poster said... That's by design.
Even if you build some new more efficient airports, the Devs are not going to change it.
They were in the original game.

I did not touch their look and they will not implement my work.
What makes you think they will implement a change to the base airports?

In any case, you are not comparing apples to apples anyway...
I made a lot of changes to the state machine. Even if I were to model that airport, it would not be a fair comparison.
So if you want to do this, go do it yourself. Check out the code and add it to the default game and run your tests.

If you do not like the terminal buildings, there are rotations of the airports that have no buildings.
You can then add whatever buildings you want to the airports.

I am not going to add it.
It does not fill any gap or is interesting.
To give you an example, I modeled the Sydney airport because it looked way different than other airports.
I just have not done it yet... But here is a pic of how the layout would work...
Sydney.png
Sydney.png (21.58 KiB) Viewed 4439 times
perverted monkey
Traffic Manager
Traffic Manager
Posts: 161
Joined: 02 Mar 2009 02:07

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by perverted monkey »

In anticipation! :bow:
EG0611
Engineer
Engineer
Posts: 49
Joined: 19 Feb 2012 08:39

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by EG0611 »

Vetteman06 wrote: 16 Jan 2021 12:51
I think you understand me wrong. I didn't order you to do anything and I didn't ask you to replace one of default airport from base game. I asked to you that I have this design idea and if you wish to built it with your program. I am also aware that OpenTTD developers wouldn't go and improve airport/airplane system just because of my idea since they are developing a hovercraft that can go on land. Even though they would have done it already.
User avatar
2TallTyler
Route Supervisor
Route Supervisor
Posts: 495
Joined: 11 Aug 2019 18:15
Contact:

Re: [patch] Terminus Airports v1.49 (OpenTTD 1.10.3)

Post by 2TallTyler »

For the record, the hovercraft on land was a joke for a developer livestream. It is not being added to the game. ;)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests