hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.03k stars 2.15k forks source link

Fetch Game Cover For Discord Rich Presence #19423

Open Overimagine1 opened 2 weeks ago

Overimagine1 commented 2 weeks ago

What should happen

PPSSPP should fetch the games box cover from a service like IDGB for it's rich presence. You are able to use image links for rich presences.

I have made a quick mockup of what this could look like. I've also made it so it uses the game title instead of "PPSSPP" as you can also change the title of the rich presence. image

Who would this benefit

This is more of a QOL change so the benefit would be small but nice. Discord users who see the PPSSPP rich presence. It is much quicker to recognize the cover art for a game and realize it's the game rather than just the title and the PPSSPP logo. It also just looks a lot nicer.

Platform (if relevant)

Windows, MacOS, Linux

Games this would be useful in

All

Other emulators or software with a similar feature

No response

Checklist

hrydgard commented 2 weeks ago

What are the terms for using images from there? How does it work with copyright? Can we put unlimited load on their servers? (If we can, we could display covers on the games tab...)

Last I checked that site didn't have PSP games, but that was years ago, now it seems it does.

anr2me commented 2 weeks ago

Based on the FAQ, they only interested with data available publicly that can re-distributed, so may be there is no copyright issue?

Yes. If you have data that we think will complete the overall IGDB data set and you are willing to share that data with us, we can opt for this approach instead. Please be aware, however, that we are only interested in publicly available data that we can re-distribute using this API.

Overimagine1 commented 2 weeks ago

Can we put unlimited load on their servers? (If we can, we could display covers on the games tab...)

Seems to be 4 requests a second. If you're gonna display covers on the game tab it doesn't seem to be an issue if you can download the images needed onto the users PC.

anr2me commented 2 weeks ago

4 requests for a single PPSSPP instance might not be an issue, but if it was limited to 4 requests for all PPSSPP users worldwide trying to run PPSSPP at the same time, will certainly cause issue (some of them might get 429 Too Many Requests error).

However, it's less likely to happen except when a group of players agreed on playing multiplayer at the same time, but that won't happened at the exact same second, and we can always retry a few seconds later (may need to give delay before the next request to prevent naughty players from intentionally floods the server with requests) when a player goes to Games tab again.

MrWrightyLC commented 1 week ago

I know it's not the same, but wouldn't it be more convenient to implement something similar to what PCSX2 did? https://github.com/PCSX2/pcsx2/pull/11730

hrydgard commented 1 week ago

Oh, that's a pretty cool idea. The retrochievements game icon will be cached anyway if you have it enabled and are playing the game, so no additional cost (other than code implementation time...) ... but of course will only work if you are actually using retroachievements and the game is supported.

anr2me commented 1 week ago

Yeah, it looks better, since it can even shows you at which part of the game you're (eg. Main Menu). Someone will eventually request for this :)