How do I use google play services in web game?

Get help using Construct 2

Post » Mon Mar 23, 2015 11:28 pm

according to help page about how to make this
https://www.scirra.com/manual/175/google-play
i found this
For example, the completed Authorized Javascript origins could list:
http://www.mywebsite.com/games/myawesomegame
http://localhost:50000
http://192.168.1.3:50000


but Google didn't allow me to use subdir ! so i cant make the link of javascript origin like this: http://www.mywebsite.com/games/myawesomegame

so please how can i make it works ?

another problem:-
I'm using iframe to publish the game on my site and so there is 2 links for the game, the original index.html path and the published page contains the iframe so it's very complicated to figure out how to make it
thanks for help
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 24, 2015 12:16 pm

I believe you need to supply domains (and ports if need be) not full URLs

Your javascript call originates from:

http://www.mywebsite.com
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Mar 24, 2015 1:44 pm

@lennaert
Thanks, it worked :) very nice
the problem now is that i can sign in but there is no leaderboard, i've no idea how to show leasderboards and achievements on web games
take a look please on my game
http://egyptoon.net/propagandagame/
and tell me how can i display leaderboards and achievents just like on mobile phones using GooglePlay plugin
or there is no simple way to do that on web games ?
on mobile i just use phonegap game plugin and choose : Show Leaderboard or Show achievements when the player click the button.
Thanks alot for your help
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 24, 2015 2:28 pm

Are there scores already then ?


Normally, when you created a new leaderboard, I call it "ÿou need to fiddle" lol

You need to submit some scores, and not just from your developer account. (not 100% certain about this, but I read it somewhere, and started using it to get my leaderboards activated quicker)

The thing ism when you create the leaderboard on google, it takes a bit before it works.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Mar 24, 2015 2:51 pm

@lennaert
The leaderboard is already working on mobile phones and have 2000 players! shall i create another leaderboard for web version ?!
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 24, 2015 4:11 pm

You could.

I would if the game play varies alott, ie, perhaps on 1 type of device the gameplay is easier .... otherwise ... just keep it the same :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Mar 24, 2015 4:11 pm

You could.

I would if the game play varies a lot, ie, on 1 type of device the gameplay is easier .... otherwise ... just keep it the same :)
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Tue Mar 24, 2015 4:43 pm

Thanks
I'll try creating another leader board and use its ID in the game and re-upload it.
but what about achievements ?!
I can access achievements using the Google Play plugin such as "set text to the count of achievements" and it works, but i can't show the achievements itself in just one action as on mobile phones!
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 24, 2015 4:46 pm

and yes BTW :) the web version is much easier to play, because the performance of PC is much much better, no lags at all :) lag can make the player loose :)
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 24, 2015 5:36 pm

Haha, yeah, then its wise to add another leaderboard ;)


About achievements, you have to request them first, and iterate through them from what I remember. I dont use them as much.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572


Return to How do I....?

Who is online

Users browsing this forum: Blendi1223, farsen, gskunk, R0J0hound and 54 guests