Binary Moon Posted August 6, 2014 Share Posted August 6, 2014 Has anybody had any joy with getting cocoonjs leaderboards and acheivements working? Their documentation is poor and has no useful examples so I'm struggling a bit (although I have managed to get the adverts working which is a good start I think). Link to comment Share on other sites More sharing options...
dec0y Posted August 6, 2014 Share Posted August 6, 2014 Just getting started on it myself. Any hints you can give for the advert stuff to get a leg up? Link to comment Share on other sites More sharing options...
Str1ngS Posted August 8, 2014 Share Posted August 8, 2014 So the first thing you do is set everything up in the Play Store, every Achievement and Leaderboard you add has it's own unique ID that you should use for the services. Here a piece of code I used for one of our Projects.https://gist.github.com/AleBles/2b96a572a157a1755f1c In your app you first have to make sure your user get's logged in, otherwise nothing will happen there, after that you just call the correct methods. ps; you obviously need to include the cocoon library in your project Binary Moon 1 Link to comment Share on other sites More sharing options...
Binary Moon Posted August 10, 2014 Author Share Posted August 10, 2014 Str1ngS - that's awesome. Thanks a lot. I have been working on this since I posted the question and have logins working - so it's the leaderboards and achievements I need to add next, but your code makes it a lot clearer. Cheers! Link to comment Share on other sites More sharing options...
Binary Moon Posted August 10, 2014 Author Share Posted August 10, 2014 dec0y - there's a basic tutorial here:http://www.html5gamedevs.com/topic/5224-banner-ads-tutorial-cocoonjs-phaser-html5-game/ However I found that before adding the banner(); call I had to make sure an advert was loaded using 'CocoonJS.Ad.preloadBanner();' dec0y 1 Link to comment Share on other sites More sharing options...
Recommended Posts