- #1
Evgenit
- 4
- 0
I'm making a drag racing game. But I'm only 11th grade, and I'm not the best with physics. I won't ask you to make the game, but what formulas to use.
I have the following variables(?). From these I have to make a car move realistically :D
//Car specs
car="2010 Ford Shelby GT500";
//Engine specs
engine_model=V8;
engine_capacity=5.4;
horsepower=540;
compressor=intercooled_supercharger;
//Transmission
transmission_type=manual;
gears=6;
axle_ratio=3.55;
gear_ratio1=2.97;
gear_ratio2=1.78;
gear_ratio3=1.30;
gear_ratio4=1.00;
gear_ratio5=0.80;
gear_ratio6=0.63;
current_gear_ratio=1;
gear=1;
final_gear=0;
//Drivetrain
drive_type=rear_wheel;
front_tires="255/40ZR19.0 BSW";
rear_tires="285/35ZR19.0 BSW";
tire_diameter=27;
tire_radius=tire_diameter/100/2;
//Other
exhaust=base_dual_exhaust;
suspension=sport;
weigth=1777;
Some of these probably won't be used for physics, but for else.
I have tried this
final_gear=current_gear_ratio*axle_ratio;
rpm=(axle_ratio*speed*current_gear_ratio*336.13)/tire_diameter;
speed=(rpm/60*(1/final_gear)*2*3.14*tire_radius)*3.6*0.9
But it just doesn't work. Sorry for my stupidity.
I have the following variables(?). From these I have to make a car move realistically :D
//Car specs
car="2010 Ford Shelby GT500";
//Engine specs
engine_model=V8;
engine_capacity=5.4;
horsepower=540;
compressor=intercooled_supercharger;
//Transmission
transmission_type=manual;
gears=6;
axle_ratio=3.55;
gear_ratio1=2.97;
gear_ratio2=1.78;
gear_ratio3=1.30;
gear_ratio4=1.00;
gear_ratio5=0.80;
gear_ratio6=0.63;
current_gear_ratio=1;
gear=1;
final_gear=0;
//Drivetrain
drive_type=rear_wheel;
front_tires="255/40ZR19.0 BSW";
rear_tires="285/35ZR19.0 BSW";
tire_diameter=27;
tire_radius=tire_diameter/100/2;
//Other
exhaust=base_dual_exhaust;
suspension=sport;
weigth=1777;
Some of these probably won't be used for physics, but for else.
I have tried this
final_gear=current_gear_ratio*axle_ratio;
rpm=(axle_ratio*speed*current_gear_ratio*336.13)/tire_diameter;
speed=(rpm/60*(1/final_gear)*2*3.14*tire_radius)*3.6*0.9
But it just doesn't work. Sorry for my stupidity.