Multiplayer: local string variables don't sync

0 favourites
  • 6 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hello fellas,

    Ashley

    Don't know if it's bug or feature or I'm doing something wrong, but local string variables do not get synced.

  • Currently only number variables are coded to be synced. I'm not sure it's worth syncing text variables, since they can be variable length, don't conveniently fit in to the binary updates, and could easily waste loads of bandwidth. Could you compensate with sending messages?

  • Sure I can easily work around that, just noticed it.

  • Currently only number variables are coded to be synced. I'm not sure it's worth syncing text variables, since they can be variable length, don't conveniently fit in to the binary updates, and could easily waste loads of bandwidth. Could you compensate with sending messages?

    And I do not work message. When the client is connected and connected server room and login and I send a message to the host but the host can not receive the message.

  • There is a problem with On Peer Connect> Send Message, as it doesn't process the information until after the objects are synced.

    If you look at the multiplayer demo, as a peer joining a host everything is destroyed and then respawned. if you put a message event in the On Peer Connect, the peer's events won't see it. If you put a wait 0.001seconds before the message, it does.

    It's probably the same problem that the peer is having on-connect, where when it sends the message is too early

    Since I do not like relying on a 0.001 wait just in case there is an issue and it doesn't execute, I've made a SERVER object that only the server keeps. Then for the Peer event group, have a On created: SERVER> Send message requesting a response

    This way the host receives the request, then sends the sync afterward.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thndr little misunderstood but the source can show an example

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