Aircraft queueing & planespeed
Moderator: OpenTTD Developers
Virus in patch ?
Right after installing the patch, my antivirus scanner started giving notifications that my system was infected with W32/Stanit
Is the patch infected ?
Is the patch infected ?
Nope, scanned my files here, and my patch and OpenTTD files came out clean. Either it's a false positive, or it was already on your system and spread to 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
The patch is really awesome, but ATM out of sync with trunc. =( I just want to ask if you could update it.
Another feature could maybe added to the patch. The different holding entry procedures. They might remove the annoying 180deg turn in air. =)
Another feature could maybe added to the patch. The different holding entry procedures. They might remove the annoying 180deg turn in air. =)
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
Hmm, I updated and resolved conflicts, but it currently throws linker errors - common stuff like argc and argv? Odd.
The entry procedures look nice, but may be a bit of a pain to implement. Unfortunately, I no longer have the time or desire to implement new features in my patch, so somebody else will have to do it.
The entry procedures look nice, but may be a bit of a pain to implement. Unfortunately, I no longer have the time or desire to implement new features in my patch, so somebody else will have to do it.
"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
Comments for patch as of 2007-01-18.
Hi Folks,
I tried the patch as currently available in the first post and I have a few comments to it:
I think the initial acceleration is too low. The aircraft should speed up to ~1/4 of the speed on the runway and not just slightly less than 1/10 as it is now (Lockheed Constellation taking off at ~50km/h when it has max speed 485 or so).
On the other hand the properller aircraft land at their cruise speed, which is just plain weird. The aircraft should land at less (or the same, that would be easier) speed they took off.
I would suggest tuning the speeds and accelerations so, that properller aircraft take of and land at 1/3 their cruise speed, jets at 1/4 and supersonics at 1/8. Or just all at 1/4 if it's too hard to switch, but the reduced acceleration of supersonics would be useful as it'd make them less useful for short distances.
Aircraft economy
Current code multiplies the days in transport with the plane speed multiplier. However, that has relatively small effect on profit, since that value affects payment only a little (say at most twice).
What really makes faster aircraft make a lot more money is that they can make many more trips a year. To compensate for that, they should simply cost more to operate. Therefore I suggest multiplying the aircraft running cost by the aircraft speed-up factor and dropping the adjustment for days in transport.
The increased payment due to less days in transit can make up for the fact that the twice faster aircraft makes less than twice as many rounds, since the loading and taxiing times did not increase. If operating aircraft proves too hard than, a running cost increase factor could be added that would be something like speedup^0.75 or speedup^0.5 (with whatever exponent it will feel play-balanced). It would be precalculated -- after all it's just 8 discreete speed-up values.
I tried the patch as currently available in the first post and I have a few comments to it:
- There is a bug in the patch: In station_cmd.c in DestroyStation it frees the queues twice. Causes a crash at runtime when an airport is destroyed (eg. when AI goes bankrupt).
- I didn't try the fast aircraft yet, but the slow ones act unrealistically in that they land at their full speed, while take off at absurdly low speed.
- The economy adjustment for days in transport falls short of it's goal. More on this below.
I think the initial acceleration is too low. The aircraft should speed up to ~1/4 of the speed on the runway and not just slightly less than 1/10 as it is now (Lockheed Constellation taking off at ~50km/h when it has max speed 485 or so).
On the other hand the properller aircraft land at their cruise speed, which is just plain weird. The aircraft should land at less (or the same, that would be easier) speed they took off.
I would suggest tuning the speeds and accelerations so, that properller aircraft take of and land at 1/3 their cruise speed, jets at 1/4 and supersonics at 1/8. Or just all at 1/4 if it's too hard to switch, but the reduced acceleration of supersonics would be useful as it'd make them less useful for short distances.
Aircraft economy
Current code multiplies the days in transport with the plane speed multiplier. However, that has relatively small effect on profit, since that value affects payment only a little (say at most twice).
What really makes faster aircraft make a lot more money is that they can make many more trips a year. To compensate for that, they should simply cost more to operate. Therefore I suggest multiplying the aircraft running cost by the aircraft speed-up factor and dropping the adjustment for days in transport.
The increased payment due to less days in transit can make up for the fact that the twice faster aircraft makes less than twice as many rounds, since the loading and taxiing times did not increase. If operating aircraft proves too hard than, a running cost increase factor could be added that would be something like speedup^0.75 or speedup^0.5 (with whatever exponent it will feel play-balanced). It would be precalculated -- after all it's just 8 discreete speed-up values.
Re: Comments for patch as of 2007-01-18.
Acceleration/deceleration and landing speeds can be grf controlled, via aircraft action 0 property 0D and callback 36 respectively. To keep grf files compatible between the two games, I suggest the acceleration model is made similar to that in TTDP.bulb wrote:I would suggest tuning the speeds and accelerations so, that properller aircraft take of and land at 1/3 their cruise speed, jets at 1/4 and supersonics at 1/8. Or just all at 1/4 if it's too hard to switch, but the reduced acceleration of supersonics would be useful as it'd make them less useful for short distances.
Both the planeset and av8 already adjust the aircraft running costs to compensate for planespeed by checking Action D patch variable 0x10, so it's not necessary (and would be much less flexible) to hard-code such adjustments into the game.Therefore I suggest multiplying the aircraft running cost by the aircraft speed-up factor and dropping the adjustment for days in transport.
Re: Comments for patch as of 2007-01-18.
Thanks. Good to know.PikkaBird wrote:Acceleration/deceleration and landing speeds can be grf controlled, via aircraft action 0 property 0D and callback 36 respectively. To keep grf files compatible between the two games, I suggest the acceleration model is made similar to that in TTDP.
Unfortunately I don't have TTDP around, so I can't check how it works there, but the way it works in the patch attached to first post in this thread does not seem right. Basically the acceleration is always the same in game speed. That means at plane-speed 8 the aircraft accelerates only 2/3 speed after flying some 250 squares.
Note, that I am using planeset 1.5.3
Hm, than the patch again mishandles it. Because when I multiplied the running cost manually, it came out correct (ie. the value at planespeed 1 multiplied by the planespeed).PikkaBird wrote:Both the planeset and av8 already adjust the aircraft running costs to compensate for planespeed by checking Action D patch variable 0x10, so it's not necessary (and would be much less flexible) to hard-code such adjustments into the game.
Unfortunately I don't know openttd codebase well. I will try to look at how to properly export the planespeed value for the newgrfs to use.
Re: Comments for patch as of 2007-01-18.
Aside to the fact, that callback 0x36 is not handled in OpenTTD at all, the documentation (at the link you gave) says that only property 0C, ie. speed, can be adjusted. Is there more up-to-date documentation anywhere?PikkaBird wrote:Acceleration/deceleration and landing speeds can be grf controlled, via aircraft action 0 property 0D and callback 36 respectively. To keep grf files compatible between the two games, I suggest the acceleration model is made similar to that in TTDP.
Anyway, I will assume it is used for both 0C and 0D. I will have to figure out how exactly it should work though.
OpenTTD does not support reading patch variables (yet). The current planespeed patch does not include that functionality. But I found where it should be implemented, so I can try to do it.PikkaBird wrote:Both the planeset and av8 already adjust the aircraft running costs to compensate for planespeed by checking Action D patch variable 0x10, so it's not necessary (and would be much less flexible) to hard-code such adjustments into the game.
Could you please tell me what value should be used to represent realistic plane speed (I would assume 8, but want to check with someone who knows TTDP).
"Realistic" is ambiguous. Some people seem to think that it's 8x; others 4x.
The sprite "-1 * 9 0D 01 00 10 FE FF FF 00 00" should load the value 1 into parameter 1 if the planes travel as fast as they do in TTD, the value 2 if the planes travel twice as fast as in TTD, 3 if the planes travel three times as fast, and so on.
The sprite "-1 * 9 0D 01 00 10 FE FF FF 00 00" should load the value 1 into parameter 1 if the planes travel as fast as they do in TTD, the value 2 if the planes travel twice as fast as in TTD, 3 if the planes travel three times as fast, and so on.
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
Ok. I didn't ask clearly enough. By "Realistic" I mean that if the plane says it has max speed 300mph and a train engine says it has max speed 300mph, they both move at the same speed in the game. And I want to know this for TTDP. For OpenTTD I know it (it's 8x).DaleStan wrote:"Realistic" is ambiguous. Some people seem to think that it's 8x; others 4x.
That I understand. However I want to do it so that the value here means the same game speed in TTDP and OTTD.DaleStan wrote: The sprite "-1 * 9 0D 01 00 10 FE FF FF 00 00" should load the value 1 into parameter 1 if the planes travel as fast as they do in TTD, the value 2 if the planes travel twice as fast as in TTD, 3 if the planes travel three times as fast, and so on.
Now when I played TTD looong time ago, I recall that 90mph train was just very slightly faster than DC3, which says (if OTTD values match) 293mph. That'd be 73.25mph when divided by 4 and mean that TTD really used 1/4 modifier for aircraft. So unless someone tells me better, I will return 1/2 of the OpenTTD multiplier, rounded up. The odd steps (1, 3, 5, 7) will likely be less playable though, because the aircraft will be slower but have running cost for the higher even step.
By the way, the av8 is uplayable, at least in early days (from 1920), in OTTD, probably because the running cost (difficulty setting medium) is calculated for aircraft flying twice faster, which would support my suspiction that aircraft are slowed down too much in OTTD.
It's 4x in both TTDPatch and OpenTTD.bulb wrote:Ok. I didn't ask clearly enough. By "Realistic" I mean that if the plane says it has max speed 300mph and a train engine says it has max speed 300mph, they both move at the same speed in the game. And I want to know this for TTDP. For OpenTTD I know it (it's 8x).DaleStan wrote:"Realistic" is ambiguous. Some people seem to think that it's 8x; others 4x.
He's like, some kind of OpenTTD developer.
Can someone (anyone?) PLEASE explain to me where this whole "8x is realistic" concept came from?
Yes, I know aircraft use mph*8 as their speed unit, but if that's the reason, why aren't trains accelerated to 1.6x, and road vehicles and ships to 3.2x? After all, trains use mph*1.6 as their unit, and ships and RVs both use mph*3.2.
Yes, I know aircraft use mph*8 as their speed unit, but if that's the reason, why aren't trains accelerated to 1.6x, and road vehicles and ships to 3.2x? After all, trains use mph*1.6 as their unit, and ships and RVs both use mph*3.2.
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
I don't know where it came from, but I certainly got it from the current plane speed patch for OpenTTD.DaleStan wrote:Can someone (anyone?) PLEASE explain to me where this whole "8x is realistic" concept came from?
I checked it with a current MiniIN without planespeed and it indeed is 4x, not 8x. Mea culpa. I should have checked it earlier.
That's not exactly true. Trains use 1.0 km/h as speed unit, which is 1/1.6 mph (approximately, as a mile is not exactly equal to 1.6 km), and road vehicles and ships use 0.5 km/h, which is 1/3.2 mph. I do not exactly know what aircraft use; this may indeed be 8 mph (not 1/8 mph, which seems unlikely).DaleStan wrote:Can someone (anyone?) PLEASE explain to me where this whole "8x is realistic" concept came from?
Yes, I know aircraft use mph*8 as their speed unit, but if that's the reason, why aren't trains accelerated to 1.6x, and road vehicles and ships to 3.2x? After all, trains use mph*1.6 as their unit, and ships and RVs both use mph*3.2.
This factor seems to be unrelated to the multiplier. In order to find out the correct multiplier, one should do this analytically (by examining the code responsible for aircraft movement in relation to the corresponding part for other vehicle types) or experimentally (compare the aircraft speed in-game to the other vehicles). The former may be a little more difficult to perform, but it gives a rigorous solution to the problem.
Who is online
Users browsing this forum: No registered users and 24 guests