romm icon indicating copy to clipboard operation
romm copied to clipboard

[Feature] Retroachievements

Open BumbleCast opened this issue 1 year ago • 2 comments

Thanks for you amazing work. I really like the rom manager. I think a great improvement would be the integration of retroachievements (https://retroachievements.org/) for a handy overview within romm.

BumbleCast avatar Mar 11 '24 11:03 BumbleCast

We did some analysis on this in another ticket related to an open PR so putting it here to give more information around what has been discussed.

A community user has already done most of the work/analysis around this as part of #1142 which shows better than I could an example of how it could be implemented as a tab and be hooked up.

Describe the solution you'd like I would like to see optional settings for users to be able to hook it up to their account: example ra admin

As well as the front ends to be able to show achievement information within tabs if enabled: example ra tab

Both these images were taken from the PR mentioned #1142 and that contains more implementation ideas and information.

I would also like to be able to see if the Rom provided matches any of the hashes that RA support, which can be requested from their API at the following endpoint: https://api-docs.retroachievements.org/v1/get-game-hashes.html. It would be good to show this maybe as an icon next to Roms that this is a supported Rom as well as somewhere within the tab, but it is up to the implementor how they deem it best to visualize this information.

Additional context I would say this task can be broken down into different chunks which would all build on top of each other but provide an avenue to implement bits without a big bang approach.

  1. Add ability to add an api key for RA to the system
  2. Add user agnostic game achievement information tabs
  3. Verify hashes against RA hashlist to see if a game is compatible and visualize result
  4. Add ability for users to add their RA username in their romm settings
  5. Pull in user specific progress for achievements on game achievement tab information (task 2)

Again the PR #1142 already does a lot of this and may be able to be worked on top of or at least used as a basis to formulate a new approach to implementing this functionality as that already does majority of what is being requested. There is also an older request #628 which requests part of the visualization asked for here.

This work also adds the basis to be able to support runtime achievement integration with RA via EmulatorJS (which is already in play but low priority for them (https://github.com/EmulatorJS/EmulatorJS/issues/589)[https://github.com/EmulatorJS/EmulatorJS/issues/589])

grofit avatar Jan 31 '25 18:01 grofit

Also so some discord discussion information isnt lost to time, I spoke to the devs of romm and RA and it feels like one major blocker currently is:

  • Given a rom file, how do we link it to an RA id?

There will probably need to be a manual way of letting a user override or provide an id, but currently there is no way to get an RA game id from a given hash/filename via the RA API. This was confirmed by the RA devs, and there was discussions on both sides about how to best convert the information romm has into a workable id and thats still a discussion point.

Two main bits of information though that came from this were:

  • There is currently a spike looking at using https://hasheous.org/ as a way to push the hash/file resolution to a game id into this service and have this provide it
  • There is actually a way to convert a hash into a game id with RA which is what emulators use behind the scenes, but you go via a more locked down private API (dorequests) that you provide an approved user agent to, with the hash (looks something like

POST <the-dorequest-url>?r=gameid&m=1bc674be034e43c96b86487ac69d9293 -> { success: bool, gameid: int}

The RA team seemed open to possibly adding a hash -> gameid official api endpoint but it was queried if this could just be achieved via batching and caching the all games endpoint, which could work but there was some debate as to if this is a good fit.

Anyway if any more information comes about from discussions on the topic I will try to keep it up to date in here.

grofit avatar Jan 31 '25 18:01 grofit

Hi just throwing in my support for this idea. I think a whole tab and achievement view is a cool idea for sure but even just a dang indicator on the game that confirms it is compatible with an RA set would be so nice. I would donate to the cause to have this feature. As of right now, it would be the easiest way to check the hashes on your entire library of roms. KEEP GOING ITS SO GOOD THANK YOU

milktoastrat avatar May 21 '25 01:05 milktoastrat

Retroachievements integration is already merged and will be available in the next release ;)

This is how it looks https://github.com/rommapp/romm/pull/1858

zurdi15 avatar May 21 '25 06:05 zurdi15

YES! I cannot wait. Thank you!

milktoastrat avatar May 21 '25 13:05 milktoastrat

Retroachievements integration is already merged and will be available in the next release ;)

This is how it looks https://github.com/rommapp/romm/pull/1858

That's excellent news, when is the next release?

Cereal916 avatar May 21 '25 16:05 Cereal916

Retroachievements integration is already merged and will be available in the next release ;) This is how it looks #1858

That's excellent news, when is the next release?

First alpha soon, final release no date

zurdi15 avatar May 21 '25 16:05 zurdi15

Retroachievements integration is already merged and will be available in the next release ;) This is how it looks #1858

That's excellent news, when is the next release?

https://docs.romm.app/latest/Miscellaneous/FAQs/

I was afraid to ask haha

milktoastrat avatar May 21 '25 17:05 milktoastrat

Just wanted to say thanks for this feature - I'm stoked to try it when I have a chance to backup and update!

truevox avatar Jun 03 '25 01:06 truevox

Finally closing this as this was shipped with release 3.10.0 !!

zurdi15 avatar Jun 11 '25 16:06 zurdi15

I have a hard time understanding this feature.
When i add my own API-Key from RA to the configuration of ROMM, then how this can be "user-agnostic"? Wouldn't every user have to input his or hers own API-Key so that it works?
Will all users of the ROMM-Server just see the achievemets of one user? The one that provides API-Key? How does this work exactly?
Upgrading the documentation with a little more information would be also nice generally.

Thank you in advance for answering

dotbanana avatar Aug 20 '25 01:08 dotbanana

Under your profile in romm, there's a section to enter your RA username. Do that, hit sync, and it'll use the RA API key to pull that user's achivements.

gantoine avatar Aug 20 '25 02:08 gantoine

Do that, hit sync, and it'll use the RA API key to pull that user's achivements.

Ahh i see, thanks for answering me.
So when a user logs in into ROMM, puts there his RA-Username, it just pulls the achievements (using the API-key i provide as admin), but this user cannot play in EmulatorJS and earn and push achievements back to RA, correct? Is this feature i describe maybe planned, because in this format as it is now i see only limited use. But I assume EmulatorJS would need its own integration of RA.

dotbanana avatar Aug 20 '25 09:08 dotbanana

Ahh i see, thanks for answering me. So when a user logs in into ROMM, puts there his RA-Username, it just pulls the achievements (using the API-key i provide as admin), but this user cannot play in EmulatorJS and earn and push achievements back to RA, correct? Is this feature i describe maybe planned, because in this format as it is now i see only limited use. But I assume EmulatorJS would need its own integration of RA.

Yes this is exactly how it works, it's just an achievements displayer. About integrating RA into emujs you will need to ask them, but I don't think it's planned for now

zurdi15 avatar Aug 20 '25 10:08 zurdi15