v.175 - Text variables don't sync for multiplayer

0 favourites
  • 4 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Problem Description

    Text variables don't sync with the multiplayer object. At one stage they did, except for one specific variable. Then, with no change to events at all, none of the text variables sync. So I recreated in minimal capx to make sure. (As a side note, it would be great if we could also sync booleans!)

    Attach a Capx

    Attached!

    Description of Capx

    Press anywhere on layout1. Open game in a different browser and do the same. When they log in and join rooms, it will go to layout2 where the host will change the variables of the array. In the debugger you will see that only the number variable syncs, the text variable stays blank for the peer.

    Steps to Reproduce Bug

    • Step 1: Load game in browser, press anywhere in the screen.
    • Step 2: Load game in a different browser, press anywhere in the screen.
    • Step 3: Observe results of array variable syncing in the debugger.

    Observed Result

    Text variables don't sync.

    Expected Result

    Text variables sync.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Nodewebkit (preview): Yes
    • Internet Explorer: N/A (can't connect with MP at all)

    Operating System and Service Pack

    Windows 8, and don't know sorry.

    Construct 2 Version ID

    175

  • This is currently by design (although it appears to be missing from the manual so I'll update that).

    Streaming text values is an easy way to design inefficient games that waste tonnes of bandwidth. 'Sync instance variable' only supports numbers. To synchronise text variables, use the message sending system.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley Okay, thanks for the reply. Would you have any advice as to the best way to do this? I have lots of ideas, but worry about efficiency.

  • Just broadcast a message from the host whenever it changes to something different. The important thing for efficiency is not to send any messages when nothing is changing, and not to change the variable constantly, or if you have to, to rate-limit the messages that are sent out (e.g. 10x a second instead of every tick).

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