Sign in to follow this  
Vivek Agrawal

Minimizing games in Multiplayer

Recommended Posts

Hello,

I am making a multiplayer card game in phaser, the game is targeted for web as well as packaged for iOS and android using cocoon.io.

Now my problem is suppose a player minimizes/tabs the game on browser or minimizes the app then it doesnt affects others, since he is just same as not taking actions so he will either fold or check when timed out, but the problem is when he maximizes again, all the animations (tweens) that were pending, like some1 betting or players drawing cards, or chips going to winner, all of them play at once.

I am not sure how to procede from here. Is there a way to let the app execute the tweens to sprites even when minimized. 

Also I want to know how to find out when the exported app minimizes, i tried adding listener to onPause and onResume, it works fine on browsers but doesnt on exported cocoonjs app.

Thanks

Share this post


Link to post
Share on other sites

The key is that they don't play while minimised, and there are very good reasons for this, apps minimised shouldn’t suck too many cycles (if any) being the main one, the other main one being that it is pointless as no-one can see them and animations are only for the eye.

The problem you really want to solve is how to restore the current state when the window comes back. This will depend on how you've structured your app.

There have been a fair number of these type of questions over the last couple of months, a search will help.

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.