kmsravindra's Recent Forum Activity

  • Thanks ASHLEY. I have also noticed that in Pong example -> Peer group - on-created paddle event - set Paddle.peerid to multiplayer.peerid works only for one single instance of Paddle. In any game, lets say if I want to create multiple paddles (by sending create message from peer to host , using sync object) then the remaining instances of paddle on peer side doesn't get set to multiplayer.peerid...they are getting set to blank. The Pong example says that sync object should automatically get the multiplayer.peerid on peer side when a paddle gets created...This seems to work only for the first instance of paddle on peer side and doesnt work for remaining instances...

  • Also I have noticed that if sync - variable happens to be a text, then it doesnt sync? It only syncs number type variables...

    Ashley, I have referred the tutorials and examples but couldnt find any answer to this. Could you please help?

  • I have to spawn a new sprite on peer or host whenever the user double clicks on a screen...While I was able to get this working, I am not able to update the sprite.peerid with the peerID's of the user who creates them...I am using "Sprite - oncreated" event on peer and then assigning it to multiplayer.peerID...(as per the example multiplayer.peerID is supposed to contain the peerID whenever sync object creates a sprite on the host)...Strangely multiplayer.peerid gets set only for very first sprite that gets created on the peer / host...The sprites that get created from then on have blank values in their peerid instance variables..I am sending a message to host to create a sprite whenever peer double clicks on screen...

    DuckfaceNinja OR help or have you encountered such a situation?

  • I am planning to develop a tool using MP ( which is not in gaming context ) and sorry that I cannot disclose more than this...

  • DuckfaceNinja - Thanks for your perspective. However I think there could be a limit on messaging size but I dont think its a bad bandwidth management especially when the world is already talking about video streaming using webrtc...If the limit is on message size, then I could probably think of split/concatenate approach for larger messages...This approach brings up another interesting question - It would be nice to have a event - Multiplayer - On message sent "tag" ? Even if we keep my current problem aside, this event could be helpful for sending serialized messages one after another as well?

  • I am exploring Multiplayer features and hence several questions...As I find answers, I am very excited about the potential it has...Please bear with me...

    My question is - Is there any limit on the size of multiplayer.message? I converted sprite image to base64 image string and sent it as a message...Good news is that it works for images upto the size of upto 300px by 300px (around 13kb size) or so...However when I try to send something like 60kb size (600px by 600px) a strange thing happens - Multiplayer kicks the peer out! OR the message is not received at the peer side forever...Could you please tell me how this can be circumvented OR what is the limitation on messaging size/feature? BTW, I am sending the message from host only after "On image URL loaded" condition...I know that this is async on host...but isnt supposed to send the message to peer anyway whenver that happens on host? And why it is that sometimes the peer gets kicked out?

    Thanks....

  • rexrainbow, do you plan on doing this in near future by any chance?

  • Thanks ASHLEY. That technique worked! Now I am trying to add a textbox to each sprite and move it along with the sprite in multiplayer mode...The way I went about it was by adding a container textbox object and tested it..However the textbox doesnt move along with the sprite...Looks like sync doesn't sync container objects? Do I need to repeat the same code that I did for sprite to move the textbox as well?

    Edit - I think I got the answer in the forums from Ashley's response to one of the bug - "Closing as not a bug. You only sync one of the objects, so the other object in the container will be created, but not synced".

    But I couldnt understand why sync - position cannot happen on container objects...wont that be a good/required feature?

  • Does anyone know how do I make drag-drop behavior on sprite work in multiplayer...Having this behavior on sprite doesnt have any influence as a Peer...Only on host it moves...Is it that I can move on peer side only using client input state variables / sync approach..? Behaviors on objects are not sync'ed?

    Edit - I guess this is the answer from manual - It is important to disable any behaviors and deactivate any events on the peers that may attempt to move the objects themselves; this will conflict with what Sync object is trying to do, and will not have any effect on the host.

    So does this mean any behavior that alters the positions doesnt work on peer? Because Pong example uses Solid behavior and it works both on peer and host...could someone clarify?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much ASHLEY. This clarifies lot of things

  • Ashley, could you please give some reference help link on the below - I have gone through the tutorials but was not able to make out which one should be exactly used in what case...

    1. Which method out of the below is preferred to propagate data from peer to host in multiplayer and in what conditions each of them is used ?

    A. Set Client input state "<variable>" to something and then use Multiplayer.PeerState (Associatedobject.peerid", "<variable>") sequence

    B. Send message with peer data within the message

    C. Use Sync variable

  • DUTOIT, you are right...sorry for the confusion...Here is the revised capx with changes

kmsravindra's avatar

kmsravindra

Member since 29 Dec, 2012

None one is following kmsravindra yet!

Connect with kmsravindra

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies