lennaert's Forum Posts

  • That is precisely what I have done but the stringvariable ends up simply being empty..

    Then either your request is incorrect, or your request does not get you anything.

    How do you know stringVariable is empty ? Did you check the debugger ?

  • Okay. So, to have it written as straightfoward as possible, for each room there are 1 host and X peers, right ?

    Yes

    Ah ! Another question while I'm here : the multiplayer objet can sync instances positions and variables.

    So, what's the best way to synchronize attributes like visibility ?

    Send a broadcast message to the peers, the peer receives it and changes the instance visibility ?

    Or just to add an instance variable "visibility" on the object which will synchronize automatically, and add a global event (availble for the host and peers) like "if sprite visibility = true -> sprite ; set visible" ?

    For those kind of actions I often just send a message to the peer.

    send to peer xxxx, tag "setVisible" message = "no" (or yes)

    Peer on received message "setVisible"

    sub compare 2 values: Multiplayer.Message = "yes" , action set visible

    sub compare 2 values: Multiplayer.Message = "no" , action set invisible

  • thank you unfortunately, i a, aware of all that - and i don't see any way to tag an Ajax request in C2.

    https://www.scirra.com/manual/107/ajax.

    I'm just wondering what is the simplest way to get Ajax.Lastdata into a string?

    Did you take your time to read this ?

    Read the first thing that comes after "How to make a request".

    In your request, I believe its the last entry/option ... there you can add a TAG name.

    The info I gave you is what you are asking for.

  • 1) no, a peer is a client, connected to other clients. The c2 host is considered the "server" side of things.

    2) If you are thinking about RPG like mechanics, just store your player info somewhere, together with whatever he or she unlocked.

  • Ajax.LastData is generally a textual string.

    If you have a Ajax request tagged: "getPage"

    On Ajax request done "getPage" set StringVariable = Ajax.Lastdata

    The Ajax.LastData needs to be called in the On ajax request done trigger. (or as a sub event)

  • no.

    The first client to "join" a room, is not 'just' joining it, he creates the actual room on the signalling server , then joins it. and instantly becomes "Host"

    Clients that follow join the room and become "Peers".

  • Try that again, but enable unbound scrolling.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about taking the half of the users viewport, and scroll that distance down from the top of the layout.

  • On the peer side, you want to know when all the balls are created for the amount of players, before sending a command to the host, that all balls are present, initiating the next step of the starting sequence.

  • Something like:

    event

    trigger once

    multiplayer.peercount = ball.count

    action

    send message: ready for the next command

  • Up to a fairly great amount, it does not matter. It is about what you do with them.

    I noticed the greatest performance hits with large amounts of objects, is when you loop through them continuously and check/do things with each.

  • That would be scale inner if I am not mistaken.

  • How about disabling physics while drag and drop ?

  • The connection degrade depends on what you are doing and how.

    Which type of synchs, how many synched objects on the layout etc ...

    Best approach, less is better.

  • set object.bullet.speed = object.bullet.speed - X