Page 2 of 8

Re: NewGRF Airports, try 2

Posted: 27 Oct 2009 18:47
by petert
Regarding Roujin's crash, I got the same one, and posted a topic about it. (Don't actually post on it, since that topic wasn't supposed to be made)

Re: NewGRF Airports, try 2

Posted: 27 Oct 2009 20:29
by Yexo
Very strange, but I can't reproduce the crash. Can anyone who can reproduce it with a windows binary from http://www.openttd.org/en/download-airports upload crash.log/crash.dmp?

Re: NewGRF Airports, try 2

Posted: 27 Oct 2009 20:53
by Zuu
I just tried to get the crash files but they do not seam to appear. As a side note the OpenTTD crash handling window does not appear. Instead the Windows crash window is shown.

I'll make a compile in Visual Studio and see what comes out from that.

Re: NewGRF Airports, try 2

Posted: 27 Oct 2009 21:02
by Yexo
Bug fixed, it was trying to draw the preview when no airport was selected.

Workaround: don't select an airport class without any available airports. To make sure the small airport is always available set the setting "airports never expire" to "on" (advanced settings->construction).

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 13:00
by Roujin
Alright, that bug is squashed :)
Tip of your repository works fine for me now, without crashes.

If the spec is going to stay more or less like it is, maybe some newgrf wizards are interested in coding some more airports / planes for this branch to test.. :) I guess that would surely help in development of this branch, wouldn't it? More test cases to test...

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 13:03
by Yexo
Roujin wrote:If the spec is going to stay more or less like it is, maybe some newgrf wizards are interested in coding some more airports / planes for this branch to test.. :) I guess that would surely help in development of this branch, wouldn't it? More test cases to test...
Indeed. I'll of course give help whenever needed,and if anyone creates a nice tile layout and a plan for how the airports should move I'm even willing to code that.

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 13:13
by Roujin
I assume you are aware of this patch? (edit: yes you are, you posted in that thread... :P)

Maybe the author can be persuaded to give it a go with the new grf spec,
or if you count the code he wrote as both "a nice tile layout and a plan for how the airports should move", you could do it :lol:

It is possible to reuse sprites in the base graphics, isn't it?

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 14:24
by richk67
Yexo wrote:Indeed. I'll of course give help whenever needed,and if anyone creates a nice tile layout and a plan for how the airports should move I'm even willing to code that.
If you want to take the optimised International, La Guardia, and San Francisco .nfos I created for my branch, then I'm quite happy for you to convert them to your new standard.

The International as optimised in my style, has throughput close to that of the Intercontinental. Much better stacking on taxiways.

LaGuardia is a 2 runway, with short takeoff of light aircraft.

San Francisco has the big double crossing runway. This would be a real test of your new spec - and be assured that the movement is fully debugged, so should be lock free. This airport is a joy to watch at high loads + high speed.

I dont know how much of the existing .nfo is directly re-usable; as you always stated - you know more about .nfo than I do ;)

BTW the .nfos are pretty closely commented - mostly 1 comment per node.

Cheers, RichK

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 14:52
by Yexo
richk67 wrote:
Yexo wrote:Indeed. I'll of course give help whenever needed,and if anyone creates a nice tile layout and a plan for how the airports should move I'm even willing to code that.
If you want to take the optimised International, La Guardia, and San Francisco .nfos I created for my branch, then I'm quite happy for you to convert them to your new standard.

The International as optimised in my style, has throughput close to that of the Intercontinental. Much better stacking on taxiways.

LaGuardia is a 2 runway, with short takeoff of light aircraft.

San Francisco has the big double crossing runway. This would be a real test of your new spec - and be assured that the movement is fully debugged, so should be lock free. This airport is a joy to watch at high loads + high speed.

I dont know how much of the existing .nfo is directly re-usable; as you always stated - you know more about .nfo than I do ;)

BTW the .nfos are pretty closely commented - mostly 1 comment per node.

Cheers, RichK
Thanks a lot, I'd like to convert those very nice airports you created, but I didn't know whether you'd like that. Can you send me the commented nfo's? I'll have to dig in your spec to see how easy I can reuse the tile layouts, the statemachines will probably have to be rewritten from scratch (but having an example and correct nodes makes that doable).

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 15:07
by richk67
Yexo wrote:Thanks a lot, I'd like to convert those very nice airports you created, but I didn't know whether you'd like that. Can you send me the commented nfo's? I'll have to dig in your spec to see how easy I can reuse the tile layouts, the statemachines will probably have to be rewritten from scratch (but having an example and correct nodes makes that doable).
Sure I dont mind them being re-used - its a crying shame to leave a good airport design uncoded! Just I dont want to be lumbered with the hard task of doing the coding when Im not active in OTTD any more (life moves on...)

I'll pmail the .nfos and the .grf (so you get the graphics too). I would guess that the graphics would just be 1:1 direct copy since they are just classic graphics declarations. Most of the new graphics use Skidd13's airports, and I think you have the permissions for those.

The .nfo with LaGuardia and San Francisco also has an incomplete Munich. Its really big - I had completed some of it; probably about 80%. I think it was missing helicopter instructions, but the pathing for the aircraft was all complete. Its a 12 terminal, 3 helipads, 3 runways (one dual takeoff/landing). Very high capacity beyond the Intercontinental.

I also have a placeable graphic for Schiphol, but no aircraft movement worked out. 6 runways, so mega silly really.

Cheers, RichK

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 22:03
by Dimme
I think I've managed to understand enough .nfo to get a feel of the specs now. A very nice example by Pikka here helped a lot! I'm already having a lot of fun with this :D

I must say it looks promising regarding the "simple" program mentioned earlier. I doubt it is possible to implement everything from my minigame, but it should be possible to come up with something.

A quick question: you can define entry points depending on what direction the AC comes from, but is it possible to define exit points depending on what direction the AC is going to? In case it is not: would it somehow be possible to implement that? I dislike planes turning 180 degrees in mid-air :)

regards
Dimme

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 22:13
by Yexo
Dimme wrote:A quick question: you can define entry points depending on what direction the AC comes from, but is it possible to define exit points depending on what direction the AC is going to? In case it is not: would it somehow be possible to implement that? I dislike planes turning 180 degrees in mid-air :)
In trunk planes don't instantly turn 180 degrees anymore. Adding a variable that holds the direction of the next airport is an option, would that work for you?

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 22:18
by petert
Yexo wrote:In trunk planes don't instantly turn 180 degrees anymore. Adding a variable that holds the direction of the next airport is an option, would that work for you?
Do you know what revision that was changed Yexo?

Re: NewGRF Airports, try 2

Posted: 28 Oct 2009 22:19
by Dimme
Yexo wrote:
Dimme wrote:A quick question: you can define entry points depending on what direction the AC comes from, but is it possible to define exit points depending on what direction the AC is going to? In case it is not: would it somehow be possible to implement that? I dislike planes turning 180 degrees in mid-air :)
In trunk planes don't instantly turn 180 degrees anymore. Adding a variable that holds the direction of the next airport is an option, would that work for you?
That would be nice, as it is then also possible to keep leaving AC away from the holding pattern (just a little less colliding). If they take nice round turns in trunk it is not really necessary, though :)

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 02:16
by petert
I finally got it working by downloading it using OpenTTDAutoUpdate 2.0, here are some screenshots :):

Edit: How does the water airport work?

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 09:02
by Yexo
petert wrote:I finally got it working by downloading it using OpenTTDAutoUpdate 2.0, here are some screenshots :):
It may not be obvious, but by using the little buttons left and right of the word "North" you can rotate the airport.
Edit: How does the water airport work?
Exactly the same as other airports, only there isn't a newgrf that provides a water airport yet.

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 10:35
by Zuu
Also you need to place it on the shore. If the problem was to find some where to place it. In north rotation the top left row should be on the shore and the other tiles should be on water. (from what I know and have tested)

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 11:04
by HackaLittleBit
Yexo very nice work.
Just a question.
Would it be possible to make a long runway of lets say 12 tiles?
And if so, make planes use more or less runway according to weight, power?
edit: (having PikkaBird in mind :wink: )

Regards HackaLittleBit

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 11:23
by PikkaBird
hackalittlebit wrote:Would it be possible to make a long runway of lets say 12 tiles?
And if so, make planes use more or less runway according to weight, power?
Yes, that is possible within the current spec.

Re: NewGRF Airports, try 2

Posted: 01 Nov 2009 11:27
by HackaLittleBit
Thanks PikkaBird

I need to hurry up now finishing my patch(signals) :roll: and start playing the game :)