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

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

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

TopTechDreamer
Engineer
Engineer
Posts: 61
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 65 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 65 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 65 times

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests