How do I handle the pause on unfocus in a multiplayer game ?

0 favourites
  • 3 posts
From the Asset Store
The official Scirra Multiplayer Signalling Server for helping peers find and connect to each other
  • Hello,

    I'm currently making a realtime topdown shooter. The project is pretty well advanced, but here are my "issue" :

    Right now, I'm using the NW.js export with an updater to distrube my game. It's good, but I'd like to be abble to play it in my browser. But...

    If I switch tab in a browser, the game pauses (obviously that's normal and can't be turned off for performance issues) but this mess up my realtime game timers.

    Do you have any tips to handle this ?

    Thank you

    Here is the game if you want to check it out : https://www.dropbox.com/s/p0brxh4pnqftfuv/BRikette_Setup.exe?dl=1

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This is not really a solution since as you said c2's functionalities can't really help you, but have you considered a "kick" from the current session ? Or maybe another less aggressive solution would be once each 10-20 mins for example, to place the player in a safespot until he comes back, so if they abuse it and do it more than 1 time each x minutes, they get somekind of penality the more they do it, or they may get kicked or instakilled, you choose. This way you also trigger the penality if they don't move for x minutes to prevent afk players.

  • Would just getting the difference between your time and another player's time and adjusting the timers based on that work?

    If adjusting timers won't work or is too much trouble maybe you could increase time scale to some high number until current time matches other players.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)