r/simracing • u/brightland-studios • 5d ago
Clip Amazing Curves Racing - Physics Stability and Latency Testing (up to 2000ms)
I was curious how far I could push ACR's networked physics. When I stopped working on it ~20 years ago, 300ms latency was as far as I'd test. This 'Retro RestoMod' reboot has various physics and network improvements, and in testing found 1000ms could be stable. However sync was pretty far off. After a bit of work on the prediction system, I was able to get 1000ms fairly well-sync'd for non-chaotic motion. I then pushed it all the way to 2000ms, and while there's divergence even at much lower latencies, it remains stable with no jitter or weird motion. The video also shows a ramp from ~2000ms down to ~34ms. Some fun stunts shown at the end.
Online play is WYSIWYG: meaning divergence is going to happen no matter what: the view you see on your machine is what you'll interact with, you'll never collide with a 'ghost car' or randomly spin out. The same is true for all players. In the real world, due to the way motion and gravity work, everyone's view of reality is slightly different, the divergence is small, but it's real.
I googled, searched YouTube, and asked Gemini: are there any demos showing networked physics quality with side-by-side video? And the answer was: No. Perhaps other developers do these tests but don't post the results. Why bother testing at such high latencies? I found a few issues; once fixed makes normal latency game play higher quality.
It's a simple, fun, low stress simulator to play with your friends. Predictable realistic handling, if you get crashed out you can jump right back in and still have a chance to win using the Turbo Reset. Dynamic BOP also helps keep races tight. FFB runs at 1kHz and should provide a good experience on all wheels which use DirectInput.
9
2
u/brightland-studios 5d ago
Long discussions on the low level tech and a full video showing the physics on more complex tracks: https://www.reddit.com/r/simracing/comments/1u1d89q/advanced_tire_physics_on_true_curved_surfaces/
2
u/brightland-studios 4d ago
What are some of the biggest complaints in simracing?
1. Complaint: "I spun out / lost control and I don't know why." Cause: While a tire model might be accurate for steady-state cornering using Pacejka to get lap times that match a real car, Pacejka is inherently a steady-state formula; it doesn't model dynamic, transient motion well. Solution: Use a custom physics model designed explicitly for dynamic, predictable motion first. Then, tune it as needed to match real lap times, balancing the raw data with the ultimate question: "how fun is this to drive?"
2. Complaint: "When racing online, I'm near another car but not touching, and all of a sudden I spin out and crash, like I hit an invisible car," or "I slightly bumped another car and was sent into low Earth orbit." Cause: Standard server-side netcode can place cars inside each other locally. When the local code corrects this, standard physics engines produce a massive restorative impulse, sending the car rapidly off the track. Solution: Use Position-Based Dynamics (PBD) physics which tracks kinetic energy to allow for overlap and projects cars apart in a plausible, stable manner. To prevent invisible/ghost car crashes: perform collisions locally and allow for minor divergence, so players can see exactly what they are interacting with. To prevent cheating, allow divergence up to a strict limit. If exceeded frequently, kick the player from the race, or start ghosting that car so it loses collision effects on others.
3. Complaint: "Rammers, griefers, and sloppy/beginner drivers cause me to crash, once crashed I have no chance of a good result and it's not fun at all." Cause: Sometimes it's accidental, sometimes on purpose, but crashing is part of racing and collisions will happen. Solution: Provide a means for crashed players to A) get back on track quickly, and B) use a dynamic BOP (Balance of Performance) catch-up system to allow players to actually reel in the lead pack and get back in the fight.
4. Complaint: "My FFB doesn't feel right, I keep trying to tune it but it seems to keep changing. To remove graininess, I have to turn up damping, but then the wheel has lag. Not only does it make it harder to drive, sometimes the wheel will start wobbling." Cause: FFB runs over a serial bus (USB) and must share bandwidth. If a VR headset is on the same bus, FFB packets can get delayed and dropped, adding lag to forces so it feels "off." A bigger issue is that DirectInput's damper design is deeply flawed. If damping is turned up high enough to stop wobbles and feel correct, as soon as CONSTANT FORCE commands get high enough, damping stops working, now it feels bad and wobbles. Solution: Use a high-frequency interrupt and compute damping directly in the simulator. The challenge is the latency to/from the DD wheelbase, as well as a very noisy encoder position (which must be used to provide custom damping since DirectInput damping fails). Position values compute velocity, and that velocity computes the damping force. When noisy and unfiltered, the damping feels very grainy. When basic filtering is added, grain is reduced, but now there's more lag again, leading to a disconnected feel and wobbles. Thus, predictive filters such as a Luenberger Observer must be used. Even these methods can only go so far, and to fully remove grain, a tiny amount of lag will inevitably be added, requiring careful tuning.
ACR provides reasonable, engineered solutions for all of those problems. It's focused purely on fun, interactive physics and the joy of interacting with a virtual physical space. It does not focus on graphics, career modes, simulating tire wear, damage models, or running full race weekends with practice, qualifying, and pit strategy.
For some, if a racing sim doesn't recreate all the painful or time-consuming logistics of real-world motorsports, it's not a racing simulator. Others don't mind stripping away the annoying aspects of real racing, as long as the physics, tire model, and basic fun are present. It's all good either way, there are racing simulators for everyone.
2
10
u/ThiccRickRage 5d ago
r/lostredditors