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

Web support #128

Open
erperejildo opened this issue Nov 27, 2023 · 6 comments
Open

Web support #128

erperejildo opened this issue Nov 27, 2023 · 6 comments

Comments

@erperejildo
Copy link

Is this possible? If so, any plans to add it in the future?

@theLee3
Copy link
Collaborator

theLee3 commented Nov 28, 2023

This is not possible as there is no access to the Play Games or Game Center SDKs via web.

@Abedalkareem
Copy link
Owner

I think for web we can use Google play game services Rest API, or any other wildly used service if there is any. I'll do some research and see, and if someone knows a good one that will be good.

@erperejildo
Copy link
Author

I think for web we can use Google play game services Rest API, or any other wildly used service if there is any. I'll do some research and see, and if someone knows a good one that will be good.

Maybe this helps google/googleapis.dart#583

@theLee3
Copy link
Collaborator

theLee3 commented Nov 30, 2023

According to the docs, the REST API is intended for server side access for an Android client.

That is not to say that a solution couldn't possibly be built around it, using the API & GoogleSignIn but it may violate the TOS. Plus, it would only be available for Google Play Games users, which could be a downside.

I would suggest people wanting web game achievements use a backend like nakama or roll a leaderboard/achievement system with Firebase or a similar service. Then you can allow sign in with various auth providers, with no risk of alienating an audience.

@erperejildo
Copy link
Author

erperejildo commented Nov 30, 2023

According to the docs, the REST API is intended for server side access for an Android client.

That is not to say that a solution couldn't possibly be built around it, using the API & GoogleSignIn but it may violate the TOS. Plus, it would only be available for Google Play Games users, which could be a downside.

I would suggest people wanting web game achievements use a backend like nakama or roll a leaderboard/achievement system with Firebase or a similar service. Then you can allow sign in with various auth providers, with no risk of alienating an audience.

As they mentioned, Google Play Games is also available now for PC. Why would it violate the TOS?

@theLee3
Copy link
Collaborator

theLee3 commented Nov 30, 2023

Google Play Games on PC is uses virtualization to play Android Games on PC via some degree of Android emulation. It was implemented to compete with macOS's ability to play iOS games (only available on Apple silicon). You are still playing an Android game with access to the Android Play Games SDK if implemented.

Not quite the same as building for a different platform altogether and trying to integrate it. I don't know for sure that it does violate the TOS, but it certainly isn't within their intended scope of the service.

It may not even be isn't possible (see below) given that Play Games Services is tied so closely to the Play Store. PGS management occurs through the Play Store, including client app credentials. In fact, the docs state that the use of the Play Games Services SDK is still required. You must login through it, then request a server auth code, which is then used to allow your server to act as an intermediary between the client app and PGS.

A user cannot authenticate with PGS without the SDK. This is required to acquire a server auth code that your backend can then use to make API calls.

UPDATE: After digging around, it is incorrect to say that Google Play Games support on the web is not possible. However, it still requires the implementation of server side calls to PGS. Therefore, I do believe it is outside of the scope of this package.

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

No branches or pull requests

3 participants