1. Do you need support for Assetto Corsa Competizione? Please use the proper forum below and ALWAYS zip and attach the WHOLE "Logs" folder in your c:\users\*youruser*\AppData\Local\AC2\Saved. The "AppData" folder is hidden by default, check "Hidden items" in your Windows view properties. If you report a crash, ALWAYS zip and attach the WHOLE "Crashes" folder in the same directory.
  2. FOR ASSETTO CORSA COMPETIZIONE: If you report issues with saved games, please always zip and attach your entire User/Documents/Assetto Corsa Competizione/Savegame folder!
  3. If your game executable is missing, please add your entire Steam directory to the exceptions in your antivirus software, then run a Steam integrity check or reinstall the game altogether.

Let's talk about broadcasting (programmer's thread)

Discussion in 'ACC General Discussions' started by Minolin, Dec 12, 2018.

  1. Brado23

    Brado23 Racer

    Yep, I'm definitely missing middle sector times often. It doesn't happen all of the time strangely, but has definitely started happening lately as you say.

    Here's an example...

    Attached Files:

  2. Toon Knapen

    Toon Knapen Gamer

    Hello @Robby Timmermans , are you still working on this project? I'm asking because I was wondering if programmers (like you) would eventually be interested if we would document the protocol to uplink live data to our https://pitwall.live platform.

    Writing a live-timing dashboard is a lot of work. Before we started supporting ACC we focused on supporting real-life timing systems such as timeservice (used by 24h series), swisstiming (used by SRO), TSL, ... We would now also like to support more racing games (ACC, AC, rf2, ...) and thus documenting this protocol would allow programmers like yourself to avoid having to capture the data _and_ build the whole live-timing dashboard.
    ..LeRenard! and Brado23 like this.
  3. Justin w

    Justin w Racer

    If i wanted to broadcast from a different pc to what im playing acc on im guessing I would need another copy of game and pc capable of playing it??
  4. Toon Knapen

    Toon Knapen Gamer

    You can access the broadcasting API from another PC as the PC running ACC. The broadcasting API is just a UDP socket. So to access most generally specify the address but you could thus also access this from another pc but then you need to specify the IP address of the PC that is running ACC. You can see which IP you have using the `ipconfig` command.

    Of course when accessing it from another pc, you also need to be wary of firewall's etc.
  5. Justin w

    Justin w Racer

    Sounds complicated I'm not clued up on pcs
    Also I wouldn't be able to join as spectator to broadcast and play at same time would I ?
    Last edited: Aug 6, 2020
  6. Brado23

    Brado23 Racer

    You wouldn't join as a spectator, just join normally as a player and you can still run the broadcast client (not that it would be much use though while you are playing except for timing).
  7. Toon Knapen

    Toon Knapen Gamer

    @Doug Duthie, I see in your post about the latest release of ACC Results companion that you have succeeded in interpreting the accident reports. Congratulations :)
    I imagine you base this on the info you get through the broadcasting interface.
    Can you share how you interpret them?

    thanks in advance,

  8. Doug Duthie

    Doug Duthie Simracer

    Well..in a fashion. Yes it comes from UDP interface. We has the accident event abd the message is something like #vs. #70497248. All we really know is the lap, the driver having then accident and the time it happened. The other player involved is just some sort of ID. I thought this might have been the steam3 id, but it doesn't match up. Actually, I've just checked, and it is a random number..it the below race I shamefully had 5 accidents, but no id appeared more than one

    The "at fault" column was pure speculation. I had noticed that it appeared that the id of the rearmost car in accidents was always negative (this might have been coincidental though) so I decided to apportion blame on that basis. However, now all player ids are positive. I might change the logic to apportion blame to anyone who isn't me ;) - seriously though, I'll probably get rid of that as ACC doesn't apportion blame, it just penalises all concerned


    I'd love to be able to map the car ids of those involved in the accidents but it seems the info isn't there at the moment
    Brado23, AndyK70 and Toon Knapen like this.
  9. Doomsayer

    Doomsayer Rookie

    I am a little confused with all the code I found in "Sources\ksBroadcastingTestClient\": Is this all implemented in the test client?

    Especially I am interested in the "Autopilot" function, because I want to broadcast our league races while I am still driving for myself. All the stuff in the file "Sources\ksBroadcastingTestClient\Autopilot\AutopilotCarViewModel.cs" looks like there is a good logic behind this autopilot in the testclient. Is there anyone, who suceeded in programming a good "autopiloted" client for broadcasting? Or does anyone have good values for autopilot in the testclient?


    RRL Fun Liga https://raceapp.eu/rrl/Community/rrl | YOUTUBE: https://www.youtube.com/channel/UC2lIrqCNAouuWo9QIezstUw
  10. Doug Duthie

    Doug Duthie Simracer

    @Minolin - is there an updated BroadcastingEnums.cs? I've just noticed a new country - Chile=82, but NationalityEnum only goes to 77.

    Just to check I'm not looking in the wrong place, I've updated the dedicated server and the file
    .\SteamLibrary\steamapps\common\Assetto Corsa Competizione Dedicated Server\sdk\broadcasting\Sources\ksBroadcastingNetwork is still at 8th October.

  11. RadstaR

    RadstaR Rookie

    Any news about SDK fixes ?
  12. gvann

    gvann Rookie

    Hello everyone, I'm currently working on a broadcasting client and I have a couple of questions:
    - I'm reading that some of you have some problems with accident notifications, like wrong info in the notification message. My problem is that I do not receive any accident notification at all (best lap and lap completed notification work properly, I haven't tested other events yet). Am I doing something wrong or is it the game that no longer sends accident notifications after some patch?
    - In my highlights system I would like to include also notifications for overtakings, is there someone who tried to accomplish that? My guess is to implement that comparing the spline positions of the cars, but I'm reading that sometimes those are not properly in sync with the actual car position if I understood correctly. Any suggestion on how to tackle this?
  13. Doug Duthie

    Doug Duthie Simracer

    The last time I tested online was the end of November and accidents were reported then - I've not had a chance to test since then. They are reported as a InboundMessageTypes.BROADCASTING_EVENT type message. It is difficult to tie up who is involved in an accident though - maybe you could see who had accidents at the same time and extrapolate from there. The only thing that I suspect is missing, is the accident message is along the lines of

    #vs #<nnnnn>

    I'm probably wrong, but I assumed this was intended to indicate the 3rd party of the accident (is "vs" versus ?). Anyway, the number that shown appears to be random.

    I've not played with relative car coordinates at a point in time, so can't comment if you could use this. I have seen that there appears to be a lag on the position in the real time car update messages (maybe just that they are sent asynchronously) so you might not be able to use that to monitor overtakes. You could use shared memory - according to the documentation it gives coordinates of all cars at any point in time
  14. gvann

    gvann Rookie

    I've not tested online yet, only on single player mode. Could be that accident messages works only in online mode? I'll try as soon as possible. If they're not working in online mode too probably I'm doing something wrong.
    Thanks for the advice about shared memory, i'll try with that approach. If I can see coordinates or spline position in real time it should be pretty simple to report overtakes.
  15. Doug Duthie

    Doug Duthie Simracer

    I've never seen accident events working in SP - only online
  16. Fabio Pittol

    Fabio Pittol Gamer

    On my Node.JS version here, in SinglePlayer it doesn't report accidents either.

    And I saw a few AI bumping/sliding/pushing happening that would for sure be an "accident". Still no reports.
  17. Fabio Pittol

    Fabio Pittol Gamer

    @Minolin I know your work there must have made the Broadcasting API drop a few spots on the priority list, but would be awesome if in the near future we could have at least some more infos that are already on the default ACC UI.

    I mean, as @Brado23 listed on back in April/2020 (post on the "spoiler"). If a Broadcaster really wants to build something to customize and overlay the original UI (leaving HUD as Blank), stuff a Spectator can already see, like Tire Set/Type, Weather forecast, Track condition are crucial. Otherwise, if it's for getting hints of battle for position and change the cameras, we don't need to do nothing but use the TestClient. I know it might sound like sarcasm, but that's not the intention.

    The API itself as it is, it's pretty cool. We can do lot's of stuff on our own with the realtime updates. It's just missing a few bits to get people off the limbo.

  18. Cirith Ungol

    Cirith Ungol Simracer

    Hi !

    I want to build a really small app that only shows things relative to the weather (rain, cloud, wetness and temperature) because I never found an app that tells me when I enter a wet server just how wet it is ( :D ). And also it was a good excuse to get back on some C#. Anyway I have to admit I'm quite a noob about that and I don't really understand how to connect to ACC broadcast. Here is what I've come up with :

    ACCUdpRemoteClient client = new ACCUdpRemoteClient("", 9000, "", "asd", "", 100);
    ksBroadcastingNetwork.Structs.RealtimeUpdate realtimeUpdate = new ksBroadcastingNetwork.Structs.RealtimeUpdate();
    But that doesn't seem to do anything as the realtimeUpdate object his just full of 0. I know this is a basic question but I really searched on Google but I didn't find anything :oops:
  19. ohjeah

    ohjeah Simracer

    There's a simhub overlay that does exactly what you need:
    Cirith Ungol likes this.
  20. expor

    expor Gamer

    And if you still decide to get it working yourself, what you do on line 2 is just create a new instance of the RealtimeUpdate struct, which by default will contain 0-values.

    Instead, you want to do something like this;

    ACCUdpRemoteClient client = new ACCUdpRemoteClient(""9000"""asd"""100); // Connect to UDP server
    ACCUdpRemoteClient.MessageHandler.OnRealtimeUpdate += OnRealtimeUpdate// Register for RealtimeUpdate event with a callback

    // Callback implementation
    private void OnRealtimeUpdate(RealtimeUpdate realtimeUpdate)
    // Do something with data
    Last edited: Feb 10, 2021
    Cirith Ungol likes this.
Similar Threads
Forum Title Date
ACC Physics Let's talk about spins... Apr 2, 2021
ACC PS4 - XB1 General Discussions Let's talk multiplayer/online servers Jul 11, 2020
ACC General Discussions Let's talk about broadcasting (user's thread) Dec 12, 2018
Console Lounge Let's talk vote to kick Mar 18, 2017
Console Lounge Quick race weekend (let's talk abou it Vol.1) Feb 24, 2017
Chit Chat Room Let's talk Lotus 98T Feb 17, 2017
Console Lounge Porsche Cayman GT4 - Let's talk gearing Jan 16, 2017
Console Lounge Let's talk about rage quitters... Dec 9, 2016
Chit Chat Room 935/78 - Let's talk setup and driving Oct 30, 2016
Console Lounge Let's talk about braking Oct 6, 2016
Suggestions Let's talk weather (I am not asking for rain). Aug 15, 2016
Chit Chat Room Let's talk wheels...again. why not? Aug 27, 2014
ACC PS4 - XB1 General Discussions Let's do something, this is going to get ugly...(Servers) Aug 3, 2020
ACC General Discussions Let's get acquainted? Nov 28, 2019
ACC General Discussions POLL! Let's buy this game again every year to support Assetto Corsa guys! Jul 20, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice