PDA

View Full Version : API documentation and breaking changes



mr_belowski
30-11-2017, 12:50
Having just posted a big chunk of unofficial information regarding API changes in the latest pCars2 patch, I'd like to raise a wider point about API documentation and updates.

I think there needs to be a better process to provide fair warning to app developers to give them time to update their products when the game patches include API changes that may break compatibility. I know 3rd party developers aren't SMS's responsibility, but if SMS want us to build interesting and useful apps that take advantage of the APIs they provide, the 3rd party developers really need to be able to rely on these APIs. This means that we need to have confidence that the data they provide can be used as intended, that the API documentation will be accurate and updated in a timely fashion, and that there is a sensible way to report and share issues with the APIs and their data. I think we also need to be warned when up-coming changes will break compatibility.

I'm not suggesting that SMS is in any way responsible for the work that 3rd party developers do but I do feel that the current situation makes it quite risky to implement support for the new APIs.

I've chosen stop work on adding pCARS2 UDP format support to my applications (for the time being), partly because of some of the issues I've found but mostly due the risk of future unannounced changes breaking my app. SMS very kindly gave me an early heads-up about the planned patch 3's UDP changes, and while I'm very grateful for this I don't think I can risk relying on this kind of good-will going forward.

cjorgens79
30-11-2017, 13:04
+1 we definitely need official threads for both the shared memory and udp api's and we need good clear communication from SMS on any changes to these protocols before any patches go live in order to be able to maintain our apps compatibility appropriately.

TBH i was rather surprised to see the PC2 UDP protocol posted on the main projectcarsgame website a little while ago, when the api itself was still under construction by martin and effectively buggy to the point of being unusable for me (and others ive heard from) at least. It is still listed on the website (https://www.projectcarsgame.com/project-cars-2-api.html?lang=en) now and since patch v1.3 came out, it is also now out of date too.

Kafumanto
30-11-2017, 14:31
+1

As already discussed with others, supporting the new protocol (UDP for me) is very "challenging": at the moment the resulting UX for final users is worst than using the old PC1 protocol. Surely the lack on an official communication channel with SMS, where receive timing updates and reporting issues, is a really big limit. I would love to see this addressed.

Dealman
30-11-2017, 19:14
Not only that but dedicated servers as well, I've been working on an addon for dedicated servers for a while but have since lost interest due to AI randomly appearing and manual pitstops not working. I'm also working on a RCON program but have also lost interest in this and kind of paused that for now. I don't see why we should invest time and effort into developing useful addons for this game when SMS does absolutely nothing in any way, shape or form to communicate with us and help them improve the APIs further.

There was an update to the dedicated servers, what was fixed or changed? Manual pitstops still don't work. AI still seems to show up occasionally even though they're disabled.

Ugh, it really saddens me to see such influential people such as mr_belowski here who has contributed to the PCARS community a whole great deal. Really it kind of feels disrespectful and I wholeheartedly hope SMS will re-consider and sort of re-organize the modding as it will do nothing but help with the longevity of the game.

SenorPez
30-11-2017, 19:49
+1000. Between the way the API (UDP and Shared Memory) has been handled for PCARS2 and the "second class citizen" nature of the console releases, I have little interest in developing for PCARS2. I mean, why should I bother, if fields aren't going to be universally supported between game versions and whatever I do is going to be broken as soon as the next patch comes out. This thread, and the population of the 3rd party apps forum for 2 confirm I'm not the only one.

PCARS had great patch and API communication. So far, PCARS2 has not improved on either of those marks.

Maskmagog
30-11-2017, 19:59
3rd party apps was one of the reasons I moved to PC2 from other games. Not the number one reason, but not insignificant either. I really hope that SMS values all the hard work from these developers.

mr_belowski
01-12-2017, 15:19
Any chance of a response from SMS about this? Ta

Dealman
01-12-2017, 19:46
Any chance of a response from SMS about this? Ta

Sadly I wouldn't hold my breath, I don't think I've ever seen an SMS post in this sub-forum. Moderator posts, sure, but no SMS responses. Ever since I first started working on my dedicated server addon I've been checking these forums daily, and the lack of SMS activity here is what just made me stop working on everything. If they're not gonna show any interest - neither will I.

mr_belowski
04-12-2017, 10:56
From the lack of any kind of response here, I have to presume you're right Dealman.

Very frustrating and disappointing.

Gassolini
04-12-2017, 15:10
I've been out of it for a while, and I'm just about to update an app.

AFAIK, SMS has said that the telemetry API/format is unchanged from pCARS 1, but this thread suggests that there have been changes to at least the UDP version.

Any pointers to the latest API docs? I'd also be interested in seeing those changes to the UDP version mentioned by @mr_belowski.

Something like a pinned API documentation thread would've been useful.

Edit: I found some remnants of docs in the pCARS 1 forum, but nothing quite like a simple "just the docs" pinned thread...

mr_belowski
04-12-2017, 15:19
pcars 1 format is unchanged, but there are some new bugs in pcars2's pcars1-mode UDP output (IIRC, the PitSchedule stuff reports drive-through penalty when you request a pit stop, or something like that).

The pcars 2 UDP format is what we're discussing here. The official API docs for pcars 2 UDP and pcars 2 shared memory are out of date. See here for what's changed: http://forum.projectcarsgame.com/showthread.php?58078-New-additions-to-shared-memory-and-UDP-data

There are some issues though.

Gassolini
04-12-2017, 15:34
Thank you mr_belowski! :)

I'll factor that into my update. I take it those changes are relative to the very first UDP structure as published for pCARS 1(?)

And I take it we're still on SHARED_MEMORY_VERSION = 5 for the shared memory API then(?)

Edit: I'm not on PC2 yet, but I just found out that PC1 versions of the Shared Memory and UDP API can be selected as mentioned here (http://forum.projectcarsgame.com/showthread.php?51085-Shared-Memory-for-third-party-apps). Hopefully that support is solid and usable then.


This situation has to be cleaned up for sure. Hey SMS, how a about a simple sticky with just the latest docs, headers and instructions/examples?

mr_belowski
04-12-2017, 15:46
no, those changes (both UDP and shared memory) are changes in the pCARS 2 formats that were part of the recent patch. The pCARS1 formats are unchanged - apart from working around new bugs, if your app uses the pCARS1 format(s) you don't need to make changes.

The pCARS2 formats are documented here:

https://www.projectcarsgame.com/project-cars-2-api.html?lang=en

my post explains the ways in which the actual data sent by the game differs from whats in this documentation for pCARS2 UDP and shared memory

Gassolini
04-12-2017, 16:09
Aha! There it is - thanks again! :eagerness:

Kafumanto
11-12-2017, 17:09
Any chance of a response from SMS about this? Ta

Are the forums monitored by SMS? Maybe there's some moderator in touch with them?

mr_belowski
11-12-2017, 18:05
All the other forums seem to be actively monitored by moderators and SMS people, including the gaffer, post regularly on them. So it seems reasonable to assume that this forum is no different and that SMS would be aware of this issue

mr_belowski
13-12-2017, 12:29
In case you guys missed it, here's an SMS response to an admittedly slightly blunt thread venting some frustrations that I do share.

http://forum.projectcarsgame.com/showthread.php?58815-Ian-sit-rep-on-API-amp-DS-etc-Please-(


So I guess that's that then :(

disappointing

Dealman
13-12-2017, 12:50
In case you guys missed it, here's an SMS response to an admittedly slightly blunt thread venting some frustrations that I do share.

http://forum.projectcarsgame.com/showthread.php?58815-Ian-sit-rep-on-API-amp-DS-etc-Please-(


So I guess that's that then :(

disappointing

A good advice is to not browse forums while at work and already in a bad mood. Bad things will happen, haha. I took it a bit too far, I didn't want to insult anyone and I sincerely thought I didn't at the time. I shouldn't have used those words the way I did, but it is what it is. I apologized to Ian personally(personally being a PM) as I felt pretty bad afterwards, I really didn't want to step on any toes - I simply find it peculiar that the other sub-forums are so active yet this one is seemingly left in the dark.

Though, Remco did say he had been in touch with them and that they'd seemingly stop by some time soon. So I'd still say there's hope. I'm sure they want to come in here and help but are probably plenty occupied with working on other stuff.

Sorry for making a bad impression.

mr_belowski
13-12-2017, 12:53
Nah, don't worry about it dude. We've been asking for some support for a while and SMS haven't been able or been willing to provide it. We're all frustrated, and while I don't think SMS are being despicable or disrespectful (just very busy and snowed under) I do agree with the rest of your post and I think Ian Bell's response is excessive.

Kafumanto
13-12-2017, 12:59
In cases like these, I usually suspect there is something under the hood. Not necessarily bad, but something that interferes with the 'expected behaviour'.

Sankyo
13-12-2017, 13:07
Nah, don't worry about it dude. We've been asking for some support for a while and SMS haven't been able or been willing to provide it. We're all frustrated, and while I don't think SMS are being despicable or disrespectful (just very busy and snowed under) I do agree with the rest of your post and I think Ian Bell's response is excessive.
So Dealman apologized for what he wrote, yet you're steering this in a bad direction again by questioning Ian's behaviour. How is this going to help?

Ian stated a few weeks ago that they're done with the crap they have to take from people on forums. They're listing to feedback and critique, provided that it's worded decently. Anything else is not going to be listened to. Discuss anything you want, but do it without the swearing, name-calling and entitlement that seem to be the norm these days. If you can't, postings and people will be ignored and/or removed.


And that's the last of this discussion. SMS will respond if they see fit, stop questioning their actions or intentions.

mr_belowski
13-12-2017, 13:12
Eh?

I'm not flinging crap around at all, or questioning anyone's actions apart from the nature of Ian's response.

I've done *nothing* remotely disrespectful or anything else. I merely agree with the frustrations of a fellow 3rd party app developer, and disagree with some of his interpretation and wording. I've made this clear.

Kafumanto
14-12-2017, 15:04
Finally the new "patch 3" has been published (LOL, I can't post links: "www projectcarsgame com / project-cars-2-api html" fill the dots ;) )

mr_belowski
16-12-2017, 10:21
Nice to see some release notes and update APIs have been posted - thanks for that. I think there's an inconsistency between the UDP changes in the release notes and in the API - sLocalParticipantIndex is actually in the sTimingsData structure.

Can we also have somewhere to track bugs as well please? There are still some quite serious ones in the UDP data, like blank driver names

nabezokodaikon
16-12-2017, 11:40
Thank you to tell.

Kafumanto
16-12-2017, 15:09
Nice to see some release notes and update APIs have been posted - thanks for that. I think there's an inconsistency between the UDP changes in the release notes and in the API - sLocalParticipantIndex is actually in the sTimingsData structure.

Thanks for the note.



Can we also have somewhere to track bugs as well please? There are still some quite serious ones in the UDP data, like blank driver names

Hoping there will be something more "official", another user started a thread about it: forum projectcarsgame com/showthread.php?56963-PCARS2-UDP-API-Bug-reports (can't post links, fill the dots please).