Google Play Games Services for Web - How can I search for players by gamerId? - google-play-services

I am developing a turn based web game using Play Games Services for Web. According to the docs, I can invite other players when a user creates a match setting the invitedPlayerIds property in turnBasedMatches.create. The problem is that I am not able to implement any player selection method (players.list always returns an empty list, no matter if I look for connected or visible states).
Now that Google has implemented Gamer ID, is there any API to look for players by gamerId in the same way that the Play Games Android app lets the user find players and get their playerId to invite participants to the match? Or is there another way to look for players (email, contacts,...)?

Related

How to get to Google Play "Multi-Player Games" section with my game?

I have a multiplayer game distributed through Facebook, AppStore, and Google Play. I want my game to be listed in the "Multi-Player Games" section of the Google Play market.
How should I do this?
Is it enough to add related Google Play Game Service (multiplayer) and my app will appear in the multiplayer section of Google Play?
And also, we do not apply the Google API for implementing our game's multiplayer features, instead we use SmartFox Server. Is it acceptable, or does Google only list games built on its own multiplayer platform in the Google Play multiplayer section?
To enable multiplayer support:
Open the Games with Game Services page from the Google Play Developer Console, and select your game.
Open the Linked apps page for your game, then switch the multiplayer setting to ON.
Click Save as draft to store your settings.
You can publish an app which can be shown in the multiplayer games category even without using google play game service. Just make sure that you chose the correct options in the google play console when publishing your app.
Here are the specific options that you need to set under content ratings:
you must select the Games category.
To make it multiplayer, you must answer one of the questionnaire that asks whether users can interact with other user to yes.
The game services tab setup is not required. You only need to set it up if you use the Google Play Games Services to build your game.

Matches across different apps of a Game Center group

I have a free app (with ads) that allows players to play online games through Game Center.
Now I want to create the ad-free (paid) version of the app. So I create a Game Center group and move there all my leaderboards and achievements.
The problem is: can a player of the paid app play against a player of the free app? I'm using Game Center only, no server of my own. From a few quick experiments, it seems that the two apps live on two parallel worlds, and if one uses the classical findMatchForRequest:withCompletionHandler: one can only find matches within the same app and not across apps in the same group.
Is there any way around this?
It is actually possible to address this issue in a rather simple way, although it was not so evident what to look for.
The Game Center Programming guide actually states that "You can create distinct games (with different bundle identifiers) and still allow them to play against each other."
So you have to click "View Details" of one of your apps. There, if you have enabled Game Center for your app, edit "Multiplayer Commpatibility" and add the other app to the list.
Now you can play matches across different apps.

Forgotify vs track play count in Spotify API

There's lots of buzz about Forgotify (http://forgotify.com) - a tool, that crawls Spotify against unplayed tracks.
Non-technical press articles say that they use Spotify API to crawl the songs and index only those with zero play count.
However, according to Spotify API documentation, such value is not available for single tracks:
https://developer.spotify.com/docs/apps/api/1.0/api-models-track.html
Similar question about possibility to retrieve track play count has also been answered here on StackOverflow (Get play count of a track from Spotify API) with similar results - that it's not possible.
I'm looking for a clue how Forgotify achieved what they claim they did. Any ideas? :)
The metadata api and libspotify provide the popularity score for songs. Perhaps they searched for tracks with popularity of zero. I don't know that zero popularity implies zero plays though.
They also could have implemented a remote control of the desktop client with some screen scraping. Or reverse engineered whatever internal communication the desktop does (though I suspect Spotify would have put a stop to that).

Can I use the Spotify recommendation intelligence in an app?

On the Spotify dashboard an user has a great experience through the recommended artist and songs. I would like to use this intelligence in an app we plan to develop for a big Dutch based podium. So the app can give a list of concerts playing at the poppodium which the user might be interested in.
Can I get this recommended artist data, based on the user's history, through the Spotify API?
The Spotify API now provides recommendations:
https://developer.spotify.com/web-api/get-recommendations/
Recommendations are generated based on the available information for a
given seed entity and matched against similar artists and tracks. If
there is sufficient information about the provided seeds, a list of
tracks will be returned together with pool size details.
For artists and tracks that are very new or obscure there might not be
enough data to generate a list of tracks.
There are a bunch of parameters that can be configured for fine-tuning the recommendation: key, genre, loudness, energy, instrumentalness, popularity, speechiness, danceability, key ...
You can use Spotify's Web API endpoints to fetch these data:
The Get a User’s Top Artists and Tracks endpoint will give you artists and tracks based on user's listening history. You can also use the Get Current User’s Recently Played Tracks, which will give you up to 50 recently played tracks.
Use the artists and tracks you just get and use them as seeds for the Get Recommendations Based on Seeds endpoint. This endpoint will only return tracks. If you want to get artists based on other artists there is the Get an Artist’s Related Artists endpoint that you can use.
As you see, combining multiple endpoints will get you covered. Just make sure you read the Web API Authorization Guide before. You are going to need the user to authenticate in order to get user's data.
Note: When the question was first posted (July 2013), Spotify's Web API didn't exist. The question referred to a now defunct Spotify Apps API which didn't provide a way to generate recommendations based on listening history.

Xbox and ps3 API

I have been asked to create a site on which users can invite each other to play a game on a specific gaming console (X-Box or PS3 for example). If the players do meet online and play, the site needs to monitor which of them won - then distribute prize money to the winner.
Can anyone point me toward a reference for monitoring the gaming results through some kind of API on these various platforms?
I can't speak for PSN or the PlayStation 3 (although I assume it works very similarly), but for the Xbox 360 and Xbox LIVE:
There is no single API that will enable you to access wins/losses for every multiplayer title - each title would need its own individual API.
Very few developers provide public APIs for their games with statistics for wins/losses.
Microsoft does provide registered developers (and some community members) with access to some Xbox LIVE APIs (which provide achievement, game, and profile related data).
So, what you want to build is not possible using APIs unless:
You are only tracking stats for one specfic game which does have a public (or otherwise accessible to you) API; OR
You are a registered developer and have access to some NDA APIs which provide the information you seek (for example, leaderboard information for XBLA titles, achievement/trophy data, etc.).
You may need to find some other method for verifying the winner.