Hacker News new | ask | show | jobs
by sanesmith 1960 days ago
Interesting anecdote from a previous comment (https://news.ycombinator.com/item?id=25698217):

"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."

1 comments

cool anecdote about the team sessions. I have done a few team races and they are a ton of fun with friends. my one gripe with sessions is that its very... permanent. like if you join with the wrong car or wrong team, you cant back out and change it. any idea why it was implemented like that?

I am horrible at iracing, likely because I never practice and just decide to hop into a race occasionally, but it is a good way to spend the offseason when we cant go irl racing

The teams thing is interesting. It bit me a few months ago because a teammate accidentally registered for a race with the wrong car. He couldn't back out or join the race with the new team the rest of us registered with because he was already in a team.

I'm not sure why it's implemented this way, but given the issues with registration/session creation for the Daytona 24 hour this year I'd guess the team event registration is write only and doesn't permit updates in order to simplify the session creation logic.