Aircraft queueing & planespeed
Moderator: OpenTTD Developers
Aircraft queueing & planespeed
SUCCESS!
I've been able to do in OpenTTD what I've wanted to do in TTDPatch for a long time - aircraft queueing! A year ago, I was very bothered by broken/slower aircraft being taken over by faster aircraft, and never getting a chance to land. Ever. They'd just go around all day, while faster aircraft took over the runway.
This also uses Benben's planespeed patch, allowing the user to adjust aircraft speeds, since many people think planes going slower than trains is ridiculous.
Both the patches are together because the queueing patch adjusts some of the same lines as the planespeed patch, causing conflicts if they were to be seperated. Also, the higher plane speeds are beneficial to the queueing patch, allowing it to clear the queue faster.
The current "features" of the patch:
-Aircraft queueing, solves eternally circling aircraft problem.
-Better placed and shorter aircraft loop, allowing the queue to be cleared faster (less time in the air after an aircraft leaves the runway), and is also more visually appealing IMHO. This is a permanent change, and cannot be turned off, because of how the airport state machine works. (not finished, not in current patch)
-Aircraft further back in the queue wait at higher altitudes, which prevents aircraft from bunching up, and from flying through each other.
-Aircraft slow down when the destination airport is busy to slow down filling of the queue (and speed up a little when they're one of last two in queue, so it can be cleared faster).
-Helicopters line up in their own queue. Relatively simple compared to aircraft queueing, since helicopters can stand still .
-Modified form of BenBen's planespeed patch.
-Descent added between queue and landing.
Internal changes not visible to the user:
-New queue type designed specifically for holding vehicles, includes features:
--Very fast operations for almost everything (usual case for most operations is O(1), worst case O(n)), despite availablility of mid-queue deletions and the ability to get a vehicle's position in the queue.
--Vecicles can be deleted from middle of queue (the primary reason for creating a new queue type - they *must* be able to do this, because the owner may do something like redirect the aircraft to a new airport)
--Vehicles know their position in the queue - used internally for making decisions and in that nice stacking effect .
--In addition to the queue knowing which vehicle it contains, vehicles know which queue they belong to.
--Vehicle type is non-specific - queue can be made to hold trains & road vehicles as well as aircraft. But it must be a vehicle.
-Several datatypes had to have their size increased in order to overcome limits.
--Planespeed required new code to allow aircraft to move faster than one unit at a time.
--Plane heights also required changes.
NOTE: The patch is based off of the 19 September 2007 SVN - r11127.
The patch has now been submitted to FlySpray.
Current version changes the savegames - savegames made with my patch will not work with non-patched versions of OpenTTD!
I've been able to do in OpenTTD what I've wanted to do in TTDPatch for a long time - aircraft queueing! A year ago, I was very bothered by broken/slower aircraft being taken over by faster aircraft, and never getting a chance to land. Ever. They'd just go around all day, while faster aircraft took over the runway.
This also uses Benben's planespeed patch, allowing the user to adjust aircraft speeds, since many people think planes going slower than trains is ridiculous.
Both the patches are together because the queueing patch adjusts some of the same lines as the planespeed patch, causing conflicts if they were to be seperated. Also, the higher plane speeds are beneficial to the queueing patch, allowing it to clear the queue faster.
The current "features" of the patch:
-Aircraft queueing, solves eternally circling aircraft problem.
-Better placed and shorter aircraft loop, allowing the queue to be cleared faster (less time in the air after an aircraft leaves the runway), and is also more visually appealing IMHO. This is a permanent change, and cannot be turned off, because of how the airport state machine works. (not finished, not in current patch)
-Aircraft further back in the queue wait at higher altitudes, which prevents aircraft from bunching up, and from flying through each other.
-Aircraft slow down when the destination airport is busy to slow down filling of the queue (and speed up a little when they're one of last two in queue, so it can be cleared faster).
-Helicopters line up in their own queue. Relatively simple compared to aircraft queueing, since helicopters can stand still .
-Modified form of BenBen's planespeed patch.
-Descent added between queue and landing.
Internal changes not visible to the user:
-New queue type designed specifically for holding vehicles, includes features:
--Very fast operations for almost everything (usual case for most operations is O(1), worst case O(n)), despite availablility of mid-queue deletions and the ability to get a vehicle's position in the queue.
--Vecicles can be deleted from middle of queue (the primary reason for creating a new queue type - they *must* be able to do this, because the owner may do something like redirect the aircraft to a new airport)
--Vehicles know their position in the queue - used internally for making decisions and in that nice stacking effect .
--In addition to the queue knowing which vehicle it contains, vehicles know which queue they belong to.
--Vehicle type is non-specific - queue can be made to hold trains & road vehicles as well as aircraft. But it must be a vehicle.
-Several datatypes had to have their size increased in order to overcome limits.
--Planespeed required new code to allow aircraft to move faster than one unit at a time.
--Plane heights also required changes.
NOTE: The patch is based off of the 19 September 2007 SVN - r11127.
The patch has now been submitted to FlySpray.
Current version changes the savegames - savegames made with my patch will not work with non-patched versions of OpenTTD!
- Attachments
-
- queue_release.zip
- (784.59 KiB) Downloaded 501 times
-
- queue_lang.zip
- (51.71 KiB) Downloaded 400 times
-
- queue.patch
- (51.4 KiB) Downloaded 495 times
Last edited by CobraA1 on 19 Sep 2007 10:05, edited 67 times in total.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
could you NOT start a new topic about the same subject everytime you have something to report? the development forum is supposed to be tidy.
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
Oh, for crying out loud! What's wrong with the way TTDPatch does it?
For those of you who don't have enough time to check it out for yourself, there's a patch, planespeed, that takes a number from 1 to 4.
The number is the number that the TTD-motion-speed is multiplied by. So, 1 has the same effect as off, and 4 means planes travel at full speed.
Slightly OT:
I'm still not sure where you folks got this eighth-speed thing; Patchman says:
For those of you who don't have enough time to check it out for yourself, there's a patch, planespeed, that takes a number from 1 to 4.
The number is the number that the TTD-motion-speed is multiplied by. So, 1 has the same effect as off, and 4 means planes travel at full speed.
Slightly OT:
I'm still not sure where you folks got this eighth-speed thing; Patchman says:
Now, I understand OTTD could have chosen to do things differently, but could someone please cite their source for this eighth-speed claim?TTD normally divides a plane's speed by four when calculating how fast it should move across the map.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
in engines.h the aircraft-maxspeed is stored as one-eigth of the shown speed in mph
(stumbled accross it by accident )
btw in .NFO it seems to be also factored by 8 (http://wiki.ttdpatch.net/tiki-index.php ... ion0Planes)
(stumbled accross it by accident )
btw in .NFO it seems to be also factored by 8 (http://wiki.ttdpatch.net/tiki-index.php ... ion0Planes)
Korenn: For crying out loud, I only started what, 2 topics?
One was technical about a specific file, the other more general about a patch. I feel they're entirely different topics, so should be separate.
OpenTTD doesn't have the option at all.
SetDParam(1, v->cur_speed * 8);
SetDParam(1, v->cur_speed * 8);
SetDParam(0, v->cur_speed * 8);
Question: Are patches like these generally put into OpenTTD? Why or why not?
Why is the planespeed patch not in OpenTTD?
One was technical about a specific file, the other more general about a patch. I feel they're entirely different topics, so should be separate.
People complained.Oh, for crying out loud! What's wrong with the way TTDPatch does it?
OpenTTD doesn't have the option at all.
aircraft_gui.c, lines 516, 522, 533.Slightly OT:
I'm still not sure where you folks got this eighth-speed thing; Patchman says:
Quote:
TTD normally divides a plane's speed by four when calculating how fast it should move across the map.
Now, I understand OTTD could have chosen to do things differently, but could someone please cite their source for this eighth-speed claim?
SetDParam(1, v->cur_speed * 8);
SetDParam(1, v->cur_speed * 8);
SetDParam(0, v->cur_speed * 8);
Hmm, you're right. It may be possible to combine the two patches also. I suppose it all depends on how many people want our patches.For those of you who don't have enough time to check it out for yourself, there's a patch, planespeed, that takes a number from 1 to 4.
Question: Are patches like these generally put into OpenTTD? Why or why not?
Why is the planespeed patch not in OpenTTD?
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
maybe I overreacted a bit, there are a whole bunch of useless threads spawning on the forum and I was getting irritated about it. I'm sorry that you were the outletCobraA1 wrote:Korenn: For crying out loud, I only started what, 2 topics?
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
Oh? What did they compain about? I remember, back when planespeed was just on/off (where planespeed on means planespeed 4), people complained that on was too fast, but now planespeed 1, 2, and 3 are options too. (planespeed also fixes a TTD bug where very slow aircraft will speed up when they break down, hence usefulness of planespeed 1)CobraA1 wrote:People complained.DaleStan wrote:Oh, for crying out loud! What's wrong with the way TTDPatch does it?
Yeah. That would be where the displayed speed is set to 8 times the internally stored value (same as in TTD unpatched, and the reason that NFO uses mph*8). Very similar lines exist in roadveh_gui.c and ship_gui.c. Does that mean we need to adjust their in-game speeds too?CobraA1 wrote:aircraft_gui.c, lines 516, 522, 533.DaleStan wrote:Slightly OT:
I'm still not sure where you folks got this eighth-speed thing;
SetDParam(1, v->cur_speed * ;
SetDParam(1, v->cur_speed * ;
SetDParam(0, v->cur_speed * ;
This planespeed patch is part of TTDPatch, so it can't be put in OTTD in its current form.
EDIT: Why must be an emote? WHY!?
Last edited by DaleStan on 31 May 2005 05:06, edited 1 time in total.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Actually, somebody did release a patch for the plane speed for OpenTTD, it turns out (after some searching):
http://www.tt-forums.net/viewtopic.php? ... raft+speed
In any case, such a patch is much easier to implement than my non-linear formula.
Any idea if we'll be seeing benben's patch in an upcoming version of OpenTTD? Or are further changes needed?
http://www.tt-forums.net/viewtopic.php? ... raft+speed
In any case, such a patch is much easier to implement than my non-linear formula.
Any idea if we'll be seeing benben's patch in an upcoming version of OpenTTD? Or are further changes needed?
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
I've also been playing around - and seem to have succeeded - in implementing queueing for aircraft - a concept I've been playing around with for over a year ever since I've had problems with slower (or broken) aircraft staying in the air forever when they are combined with faster aircraft.
Finally, I have quite a bit of free time to experiment, and I implemented it .
Is it just me, or do aircraft never break down in OpenTTD .
Finally, I have quite a bit of free time to experiment, and I implemented it .
Is it just me, or do aircraft never break down in OpenTTD .
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
whoohooo, finally something I have been looking forward to and wanting for a LOOOONG time.CobraA1 wrote:I've also been playing around - and seem to have succeeded - in implementing queueing for aircraft - a concept I've been playing around with for over a year ever since I've had problems with slower (or broken) aircraft staying in the air forever when they are combined with faster aircraft.
Finally, I have quite a bit of free time to experiment, and I implemented it .
Is it just me, or do aircraft never break down in OpenTTD .
Is it possible to post a diff or even a compiled exe/lang pack for the aircraft queing please?
Hi Cobra !
me want a diff too !!!
suggestion : I'll love to see first plane circling lower than last one in queue...
about planespeed as Korenn as said in Benben's topic, plane position updating should be edited if you want more than 2 or 3 times original speed.
and yes, planes does break down, I use it to rise probability of crash at landing in my diff...
and last airports/planes cost should match relative speed...
me want a diff too !!!
suggestion : I'll love to see first plane circling lower than last one in queue...
about planespeed as Korenn as said in Benben's topic, plane position updating should be edited if you want more than 2 or 3 times original speed.
and yes, planes does break down, I use it to rise probability of crash at landing in my diff...
and last airports/planes cost should match relative speed...
OK, cool - I will continue to work on these patches.
I'll probably implement a method similar to benben's instead of my own, it's more realistic, plus since it can be adjusted, it's more flexible.
WARNING: The queue only solves the problem of slow aircraft eternally circling! It does not make the airport handle more aircraft!
After some testing, it does indeed appear that the concerns about not being able to handle as many aircraft may be valid, as it requires many aircraft to wait for the correct aircraft to land before they can follow.
The planespeed patch will help alleviate it, as it will make all aircraft faster.
I will also see what I can do to decrease the size of the circling pattern when an aircraft can't land, which will also decrease the delay before an aircraft can land.
I will also look at other methods of improving it so aircraft don't have to wait as long.
I'll probably implement a method similar to benben's instead of my own, it's more realistic, plus since it can be adjusted, it's more flexible.
I'll see what I can do .suggestion : I'll love to see first plane circling lower than last one in queue...
WARNING: The queue only solves the problem of slow aircraft eternally circling! It does not make the airport handle more aircraft!
After some testing, it does indeed appear that the concerns about not being able to handle as many aircraft may be valid, as it requires many aircraft to wait for the correct aircraft to land before they can follow.
The planespeed patch will help alleviate it, as it will make all aircraft faster.
I will also see what I can do to decrease the size of the circling pattern when an aircraft can't land, which will also decrease the delay before an aircraft can land.
I will also look at other methods of improving it so aircraft don't have to wait as long.
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
Just as an Idea which I don't know if it can be implemented, to help reduce take off and landing times, why not go for a couple of options.
the first being a "outer marker" inline with the runway(s) at some point, this is where the "stack" or circling aircraft are, this would solve a/c having to wait for other a/c (short for aircraft) no1 to circle around the airport and land.
My secound idea is probably close to being impossible to impliment but I don't know.
Jet aircraft have whats known as "Point of No return", this is a pre-determined speed/distance down the runway where if the aircraft has to abort it's take off it basically cannot, it has to take off and circle around for an emergancy landing, others wise known as "take off speed". At this point very busy airports like London Heathrow already have aircraft on final approach, so what you get is about 30 secounds after one aircraft has taken off the next is landing on the same runway.
Something like this would also reduce circling times.
Final idea, instead of aircraft having to circle at a preset hight, what about as they take off they "climb" to a very high altitude and then as they get close to the outer marker of the destination airport they slowly start to sink untill they become the last aircraft in the stack. Though that is probably more eye candy than anything else.......
the first being a "outer marker" inline with the runway(s) at some point, this is where the "stack" or circling aircraft are, this would solve a/c having to wait for other a/c (short for aircraft) no1 to circle around the airport and land.
My secound idea is probably close to being impossible to impliment but I don't know.
Jet aircraft have whats known as "Point of No return", this is a pre-determined speed/distance down the runway where if the aircraft has to abort it's take off it basically cannot, it has to take off and circle around for an emergancy landing, others wise known as "take off speed". At this point very busy airports like London Heathrow already have aircraft on final approach, so what you get is about 30 secounds after one aircraft has taken off the next is landing on the same runway.
Something like this would also reduce circling times.
Final idea, instead of aircraft having to circle at a preset hight, what about as they take off they "climb" to a very high altitude and then as they get close to the outer marker of the destination airport they slowly start to sink untill they become the last aircraft in the stack. Though that is probably more eye candy than anything else.......
All good ideas . I will see what I can do.
I've got *basic* aircraft queue code working right now, I just need a way to create patches.
Anybody know of a good program for doing so?
I've got *basic* aircraft queue code working right now, I just need a way to create patches.
Anybody know of a good program for doing so?
"If a man does not keep pace with his companions, perhaps it is because he hears a different drummer. Let him step to the music he hears, however measured or far away" --Henry David Thoreau
TortoiseSVN seems to be the prefered Windows program. Alternatively, you can install cygwin and use diff (diff -u, please.)
If you're on a Mac, I don't have the slightest idea.
If you're on a Mac, I don't have the slightest idea.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests