SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Discussion

Reply
 
Thread Tools Display Modes
Old 17/09/2012, 03:00 AM   #11
zugg48
Little Clucker
 
Join Date: Feb 2011
Posts: 22
Reputation: 3
Default Respuesta: The "Real" vehicle speed thread

Of the handling.cfg archive:


Code:
		             		

                                     ------- CARS --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sē)        |
-----------------------|----------------------------|----------------------------------------|   
	LANDSTAL     		160.0 					25.0 
	BRAVURA     		160.0 					15.0 
	BUFFALO      		200.0 					28.0 
	LINERUN      		120.0 					25.0 
	PEREN        		150.0 					18.0 
	SENTINEL     		165.0 					24.0 
	DUMPER       		110.0 					25.0 
	FIRETRUK     		170.0 					27.0 
	TRASH        		110.0 					20.0 
	STRETCH      		180.0 					18.0 
	MANANA       		160.0 					19.0
	INFERNUS     		240.0 					30.0 
	VOODOO       		160.0 					23.0 
	PONY         		160.0 					15.0 
	MULE         		140.0 					18.0 
	CHEETAH      		230.0 					30.0 
	AMBULAN      		155.0 					24.0 
	MOONBEAM     		150.0 					15.0 
	ESPERANT     		160.0 					18.0 
	TAXI         		180.0 					19.0 
	WASHING      		180.0 					21.0 
	BOBCAT       		165.0 					20.0 
	MRWHOOP      		145.0 					14.0
	BFINJECT     		170.0 					30.0 
	PREMIER     		200.0 					22.0 
	ENFORCER     		170.0 					20.0 
	SECURICA     		170.0 					15.0 
	BANSHEE      		200.0 					33.0 
	BUS          		130.0 					14.0 
	RHINO        		80.0  					40.0 
	BARRACKS     		180.0 					20.0 
	HOTKNIFE     		200.0 					28.0 
	ARTICT1      		120.0 					18.0 
	PREVION      		160.0 					18.0 
	COACH        		160.0					18.0 
	CABBIE       		160.0 					24.0 
	STALLION     		160.0 					23.0 
	RUMPO        		160.0 					18.0 
	RCBANDIT     		75.0  					35.0 
	ROMERO       		150.0 					16.0 
	PACKER       		150.0 					13.0 
	MONSTER      		110.0 					45.0 
	ADMIRAL      		165.0 					22.0 
	TRAM         		150.0 					25.0 
	AIRTRAIN     		140.0 					24.0 
	ARTICT2      		120.0 					18.0 
	TURISMO      		240.0 					30.0 
	FLATBED      		140.0 					25.0 
	YANKEE       		160.0 					14.0 
	GOLFCART    		160.0 					15.0 
	SOLAIR      		165.0 					20.0 
	TOPFUN       		160.0 					15.0 
	GLENDALE     		160.0 					22.0 
	OCEANIC      		160.0 					16.0
	PATRIOT      		170.0 					25.0 
	HERMES       		160.0 					18.0 
	SABRE        		160.0 					24.0 
	ZR350        		200.0 					28.0 
	WALTON       		150.0 					14.0 
	REGINA       		165.0 					16.0 
	COMET       		200.0 					30.0 
	BURRITO      		150.0 					25.0 
	CAMPER       		120.0 					16.0 
	BAGGAGE      		160.0 					20.0 
	DOZER        		100.0 					35.0 
	RANCHER      		170.0 					20.0 
	FBIRANCH     		170.0 					22.0 
	VIRGO        		160.0 					18.0 
	GREENWOO     		160.0 					20.0 
	HOTRING      		220.0 					26.0 
	SANDKING     		170.0 					28.0 
	BLISTAC      		200.0 					26.0 
	BOXVILLE     		140.0 					14.0 
	BENSON       		140.0 					14.0 
	MESA         		160.0 					24.0 
	BLOODRA      		160.0 					24.0 
	BLOODRB      		160.0 					26.0 	
	SUPERGT      		230.0 					26.0 	
	ELEGANT      		165.0 					20.0 
	JOURNEY      		140.0 					14.0 	
	PETROL       		120.0 					25.0 
	RDTRAIN      		120.0 					25.0 
	NEBULA       		165.0 					20.0 
	MAJESTIC     		165.0 					22.0 
	BUCCANEE     		160.0 					24.0 
	CEMENT       		110.0 					20.0 
	TOWTRUCK     		160.0 					25.0 
	FORTUNE      		160.0 					20.0 
	CADRONA      		160.0 					20.0 
	FBITRUCK     		170.0 					25.0 
	WILLARD      		160.0 					18.0 
	FORKLIFT     		60.0 					20.0 
	TRACTOR      		70.0 					20.0 
	COMBINE      		140.0 					25.0
	FELTZER      		200.0 					28.0 
	REMINGTN     		160.0 					23.0 
	SLAMVAN      		160.0 					40.0 
	BLADE	     		160.0 					24.0 
	FREIGHT      		110.0 					20.0
	STREAK       		110.0 					20.0 
	VINCENT      		160.0 					18.0 
	BULLET       		230.0 					30.0  
	CLOVER       		160.0 					24.0 
	SADLER       		165.0 					25.0 
	RANGER       		160.0 					20.0 
	HUSTLER      		160.0 					22.0 
	INTRUDER     		160.0 					18.0 
	PRIMO        		160.0 					18.0 
	TAMPA        		160.0 					24.0 
	SUNRISE      		160.0 					17.0 
	MERIT        		165.0 					22.0 
	UTILITY      		160.0 					18.0 
	YOSEMITE     		170.0 					25.0
	WINDSOR      		180.0 					30.0 
	MTRUCK_A     		110.0 					45.0 
	MTRUCK_B     		110.0 					45.0 
	URANUS       		200.0 					20.0 
	JESTER       		200.0 					28.0 
	SULTAN       		200.0 					28.0
	STRATUM      		200.0 					20.0 
	ELEGY        		200.0 					28.0 
	RCTIGER      		75.0  					35.0 		
	FLASH        		200.0 					24.0 
	TAHOMA      		160.0 					24.0 
	SAVANNA      		160.0 					24.0 
	BANDITO      		170.0 					35.0
	FREIFLAT     		110.0 					20.0 
	CSTREAK      		110.0 					20.0 
	KART         		90.0					18.0 
	MOWER        		60.0 					12.0 
	DUNE         		110.0 					35.0 
	SWEEPER      		60.0 					12.0 
	BROADWAY     		160.0					20.0 
	TORNADO      		160.0 					20.0 
	DFT30        		110.0					20.0 
	HUNTLEY      		160.0 					25.0 
	STAFFORD     		165.0 					24.0
	NEWSVAN      		160.0 					15.0
	TUG	         	170.0 					15.0 
	PETROTR      		120.0 					18.0 
	EMPEROR      		165.0 					21.0 
	FLOAT        		110.0 					20.0 
	EUROS        		200.0 					24.0 
	HOTDOG	     		140.0 					14.0 
	CLUB	     		200.0 					30.0
	ARTICT3      		120.0 					18.0 
	RCCAM	     		60.0 					50.0 
	POLICE_LA    		200.0 					25.0 
	POLICE_SF    		200.0 					25.0 
	POLICE_VG    		200.0 					25.0 
	POLRANGER    		160.0 					30.0 
	PICADOR      		165.0 					25.0 
	SWATVAN      		110.0 					24.0 
	ALPHA        		200.0 					23.0 
	PHOENIX      		200.0 					26.0 
	BAGBOXA      		160.0 					20.0 
	STAIRS 		 	160.0 					20.0 
	BOXBURG      		140.0 					14.0 
	FARM_TR1     		160.0 					20.0
	UTIL_TR1     		60.0  					20.0 
	ROLLER	     		160.0 					15.0 
												
		              ------- BIKES & MOTOR BIKES --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sē)        |
-----------------------|----------------------------|----------------------------------------|    
	BIKE         		190.0 					50.0 
	MOPED        		190.0 					30.0 
	DIRTBIKE     		190.0 					50.0 
	FCR900       		190.0 					50.0 
	NRG500       		190.0 					60.0 
	HPV1000      		190.0 					50.0 
	BF400        		190.0 					50.0 
	WAYFARER     		190.0 					40.0 
	QUADBIKE     		160.0 					25.0 
	BMX          		120.0 					18.0 
	CHOPPERB     		120.0 					18.0 
	MTB          		140.0 					25.0 
	FREEWAY      		190.0 					40.0


		                   ------- BOATS --------

        NAME           |      MAX. VEL (Km/h)       |              ACELERATION (m/sē)        |
-----------------------|----------------------------|----------------------------------------|   
	PREDATOR     		190.0					1.7  
	SPEEDER      		190.0 					2.5  
	REEFER       		190.0 					0.7  
	RIO          		190.0 					0.5  
	SQUALO       		190.0 					3.0  
	TROPIC       		190.0 					1.4 
	COASTGRD     		190.0 					1.6  
	DINGHY       		190.0 					1.2  
	MARQUIS      		190.0 					0.5  
	CUPBOAT      		190.0 					3.0  
	LAUNCH       		190.0 					1.5  




                                   ------- PLANES --------

         NAME          |      MAX. VEL (Km/h)       |              ACELERATION (m/sē)        |
-----------------------|----------------------------|----------------------------------------|           
	SEAPLANE                200.0  					1.7  
	VORTEX       		150.0  					2.0  
	RUSTLER      		200.0 					16.0  
	BEAGLE       		200.0 					16.0 
	CROPDUST     		200.0 					16.0  
	STUNT        		200.0					16.0  
	SHAMAL       		200.0 					16.0 	
	HYDRA        		200.0 					16.0 
	NEVADA       		200.0 					16.0 
	AT400        		200.0 					16.0 
	ANDROM       		200.0 					16.0 
	DODO	     		200.0 					16.0 
	SPARROW      		200.0 					16.0 
	SEASPAR      		200.0 					16.0 
	MAVERICK     		200.0 					16.0 
	COASTMAV     		200.0 					16.0 
	POLMAV       		200.0 					16.0 
	HUNTER       		200.0 					16.0 	
	LEVIATHN     		200.0 					16.0 
	CARGOBOB     		200.0 					16.0
	RAINDANC     		200.0 					16.0 
	RCBARON      		75.0  					1.0 
	RCGOBLIN     		75.0  					35.0 
	RCRAIDER     		75.0  					35.0

______________
zugg48 is offline   Reply With Quote
Old 17/09/2012, 08:59 AM   #12
[ABK]Antonio
High-roller
 
[ABK]Antonio's Avatar
 
Join Date: Sep 2011
Location: ID, USA
Posts: 1,224
Reputation: 185
Default Re: The "Real" vehicle speed thread

I just use vX^2,vY^2,vZ^2 * 100 because it has pretty nice speeds...It has most vehicles going around 130 mph - infernus getting in the upper 100s...Which I think is a pretty good speed. Before that, I had it at around *140 (using the sqrt method) because it didn't feel like you were going nearly as fast as it was saying. The other method feels better though
__________________

ABKClan.com
[ABK]Antonio is offline   Reply With Quote
Old 02/08/2013, 12:06 PM   #13
Edix
Big Clucker
 
Edix's Avatar
 
Join Date: Nov 2009
Posts: 134
Reputation: 6
Default Re: The "Real" vehicle speed thread

I found out that the magic number is 191.
The way I found it is by checking the distance the car passes at its max speed over 1 second.
I found out that with Sabre you drive 51 meters over 1 second and using a simple converter I found out that the max speed is 183 km/h.
I also did the same test on a Sultan which drives about 50.25 meters over 1 second at top speed wich is 180 km/h and so the magic number of 191 worked perfectly fine for me.
Edix is offline   Reply With Quote
Old 02/08/2013, 12:13 PM   #14
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,863
Reputation: 1399
Default Re: The "Real" vehicle speed thread

Quote:
Originally Posted by Edix View Post
I found out that the magic number is 191.
The way I found it is by checking the distance the car passes at its max speed over 1 second.
I found out that with Sabre you drive 51 meters over 1 second and using a simple converter I found out that the max speed is 183 km/h.
I also did the same test on a Sultan which drives about 50.25 meters over 1 second at top speed wich is 180 km/h and so the magic number of 191 worked perfectly fine for me.
Except the bump of an old thread, you stated something and my answer is pretty much what someone above said "GTA Logic". How is that even possible, sabre being faster than sultan?
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 02/08/2013, 06:17 PM   #15
[ABK]Antonio
High-roller
 
[ABK]Antonio's Avatar
 
Join Date: Sep 2011
Location: ID, USA
Posts: 1,224
Reputation: 185
Default Re: The "Real" vehicle speed thread

Quote:
Originally Posted by _Zeus View Post
Except the bump of an old thread, you stated something and my answer is pretty much what someone above said "GTA Logic". How is that even possible, sabre being faster than sultan?
There's nothing wrong with bumping a thread if you have some sort of contribution towards it.

I wouldn't doubt if Sabre was faster than Sultan. Sultans are actually really slow but favored among communities.
__________________

ABKClan.com
[ABK]Antonio is offline   Reply With Quote
Old 04/08/2013, 05:47 PM   #16
Pottus
High-roller
 
Pottus's Avatar
 
Join Date: Jun 2012
Posts: 4,851
Reputation: 1292
Default Re: The "Real" vehicle speed thread

You guys have probably missed my ultimate test I'll post it here where it belongs.

pawn Code:
new Float:vx, Float:vy, Float:vz, Float:vel;
vel = GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
vel = (floatsqroot(((vx*vx)+(vy*vy))+(vz*vz))* 181.5);

Here is the golden nugget direct proof of concept.

Notes:

- Velocity calculation is not accurate
- We are looking to compare two different velocity calculations which are "average speed" in km/h vs immediate speed through GetVehicleVelocity()
- There should be a reasonable tolerance of around +/-5km/h between these comparisons regardless of velocity
- The average speed is taken over a distance of 500 meters

Here are the results of the test:

(All Numbers are in km/h)
Infernus: Top Speed: 223 Average Speed: 219.298 Tolerance: 3.702
Jester: Top Speed: 179 Average Speed: 176.71 Tolerance: 2.29
Tug: Top Speed: 86 Average Speed: 85.20 Tolerance: 0.8

Ignore the speedometer on the last test it isn't consistent when using speed boost the settings are as follows. Were looking to see how well the speed boost which uses GetVehicleVelocity() can compensate by maintaining the designated top speed. This test is not particularly accurate the Infernus will get a higher top speed it's mainly to demonstrate general consistency even in more extreme cases which increases confidence in the overall consensus of the velocity tests.

Key Poll Update: 200ms timer (Not timerfix corrected)
Acceleration Factor: 1.2x
Max Speed: 400 km/h
Average Speed: 404.67 km/h

Documented video testing
[ame]http://www.youtube.com/watch?v=qbZhMxsr8G0[/ame]
Pottus is offline   Reply With Quote
Old 04/08/2013, 06:53 PM   #17
-Prodigy-
Huge Clucker
 
Join Date: Dec 2010
Posts: 399
Reputation: 45
Default Re: The "Real" vehicle speed thread

Looks good. You should maybe try a road that is completely flat. Anyone up to get all vehicle's top speeds?
-Prodigy- is offline   Reply With Quote
Old 04/08/2013, 06:55 PM   #18
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,992
Reputation: 538
Default Re: The "Real" vehicle speed thread

Quote:
Originally Posted by -Prodigy- View Post
Looks good. You should maybe try a road that is completely flat. Anyone up to get all vehicle's top speeds?
He did..

Also the incline there is perfect, it gives the vehicle a little extra at the beginning. You know most stuff here is inaccurate...
Kar is offline   Reply With Quote
Old 04/08/2013, 06:57 PM   #19
-Prodigy-
Huge Clucker
 
Join Date: Dec 2010
Posts: 399
Reputation: 45
Default Re: The "Real" vehicle speed thread

Quote:
Originally Posted by Kar View Post
He did..

Also the incline there is perfect, it gives the vehicle a little extra at the beginning. You know most stuff here is inaccurate...
incline road != completely flat. Even if it's a small incline, it could still throw off the speed even by a little.
-Prodigy- is offline   Reply With Quote
Old 04/08/2013, 07:00 PM   #20
Kar
Banned
 
Join Date: May 2010
Location: Black Asylum
Posts: 2,992
Reputation: 538
Default Re: The "Real" vehicle speed thread

Apparently you don't understand how vehicles here work. I didnt said an incline is flat.

If you want to correct it, do it yourself. I saw his tests in-game, he showed me. There is a reason behind everything.

Also how does the incline even disrupt the calculations? the vehicle would reach the speed anyway.

Last edited by Kar; 05/08/2013 at 04:54 AM.
Kar is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
5 Dialog errors - Input line too long, undefined symbol "t","is" and "only" Deal-or-die Scripting Help 6 01/05/2012 12:08 PM
"Slight homing", make a missile "Slightly!" home a vehicle. Donya Help Archive 4 11/06/2011 09:20 PM
Admin script requires "ReturnUser", "strtok" and "IsNumeric" Rubennnnn Help Archive 1 02/12/2009 06:08 PM
"Bots", "AI", "NPCs"... Computer-controlled pedestrians and traffic! ssflsnoob General 2 23/11/2008 06:06 PM


All times are GMT. The time now is 11:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.