Quantcast

Jump to content

» «
Photo

GTASA Advanced Acceleration mode

27 replies to this topic
BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#1

Posted 19 September 2005 - 04:40 PM

I recently completed my GTASA normal acceleration mode tutorial which deals with acceleration when the USE_MAXSPD_LIMIT flag is not enabled. When this flag is enabled, the game applies an advanced acceleration mode to that vehicle which I have been working with in my GTASA Handling Overhaul but which I havn't done many experiments with.

Basically, my findings are that this flag activates the TopSpeed setting so that the car cannot go faster than what it says. In effect, this is like setting the speed the car would reach at maximum engine speed in the highest gear. However, if you have a high TopSpeed with a low Acceleration value, then the vehicle will not actually reach this speed. If you have a high DragMultiplier setting, the vehicle will not reach the top speed either.

Basically, it seems to work like this:
  • The time it takes to reach top speed is determined by a combination of Drag, TopSpeed, Acceleration and EngineInertia combined.
  • The maximum speed the vehicle will actually reach is determined by the Acceleration and Drag settings but limited by TopSpeed.

I received an Email from a guy called Ofer Porat. He has been trying to create a mathematical formula to predict the top speed a vehicle will reach and maybe the shape of its acceleration curve, too. I've created this topic so that we can combine our experiments with those of other modders and have our theories tested by anyone interested in figuring out how the GTASA advanced acceleration mode actually works. smile.gif

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#2

Posted 19 September 2005 - 05:56 PM Edited by op9080, 21 September 2005 - 03:15 PM.

Ben Millard asked me to post the results of my testing so here it goes...

I tested the top speed on 15 vehicles and made a lot of tweaking experiments with the parameters to see which parameters effect top speed and how. Also, I gave cars with different sizes the same parameters to see if the car's dimensions influence top speed. They don't. Finally, based on a simple model from aerodynamics and some coefficients I fitted from the data, I came up with a formula which I believe gives the correct top speed (to within 2 KPH) for any car.

- I used the "SASpeedo" speedometer mod to measure a vehicle's top speed while driving it on the LS airport runway.
- I used the "carspawner" mod to spawn the cars by ID.

The formulas I came up with are:
1) The aerodynamic drag deceleration (in m/s) on the car is

CODE
fDragMult * v ^ 2 / 2450


where v is the speed in KPH.

2) The top speed is reached when drag is equal the engine's max acceleration:

CODE
fEngineAcceleration = fDragMult * v_max ^ 2 / 2450


so solving, we get that the top speed as limited by the drag is

CODE
v_max = sqrt(2450 * fEngineAcceleration / fDragMult)


The number 2450 is a coefficient derived experimentally from the measurements made.

3) The top speed is also capped by the parameter fMaxVelocity as follows:
- when USE_MAXSP_LIMIT is enabled, the speed is limited to fMaxVelocity. In this mode, the car's top speed is not limited by the drag model, although the vehicle's acceleration curve still appears to be influenced by fDragMult.
- when USE_MAXSP_LIMIT is disabled, the speed is limited to a value which is approximately 18.5% higher than fMaxVelocity.

So the complete formula for the top speed (KPH) is:
CODE
- with USE_MAXSP_LIMIT enabled:

Top Speed = fMaxVelocity

- with USE_MAXSP_LIMIT disabled:

Top Speed = Min(1.185 * fMaxVelocity, sqrt(2450 * fEngineAcceleration / fDragMult))


I've verified by experimentation that the top speed changes as the square root of the ratio fEngineAcceleration / fDragMult (as long as it's below the speed cap).

These formulas apply to cars. Boats, bikes and planes have additional parameters that may effect top speed and that haven't been tested.

I've also tested the effect of using nitro. Nitro does not change the vehicle's top speed. It changes the acceleration curve so the vehicle's top speed is reached in a significantly shorter time, however the top speed remains the same.

I have a spreadsheet summarizing the measurements made and a comparison with the formulas given. There doesn't seem to be a way of adding attachments here so I don't know how to post it.

Ofer Porat

SAZ
  • SAZ

    Square Civilian

  • Members
  • Joined: 25 Jun 2005

#3

Posted 20 September 2005 - 12:02 AM

wow!..complex stuff...lol....umm....duno if this any use to u and don't quite know y u want to know this stuff but i've topped a 347mph using the same speedometer mentioned above in san andreas at the LS airport runway....personally duno if ur formula works or not but just to mention i used the ultimate editor to edit the vehicle stats and i emphasise VEHICLE becoz i did this with the BMX bike! quite cool huh!? biggrin.gif

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#4

Posted 20 September 2005 - 10:14 AM Edited by Cerbera, 20 September 2005 - 10:18 AM.

I'd like to see some more focused experiments because I think your coefficients might not be telling the whole story. If we are to construct a formula, we must make sure it works in all circumstances because it will need to work with everything from bulldozers and dragsters. smile.gif

Doing a series of tests with each of the relevant settings on one car would allow us to test a wide range of values on one platform, giving a good "control" for the tests. These tests could then be repeated on other vehicles to determine if there are factors outside those which we think are relevant.

Bike acceleration is altered by leaning forward while the boat and plane acceleration use totally different systems to wheeled vehicles.

To make a file available online, you must upload it somewhere (there are lots of free hosting places) and then give a link to it here. Try the WD&P Mega Topic for some ideas of where to try. Your Internet Service Provider will normally supply you with some web space, so you might want to check that.

CODE
1 / 3 = 0.333...3
    1 = 0.333...3 x 3
    1 = 0.999...9
By using the "code" tags, you can align your maths more neatly. Note that you need to indent a line by two spaces in the message to get the first space of indentation on the page. After those first two spaces, the text is indented correctly.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#5

Posted 20 September 2005 - 11:49 AM Edited by op9080, 21 September 2005 - 03:02 PM.

I converted the spreadsheet to CSV format and pasted it below as text. If you have a spreadsheet program you can load it up.

The first 2 columns are Car name & vehicle ID
Then 8 columns of key parameters from the handling file
Then 3 colums as follows
- the vehicle's top speed as measured by a speedometer (KPH)
- a calculation of the fudge factor in the formula (the 2450) for the car
- the vehicle's theoretical top speed (KPH) as calculated from the handling parameters using the formula I gave.
CODE

Car,Vehicle ID,,fMass,fTurnMass,fDragMult,fTractionMultiplier,fMaxVelocity,fEngineAcceleration,fEngineInertia,USE_MAXSP_LIMIT,,Measured Top Speed (KPH),Empirical Drag Coefficient,Theoretical Top Speed (KPH),

Greenwood,492,,1600.00,4000.00,2.50,0.70,160.00,20.00,20.00,0,,140.00,2450.00,140.00,
Uranus,558,,1400.00,2998.30,2.00,0.80,200.00,20.00,5.00,0,,156.00,2433.60,156.52,
Broadway,575,,1700.00,4166.40,2.00,0.65,160.00,20.00,10.00,0,,158.00,2496.40,156.52,
Hotring,494,,1600.00,4500.00,1.40,0.85,220.00,26.00,5.00,0,,215.00,2489.04,213.31,
Baggage,485,,1000.00,1354.20,5.00,1.00,160.00,20.00,30.00,0,,99.00,2450.25,98.99,
Glendale,466,,1600.00,4000.00,2.50,0.60,160.00,22.00,15.00,0,,147.00,2455.57,146.83,
SuperGT,506,,1400.00,2800.00,2.00,0.75,230.00,26.00,5.00,0,,179.00,2464.69,178.47,
Infernus,411,,1400.00,2725.30,1.50,0.70,240.00,30.00,10.00,0,,222.00,2464.20,221.36,
Turismo,451,,1400.00,3000.00,2.00,0.75,240.00,30.00,10.00,0,,193.00,2483.27,191.70,
Banshee,429,,1400.00,3000.00,2.00,0.75,200.00,33.00,10.00,0,,202.00,2472.97,201.06,
Voodoo,412,,1800.00,4411.50,2.00,0.95,160.00,23.00,5.00,0,,169.00,2483.57,167.85,
Dune,573,,10000.00,50000.00,2.00,0.65,110.00,35.00,25.00,1,,110.00,N/A,110.00,
Buffalo,402,,1500.00,4000.00,2.00,0.70,200.00,28.00,5.00,0,,186.00,2471.14,185.20,
Bobcat,422,,1700.00,4000.00,2.50,0.65,165.00,20.00,15.00,0,,140.00,2450.00,140.00
Taxi,420,,1450.00,4056.40,2.20,0.80,180.00,19.00,10.00,0,,145.00,2434.47,145.46


pinky
  • pinky

    "Tooled up and chibbin' ye, ya Bass".

  • Members
  • Joined: 06 Jan 2005

#6

Posted 20 September 2005 - 12:05 PM Edited by pinky, 20 September 2005 - 12:09 PM.

So we have proven that the use max speed pretty much limits your max speed, what I am interested in is if it actually effects acceleration curves at all.
Using a max speed limiter is only really applicable in real life for cars that have speed limiters.
Drag and power to weight ratio are the real deciding factors in the real world, even no two cars of the same model are identical due to bodywork imperfections and the likes. As well as multitudes of other factors like tyre pressures, running resistance, fuel imperfections, none of which are covered in the handling files of the game. So we can only adjust what we are given.
But anyway back to the point, can you perform further tests to prove the effect of the max speed limiter on accelleration because I have found that setting up the drag effectivley gives the acceleration tail off that Cerbera has described before without using it.
And the extra 18.5% top speed increase you have mentioned has never happened to me, I always use the drag multiplier to trim my cars top speeds to realistic levels and have never experienced this.
Keep up the good work, it is a ball busting process doing all of those tests and rather you than me.

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#7

Posted 20 September 2005 - 01:39 PM

CODE
Car,Vehicle ID,,fMass,fTurnMass,fDragMult,fTractionMultiplier,fMaxVelocity,fEngineAcceleration,fEngineInertia,USE_MAXSP_LIMIT,,Measured Top Speed (KPH),Empirical Drag Coefficient,Theoretical Top Speed (KPH),

Greenwood,492,,1600.00,4000.00,2.50,0.70,160.00,20.00,20.00,0,,140.00,2450.00,140.00,
Uranus,558,,1400.00,2998.30,2.00,0.80,200.00,20.00,5.00,0,,156.00,2433.60,156.52,
Broadway,575,,1700.00,4166.40,2.00,0.65,160.00,20.00,10.00,0,,158.00,2496.40,156.52,
Hotring,494,,1600.00,4500.00,1.40,0.85,220.00,26.00,5.00,0,,215.00,2489.04,213.31,
Baggage,485,,1000.00,1354.20,5.00,1.00,160.00,20.00,30.00,0,,99.00,2450.25,98.99,
Glendale,466,,1600.00,4000.00,2.50,0.60,160.00,22.00,15.00,0,,147.00,2455.57,146.83,
SuperGT,506,,1400.00,2800.00,2.00,0.75,230.00,26.00,5.00,0,,179.00,2464.69,178.47,
Infernus,411,,1400.00,2725.30,1.50,0.70,240.00,30.00,10.00,0,,222.00,2464.20,221.36,
Turismo,451,,1400.00,3000.00,2.00,0.75,240.00,30.00,10.00,0,,193.00,2483.27,191.70,
Banshee,429,,1400.00,3000.00,2.00,0.75,200.00,33.00,10.00,0,,202.00,2472.97,201.06,
Voodoo,412,,1800.00,4411.50,2.00,0.95,160.00,23.00,5.00,0,,169.00,2483.57,167.85,
Dune,573,,10000.00,50000.00,2.00,0.65,110.00,35.00,25.00,1,,110.00,N/A,110.00,
Buffalo,402,,1500.00,4000.00,2.00,0.70,200.00,28.00,5.00,0,,186.00,2471.14,185.20,
Bobcat,422,,1700.00,4000.00,2.50,0.65,165.00,20.00,15.00,0,,140.00,2450.00,140.00
Taxi,420,,1450.00,4056.40,2.20,0.80,180.00,19.00,10.00,0,,145.00,2434.47,145.46
As well as aligning your maths, these "code" tags neaten up text file contents, handling lines and so on. Makes it easier to see exactly what part of the post is code and what parts are just text.

Pinky, as far as I can tell, the TopSpeed setting only sets an upper limit for the acceleration curve when USE_MAXSPD_LIMIT is enabled. I don't think it stretches or squashes the acceleration curve to fit but the EngineInertia and DragMultiplier settings allow manipulation of the curve.

I will be doing a series of targeted experiments with the advanced acceleration mode, a bit like my normal acceleration mode experiments. Hopefully they will be completed before the end of next month and I'll keep this thread active by posting my findings while I experiment. I'll test the things other modders come up with to see if the theories match the reality, too. Exciting times! tounge.gif

pinky
  • pinky

    "Tooled up and chibbin' ye, ya Bass".

  • Members
  • Joined: 06 Jan 2005

#8

Posted 20 September 2005 - 01:52 PM

Cheers, looking forward to the findings.
I don't envy you the task of testing all the cars.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#9

Posted 20 September 2005 - 08:04 PM

QUOTE (Cerbera @ Sep 20 2005, 13:39)
Pinky, as far as I can tell, the TopSpeed setting only sets an upper limit for the acceleration curve when USE_MAXSPD_LIMIT is enabled.


You're wrong about this, and in fact your own results show the opposite. For example, you have a graph called "Effect of Drag Multiplier on Top Speed" in your handling acceleration page. You note there that the top speed is capped as you decrease the drag, and you misinterpreted this to mean that the game enforces a minimum (positive) drag. This is not the case. There is no minimum drag. The top speed is capped by a value about 18.5% higher than fMaxVelocity. The reason you don't notice this is that for most vehicles that have USE_MAXSP_LIMIT disabled, the limit enforced by the drag component (the sqrt part of my formula) is lower than fMaxVelocity * 1.185. However, as you decrease the drag or increase the engine acceleration you eventually reach this ceiling. You note yourself that the maximum speed seems to be 290. This is not really 290 per se. It's 240 + 18.5% (about 286), and 240 is the number listed in fMaxVelocity for the vehicle you used in that case.

Here is how to test this: Take a vehicle that you know can go close to 200 KPH (see my list above). Make sure USE_MAXSP_LIMIT is disabled for that vehicle. Now set fMaxVelocity to 100. You'll see that now the top speed is about 118-119. Now set fMaxVelocity to 50. You'll get a top speed of around 59. And so on and so forth...

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#10

Posted 20 September 2005 - 08:17 PM

I just want to clarify that the 15 measurements I listed above are not the full extent of what I did before coming up with the formula. I did a lot of tweaking of handling parameters to see which ones don't affect the top speed, and which ones do and what the functional relationship is. I just didn't record those results as I was doing the testing. I only recorded results with original handling parameters for each car. So I realize that these numbers don't prove the correctness of each part of the formula I gave (especially the 18.5% part, for which I haven't really given any examples).

I'm testing more cars now. There are about 150 in the game and I've done about 35, and so far the formula always gives the correct number within 1 or 2 KPH. Also, I found one vehicle (the Rhino) which has a speed that is capped by the 18.5% limit instead of the drag limit.

I don't know if I'll test all cars. I'll do at least 50, and try to include many of the special vehicles (dozer, etc.) to see if they hold up. I'll post the results when I'm done.

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#11

Posted 20 September 2005 - 09:43 PM

It doesn't matter which vehicles you test with, all that matters are the handling values. Bikes, boats and flying vehicles use a special handling engine but everything is the same. Trucks, vans and cars all use the same vehicle physics, just with a different handling line. Therefore, I would suggest concentrating on one car and testing a wide range of values for each setting, recording the results.

I'm quite convinced about this TopSpeed behaviour you've described in the normal acceleration mode. I've run a couple of quick tests with the Infernus with a TopSpeed of 300 and it *just* reach 360km/h, normally flickering between 358 and 359. I think the number is more like 20% than 18.5% because of this. I'll run more tests tomorrow but it's clear that you're just as methodical about this as I am. Never thought I'd see the day when someone else started applying mathematical formula to video game handling. tounge.gif

CODE
INFERNUS 1000 2000 1.0 0.0 0.10 -0.50 -1 2.00 2.00 0.40 5 300 100 1 4 P 10.0 0.60 0 30.0 1.05 0.140 5.0 0.25 -0.10 0.5 0.2 0.37 0 95000 40002004 4001 2 2 1
This is the handling I am working from. Lots of grip so you don't have to slow for corners. Reaches top speed in about five seconds, which makes testing much more rapid. If you give a handling setup like this to several cars, you can give each one a different value of one setting to test how it affects top speed without having to reload the game. That's what I'll be doing tomorrow, because you really seem to be onto something here.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#12

Posted 21 September 2005 - 03:14 PM Edited by op9080, 21 September 2005 - 04:52 PM.

I'm done measuring the top speed of all drivable 4-wheel vehicles in the game. I found 139 of them. It's attached as a CSV file below. I've simplified the results so the four columns are:
1) Vehicle name
2) Vehicle ID
3) Top speed as actually measured by speedometer in KPH
4) Top speed calculated by the formula in KPH (rounded to integer)

My formula gives a number which is within 2 KPH for all 139 vehicles.

I found one error in my formula while doing the testing and corrected my original post to reflect it. It appears that when USE_MAXSP_LIMIT is enabled, the vehicle is no longer limited in speed by the drag model. The vehicle's top speed is exactly equal to fMaxVelocity, regardless of the other parameters. This is a little strange, because it's clear that increasing fDragMult severely affects the vehicle's acceleration curve. It accelerates very slowly as you get above the drag limit, however it still goes up to fMaxVelocity. I guess they tweaked it so you could magically overcome the drag and reach the number in the handling file.

CODE
Car,Vehicle ID,Measured Top Speed (KPH),Theoretical Top Speed (KPH)

Landstalker,400,157,157
Bravura,401,147,147
Buffalo,402,186,185
Linerunner,403,110,111
Perennial,404,133,133
Sentinel,405,164,163
Dumper,406,110,110
Firetruck,407,148,148
Trashmaster,408,100,99
Stretch,409,158,157
Manana,410,129,129
Infernus,411,221,221
Voodoo,412,168,168
Pony,413,110,111
Mule,414,105,105
Cheetah,415,192,192
Ambulance,416,154,153
Moonbeam,418,115,115
Esperanto,419,149,148
Taxi,420,145,145
Washington,421,154,153
Bobcat,422,140,140
MrWhoopie,423,99,99
BFInjection,424,135,136
Premier,426,173,173
Enforcer,427,165,165
Securicar,428,157,157
Banshee,429,201,201
Bus,431,130,131
Rhino,432,94,95
Barracks,433,110,111
Hotknife,434,167,166
Previon,436,149,148
Coach,437,158,157
Cabbie,438,142,142
Stallion,439,168,168
Rumpo,440,136,136
Romero,442,139,140
Packer,443,126,126
Monster,444,110,110
Admiral,445,164,164
Turismo,451,193,192
Flatbed,455,157,157
Yankee,456,106,107
Caddy,457,95,96
Solair,458,157,157
Berkley's RC Van,459,136,136
Glendale,466,147,147
Oceanic,467,140,140
Patriot,470,157,157
Quadbike,471,110,111
Hermes,474,149,148
Sabre,475,173,171
ZR350,477,186,185
Walton,478,117,117
Regina,479,140,140
Comet,480,184,183
Burrito,482,156,157
Camper,483,122,123
Baggage,485,99,99
Dozer,486,64,65
Rancher,489,139,140
FBIRancher,490,157,157
Virgo,491,149,148
Greenwood,492,140,140
Hotring,494,214,213
Sandking,495,176,177
Blista Compact,496,162,163
Boxville,498,108,107
Benson,499,123,122
Mesa,500,140,140
Bloodring Banger,504,173,171
SuperGT,506,179,178
Elegant,507,166,165
Journey,508,108,107
Tanker,514,120,120
Roadtrain,515,142,142
Nebula,516,157,157
Majestic,517,157,157
Buccaneer,518,164,163
Cement Truck,524,130,130
Towtruck,525,160,160
Fortune,526,158,157
Cadrona,527,149,149
FBI Truck,528,176,175
Willard,529,149,148
Forklift,530,60,60
Tractor,531,70,70
Combine Harvester,532,110,111
Feltzer,533,167,166
Remington,534,168,168
Slamvan,535,158,157
Blade,536,173,171
Vincent,540,149,148
Bullet,541,203,202
Clover,542,164,163
Sadler,543,151,151
Hustler,545,147,147
Intruder,546,149,148
Primo,547,142,142
Tampa,549,153,153
Sunrise,550,145,144
Merit,551,157,157
Utility Van,552,121,121
Yosemite,554,144,143
Windsor,555,158,157
Uranus,558,156,157
Jester,559,178,177
Sultan,560,169,169
Stratum,561,154,153
Elegy,562,178,177
Flash,565,165,163
Tahoma,566,160,160
Savanna,567,173,171
Bandito,568,146,146
Kart,571,93,94
Mower,572,60,60
Dune,573,110,110
Sweeper,574,60,60
Broadway,575,158,157
Tornado,576,158,157
DFT-30,578,130,130
Huntley,579,158,157
Stafford,580,153,153
Newsvan,582,136,136
Tug,583,85,86
Emperor,585,153,153
Euros,587,165,163
Hotdog,588,108,107
Club,589,162,162
Police LS,596,175,175
Police SF,597,175,175
Police LV,598,175,175
Police Ranger,599,158,157
Picador,600,151,151
SWAT Van,601,110,110
Alpha,602,169,168
Phoenix,603,171,170
Burglary Boxville,609,108,107

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#13

Posted 21 September 2005 - 05:06 PM Edited by Cerbera, 21 September 2005 - 05:18 PM.

The USE_MAXSPD_LIMIT flag doesn't stretch the acceleration curve out so that the vehicle will always be able to reach the TopSpeed setting.

CODE
INFERNUS 1000 2000 1.0 0.0 0.10 -0.50 -1 2.00 2.00 0.40 5 1000 1 100 4 P 10.0 0.60 0 30.0 1.05 0.140 5.0 0.25 -0.10 0.5 0.2 0.37 0 95000 40002004 1004001 2 2 1
This is an extremely low-powered setup with a very high TopSpeed using the advanced acceleration mode. On flat surfaces it can only just reach 155km/h and when going downhill the most it can seem to reach is about 200km/h. The advanced acceleration mode which is enabled by USE_MAXSPD_LIMIT doesn't seem to force the vehicle into any specific behaviour. It actually seems to use a completely open behaviour where all the relevant settings operate naturally, without restrictions. This means that the TopSpeed limit is a precise limit, as it should be, and the vehicle is not forced to reach it.

A seperate formula will need to be devised when the advanced acceleration mode is being used. BTW, you won't encounter all possible situations by testing R* vehicles. Their default top speeds only range from about 60km/h to about 220km/h. The best method is to pick one vehicle which you can remember the ID for spawning, then make careful modifications to one of its settings and see what the effect is. Try lots of values for this setting, including very large and small values.

This way you can begin to understand exactly how the system works and can create a formula which will always be true, rather than only being true within the fairly small range of R* handling. Also, GTA is not like reality. You have to test everything to understand what it's actually doing because the names of settings can be very misleading. Their effects are sometimes conflicting and irrational, which is why work like yours and mine is important to show these oddities for people trying to make their own handling setups. tounge.gif

(EDIT) Instead of making double posts, you can use the "Edit" button to add further notes to your existing post until somebody else replies after you. This means more people can make posts before a new page is reached without any of your information being missed out.

I have been developing a series of semi-realistic handling setups in my GTASA Handling Overhaul project. You could try them out to see how the EngineInertia setting flattens out the acceleration curve without reducing top speed. You'll also see that TopSpeed is not always acheivable on flat roads when in the advanced acceleration mode. I think the USE_MAXSPD_LIMIT simply removes the limitations of the normal acceleration mode, rather than forcing new limits.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#14

Posted 21 September 2005 - 08:08 PM

I've got the results for bikes. They're attached below in CSV format as before.

The formulas for bikes are:

CODE
USE_MAXSP_LIMIT enabled

Top Speed KPH = Min(fMaxVelocity, sqrt(2050 * fEngineAcceleration / fDragMult))

USE_MAXSP_LIMIT disabled

Top Speed KPH = Min(1.185 * fMaxVelocity, sqrt(2050 * fEngineAcceleration / fDragMult))


These formulas apply to accelerating the bikes in normal fashion. Both motorbikes and bicycles have special modes as follows:

Bicycles in sprint mode (tapping acceleration button):

Top speed appears to be about 30% higher. No handling parameter affects this.

Motorbikes with head bob (tapping stoppie button):
Top speed appears to be limited only by amount of road available and ability to tap at correct pace to keep the head down. No handling parameter affects this.

The results of the measurements are:
CODE
Bike,Vehicle ID,Measured Top Speed (KPH),Theoretical Top Speed (KPH)

PCJ600,461,160,160
Faggio,462,111,111
Pizzaboy,448,111,111
Sanchez,468,144,143
FCR900,521,160,160
NRG500,522,176,175
HPV1000,523,151,151
BF400,581,151,151
Wayfarer,586,142,143
Freeway,463,142,143
BMX,481,73,73
Bike,509,79,78
Mountain Bike,510,101,101

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#15

Posted 21 September 2005 - 08:27 PM

QUOTE
This is an extremely low-powered setup with a very high TopSpeed


I guess I should've added a caveat that actually reaching the top speed given by the formulas depends on the availability of enough road. If you have a low acceleration the time needed to reach top speed may be so long that your road will end before you get there. When using high top speed it's best to use nitro to shorten the amount of time needed to get to the top speed.

My formulas only give top speed. I didn't study acceleration curves or the times required to reach a vehicle's top speed. To study acceleration curves I need a tool that accurately records speed data as a function of time while accelerating, and none is available.

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#16

Posted 22 September 2005 - 12:21 PM Edited by Cerbera, 22 September 2005 - 01:33 PM.

If you try out that setting and read what I typed, you will find you are wrong about that. Spawn the vehicle on top of Mongomery Intersection and drive north, over the Mako Span and all the way down Harry Gold Parkway. It's has a lot of downhill sections where you can get near to 200km/h, but when you get onto flat road the vehicle decelerates back down to between 155km/h or 160km/h. It cannot sustain speeds far below the top speed. This means that no matter how much flat road there was, it would never reach the 1000km/h TopSpeed setting because it cannot even sustain speeds above 160km/h on flat roads.

Therefore, it is proven that the performance of the vehicle is not altered so it will always reach the TopSpeed setting in the advanced handling mode. This vehicle cannot even sustain 20% of it's top speed on flat roads. As I said before, you have to test everything with a wide range of values to find out what's really going on. smile.gif


You made another double post, too. You can get warnings from the staff about that, because they may think you are trying to bump up your post count. My concern is that it makes the topic split to a second page faster, making it more difficult to review the findings which have been made.

You might find my CFG Studio program makes the handling easier to work with than Notepad because it uses a spreadsheet layout which keeps all the columns in line. There's lots of screenshots in that thread, so you can see what you'll be getting before downloading it. As you can probably imagine from seeing my approach to handling, it's a carefully made program and won't corrupt your data. It's got a simple backup feature, too, which I am developing further for the next release.

(EDIT) Interestingly, by using the super-slow handling with the DragMultiplier set to zero, the rate of acceleration does not drop off. This proves that you are right about the normal acceleration mode introducing a top speed limit based on TopSpeed rather than ignoring DragMultiplier values below one. In the advanced acceleration mode, using a DragMultiplier of zero would match your idea that the car just needs more road, since the force which resists the acceleration will now be zero.

However, when there is a non-zero value for DragMultiplier in the advanced acceleration mode, it is not guaranteed that the vehicle can reach the TopSpeed on a flat road, even if that road was endless.

CODE
INFERNUS 1000 2000 0 0.0 0.10 -0.50 -1 2.00 2.00 0.40 5 1000 1 0 4 P 10.0 0.60 0 30.0 1.05 0.140 5.0 0.25 -0.10 0.5 0.2 0.37 0 95000 40002004 1004001 2 2 1
This is the slow setup which seems to accelerate endlessly. I've managed 420km/h on the LV ring road but it was still accelerating. Therefore, I think this vehicle would continue to accelerate all the way to 1000km/h because it has a zero DragMultiplier effect.

GTA_gangstar
  • GTA_gangstar

    Square Civilian

  • Members
  • Joined: 02 Sep 2005

#17

Posted 22 September 2005 - 01:57 PM

will this work for planes to cause i would really like to make the hydra much more faster

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#18

Posted 22 September 2005 - 02:25 PM

Hydra tuning goes here. There is no known way to make the Hyrda faster.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#19

Posted 23 September 2005 - 11:08 AM

I tested the scenario you suggested and I stand by what I said. I think you just don't appreciate how extreme your scenario is. The parameters you gave may require the car a full hour of driving to reach its top speed. The road you suggested is only enough for about 80 seconds. It's neither flat nor straight nor uninterrupted. These things make it impossible to reach the car's top speed.

QUOTE
It's has a lot of downhill sections where you can get near to 200km/h, but when you get onto flat road the vehicle decelerates back down to between 155km/h or 160km/h.


That's normal, because when you go back to a flat road, you lose the extra acceleration given by gravity while the drag resistance remains at the same level determined by the speed, so in the immediate term you'll decelerate. The point is - the drag limit for the parameters you gave is about 49KPH. In order for the vehicle to pass this limit, it has to violate the laws of physics. So they have a tweak in there that allows the car to magically get extra acceleration and go faster. The extra acceleration it gets doesn't seem very high, so when you go past the drag limit you start going up very slowly, and any twist in the road will hold you back.

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#20

Posted 23 September 2005 - 12:37 PM

QUOTE (GTA_gangstar @ Sep 22 2005, 13:57)
will this work for planes to cause i would really like to make the hydra much more faster

The hydra appears to have a hard-wired top speed limit of 270KPH. I've only been able to make it go slower. In the default handling, it will always be going 270 unless you actively decelerate it.

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#21

Posted 23 September 2005 - 01:44 PM Edited by Cerbera, 23 September 2005 - 01:45 PM.

I've been doing this for seven years. I've worked with the handling, landscapes and mission scripts, sound effects, textures and game dialogue of five editions of GTA. I know what I'm doing.


OP, the fact that the vehicle stops accelerating when it is on the flat sections of Harry Gold parkway and then slows down proves that your theory about the vehicle always reaching the TopSpeed setting when USE_MAXSPD_LIMIT is set must be false. If you're going to ignore the facts, I'll make a video showing the vehicle decelerating from 200km/h down to 155km/h on a perfectly straight, perfectly flat section of the Harry Gold Parkway without me steering or braking or letting go of the throttle. It could never keep accelerating to reach the TopSpeed setting of 1000km/h because it slows down from 200km/h on these flat, straight sections of road, even with full throttle and no steering.

I chose to include the downhill sections which lead to the Harry Gold Parkway so you can get above the terminal velocity of the vehicle when driving on flat roads. The extra acceleration from the downhill sections allows you to reach around 200km/h so that you arrive on the flat sections with lots of speed in order to test whether the car continues to accelerate towards 1000km/h. However, as you drive along the flat sections of Harry Gold Parkway you reduce speed. If you are reducing speed on the flat, straight sections, then the game cannot be forcing it to acclerate all the way to the TopSpeed setting! It reaches a terminal velocity far below the TopSpeed setting. QED. tounge.gif


GTA is not like real-world phyiscs; the only laws are the ones in the game and they don't have to be anything like reality. For example, the visual shape of the car has no effect on the drag. To create a good formula you have to understand how the game works and forget about how reality works. The formula we devise must hold up under extreme circumstances, otherwise it won't be reliable for people to use when making their own vehicle handling. A good formula will remain accurate no matter what values are used.

You have a good mathematical approach but you need to remember that this is not "real" physics, it is computer game physics.


(EDIT) You made yet another double post, so the topic is split across two pages and is now difficult to look through what has been said. Use the "edit" button and only make one post at a time. It isn't difficult and it makes the thread easier to use. smile.gif

op9080
  • op9080

    Player Hater

  • Members
  • Joined: 19 Sep 2005

#22

Posted 23 September 2005 - 04:10 PM

I'm not ignoring the facts. I couldn't reproduce your numbers. Your settings are:
fEngineAcceleration = 1
fEngineInertia = 100
fMaxVelocity = 1000
fDragMult = 1
USE_MAXSP_LIMIT = on

Starting at the Montgomery intersection and going north, the road first slopes downward, then there's a flat section, then there's a short downward section, then it curves uphill at it turns from the Harry Gold parkway to the Julius thruway.

As I was driving on the flat section the car continued to accelerate at a rate of 1 KPH every 10-12 seconds. It was doing around 125 KPH at the time. The highest speed it reached was 131 KPH just at the end of the 2nd downward slope as it started to climb up. The whole trip lasted about 80 seconds. I set the "reduced traffic" mode so there were no interruptions.

This behavior is consistent with everything I've said before.

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#23

Posted 23 September 2005 - 08:00 PM

Oops, I got the intersection names wrong! I meant the top of Mullholland Intersection, the massive one at the center of San Fierro. You'll get enough speed from there. Sorry about that. I know what I'm doing, just not where I'm doing it! tounge.gif


I repeated the experiment three times and reached top speeds of 179km/h, 177km/h and 175km/h on the slope just after the freeway crossroads. On the long flat section immediatly after that, the vehicle was losing speed, reaching a minimum of 165km/h. I used the reduced traffic cheat, also.

By just lifting off the throttle for a fraction of a second while on the flat section, you can reduce the speed very slightly and then accelerate again to see if the vehicle gains speed or loses speed again. Using this method, I found that the terminal velocity is between 155km/h and 160km/h for this vehicle.

Jscribble
  • Jscribble

    Player Hater

  • Members
  • Joined: 19 Oct 2006

#24

Posted 19 October 2006 - 02:16 PM

I have been chasing down a topic on advanced handling, and spent countless hours tweaking my handling file. Yesterday I came across cerbera's topic on high speed handling, and I am appalled at the speeds he and everone else have achieved. I spent yesterday going over his information and testing it, and it all seems in line and accurate for the most part, but I managed just shy of 2700mph and was still accelerating.

I will try to post pics and my handling line to prove and share


suggestion, for those testing speed especially, find a mod or make a map with a loooong straight stretch of road, I seem to remember a mount chilliad map mod that had a huge stretch of flat road that would be perfect for this, I plan to find it again today so I can play with it at work again!


BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#25

Posted 21 October 2006 - 12:34 PM Edited by Cerbera, 21 October 2006 - 12:37 PM.

My modding with handling is mainly about realistic acceleration, not making cars go stupidly fast. These super-fast setups tend to be impossible to drive around the city; I can't see the point in them. My own super-fast setup for the Infernus is a comprimise between very high speeds and drivability.

If you think driving in a straight line is an interesting thing to do, then I guess we just like different things. I'd be interested in seeing your handling line all the same, though. smile.gif

GM Dude
  • GM Dude

    Back in da hizzouse, ya'll!

  • Members
  • Joined: 30 Jun 2006

#26

Posted 23 October 2006 - 03:54 AM

Will this same setup work for Vice City, too?

Jscribble
  • Jscribble

    Player Hater

  • Members
  • Joined: 19 Oct 2006

#27

Posted 23 October 2006 - 08:09 PM

in response to my last post and cerb's comment

My aims have been at pushing the limits of the cars, obviously you cant steer much at 2500 mph, and to make the brakes remotely effective at stopping from that speed makes them a little touchy when driving slowly, It is great fun to have a car or 2 in the game that freaking fly. I am working on making the cars as drivable as possible, and the main problem I see is that the controls will be touchy. The brakes and steering react instantly, but thats not all that bad. The throttle is the biggest issue, driving slowly (staying in full control of the car) requires tapping the throttle, as the car will be in the several hundred mph range in about a second (estimate, I haven't messed with the game in a few days so dont quote me)

side note: Its very fun to go "bowling" with this handling- point the car at a bunch of traffic and pin the gas!


@everyone: Is there anyway to control the level of boost that the nitro gives to a cars acceleration? (I have the feeling that there will be about 6 posts telling me its hard coded) ie set the nitro give 10 or so times the boost so that a car can drive entirely normal until popping the laughing gas

Thanks and try to be nice, I just want to share and help if I can!


let me clean up the handling line a little before I post, I was still messing with a few things and I overdid the spring damping rate so the car bounces down in the rear when I hit the brakes... little more tweaking, should be in my next post

BenMillard
  • BenMillard

    aka Cerbera

  • Members
  • Joined: 22 Jun 2002
  • United-Kingdom

#28

Posted 23 October 2006 - 10:27 PM

Well, you barely need any steering when you're going extremely fast. You do need lots of grip to get the power down, though. This means that to get significant steering response at high speeds will result in uncontrollable steering response at lower speeds (below 300km/h).

My approach was to ensure the car had oodles of grip but give the back very much more than the front. I then moved the mass a towards the rear so the vehicle would always understeer and would never oversteer. The result is that you get a vehicle which still turns sharply at these lower speeds, but is not so extreme as to be uncontrollable. You still retain a small amount of steering response at high speed, too.

Another thing is that the acceleration has to be progressive for it to be controllable at lower speeds. By using a high EngineInertia you can smooth out the acceleration curve without reducing the top speed. You just need a longer route to reach the very highest speeds.

Here's the Infernus setup from the Handling Overhaul:
CODE
INFERNUS 900 1500 0 0 0.10 -0.60 -1 2.50 2.50 0.40 5 2000 75 -5 4 P 15 0.60 0 30 1.05 0.140 5 0.25 -0.10 0.5 0.2 0.37 0 95000 40002004 1004001 2 2 1
Maybe we can develop a better comprimise between control and speed using your more recent work?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users