Hacker News new | ask | show | jobs
by herbstein 1992 days ago
iRacing is a bunch of kludges all the way down. For the longest time the only way to race was as a solo driver. However, some of the biggest races in the world of real racing is endurance events where 3-4 people share a car over 24 hours. So iRacing added team races at some point. I've done a few things with data endpoints from iRacing, and it reveals a bit about how they did it.

Every driver has an ID. It's just an integer sequentially increasing every time a new person joins the service. Teams, however, are the opposite. Every time a new team is created they are assigned a negative ID, perpetually decreasing as new teams are created. Because of this, an entry into a racing session can be handled by way of a single database column for both drivers and teams. Keep in mind that a racing session is either a "driver session" or a "team session" - you can't have drivers and teams in the same session. You can, however, have teams with just one driver in them.

iRacing is a service that started development in 2004, using custom race simulation tech from ~2001, was released in 2008, and perpetually updated since then. The team is quite small, and has always been.

If there are any questions I have 6 years of experience of both racing and developing third-party tools for the service, and I'll gladly share some knowledge if questions arise.

4 comments

Though I'm sure you know this, it's worth noting for those unfamiliar that it started from a NASCAR game - NASCAR Racing 2003 Season[0]. A lot of the quirks are related to oval-racing based assumptions for that reason. A lot of the severely lacking (or particularly rough) areas are things that exclusively exist in road racing, like non-solo-driver events.

[0]https://en.wikipedia.org/wiki/NASCAR_Racing_2003_Season

Soon-to-be (hopefully) iRacing user here.

Are there (or could there be) extensions that improve on the simulation aspects of iRacing? Or is it considered already good enough?

Are there tools/extensions you would consider essential?

There is an external app that swaps out the built in force feedback with a system that generates forces based on the telemetry, I find it very helpful as you're able to exaggerate the feedback for oversteer and understeer (which in a real car you tend to feel through the seat of your pants, rather than through the wheel).

https://github.com/nlp80/irFFB

As far as the raw simulation goes, you get what you get with iRacing. Because of the online-only nature of the service tampering with it is impossible as an end-user. However, there are a few external things can help with immersion and getting an overview.

The one I find the most crucial is "Crew Chief". iRacing tells you when someone is beside you, a slower car is ahead, and stuff like that. Crew Chief does all of this, but also gives you a bunch of more information without making it an overload. With the voice-interface and spoken information you could completely turn off every HUD element in the simulator without losing the ability to e.g. set pitstop parameters or knowing how far ahead of the person behind is.

Another option to super-sede the default iRacing interface is "Kapps" (short for "Kutu Apps"). It's what practically every streamer uses for their overlays, but it's also very usable for your own racing. Gives more details about you competition and your potential fuel strategy.

When doing the big endurance events with a team you might want to be able to get a more strategic overview of the race as it evolves. Joel Real Timing is a server and frontend that gives you information on deltas, pit stop timing, laptimes, consistenty, etc. for every car on track. I wouldn't say it's very useful as a solo driver, but as a team it's invaluable.

All of this said, however, don't mistake being kitted out for being fast. These three apps are essentially usability improvements and niceties compared to the normal interface. You can easily plan out your endurance race, or do any sprint race, without any of this. Most important is to get a lot of seat hours and practice. You don't need to worry about all of these fancy information-gathering apps before they'll actually make a real difference to your driving. And that might take a good while, depending on your skill level.

Similarly, for a lot of people there is a lot of focus on setups. When some peoplewant to try a new car, or a new track, they always start asking around for a setup that fits well. 1) iRacing just recently added standard setups for popular track/car combinations - there already was a "baseline" setup available for each car 2) a setup can maybe give you a second at the most egregious. When you're two seconds off-pace no amount of setup is gonna make you magically faster. I've won endurance races in the higher end of the rankings with the baseline setup, after a bunch of practice, against people that have sweated over their setups for weeks before the race. Don't fall into that pitfall when starting out.

[0]: http://thecrewchief.org/ [1]: https://kapps.kutu.ru/ [2]: https://joel-real-timing.com/index_en.html

Do you have any clue how the spotter gets the info of near opponents? So the basis for the „left/right side“ messages.

I would really like to have a visual spotter similar to Assetto Corsa Competizione.

Unfortunately, that wouldn't be possible. The only details you can know about the spotter is the following:

    enum irsdk_CarLeftRight
    {
         irsdk_LROff,
         irsdk_LRClear,   // no cars around us.
         irsdk_LRCarLeft,  // there is a car to our left.
         irsdk_LRCarRight,  // there is a car to our right.
         irsdk_LRCarLeftRight, // there are cars on each side.
         irsdk_LR2CarsLeft,  // there are two cars to our left.
         irsdk_LR2CarsRight  // there are two cars to our right.
    };
And detailed positional data simply isn't available through the live API either. The closest you get is how far along the track a car is, as a percentage of the total track length. I recall reading some time ago, though I don't remember where, that this is a deliberate attempt to curb any form of cheating. Live access to information like ride height, tire pressure, and tire temperature is likewise not available.
In the last race I saw from the iRacing streamer Dan Suzuki, he had some kind of visual spotter - I think it was from Kapps - where at least you saw the position of the car - how far ahead or behind - on the side.

Perhaps that‘s implemented with the percentage you mentioned.

Can confirm this is from Kapps, and I believe it was added recently. Not sure how he does it, but he streams on Twitch[0] and you can probably just ask him in chat if you catch him when he's live. He's live right now actually (7:15AM EST).

[0]https://www.twitch.tv/kutu182

Thanks for these insights! I always knew that the underlying tech was fairly old, but I didn't realize development began in 2001.

I've been looking at the SDK thread in the iRacing forums and its definitely interesting to see how its structured.