Wsoukkachang's Forum Posts

  • I came across a problem when I was setting up my multiplayer card game. The game involves 4 players joining a room to play at once and I wanted to distribute cards to each one of them, but I found out that you could only set up one person to have the Multiplayer.PeerID. Is that correct? Or am I doing something wrong? What would be a good way to store their unique ID (peerID) and tell the computer to store it in a global or instance variable? Thanks.

  • Ashley I am not sending it every tick. I finally got it working now. Thank you so much for your help!

  • Ashley I tried doing it like this, but it still isn't working. Am I getting close?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, not websockets, just the multiplayer object's 'send message' or 'broadcast message' actions. A bit like chat messages from the chat example but with array data instead of a textbox's text.

    Oh ok, I guess that makes sense. I have the idea of the process in my head, but I don't know how to execute it yet. I'm going to analyze the multiplayer chat and try to figure out from there. But nonetheless, thanks for the quick reply Ashley. I shall try to fiddle with it more. Cheers!

  • Support is not built in, but it should be easy to achieve using normal messages. If the array is small, you can just send it as JSON text (using the AsJSON expression). If it's large then that method will waste bandwidth, so you could instead have a message that is sent when individual indices change.

    Thanks for the reply Ashely. Could you give me a step by step example of the method like how you would do it in construct. Would I use websocket?

    1. The host has array.

    2.Set as JSON text (using websocket?).

    3.Sends to peers.

    4.Peers update game with that JSON text?

  • I am trying to make a multiplayer card game using construct 2 and I came into a roadblock in the development. I was wondering if anyone knows how to sync arrays using the multiplayer feature. For example, the host shuffles the cards and put the result into an array. How do I update the values of that array to the rest of the peers. Any information would be grateful.

  • Hello everyone! I am glad I am part of this community. If you could, could you please check out my game and leave some feedback. Any support is appreciated! Thanks! hungrydoggy.clay.io