Problem Description
____ A concise description of your problem here ____
The code running the HOST of a MULTIPLAYER GAME is supposed to keep running in the background, even if it's not in the active tab. This is how C2 games worked for at least the last 3 years (from my experience).
Recently, something changed. Now, if the HOST is not running in the ACTIVE WINDOW, the multiplayer game ceases to communicate position information to synchronize objects. Basically - the multiplayer aspects of the game, halt. This is bad.
Attach a Capx
____ Upload a Capx to this post ____
I tested this using your standard "MULTIPLAYER GAME" example where you control the little dude who shoots, just to confirm it was not my code. It's not my code. You should test with your standard example.
Description of Capx
____ Concise description of what this CapX does ____
It's your code. You know what it does.
Steps to Reproduce Bug
- Step 1: Run your MULTIPLAYER GAME example. Enter an alias. That's now your host.
- Step 2: Run another TAB of the same game. I do this by just cloning the tab, running, and entering a new alias. Then, run a THIRD TAB of the same game. Another alias. You now have three little dudes - the host, and two clients. That's all you need to see the problem.
- Step 3: If you PULL YOUR THREE TABS out so they are separate windows, so you can see them all at the same time. Moving any one of the dudes, causes that dude to move in all three windows. That's how multiplayer works. All good...
- Step 4: If you OPEN ANOTHER TAB so the host tab is hidden, or minimize the HOST TAB... then, move one of the dudes in a CLIENT... guess what - it does NOT move in the other client. Basically, the data from the client to move and synchronize, halted. That's not good. That is a big limitation of the use of Multiplayer. It means if the person running the host changes to another window, everyone is frozen. It also means, making a host that runs efficiently, sitting the background without graphics, is not possible. Big limitation of C2 as a gaming engine with this new issue.
Observed Result
____ What happens? ____
Multiplayer stops sychonizing objects, when host tab is not active.
Expected Result
____ What do you expect to happen? ____
Multiplayer has always synchronized objects when host tab is not active - years and years it worked like that.
Affected Browsers
- Chrome: (YES/NO) YES
- FireFox: (YES/NO) YES
- Opera: YES
Operating System and Service Pack
____ Your operating system and service pack ____
Windows 8 and Windows 10 and OS... basically, any OS where Multiplayer currently works.
Construct 2 Version ID
____ Exact version ID of Construct 2 you're using ____
239 (64 bit) ---- basically, the current stable release.