xoros's Forum Posts

  • Ok, now I get it. The whole syncing functionality is only for real time action games with moving objects, shooting etc. I will build everything with "send message". But frankly speaking it's a bit pitty, that you can't use syncing for turn based stuff.

    In my case the text box is used to show the turn time. It has timer behavior in it. I used variable to sync the turn time between peers and hosts. But now I will do it differently.

  • rexrainbow

    That would be great, sync-function from your bottleneck plugin was very useful.

  • Hello everybody,

    Ashley

    Again, I don't know if the following are bugs or it's intended like that, but definitely it needs some clarification:

    1. I have a static object on stage, say a text box, and I want to sync only its variables. If I do something like this:

    Sync Textbox with none

    Sync Textbox variable Somevar

    Nothing get synced, it will only work if I sync the position of the Textbox, which actually creates new instances of Textboxes on peer and syncs the position of the object which will never move.

    2. Host: Broadcast tag "Sometag" message "SomeMessage".

    The event "Multiplayer onPeerMessage"Sometag" is not get triggered on the host. May be it seems redundant to send the message on itself, but this is crucial for syncing purposes.

  • rexrainbow

    The logic you described sounds very reasonable. Are you building something on top of the official multiplayer plugin or it will be your own implementation something like bottleneck?

  • I'm not complaining or something. If the host has broadcast the message on peers, "on peer message" doesn't get triggered on the host (may be it shouldn't get triggered). That's why peers should send another message back to the host, saying that it received it, but it's ok.

    IMHO the current architecture of multiplayer functionality is not optimal for turn based games. I made many of them and the way I got used to work is only possible with "SendMessage" right now - the way syncing functionality is implemented is just too much. For example, I have a text box which shows timer for the current turn, in order to sync the time variable I have to sync text object's position first, which is redundant.

  • Another thing, is it possible to sync the game state (variables and objects) not 30 times per second, but with an action only once, under some desired condition? Now this is possible with messages and some work arounds, but it would be definitely very convenient to be able to that.

  • Interesting. I think structuring the multiplayer project into host, peer and common is a good idea and if you want to make it more user friendly the concepts of host/peer should still be present "under the hood" in order that game works properly. In your plugin, which I used a lot it was called Room Moderator.

  • Hello fellas,

    Ashley

    I think this kind of event is missing: "OnMessageArrived", which will be especially useful for turn based games, at least the host should know about that.

    Example:

    • 2 Players are playing a card game against each other with limited time for a turn
    • 1st Player's turn: the host is sending a message telling him it is his turn
    • Message has arrived to the peer, host starts the timer
    • and so on

    Right now I can only do it by sending a message back from the peer to the host, telling that it has arrived, which is kind of waste of events and may be creates some delay.

  • I think you even don't have to install node.js server manually, check this topic out, everything is well described:

  • You have to setup a node.js server first and install socket.io on it.

    But you can easily make a chat using official multiplayer, there's even an example included.

  • This kind of topics make me smile. C2 is already very accessible and customisable development tool. You can develop any 2d game genre and even more by using only event system. I don't even speak about this huge amount of 3rd party plugins and behaviors and awesome official multiplayer functionality. Everything is based on cutting edge web technologies. You guys are searching for a magic button.

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • OK, after reading the third MP-tutorial, I think there should be "ball hits paddle" lag compensation, in order to solve the above mentioned issues.

  • The thing is, when the peer only renders data from the host including paddle and ball movement, there's an unpleasant lag in response to the peer's input. If I move the paddle in the peer directly + sending inputs onClientUpdate (e.g. with 8 direction behavior), than I get this synchronization issues. In the shooter example, peer also moves the soldier directly with 8 direction behavior. I don't like how I've expressed myself, but I hope you understand what I mean.