Help: Achievement Notification

Hello there,

I would like to know what is the best approach in this kind of instance. If you played “Subway Surfers” they have set of achievements where you have to fulfill a certain condition to unlock it. And when that happens, the game have some sort of pop up above the screen where it tells what achievement you finished. My problem is I want to re-create that pop up above the screen event.

Temple Run have it also(not sure though), Zenonia 1-5 uses that method too.

Any suggestions is very helpful.

And If you know how to do it, please tell me how.

Thanks in advance,

Jam

If you are using storyboard then you can use storyboard.showOverlay()

Firstly Thank you JonPM for the reply.

Yes, I do use storyboard api, but I don’t know how to do the transition effects. Like it slide from the top, and after 5 sec it will go up again.

Everytime I do the showOverlay it always go in the middle of the screen.

I think you might be more referring to Game Center achievements. There is a tutorial on this that was very helpful:

http://www.coronalabs.com/blog/2012/01/17/tutorial-game-center-integration-ios/

Thanks for the reply Panc, I’m only building for Android(I know it sucks, i’m just a student and I do not own the fancy Mac T.T)

I don’t understand what you want exactly.  Can you please make your question clearer?

Since you’re only developing for Android, Rob put together a great tutorial on Google Play achievements:

http://www.coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/

With storyboard, you could use a “slideDown” transition.  In the enterScene() function add a timer that would call storyboard.hideOverlay() after a few seconds.  There is a bug in hideOverlay though that it doesn’t do any transitions away.  We are fixing this in storyboard 2.0 but it’s not quite ready yet.

I however would not add the overhead of a storyboard scene for this.  It’s easy enough to create a display group with your achievement information in it, position it off screen at .x = 0 - 1/2 height of the group, use transition.to to slide it down.  On it’s onComplete, run a function that starts a timer that calls another transition.to to move it back off screen and potentially destroy it in an onComplete function. 

This would be hyper easy to put into a small external module too.  Hmmm idea for a blog post…

Thanks rob! that does the trick! but when the the overlay is shown and I quicky press a button that goes into a next scene, the achievement pop stucks on the screen. I even put storyboard.hideOverlay() on the exitScene of both scene(the one that calls the pop-up and the one that I go to), but no effect.

Make sure you’re display objects are in the overlay scene’s display group.  Look for errors in the console log.

Thanks rob! I forget to remove the display group when they exit, thanks :slight_smile:

If you are using storyboard then you can use storyboard.showOverlay()

Firstly Thank you JonPM for the reply.

Yes, I do use storyboard api, but I don’t know how to do the transition effects. Like it slide from the top, and after 5 sec it will go up again.

Everytime I do the showOverlay it always go in the middle of the screen.

I think you might be more referring to Game Center achievements. There is a tutorial on this that was very helpful:

http://www.coronalabs.com/blog/2012/01/17/tutorial-game-center-integration-ios/

Thanks for the reply Panc, I’m only building for Android(I know it sucks, i’m just a student and I do not own the fancy Mac T.T)

I don’t understand what you want exactly.  Can you please make your question clearer?

Since you’re only developing for Android, Rob put together a great tutorial on Google Play achievements:

http://www.coronalabs.com/blog/2013/06/25/tutorial-introducing-google-play-game-services/

With storyboard, you could use a “slideDown” transition.  In the enterScene() function add a timer that would call storyboard.hideOverlay() after a few seconds.  There is a bug in hideOverlay though that it doesn’t do any transitions away.  We are fixing this in storyboard 2.0 but it’s not quite ready yet.

I however would not add the overhead of a storyboard scene for this.  It’s easy enough to create a display group with your achievement information in it, position it off screen at .x = 0 - 1/2 height of the group, use transition.to to slide it down.  On it’s onComplete, run a function that starts a timer that calls another transition.to to move it back off screen and potentially destroy it in an onComplete function. 

This would be hyper easy to put into a small external module too.  Hmmm idea for a blog post…

Thanks rob! that does the trick! but when the the overlay is shown and I quicky press a button that goes into a next scene, the achievement pop stucks on the screen. I even put storyboard.hideOverlay() on the exitScene of both scene(the one that calls the pop-up and the one that I go to), but no effect.

Make sure you’re display objects are in the overlay scene’s display group.  Look for errors in the console log.