Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: support Discord's Rich Presence API #6913

Closed
aph3rson opened this issue Sep 23, 2018 · 7 comments
Closed

Request: support Discord's Rich Presence API #6913

aph3rson opened this issue Sep 23, 2018 · 7 comments

Comments

@aph3rson
Copy link

@aph3rson aph3rson commented Sep 23, 2018

Support for the Discord Rich Presence API should be implemented, such that a user can see the status of another user's OpenTTD game.

Some potential things to display in RP:

  • Single/multi-player (+ server name)
  • Current year
  • Landscape/map size

Additionally, supporting the join capability would be a value-add. This may require some discussion, as there's two ways to implement this - either a join button in the Discord client, or an "ask to join" button on the client, which pops an in-game message to invite the other user to the server. With password-protected servers/companies, we should consider exactly where the join functionality should take them - there's no way to have both a join and a ask-to-join button at the same time. My current thoughts would be to have a join button for servers without a password, and an ask-to-join button for those that do.

More information:

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Oct 6, 2018

Thank you for your suggestion. Currently we have no plans of adding this functionality (neither for other platforms like Steam, Twitch, etc). But we always welcome contribution, and if you feel up to it, we are more than willing to look at any Pull Request that might enable this.

@TrueBrain TrueBrain closed this Oct 6, 2018
@bennyman123abc
Copy link

@bennyman123abc bennyman123abc commented Apr 18, 2019

I am working on taking this on. It should be ready eventually.

@carterdacat
Copy link

@carterdacat carterdacat commented Aug 29, 2020

@bennyman123abc any updates lol

@bennyman123abc
Copy link

@bennyman123abc bennyman123abc commented Aug 29, 2020

Wow, I completely forgot this issue existed. I supposed I could see if I did anything with this when I get home. Ping me again Tuesday at 10:30 AM CST

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Aug 29, 2020

I did some work on this a good while ago, based on the idea that a rich presence API might involve code that can't be linked into OpenTTD itself due to licensing, so it requires an external dynamic library to be installed.
OpenTTD branch: https://github.com/nielsmh/OpenTTD/tree/rich-presence
Library for Discord support: https://github.com/nielsmh/ottd-discord

@bennyman123abc
Copy link

@bennyman123abc bennyman123abc commented Aug 30, 2020

Thank you for your contributions, Niel! I will do a bit of research on including the SDK DLL in a project, and I can contact the Discord legal team if I need to.

I will get back to you and let you know if we need to bundle the repositories separately, or if we can include the DLL in the game without issue.

Thank you!

@nielsmh
Copy link
Contributor

@nielsmh nielsmh commented Aug 30, 2020

One important point that isn't solved with code is that to implement the Discord API in the game, OpenTTD needs to be registered as an organization with Discord to get API keys, and someone within the project needs to be owner(s) in that org. Without that it isn't becoming an official feature either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants