pegasus-frontend icon indicating copy to clipboard operation
pegasus-frontend copied to clipboard

Create a "view game achievements and progress" screen/menu/popup

Open nwildner opened this issue 7 years ago • 7 comments

I know this sounds silly, but it would be awsome if pegasus could handle the GetGameInfoAndUserProgress( 'user', game_id ); function from retroachievements API. Pressing a button could show earned achievements and total progress on that game :)

Login information is stored at /opt/retropie/configs/all/retroarch.cfg on RetroPie as an example.

nwildner avatar Jun 20 '17 17:06 nwildner

Sure, a basic integration wouldn't be hard, I could imagine a profile page or even showing the user's feed. But for the games, Pegasus needs to match the platforms and games to the numeric ID used by retroachievements, and that likely can't be automated. But if there'd be a RA Game ID tag in the game list file, then yeah, it could be picked up and used by the frontend.

mmatyas avatar Jun 21 '17 09:06 mmatyas

Isn't the resolution between gameID, consoleID and game hashes(cause it have to checksum to see if it's not a "tampered" rom) handled by retroarch already(this thread)?

I'm asking this cause i'm no programmer, but i work with IT :)

Maybe cheevos.c could be of a help?

Thanks for your hard work on this amazing frontend

nwildner avatar Jun 21 '17 17:06 nwildner

It seems to me that the game detection happens in the individual cores, not in retroarch. Looks like it just provides a common API for them. But anyway, Pegasus doesn't calculate file hashes during runtime (that'd have some performance cost), it just uses the existing game list files and assets. You may use it for managing PC games, or non-libretro emulators too, or have systems that use eg. directories as a game, not files.

What could accurately recognize a game, in my opinion, is a scraper, as it could calculate hashes, may already have a list of known games, and could add such IDs to the game list file.

cc @sselph

mmatyas avatar Jun 22 '17 08:06 mmatyas

@mmatyas you can get the game id "on demand" using the ROM hash. This is the way RetroArch does.

meleu avatar Jul 16 '17 20:07 meleu

Or if you know a bit of Python, you can study what @neilmunday did with the Pi Entertainment System (PES) GUI. Here is the source code if you want to dig through it.

ghost avatar Aug 01 '17 19:08 ghost

Thanks! I'd still prefer if such mapping would be done by a scraper though, as it has direct access to the ROM files and can more easily find out the game IDs. Pegasus just shows the already found metadata, and while an on-demand ROM hashing could be done (including unzipping, skipping headers for some platforms, etc.), in my opinion it doesn't really worth it doing every time, when one could just store the ID in a file. Nevertheless, it's always useful to see how others handle it, so I'll take a look.

mmatyas avatar Aug 02 '17 08:08 mmatyas

Hi. When PES runs its ROM scan, it calculates the Retro Achievements checksum of each ROM found for the systems that Retro Achievements supports. This checksum is saved in the PES database alongside the other meta data for a ROM. If a user has opted to add their Retro Achievements details to PES then they can opt to update their achievements from the PES GUI. For this scan the check sums in the database are used to look up the user's achievements from RetroAchievements.org. You may be interested in https://github.com/neilmunday/pes/blob/master/src/rasum/rasum.c which I created based on RetroArch's cheevos.c file. "rasum" is the program that PES uses to get the check sum for a ROM. Hope this helps.

neilmunday avatar Aug 02 '17 18:08 neilmunday