Results 1 to 8 of 8

Thread: UDP questions

  1. #1
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Posts
    520
    Platform
    XBOX1 X

    UDP questions

    I'm working on a leaderboard project for consoles. It currently runs on a Raspberry Pi, and it reads UDP (laptimes etc) and stores everything in a database on the Pi. It also scrapes leaderboards from cars2-stats-steam-page, so now I can see my laptimes mixed with the PC players! Console leaderboards on a per car/track-combo, pretty awesome actually! We're looking at moving as much as possible of it to Azure, so that everyone uses the same db.

    Now the questions. The scraper script obviously gets laptimes etc, but also Setup (Default/Custom), Controller (Wheel/Gamepad/Keboard) and Camera (In-car/External). Is there anyway to get/guess these things from UDP?

    There's a Joypad and a Dpad field in the UDP. Could one assume that if they are null during the lap, that the player uses a wheel? (Excluding keyboard players, sorry!)

    Is there something in the UDP that could reveal that a custom setup is used?

    All theories welcome!
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 24" 1080 monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - unified leaderboards - Forum thread
    The following 2 users likes this Post: Hammerpgh, Killg0re NL


  2. #2
    Superkart Pilot Killg0re NL's Avatar
    Join Date
    Sep 2017
    Location
    Netherlands
    Posts
    170
    Platform
    PS4 Pro
    I am working aswell on an UDP project, when i find something you can use i will let you know.

    I am currently struggling with the floats in Arduino

  3. #3
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Posts
    520
    Platform
    XBOX1 X
    Another question:
    Is there anyway to tell if the player is watching a replay?

    UDP is sent during replays as well. RaceState is 'Racing', GameState 'In-game playing', SessionState whatever the type is/was (TimeTrial, Practice etc), so no help there.
    OdometerKM value continues to grow during replays, but that is not saved when exiting replay.
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 24" 1080 monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - unified leaderboards - Forum thread

  4. #4
    GT5 Pilot mr_belowski's Avatar
    Join Date
    May 2015
    Posts
    1,490
    Platform
    PC
    Joypad and dpad are just bytes in the data (can't remember if they're 1 byte or 2 bytes - maybe joypad is 2 and dpad is one). Each button is represented by a single bit in these bytes and the game sets them for wheels as well as controllers. Not sure about keyboards tho.

    So you can't use the presence of non-zero bits in these bytes to indicate that the user is playing with a controller. As far as I know there's no data in the UDP stream that'll give you that info
    Crew Chief details here http://forum.projectcarsgame.com/sho...r-for-PC-users
    Website, download link and forum: http://thecrewchief.org
    Or make a donation, if you think the chief needs to drink more beer:
    https://www.paypal.com/cgi-bin/websc...=LW33XFXP4DPZE
    The following user likes this Post: Maskmagog


  5. #5
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Posts
    520
    Platform
    XBOX1 X
    Thanks. For next game I'd really like them to add info about controller type, and if it's a default or custom setup.
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 24" 1080 monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - unified leaderboards - Forum thread

  6. #6
    WMD Member Sampo's Avatar
    Join Date
    Jun 2012
    Location
    Finland
    Posts
    688
    Platform
    PC
    There is GAME_INGAME_REPLAY in PC2 data.

    Code:
    // (Type#1) GameState (to be used with 'mGameState')
    enum
    {
      GAME_EXITED = 0,
      GAME_FRONT_END,
      GAME_INGAME_PLAYING,
      GAME_INGAME_PAUSED,
      GAME_INGAME_INMENU_TIME_TICKING,
      GAME_INGAME_RESTARTING,
      GAME_INGAME_REPLAY,
      GAME_FRONT_END_REPLAY,
      //-------------
      GAME_MAX
    };
    It works in my app. Or did I not understand what you were going for?
    Last edited by Sampo; 19-03-2019 at 00:14.
    CPU Intel i7-9700K @ 4.8 GHz all cores | Motherboard Gigabyte Z390 Aorus Pro | RAM 16GB DDR4 3200MHz | GPU nVidia GTX980 4GB (431.68) | Audio Realtek 5.1 on MB | Screen AOC U3477PQU | OS Windows 10 Pro 64-bit | Wheel Logitech G27
    In-game settings: 2560x1080 | Texture Resolution HIGH | AF 16x | VSync ON (adaptive) | AA None | Reflections MED | Envmap MED | Vehicle HIGH | World HIGH | Shadows MED | Motion Blur NO | Render Frames Ahead 1 | Particles MED/MED/MED

    PC2Info, a PC program that shows most stats the game provides over UDP

  7. #7
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Posts
    520
    Platform
    XBOX1 X
    Sampo, that's exactly what I'm looking for. Do you know if that is available in the old v1 udp format too?
    I'll test tonight. Thanks!
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 24" 1080 monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - unified leaderboards - Forum thread

  8. #8
    Superkart Pilot Maskmagog's Avatar
    Join Date
    Sep 2017
    Posts
    520
    Platform
    XBOX1 X
    Question about PC1 UDP:
    Is it possible to extract Front and Rear Aero damage? Or is it just Aero damage overall?

    It's sent as a byte, but I can't find anything in the documentation about getting front and rear separately. So it might not be possible, but it can't hurt to ask.
    Thrustmaster TX, Italia 458 wheel, T3PA-Pro, Firmware 54, Xbox One X, public OS, 24" 1080 monitor
    Don't miss Yorkie065's excellent videos: Ep26-LiveTrack pt1. Ep 27-LiveTrack pt2.
    Project CALC - unified leaderboards - Forum thread

Similar Threads

  1. I have some questions
    By willy3215 in forum General Discussion
    Replies: 0
    Last Post: 26-09-2017, 06:09
  2. Few questions after my first day with P.C.
    By letmeknow in forum General Discussion
    Replies: 10
    Last Post: 01-12-2015, 08:22
  3. 2 questions....
    By k12doz in forum Feature Suggestions
    Replies: 0
    Last Post: 12-06-2015, 20:11
  4. 2 questions, please...
    By Luiz Boni in forum PC - Technical Help & Support
    Replies: 3
    Last Post: 14-05-2015, 21:20
  5. Some Questions
    By Jellibean in forum XB1 - Technical Help & Support
    Replies: 3
    Last Post: 12-05-2015, 15:29

Posting Permissions

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