Sign in to follow this  
turnA

Remove Any Phaser Process when Visibility Hidden

Recommended Posts

Hi there,

Just a little background info. I try to submit my HTML5 games for TIzen smartwatch.
After some review process, my games got rejected because they detected that my games still using 12~24mA electricity when screen off/sleeping. Any application/games shouldn't be above 4~7mA when the device is sleeping, so they assume there is problem with my games when sleep/wake up.

I'm not using any special code from phaser regarding visibility change, I left all of them at default.
Is there any way to make sure that Phaser doesn't process ANYTHING at all when the screen is hidden (because screen off/sleeping)? I need to change the source code maybe?

Thanks

Share this post


Link to post
Share on other sites

Bump.

From reading source code, I realize the main controller of game loop is the game.raf . I assume that by stopping game.raf, I will totally stop any Phaser internal game process, is that right?
Can I safely call game.raf.stop() and game.raf.start() when I detect screen change?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.