Leaderboard Not Working - Cocoon Plugin

Discussion and feedback on Construct 2

Post » Wed Jun 07, 2017 2:28 pm

Hi All

I am trying to integrate leaderboard in my game by following this tutorial - https://www.scirra.com/tutorials/4802/c ... s-services

Work Done

- I added cocoongoogleplaygames request login under system > On start of layout

Image

- On same event sheet, added the following

Image

- I added the submit score in the game event sheet

Image

- Exported game and compiled it using cocoon.io but ensured the required plugin and game services ID added

Image


Challenge Faced

When i start game, I don't get any prompt for google login hence no leaderboard.

Please any one know what am doing wrong?

Thanks
B
10
S
3
Posts: 17
Reputation: 738

Post » Mon Jun 12, 2017 9:12 am

I was really hoping to get a help from the forum. I know everyone is busy but please if you can, it will be appreciated.

I just need to figure out why the google login prompt isn't showing hence no leaderboard.
B
10
S
3
Posts: 17
Reputation: 738

Post » Mon Jun 12, 2017 2:00 pm

Your implementation looks ok. I think the issue is that you request login "On start of layout". AFAIK the first login request must be manual so under "On tap" condition. Once user logs in then he will be automatically logged in each time he starts the game.
ImageImageImage
B
27
S
16
G
73
Posts: 977
Reputation: 41,173

Post » Mon Jun 12, 2017 2:26 pm

BackendFreak wrote:Your implementation looks ok. I think the issue is that you request login "On start of layout". AFAIK the first login request must be manual so under "On tap" condition. Once user logs in then he will be automatically logged in each time he starts the game.

ah ma ma mia, I see what you mean. Any example of such implementation?
B
10
S
3
Posts: 17
Reputation: 738

Post » Mon Jun 12, 2017 2:28 pm

Just put "Request login" action under some "Log in" button (On tap action, On touch may not work - I'm not sure) in game.
ImageImageImage
B
27
S
16
G
73
Posts: 977
Reputation: 41,173

Post » Mon Jun 12, 2017 2:38 pm

Thanks very much for your help. I will try that out.

Just one more request, I exported game to cocoon.io and installed on my phone. When I get to the game play screen, I see both top and bottom a black screen covering them. Have you come across such in past?

https://cdn-standard.discourse.org/uplo ... 55x500.jpg
B
10
S
3
Posts: 17
Reputation: 738

Post » Mon Jun 12, 2017 2:42 pm

It's because you use Letterbox scale. You should use Scale Outer instead. I wrote a tutorial about that which you can find here http://tobyr.wtfgamesgroup.com/what-is- ... bile-game/

Note that the resolution mention in the tutorial is not very important, it's just about ratio so all you need to do is to center the screen correctly.
ImageImageImage
B
27
S
16
G
73
Posts: 977
Reputation: 41,173

Post » Mon Jun 12, 2017 2:48 pm

Yes I am using Scale Outer for fullscreen in browser. See my settings

https://snag.gy/yPVbje.jpg
B
10
S
3
Posts: 17
Reputation: 738

Post » Mon Jun 12, 2017 3:01 pm

Then I would guess that you lack graphic elements on top and bottom? Try to preview in C2 and resize your browser to have the same ratio as the mobile device you're testing on and see if there are black bars as well.
ImageImageImage
B
27
S
16
G
73
Posts: 977
Reputation: 41,173

Post » Mon Jun 12, 2017 3:10 pm

I thought that was the case before but its fine on all browsers and NW.js. Could the below level settings be the reason, because the loader screen and menu screen are fine except all level screen.

https://snag.gy/YFRShx.jpg
B
10
S
3
Posts: 17
Reputation: 738

Next

Return to Construct 2 General

Who is online

Users browsing this forum: paxto22, Rastacity, Studio Mercato and 9 guests