andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
563 stars 51 forks source link

[feature request] discord rich presence integration #70

Open bleedforever opened 2 years ago

bleedforever commented 2 years ago

after starting retrojam7 in my favoritest quake source port ever, i alt-tabbed to discord to reply to a message (in linux, if it matters).

to my horror, discord was cheerfully reporting that i was playing Castle of Starthoo — with nary a mention of quake because the displayed label was truncated! worse yet, after changing maps (and seeing the window title update) discord continued informing everyone that i was playing Castle of Starthoo!

unsure of why i found this so embarrassing (but panicking nonetheless) i scrambled to change ironwail's title in discord to display as just "Quake" — and noticed two other entries in the activity status history for ironwail. i guess discord has thought it's been a new game every time i've started ironwail with a unique window title.

anyway, this got me thinking: it would be incredibly sick to have discord rich presence integration, imo. the quake icon instead of the question mark block, the current map name (and other info) formatted all fancy, etc...

andrei-drexler commented 2 years ago

This would be indeed a neat feature, but apparently it would require using an SDK from Discord that isn't compatible with the GPL. There is an older alternative that is compatible, but that's been deprecated, with the last commit over a year ago. Best I can do right now, I think, is to add a cvar that disables the window title stats to avoid confusing Discord about which castle you're in.

andrei-drexler commented 2 years ago

I've added a cl_titlestats cvar for now (fe4349e0e4195b6bb99e7cf3e70de66fbd1d62fd). I think I'll keep this issue open, maybe there is still a reasonable GPL-compatible way to add this feature.

bleedforever commented 2 years ago

thanks so much!

while snuffling around i saw linux-discord-rich-presence which seeeeems to be gpl and decently active? (it's also probably an alright workaround if someone wants a fancy quake discord status!)

bleedforever commented 2 years ago

relatedly, i saw that gzdoom 4.8.0 added discord rpc presence -- i don't know if any of their related commits could be helpful at all, but i figured i'd mention while the issue's open!