WIP car simulator - Added audio and other new stuff

Описание к видео WIP car simulator - Added audio and other new stuff

Added some new stuff:

- Added rudimentary audio: Just two engine sound samples for now, both "at 5000 rpm" (maybe). One on throttle and one off. Volume is blended between the two samples based on throttle position. The sound drops out occasionally, but this appears to be due to the samples and not the audio system. If I use different samples it goes away. I'm using Microsoft's XAudio2 here. Their examples are great and it didn't take long to get something running if we ignore the hour I wasted trying to figure out why it wouldn't play any sound at all. I missed a line of code from the documentation. Oops! All better now.

- Added a couple suspension cameras up front. It's fun for me to finally see what the front suspension looks like when driving for real.

- Added paddle gear shifting on my Logitech G27 wheel. On the upshifts I'm using the clutch pedal just to make it interesting. This way it sounds and acts like it would on an H-shifter. Downshifts need to happen too quickly for me to heel-toe it, so I let the clutch staying engaged during the downshifts.

- Added an anti-rollbar model. This car desperately needed it, especially on the front.

- Added the first aerodynamics element of many to come: A simple drag force. I can create as many of these as I want with different properties. For now it's just a single one set to the chassis' center of mass to minimize aerodynamic moments.

- Added a proper limited slip differential to the drivetrain model. The max torque bias ratio on power here is set to 1.25:1. On coast it's 1.5:1, so it's loose on power and likes heavy trail braking to turn. Very little preload. No idea what the real car has (if anyone knows, I'd love to learn), but this is pretty fun like this anyway.

Engine here is around 240 horsepower or so to get some wild power oversteer off the apexes (as much as I can manage).

One of the neat things about this car is the solid axle DeDion rear suspension + radius arms. It appears to have about 100% anti-squat. You'll notice when transitioning from coasting to full power, the pitch hardly changes. Especially noticeable at launch. The rear of the car actually rises ever so slightly along with the front. Under braking the front end drops a lot though.

The tire model is still a very basic one I whipped up in a couple hours a few months ago just to get something running. Believe it or not, it's just a constant slope (varying only with load) from 0 up to some peak slip angle (6 or 7 degrees IIRC) and ratio (0.1 or so) with lousy combined slip modeling. It's actually not a curve at all yet, so the cornering stiffness at small slip angles is far too low. It's amazing it works at all, let alone is still kind of fun to drive. I look forward to putting in my real tire model for comparison. Have to be careful not to make this too fun too early or I won't get any work done! 😆

Комментарии

Информация по комментариям в разработке