Jump to content

F1 2018 UDP Specification

Recommended Posts

Yep, I’m pretty sure that’s what I’ve done (not got the code in front of me to check), and then just converted to a percentage to draw the bar itself.

Share this post


Link to post
Share on other sites
Lopensky said:

Ok, this was something we have discussed here in the last days. So.. How is it working now?
What IDs i will have to expect to come out from the UDP data?
Human players will continue getting casual IDs exactly as they are doing now (except they do not get "IA-drivers fixed ones")?

Human players will have a driver ID assigned to them when entering the lobby, but with 100 added to the result to avoid clashes with the two-digit AI driver IDs. 

Share this post


Link to post
Share on other sites
Hoo said:
We have to tread very carefully where there is a suggestion that user data can be passed to and stored by third parties without explicit consent. For our purposes, anything that can allow someone to correlate data with an individual user falls exactly into this category. There is a difference between passing around player information in a supposedly closed network environment and providing a data structure to facilitate to storing of this information. We are still considering a few of options which might still give you what you're after, so I'll let you know if there are any developments in this area.
Thanks for the info, yeah GDPR is great in principal but hard to deal with for a lot of companies due to some of the broad definitions they use.
Just a thought but why not just ask for explicit consent, if you want to play online you have to consent to your gamer tag being shared? Thanks for keeping us informed :)
@Hoo just thought I would mention that I was asked to look at building an interface to Forza Motorsport 7 and while looking into it and testing with the game I noticed that they require the user to explicitly consent to their TOS/Privacy Policy in game before they can access any online functionality, presumably to cover themselves for GDPR. 

Share this post


Link to post
Share on other sites
Hoo said:
Lopensky said:

Ok, this was something we have discussed here in the last days. So.. How is it working now?
What IDs i will have to expect to come out from the UDP data?
Human players will continue getting casual IDs exactly as they are doing now (except they do not get "IA-drivers fixed ones")?

Human players will have a driver ID assigned to them when entering the lobby, but with 100 added to the result to avoid clashes with the two-digit AI driver IDs. 
@Hoo
Ok, i can see your point.. but my problem remains... :/
There is no way to map easily the udp drivers data to some other driver related data coming out from my own database. Only solution is to map them manually everytime a session starts... right?

In case, can you please tell me for sure if at least the team_id is valued correctly for online races data with only human players? :/

Share this post


Link to post
Share on other sites
@Hoo et al ....

Trying to understand the new event packet ;-)
I'd have expected to get a SSTA ..... loads of data  ... SEND.....   ALL with the same for the session UUID.
On windows (Steam) patch 1.08  the SSTA has a different UUID than everything else ... surely this defeats the object of the Event packet book ending the data for a session.
Bug ? Or am i missing how this works ?

Edit: So just had a play and the SSTA either has a seeminly random value or has the value from the last session ... That is the SSTA has the same UUID as the last SEND .... has to be a bug....

Share this post


Link to post
Share on other sites
Hi all, I'm new to receiving UDP data packets and I wandered if anyone could link me any good tutorials or help to do with working with UDP.

So far I have managed to receive them but when I try to output them I just have this returned 
this is my c# code when I'm trying to cast and output it 

Byte[] receiveBytes = c.EndReceive(ar, ref receivedIpEndPoint); //c is udp client, ar is async operation

string receivedText = Encoding.UTF8.GetString(receiveBytes);

Console.Write("\n"+receivedText);

Share this post


Link to post
Share on other sites
Hi all, I'm new to receiving UDP data packets and I wandered if anyone could link me any good tutorials or help to do with working with UDP.

So far I have managed to receive them but when I try to output them I just have this returned 
this is my c# code when I'm trying to cast and output it 

Byte[] receiveBytes = c.EndReceive(ar, ref receivedIpEndPoint); //c is udp client, ar is async operation

string receivedText = Encoding.UTF8.GetString(receiveBytes);

Console.Write("\n"+receivedText);

The data is not a string, its a stream of binary data representing the c structs (defined in the first post of this thread). You need to use a BinaryReader then you can either create identical matching structs in c# and use Marshal.PtrToStructure to convert the data, or alternative you can the binary readers .ReadXX functions to read out each data type sequentially into properties of a class.

Google and Stack Overflow are filled with UDP code examples, however you have already read the data so its more the conversion from c struct to c# class/struct that you need to look at.

Share this post


Link to post
Share on other sites
mrdezibel said:

can someone please test if this still works, in legacy mode?

https://play.google.com/store/apps/details?id=b4a.f1display

i have users telling me its Buggy and "shifting" the data…

but i am not sure if they using it with the right gamesettings…

any idea how to avoid the app showing data from the "wrong" mode ?

is the first value of f1 2018 always the beginning of the header with m_packetFormat saying 2018?

could be a way to differentiate the modes..

no one ? :-(

Share this post


Link to post
Share on other sites
Hello,
 I am loving the game and the improvements to the udp output. would it be possible to add projected pit stop lap to the udp broadcast? this would be useful while racing.
Thanks

Share this post


Link to post
Share on other sites
@Hoo Is it possible to know what tyre will be put on the players car for their next pitstop please?
I'd love that
Basically I'm on "page 1" of that ingame MFD most of the times, but when I'm about to enter the pits I'm always getting nervous if I've selected the right tyre. Sometimes Jeff disturbs me about a new strategy in the inlap and I may have selected differently. Would be very cool if I could see the next tyre type via UDP

Share this post


Link to post
Share on other sites
mrdezibel said:
mrdezibel said:

can someone please test if this still works, in legacy mode?

https://play.google.com/store/apps/details?id=b4a.f1display

i have users telling me its Buggy and "shifting" the data…

but i am not sure if they using it with the right gamesettings…

any idea how to avoid the app showing data from the "wrong" mode ?

is the first value of f1 2018 always the beginning of the header with m_packetFormat saying 2018?

could be a way to differentiate the modes..

no one ? :-(

Looking at data from the PC platform I've not seen anything "wrong" with the legacy mode data... Could it be platform related ?

Share this post


Link to post
Share on other sites
Lopensky said:
Hoo said:
Lopensky said:

Ok, this was something we have discussed here in the last days. So.. How is it working now?
What IDs i will have to expect to come out from the UDP data?
Human players will continue getting casual IDs exactly as they are doing now (except they do not get "IA-drivers fixed ones")?

Human players will have a driver ID assigned to them when entering the lobby, but with 100 added to the result to avoid clashes with the two-digit AI driver IDs. 
@Hoo
Ok, i can see your point.. but my problem remains... :/
There is no way to map easily the udp drivers data to some other driver related data coming out from my own database. Only solution is to map them manually everytime a session starts... right?

In case, can you please tell me for sure if at least the team_id is valued correctly for online races data with only human players? :/
After some tests it seems that team_id is assigned unpredictably too. Expecially if drivers join the lobby during the Q session.
@Hoo please explain me this, it's something i tested for hours with no good results. :/
Seems i won't have any data to recognize a driver except for its position (mapping it manually one by one at each sessione start). this is crazy man. :s

Something theoretically so easy and simple, came out so terribly wrong and unusable. :(

Share this post


Link to post
Share on other sites
AndyHamp said:
@Hoo et al ....

Trying to understand the new event packet ;-)
I'd have expected to get a SSTA ..... loads of data  ... SEND.....   ALL with the same for the session UUID.
On windows (Steam) patch 1.08  the SSTA has a different UUID than everything else ... surely this defeats the object of the Event packet book ending the data for a session.
Bug ? Or am i missing how this works ?

Edit: So just had a play and the SSTA either has a seeminly random value or has the value from the last session ... That is the SSTA has the same UUID as the last SEND .... has to be a bug....
@Hoo any comment on this one ?

Share this post


Link to post
Share on other sites
Anyone seeing issues with data frequency ?
The type 0,2 and 6 data is written as per the menu settings but i'm also seeing the Type 7 (Status) record written at the same frequency. They all have the same header UUID and timestamp is this correct ? Can I assume that this will continue or should i expect Type 7's to change to 2x per second as documented ?

Share this post


Link to post
Share on other sites
AndyHamp said:
Anyone seeing issues with data frequency ?
The type 0,2 and 6 data is written as per the menu settings but i'm also seeing the Type 7 (Status) record written at the same frequency. They all have the same header UUID and timestamp is this correct ? Can I assume that this will continue or should i expect Type 7's to change to 2x per second as documented ?
What you experience now is accurate. The packet USED to be sent two times a second but has since been spead up due to the drs indicator. 

Share this post


Link to post
Share on other sites
AndyHamp said:
Anyone seeing issues with data frequency ?
The type 0,2 and 6 data is written as per the menu settings but i'm also seeing the Type 7 (Status) record written at the same frequency. They all have the same header UUID and timestamp is this correct ? Can I assume that this will continue or should i expect Type 7's to change to 2x per second as documented ?
What you experience now is accurate. The packet USED to be sent two times a second but has since been spead up due to the drs indicator. 
Great ... no problem if they've changed it :-)  Would be good if @Hoo can update the top posts to reflect this....

Share this post


Link to post
Share on other sites
Hi, I read through all the pages. Regarding the delta to leader and or other cars, just to recap:
In order to get the (correct - not approx) deltatime to the leading car (or intervall times to other cars), we acctually need to keep track of all laptimes / sector times and compare them to each other? This is the way I done it and was already suggested here, but I just wonder if this information is not worth putting into the packets directly. In spectator mode the game itself shows these times with several updates between each sectors, so they are at hand...

btw: I built a windows app to show the most important session data on a second monitor.


Share this post


Link to post
Share on other sites
Hello. are there any solutions regarding online names of the friends in the session, in the live rankings of the simdashboard app (all of them with the name GIOCATORE - GIO)? And also for the colors of the users, they are all gray.


Share this post


Link to post
Share on other sites
Can someone confirm this pls?

PARTICIPANTS PACKET ... on PS4 the name will be the LAN name if playing a LAN game, otherwise it will be the driver name.



Share this post


Link to post
Share on other sites
Lopensky said:
Can someone confirm this pls?

PARTICIPANTS PACKET ... on PS4 the name will be the LAN name if playing a LAN game, otherwise it will be the driver name.



I dont have a PS4 myself, but I was looking at some data from a PS4 user of my app the other day and it appears that in online MP sessions the names are always "Player". 

Share this post


Link to post
Share on other sites
Hi All,

We've fixed the issue where the SessionUID was being reported incorrectly for the first frame should be fixed now. 
We also investigated the issue reported by @SimShaker where the longitudinal forces were dropping out in the 2018 format, but were unable to repeat the issue here. Please let us know if you encounter either of these issues again.

Thanks.

Share this post


Link to post
Share on other sites
@Hoo can you please give me some info about the "team_id" field of the participants packets?
Is that value correct while in online games on PS4? I mean.. players driving a redbull will ALWAYS have 2 as team_id? Is this sure?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×