Page 4 of 4 FirstFirst ... 234
Results 31 to 39 of 39

Thread: C# Udp V2 library

  1. #31
    Superkart Pilot Zeratall's Avatar
    Join Date
    Oct 2017
    Location
    Arizona
    Posts
    357
    Platform
    PC
    Hey bud can you join my discord and send me a PM will probably help rather than just doing 1 reply on a forum.
    RacingSimTools.com : Owner
    PC2Tuner, Car Tuning Software - https://www.racingsimtools.com/product-page/pc2tuner
    Tuning Discord :https://discord.gg/w2MeTey

  2. #32
    Rookie
    Join Date
    May 2020
    Posts
    1
    Platform
    PC
    Hi guys, so I used the provided library and everything works fine. But, now I want to see my HP but I can't find it

  3. #33
    WMD Member
    Join Date
    Dec 2011
    Posts
    4
    Thank you Zeratall for sharing this library with the community, its a great example to get started with.

    I was wondering if anyone has extended this to obtain details from any other packet types as I cannot obtain details about the drivers names, and completed lap times for each from which to create a complete lap and delta chart for each driver for each lap throughout the race. I could be wrong but I'm guessing these details are contained in other packet types or extended upon in later API revisions as I believe this went up to API version 2 and ive seen docs suggesting 3+

    I'm still hunting about for a link to the full API docs rather than odd posts about particular changes, if anyone could provide one, it would be great also.

    Kind regards,

    bcs
    Custom Build PC Motherboard: Asus P8-Z77-V Ram: 16gb CPU: Intel i7 3770k GPU: Asus Strix 970 GTX 4GB vram (Driver version 344.48+) O/S: Windows 8.1 64bit Sound: USB Corsair Vengeance 1500 Headphones / Onboard HD via SPDIF

  4. #34
    GT3 Pilot
    Join Date
    Jul 2017
    Posts
    4,282
    Platform
    PC
    Quote Originally Posted by BCS View Post
    I'm still hunting about for a link to the full API docs rather than odd posts about particular changes, if anyone could provide one, it would be great also.
    See here https://www.projectcarsgame.com/two/project-cars-2-api/

  5. #35
    WMD Member
    Join Date
    Dec 2011
    Posts
    4
    Thank you cpcdem for that link, I can see its been updated considerably over the last and it'll take a fair bit of update mapping work.

    Cheers
    Custom Build PC Motherboard: Asus P8-Z77-V Ram: 16gb CPU: Intel i7 3770k GPU: Asus Strix 970 GTX 4GB vram (Driver version 344.48+) O/S: Windows 8.1 64bit Sound: USB Corsair Vengeance 1500 Headphones / Onboard HD via SPDIF
    The following user likes this Post: cpcdem


  6. #36
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Location
    Sweden
    Posts
    670
    Platform
    XBOX1 X
    I used this library for my projectcalc.org. This is my library code: https://github.com/Maskmagog/project.../PCars2_UDP.cs
    I'm not a programmer, so this is the result of a lot of trial and error, but it might be of help to you anyway.
    note: I switched to udp v1 because almost everyone still used v1, because of bugs in v2. Most regarding multiplayer I think, making v2 unusable for many apps. I only used it for time trial, but I remember I had issues with sector times.
    Also, my suggestion is to not rely on track names or car names from the feed. They are very inconsistently named, and in few cases, plain wrong. I suggest that you use TrackLength to determine the track, and ClassIndex and VehicleIndex for, well, class and vehicle.
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 28" 4K monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - proper PC2 leaderboards for console - Forum thread

  7. #37
    WMD Member
    Join Date
    Dec 2011
    Posts
    4
    Thanks Maskmagog for sharing your project code, it looks at a glance that there's some useful structure information in there

    I appreciate the concerns over which API version to use, i'll certainly watch out for any such issues.

    Cheers,

    bcs
    Custom Build PC Motherboard: Asus P8-Z77-V Ram: 16gb CPU: Intel i7 3770k GPU: Asus Strix 970 GTX 4GB vram (Driver version 344.48+) O/S: Windows 8.1 64bit Sound: USB Corsair Vengeance 1500 Headphones / Onboard HD via SPDIF
    The following user likes this Post: Maskmagog


  8. #38
    WMD Member
    Join Date
    Dec 2011
    Posts
    4
    @Maskmagog, you werent kidding about some of the apparent issues with the UDP 2 protocol in Pcars 2, for the most part the only data in the participant related packet types which seems reliable is for the car i'm driving.

    I tried to capture the laptimes and sector times for the AI cars also using packet type 2 and i'm seeing some really strange values, sometimes even several laps into a race, i'll see 96s for a sector where the AI and myself are doing in say 45s and sometimes there will be a fastest sector time for sector 2 and 3 but not 1.

    Have implemented a number of the packet types not included in the base library and some are accurate, I tried using Game State packet types, to tell when a new race has started for resetting race specific local or historic values for previous laptimes etc. and this seems to not correlate with the data mappings in the documentation, specifically the Game and Session state data held in a byte and represented in bit form.

    Quite interesting to do this sort of modding but it's tiring when uncertain if the API is behaving as intended or still has issues even after getting to version 8. I've looked for any mods that have successfully been able to capture laptimes from the other drivers in a race, not just the one running the API data capture, though I cannot see one, If anyone knows of one, please let me know

    Either way I appreciate the help given in this thread

    Regards

    bcs
    Last edited by BCS; 16-06-2020 at 20:48. Reason: meant type 2 :)
    Custom Build PC Motherboard: Asus P8-Z77-V Ram: 16gb CPU: Intel i7 3770k GPU: Asus Strix 970 GTX 4GB vram (Driver version 344.48+) O/S: Windows 8.1 64bit Sound: USB Corsair Vengeance 1500 Headphones / Onboard HD via SPDIF

  9. #39
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Location
    Sweden
    Posts
    670
    Platform
    XBOX1 X
    Yes, it's a shame really, because v2 has more info than v1. But apps like RS Dash and Crew Chief never implemented v2, because of critical bugs that wasn't fixed.
    I really REALLY hope that SMS gets the value of a proper UDP feed for PC3. The community have done some amazing stuff with it.

    On the bright side, v1 works well. Or it works, I should say. Still some annoying things, but no critical bugs that I know of. But I only use it for time trial, for lap and sector times, and stuff like speed, gear etc.
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 28" 4K monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - proper PC2 leaderboards for console - Forum thread

Similar Threads

  1. Simresults.net - a webbased result reader & PHP library
    By Mauserrifle in forum Multiplayer
    Replies: 123
    Last Post: 19-10-2018, 12:40
  2. Interest in GTE championship?
    By p66pittfan in forum Project CARS 2 on XBOX One
    Replies: 1
    Last Post: 19-02-2018, 20:08
  3. Project Cars closed, but keeps running in steam library
    By Kunal_Racedriver in forum PC - Technical Help & Support
    Replies: 2
    Last Post: 14-02-2016, 15:41
  4. Aug old vs new DLC not showing under Library/DLC in steam
    By Kobus Maree in forum General Discussion
    Replies: 6
    Last Post: 30-08-2015, 23:02
  5. highlight video to capture library question
    By BORIStheBLADE1 in forum PS4 - Technical Help & Support
    Replies: 1
    Last Post: 19-05-2015, 02:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •