Closed ywgATustcbbs closed 1 year ago
Integration would mean, someone needs to code it, it can be a lot of work.
Integration would mean, someone needs to code it, it can be a lot of work.
Perhaps, can start with the easiest one.
fetch html metadata from an url is relatively easy using Python. Grab the info needed daily and cache them on official website. This part should be easy. Game Ui might take some time.
I think i can write a c# demo to fetch data from speedrun.com
Integration would mean, someone needs to code it, it can be a lot of work.
https://github.com/speedruncomorg/api
This is speedrun.com official api, this may save most of the data fetching work
I we wanted to implement such thing into the game, it would need to be written in c++, which complicates things (at least for me).
I we wanted to implement such thing into the game, it would need to be written in c++, which complicates things (at least for me).
I guess it's http get/post the problem? Or json parser?
The api itself is easy, Just use the get method (the url is specified by the api doc) that provided by any httpclient lib. A json file with lb info is received. Then parse it using any json parser and retrieve data from it.
Perhaps i can try to write a demo after holidays
Httpclient for cpp https://github.com/yhirose/cpp-httplib
Json parser for cpp https://github.com/nlohmann/json
There are many similar but more light eeighted libs on github.
The api doc for leaderboards https://github.com/speedruncomorg/api/blob/master/version1/leaderboards.md
We have jsmn and ISteamHTTP in the game, but there are significant privacy concerns to doing a third party HTTP request every time someone does something in a game.
...there are significant privacy concerns...
I'm not sure but it's the the 3rd party libs that raises the concerns. Am i right?
As far as i know, the speedrun.com api itself is only an anonymous get method.
Ben means stuff like https://gdpr.eu/what-is-gdpr/.
Would it be worthwhile to contact speedrun.com to see if they would even want some partnership? Obviously no point for me to message them if you guys are strongly against it, hence my question here first, but IMO even just a small UI linking to speedrun.com home page would already be a good step to make players thrive for recordings.
Ben means stuff like https://gdpr.eu/what-is-gdpr/.
I don't understand. Those data are posted by speedeun.com user and are in public domain(or cc3.0?). If one wants to post runs via api, he must register apeedrun.com account and specify his token in the api. By registering, he already agrees the terms of use.
Ben means stuff like https://gdpr.eu/what-is-gdpr/.
I don't understand. Those data are posted by speedeun.com user and are in public domain. If one wants to post runs via api, he must register apeedrun.com account and specify his token in the api. By registering, he already agrees the terms of use.
Noticed.
When making an api call from the game to speedrun.com (i.e. showing the leaderboards of speedrun in-game), we would disclose the ip of the user. Ip addresses are considered person data in the eu, falling under gdpr. The only way around it, is to legally ask for explicit opt-in to do the call, and store this consent somewhere, which already makes this whole thing more tricky.
If you mean, speedruns are posted outside of the game, that is fine. But in that case we could close the ticket, since no integration would be needed between game and speedrun.com
If you mean, speedruns are posted outside of the game, that is fine. But in that case we could close the ticket, since no integration would be needed between game and speedrun.com
Yes and no, even without a full integration, small steps can be made, with a simple link from main menu towards speedrun home page.
Obviously full integration would be awesome, but since technical limitations, first need to to just give an easier access to the website, which will make said website "officially accepted". IMO the intention is as important as the result, and if full integration is not possible, any step towards it is already a good thing.
With zero integration (aka, not even a small link), there is no officialization, nor a show that such an option is something rd team would like to have (and as I said, I feel diverting peer-review towards community would be the correct way to tackle this, as it shouldn't be done by devs).
But yes, I feel just having rd stance on it with a small integration would already go long ways.
PS : I won't mind asking speedrun.com if they would want to do something, and maybe they even have ideas/solutions as I assume they already did such partnerships, but I would like to first know if you guys even think it's a possible solution.
Got It. So there are some walk aroubds
From Speedrun.com:
Some operations the API offers require a user-context to work. In this case, an API client needs to authenticate on behalf of a registered user.
To prevent excessive crawling of the data we make available and to ensure a good overall performance, requests to the API are subject to rate limits.
Single ip or bot they don't want
Get the data using official website server and cache the data.
We would create another dependency and single point of failure, something we prefer not to introduce.
This seems like quite some time investment though, and that's not even knowing if speedrun.com even agrees to this. 1) need to know if rd team want a partnership 2) need to know if speedrun.com want a partnership 3) start small (just a link to officialize stuff) 4) look for improvement on integration / solutions for technical difficulties
But no point looking at 4) if 1) and 2) are not known. Pretty sure 3) shouldn't require much time investment, but no point without knowing if both party want a partnership
- need to know if rd team want a partnership
I am leaving this choice to the other members of the rd team.
quite some time investment though
And this is exactly my concern. It sounds so easy, but there are a lot of small roadblocks to take. Agree a link shouldn't harm, but let's be honest, how many games have an actual implementation like this in their game?
From Speedrun.com:
Some operations the API offers require a user-context to work. In this case, an API client needs to authenticate on behalf of a registered user.
This is intend for posting new records. An user token is required in that case
To prevent excessive crawling of the data we make available and to ensure a good overall performance, requests to the API are subject to rate limits.
Single ip or bot they don't want
Retrive data daily or wewkly will be enough, Since moderators also Needs time to verify a run. If official website could cache data, daily caching will be ok
"You may not use any scraper, crawler, spider, robot or other automated means of any kind to access or copy data."
As home user, you might take such terms lightly, but as organization, we have to be a bit more careful. Of course if speedrun would agree, and there is a legal data agreement, then it would become something else. Even after that, It is still some work to implement.
Here is another solution.
Anyway, The current workload on data retriving is really small. When there are more records, We can find other soluatiins.
"You may not use any scraper, crawler, spider, robot or other automated means of any kind to access or copy data."
We are legally not allowed to copy the data local. We don't own it.
Personally, I would love speedrun integration, it just has legal and some technical caveats to do so.
"You may not use any scraper, crawler, spider, robot or other automated means of any kind to access or copy data."
We are legally not allowed to copy the data local. We don't own it.
It says no copy using robots. It does not say i can't copy data Manually, It doesn't say i can't store data to a local file
"You may not use any scraper, crawler, spider, robot or other automated means of any kind to access or copy data."
We are legally not allowed to copy the data local. We don't own it.
It says no copy using robots. It does not say i can't copy data Manually, It doesn't say i can't store data to a local file
Above link explains in-depth, what is required and what not. The terms of speedrun (which above is only a small snippet) are on their site, these are added on top of gdpr. Since a lot of countries implement something similar, it's (legally) not as easy as you suggest.
TLDR: this implementation can have serious privacy concerns and issues. This is not due technical reasons, but due how personal data is handled, which is subject to local laws.
Even If speedrun.com don't allows it,. We can post our runs for verification on steam forum. Community members could work as moderators. once confirned, records can be Manually uploaded into github repo. Only Needs a file to store It. This is the most essy solution that i can come up with. No legal issues.
The current lb has so many problems, why not do something.
The current lb has so many problems, why not do something.
We tried, the public discussion of that is on the Steam forums.
If you want to make a steam forum post about speedruns and rules, I am happy to pin it on top of the discussion board. But any integration in the game with a third party service, will hit the same personal data questions as above. The only way to fix that, is by storing the data on the steam platform, like how we do it right now.
Maybe the most easy way is to add a link to a video on the stats page for each record, but that means Ben needs to code that. I leave that to him to answer. It's also not the integration you asked for in the first place..
The current lb has so many problems, why not do something.
We tried, the public discussion of that is on the Steam forums.
If you want to make a steam forum post about speedruns and rules, I am happy to pin it on top of the discussion board.
Actually, that post is talking about how we can find a way to show verified records in game to everyone, It doesn't matter where to post the records.
The issue is, the "new" board is recognized by the official. The dev team tells the community where to post the records for verification and the community will follow the instructions.
I can suggest a solution, But i can't announce It.
It's also not the integration you asked for in the first place..
Integration is not the purpose. The purpose is try to find a solution to show verified records in game that can partial replacing The current lb.. I tried my best you find a dolusyion to show verified records directly in the game to discourage cheaters.
Ideally, a little verified mark on the current lb will be enough. Then the problem comes to how to verify the record. Sunce you suggested in the steam thread that speedrun.com is recommend, So i tried to find a solution to integrate It.
As the devs concern, the integration of speedrun.com is technically possible but has legal issues.
So let's go back to what i really want to talk. Lb problems.
As far as i know, community wants to
devs want to
Based on these, i think we have one possible solution.
"You may not use any scraper, crawler, spider, robot or other automated means of any kind to access or copy data."
We are legally not allowed to copy the data local. We don't own it.
Personally, I would love speedrun integration, it just has legal and some technical caveats to do so.
Oh God, you've made a big mistake on this.
In The sperdrun.com api page, It clrary states:
Content License As with the main website, all original content provided through the API is licensed under CC-BY-NC 4.0. Images and videos are copyright of their respective owners.
In The website's term of use:
Ownership of the website All pages within the Website and any materials made available for download are the property of the Company, or its licensors or suppliers, as applicable. The Company makes no claim of ownership as to the Data as it is received from the API. ... User submissions through the website Original content provided on the site is licensed under Creative Commons Attribution-NonCommercial 4.0 International. Content uploaded by users, such as game cover images, are copyright of their respective owners; the same applies to content that is linked to, like YouTube videos and external images or documents.
That means, you may cache and redistribute The records using api under cc-by-nc-4. These records including players, time, records, etc., are all original content created by users. Or, If don't believe it, you can write an email to ask them if it's true.
In The api's readme.md, It also states that
If possible, please set a descriptive User-Agent HTTP header. This makes it easier for us to see how the API is being used and optimise it further. A good user agent string includes your project name and possibly the version number, like my-bot/4.20.
Note It encourages you to name a bot. Its not blocking you from getting data. Anyway, an api is intended for automation.
Oh God, you've made a big mistake on this.
I don't think I did, but I give up on the discussion after this line (: I agree with @BenLubar any third party integration is a privacy/legal issue, tried to explain why. Maybe someone else can explain it better.
Regarding your suggestion:
1) All top records need a community verification. Those video links could be posted on forum for verification. All devs need to do on this is add a speedrun verification sub-forum Just as bug reports, post requirements.
If you want a speedrun verification subforum, I am happy to create it. Just say the word.
2) User post their video proofs. Devs do nothing
Sounds fine
3+4) Find some community moderators to do the work. If there is only a few moderators, only verify top records. devs do nothing. Once verified, community moderators will collect record info periodically.
If you can find enough people that are willing to do the job, sure!
5+6) The devs has to find a way to put a verified flag on backed db according to verification results. The devs could assign some trusted community members to do manual marking. Modify The current lb display method s bit. Show The verified mark.
There is no way to do this technically, as far as I can see in the Steamworks Api. Scores are uploaded, there is no way to change information from another source later. Here is the information about SteamWorks Leaderboards: https://partner.steamgames.com/doc/features/leaderboard
Just give me a ping when you want a speedrun subcategory on the forums. If you prepare a text, that explains the rules, we can review it and make it sticky there.
Just give me a ping when you want a speedrun subcategory on the forums. If you prepare a text, that explains the rules, we can review it and make it sticky there.
Before we can put it into practice, i want to post a working workflow, please check if there any blokings.
m_LeaderboardScoreDetails
is used to record details. i don't know which one to modify. But I think this is a piece of cake for devsk_ELeaderboardUploadScoreMethodForceUpdate
in update function.I think it is at least a working approach. It has many problems. But as a demonstration, It can work without much coding works. So i suggest to try it in beta as an experimental feature. Then we can improve the workflow.
I don't see how above can technically work when looking at the Steam SDK. Not without wiping existing leaderboards and a solution for everything mentioned here and on the Steam forums:
https://steamcommunity.com/app/563560/discussions/2/3361397532252356972/#c3761102779887394593
It can work without much coding works. this is a piece of cake for devs The devs have to write
If you think it's such a piece of cake to write it, please go ahead! It's not that I don't want to implement something, but from my point of view, I just don't see above as easy and/or workable solution.
That said, I spent a lot of time repeating myself with basically the same message, which isn't that productive. Stepping out of this specific discussion and leave to to others for now :-)
I don't see how above can technically work when looking at the Steam SDK. Not without wiping existing leaderboards and a solution for everything mentioned here and on the Steam forums:
https://steamcommunity.com/app/563560/discussions/2/3361397532252356972/#c3761102779887394593
It can work without much coding works. this is a piece of cake for devs The devs have to write
If you think it's such a piece of cake to write it, please go ahead! It's not that I don't want to implement something, but from my point of view, I just don't see above as easy and/or workable solution.
That said, I spent a lot of time repeating myself with basically the same message, which isn't that productive. Stepping out of this specific discussion and leave to to others for now :-)
i wrote a working demo, the displaying of lb on other clients is similar to the last verification part. when verifiend, override the existing record using steamwork function. since i dont know how to show messages in chat window, and how to get the info needed, i only write some string to represent them.
I don't see how above can technically work when looking at the Steam SDK. Not without wiping existing leaderboards and a solution for everything mentioned here and on the Steam forums:
currently the game use this functions to upload score
SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount );
in this function, the 2nd parameter eLeaderboardUploadScoreMethod
can be used to force override an existing record.
@BenLubar
Could you please kindly tell me These things, Or give me some hints. I am not familar with the source code and have no idea where to find them.
I am working on integrating the demo code into the source code. The demo works fine but i don't know where to put it into the source code.
The demo repo is posted in previous comment.
Your code cannot work, because:
I don't see how above can technically work when looking at the Steam SDK. Not without wiping existing leaderboards and a solution for everything mentioned here and on the Steam forums: https://steamcommunity.com/app/563560/discussions/2/3361397532252356972/#c3761102779887394593
Need a solution for the trust issue first as described in the forums.
I prefer to not communicate any further here, it isn't productive for anyone. Happy to discuss this on Steam Chat or Discord, maybe that way it's easier to explain why your suggestions will not work without solve other things first.
Regarding make them official, this is the poll we had a while ago:
Happy to discuss this on Steam Chat or Discord,
Both are OK.
Chat was more or less a repeat of what is already said above.
Talked about this, we won't integrate speedrun.com, or do time consuming modifications to the leaderboards for only a small group.
A forum post was created, as well as a page on the site:
The post will be posted into Chinese, when the translation is ready.
This means this issue is handled for now.
Come up with some new possible solutions. Sorry to post them here because i use a phone to edit texts and steam app is unfriendly to long text editing.
I see the current possible solution is to use speedrun.com, But few ssrd players knows the website. It needs recognition and promotion from the devs before it is accepted by the Asrd players. Technically, it can replace or integrate with the game to encourage players to perform runs that can be verified, and discourage/expose those cheaters, further maintaining a good community environment.
There are several solutions to integrate speedrun.com into lb. Followings are sorted based on the works needed.
1st solution. No need to change game logic. But to retrive info from speedrun.com and display it in game.
2nd solution is based on the 1st one:
3rd solution (based on previous one):
4th solution:
5th solution. Integrate with autorecoding.
These solutions don't need much website resources. Perhaps, devs can try to contact/regrouping community members. I think it worth trying.