darkj3ean

HEADLESS mode (MultiPlayer game)

Recommended Posts

Hi I am building a WebRTC multiplayer game. I want to use the HEADLESS mode but it doesn't seem to work? i set rendering  to HEADLESS but it still renders. How do you actually use it?

Also, is there a solution to not stop the update loop when tab change or window is minimized?

If your curious to what I'm doing, here is my progress so far: 

 

Share this post


Link to post
Share on other sites

I've always been curious about headless mode. I use quite a lot of client side information but still have a fully functional multiplayer game. Its turn based though which makes it much easier.

To fix the issue with the game pausing when tabs change etc... the only option I know of is http://phaser.io/docs/2.4.7/Phaser.Stage.html#disableVisibilityChange but it still can pause, for me it happens if I minimize the browser.

Share this post


Link to post
Share on other sites

The update loop pausing when you switch tabs/minimize, etc is a result of Chrome (and other browser) memory management. I'm afraid there's not a workaround that I know of. DisableVisibilityChange does work partially - i.e. if you minimize, it will still resume or if you click another tab or vice versa (forgot which). But I'm pretty sure disableVisibilityChange is not a guarantee for what you want to accomplish (always have the game run regardless of the window state). 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.