Custom airports (version 2.1 including minigame!)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.0 including minigame!)

Post by Dimme »

DJ Nekkid wrote:there seem to be a bug, if the gridlock-detector pops in, the game wont reset. I.e. i can't get it to start/remove the error message

edit:

and sometimes dont the planes show up either :)
You must erase the error message with the erase tool (actually you don't need to click the error message, just use the erase tool somewhere) :) On very large airports, the planes will show up after a couple of seconds, as there are many routes to calculate. You must of course also place a runway for the planes to show up. If this doesn't help, please be more specific as to what you have done to get this bug.
EXTspotter wrote:I can't extract the file, it says there is an error in it.
Hmm, weird, I don't understand why extracting the .zip could be a problem, all I did was to compress it with winzip... The .jar only needs double-clicking if you have a recent version of jave. I'm no expert on this.
Try my modular airports minigame!

Image
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Custom airports (version 2.0 including minigame!)

Post by Zuu »

Must say, was a fun mini-game you've made!

For fun I tried to build a giant terminal with two taxi-ways around it with one in each direction. Apparently the program could not find a way from gate to take off runway. Only if I removed parts of the outer loop. Guess it gets into going around in a loop or something and run out of iterations.

Could also be me that don't exactly understand how to place the tarmac tiles.
Attachments
Inner loop is counter clockwise and outer loop is clockwise.
Inner loop is counter clockwise and outer loop is clockwise.
airport.png (54.19 KiB) Viewed 1992 times
Removing parts of the outer loop make it find paths.
Removing parts of the outer loop make it find paths.
airport2.png (42.72 KiB) Viewed 1940 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Custom airports (version 2.0 including minigame!)

Post by DJ Nekkid »

Error message:

ahh, that explains it :)


and the planes-dont-come;

this was setup with a runway in this direction

^
|
|
|
|
- <-- had the icon here


edit: tried the same with opposite direction runway

| <-- icon here
|
|
|
|
|
Attachments
error.PNG
error.PNG (21.92 KiB) Viewed 1820 times
Member of the
ImageImage
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Custom airports (version 2.0 including minigame!)

Post by DJ Nekkid »

sorry for doubleposting, but this little game is huge fun when you get sick of .nfo ;)

but may i ask for a feature? ;)

the first terminal should be able to be placed by the user, not in a default position :)

edit:
not really needed, as it can be deleted :)
Member of the
ImageImage
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.0 including minigame!)

Post by Dimme »

DJ Nekkid wrote: and the planes-dont-come;
I am not able to reproduce this unless you first deleted the landing-runway, and then built a takeoff-runway instead. I should make that impossible.
Zuu wrote: For fun I tried to build a giant terminal with two taxi-ways around it with one in each direction. Apparently the program could not find a way from gate to take off runway. Only if I removed parts of the outer loop. Guess it gets into going around in a loop or something and run out of iterations.

Could also be me that don't exactly understand how to place the tarmac tiles.
This is definitely a bug. I have to take a closer look at it, as I don't understand exactly what makes this happen. It cannot run out of iterations -it iterates until the whole airport has been investigated, so there is something wrong with the pathfinder I believe.
DJ Nekkid wrote:sorry for doubleposting, but this little game is huge fun when you get sick of .nfo ;)

but may i ask for a feature? ;)

the first terminal should be able to be placed by the user, not in a default position :)

edit:
not really needed, as it can be deleted :)
Thanks :) Do you get far? The feature is probably not too difficult to add, but for small airports it doesn't matter, and you won't get far in the game if the terminal is placed in the side anyways -you must use both sides of the terminal to get to a high level. Another hint is to use as little money as possible in the first levels, as remaining money is multiplied by 1.1 at the end of each level ;) I've gotten to level 10 twice, 11 should not be impossible.
Try my modular airports minigame!

Image
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Custom airports (version 2.0 including minigame!)

Post by DJ Nekkid »

i've gotten to 6 or 7 i think it was ... but thanx for that tip :)
Member of the
ImageImage
User avatar
Metruck1
Engineer
Engineer
Posts: 28
Joined: 15 Mar 2008 14:36

Re: Custom airports (version 2.0 including minigame!)

Post by Metruck1 »

If you could add a "patch-function" to add your airport to OTTD, cuttiong the default graphics into "modules" and a module assosiated to an airport sector, if it worked you could have true "custom" airports, or have the jar file create a .grf or . patch file and comple you a new exe, yoru would be just about set! Can't wait to see this in game!!! :wink:
Stienie
Engineer
Engineer
Posts: 80
Joined: 02 Aug 2008 12:35
Location: Den-Bosch (The Netherlands)

Re: Custom airports (version 2.0 including minigame!)

Post by Stienie »

How to use it???
Scenarios: http://www.tt-forums.net/viewtopic.php? ... 35#p715935
Yeah, I need to update it. Some of them are like crap. I made them when I was ten or something xD
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=45027
Not many right now, but they're coming.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4766
Joined: 09 Sep 2007 05:03
Location: home

Re: Custom airports (version 2.0 including minigame!)

Post by Alberth »

Download the file of the first post, unpack the file and run the '.jar' file in it.
(if you are usng Windows, just double-click).

To run it, you also need a Java Runtime Environment (JRE).
Sun has one, at least.
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.1 including minigame!)

Post by Dimme »

I finally had the time and courage to fix some of the bugs that has occured, updated first post with version 2.1.


Bug fixes:

* Problem with handling reservations on some airports, this resultet in among other things that that the validator kicked in on some correctly placed airports. (Zuu)
* Resetting the money and number of planes/helicopters when restarting game.


Known issues:

* The pathfinder cannot find paths that crosses an end of a runway from which an aircraft can start take-off. (very rare)
* It is possible to delete the terminals. My idea for OTTD is that a terminal is a station, so that if you create two separate terminals, they will act as separate stations; you will then need a bus route or something between them if playing with cargodest. (As in RL).
Try my modular airports minigame!

Image
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Custom airports (version 2.1 including minigame!)

Post by sulai »

Hi there,

I really like the airport minigame and I wish we had custom airports in OpenTTD :)

New players could create those ready-to-go airports we have in the game now, experienced players may choose to design own airports.

I was thinking about how to realize that without reinventing the wheel.

If we somehow could inherit the driving behavior of trains, we actually are very close to what we want to have.

Just for fun, I tried to copy existing airports with the tools we may use for trains. Imagine all vehicles on those tracks behave like trains on PBS tracks, everything already works really good. Remember stations (Gates) are accepted as safe points.
Attachments
Custom Airport.sav
(19.19 KiB) Downloaded 141 times
Custom Heliports.png
Custom Heliports.png (15.12 KiB) Viewed 5181 times
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Custom airports (version 2.1 including minigame!)

Post by sulai »

Some more screenshots.
Attachments
Custom Airport Small Commuter.png
Custom Airport Small Commuter.png (32.5 KiB) Viewed 5181 times
Custom Airport City Metro.png
Custom Airport City Metro.png (64.41 KiB) Viewed 1631 times
Custom Airport Intercontinental.png
Custom Airport Intercontinental.png (75.38 KiB) Viewed 1631 times
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.1 including minigame!)

Post by Dimme »

sulai wrote:Hi there,

I really like the airport minigame and I wish we had custom airports in OpenTTD :)

New players could create those ready-to-go airports we have in the game now, experienced players may choose to design own airports.

I was thinking about how to realize that without reinventing the wheel.

If we somehow could inherit the driving behavior of trains, we actually are very close to what we want to have.

Just for fun, I tried to copy existing airports with the tools we may use for trains. Imagine all vehicles on those tracks behave like trains on PBS tracks, everything already works really good. Remember stations (Gates) are accepted as safe points.
Thanks :) Those airports are nice, I really like that intercon :D

The main advantage in making a system close to the one for trains is that players know it. The problem, as I see it, is that you cannot guarantee that there are no deadlocks in the system, which means you need the same tools to resolve deadlocks as for trains. The deadlock problem was what I focused on when I made the minigame. If you have tried a little you know that deadlocks are impossible.

Anyway, I know Yexo is on to some newGRF stuff, so right now I'm looking forward to seeing what that is. There are several ways to make airports better, and it may be possible to make a simple-to-use program to make newGRF airports also, depending on how that turns out.

My wish is to have blocks made as newGRFs, which can be put together ingame, but I guess I'm just dreaming ;)

regards
Dimme
Try my modular airports minigame!

Image
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Custom airports (version 2.1 including minigame!)

Post by Yexo »

Dimme wrote:Anyway, I know Yexo is on to some newGRF stuff, so right now I'm looking forward to seeing what that is.
Spamming my own topic: http://www.tt-forums.net/viewtopic.php?f=33&t=45654
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Custom airports (version 2.1 including minigame!)

Post by sulai »

>> which means you need the same tools to resolve deadlocks as for train
Yeah players could create airports where planes dead lock. You would need that "skip signals" and "reverse direction" button for air craft while on ground - that may look a little strange.

I like the airport minigame also as a stand alone mini game. Only thing I'm missing: you can't distinguish the runway direction and -type.

Another suggestion: would be cool if there were some unremoveable obstangles (like blue water quadrants) and some removeable tiles (yellow farmer's field quadrants) - which you could simply delete with the existing erase button. This would add some "build into landscape" challenge :)

I'd be happy if you released the sources to CustomAirport201? I would give that a try myself then. :D
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.1 including minigame!)

Post by Dimme »

That sounds like some nice improvements :D

I managed to find the source files, they are attached. GPL v3.

The most important part is in airport.java, it is probably a bit messy some places. I know the code for calculating routes is bad, so the lag when a large airport is tested can be (in practice) removed by writing a breadth-first search (I made up something slow, as I knew nothing about graph algorithms). See the functions calculateroutes(), makeOrders() and recursion() (I had just learned recursion, so it was a bit magic for me back then, hence the name).

New sprites go to images.java, and the main loop is loop() in airport.java. Main.java is the one to run. plane and helicopter inherits from aircraft, and contain movement and reservations for the particular aircraft.

Good luck!

Dimme
Attachments
custom_airports_201_source.zip
(59.56 KiB) Downloaded 196 times
Try my modular airports minigame!

Image
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Custom airports (version 2.1 including minigame!)

Post by sulai »

Thank you for introducing us, I'll have a look at it soon =)
sulai
Traffic Manager
Traffic Manager
Posts: 159
Joined: 24 Sep 2004 18:23

Re: Custom airports (version 2.1 including minigame!)

Post by sulai »

Hi there,

I finally made it: farms and lakes enrich the world. It adds some build-into-landscape challenge. Quite a few of minor stuff has changed, too.

I've had some hard time with the code and refactored a lot. There is now an abstract class Tile, the super class of all tiles in the game.

Hope you like it!
Attachments
customairport1.png
customairport1.png (332.07 KiB) Viewed 1631 times
customairport2.png
customairport2.png (400.72 KiB) Viewed 1631 times
CustomAirport202.zip
(177.22 KiB) Downloaded 393 times
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Custom airports (version 2.1 including minigame!)

Post by Dimme »

Great! Makes it a lot more challenging. And it looks much better too :)
Try my modular airports minigame!

Image
Purator
Engineer
Engineer
Posts: 51
Joined: 02 Jul 2007 10:32

Re: Custom airports (version 2.1 including minigame!)

Post by Purator »

Hi,

maybe we could take the chance to make the Depots more realistic - only one plane per depot, as it is in "RealLife", and also planned for other Vehicles.

Purator
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 5 guests