Mehdikat's Forum Posts

  • 10 posts
  • Hi all,

    I need help (again)… I think there is a basic knowledge I don’t understand.

    I’m trying to make simple multiplayer game : 3 sqare (then 3 peers) which have car behavior.

    It works good.

    Now I would like to broadcast an information (player number) to each peer as is it done in tuto 3 “Real Time Game” with the statistic above the peer (health, kills…). So The second peer know which is the 1st, thierd peer..)

    The difference with tuto3 is that my variable to update on each peers is not “real time” variable, I mean the value of this variable is set one time on peer when it is created and not modified after.

    So if I understand the tuto, for this kind of transfer, no need to use sync object as is it done in tuto 3 with health for example. The send/broadcast message must be sufficient.

    Am I right on this point?

    So I’m looking on the tuto2 Chat room, but I can’t do what I want.

    Host block:

    When a peer connect I use broadcat function:

    Broadcast tag “majnum” message variable_num (from Multiplayer.fromID, mode ….)

    Peer block: (I want to affect the variable receive to the right peer)

    On peer message “majnum”  set instance variable from Multiplayer.fromID to variable_num

    Common block:

    Everythick: Set num player above each peer object

    (For each??)

    I think I don’t understand well the multiplayer syntax…

    Sorry for this explanation a little bit complex.

    Thx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok thanks, Host is not considerate as peer in the parameters. So Max peer: 2 --> 1 host + 2 peers max

    Thx!

  • Hi,

    I want to give access to my game for 4 users at the same time.

    I thought use the max peers parameters of multiplayer object (join room).

    I've made a test with max peers value at "1", but I can connected 2 peers (1 host & 1 peers for example).

    Is this parameter for limit peer in room?

    Thx

    Regards

  • Thx for your reply,

    So no "multiplayer" variable that coud be use to simplify that?

  • Hi all,

    I need some help about multiplayer object.

    I would like to know the best way to make that each peer know his connected number: for exemple host is player: 1, the first peer logged is player: 2, the second peer is player: 3..., and put this value on a instance variable.

    I don't find an inbuild variable which cover this.

    So, I think create a global variable (integer) and send it from host to peer with "send message" function is a good way.

    What do you think?

    Is it possible to send an integer in "send message" fonction?

    What I've test:

    In the host block, On trigger "on peer connected", I use a multiplayer object with "send to peer" fonction (tag=toto), I send the int value of the global variable.

    In the peer block, On the trigger "on peer message "toto", I affect the instance variable with multiplayer.message. witch must contain global variable value.

    Then the instance variable receive a "nan" value... iven if I force the global variable with STR function before sending.

    Thanks for your help.

    Regards

  • Hi,

    I've upload a new update.

    In this update

    • I try to correct bug when mouse dragging out windows.
    • I create animation on menu (specially for Trunks252 ;-) )

    Hutto: Concerning the ability to change movement,it's a little bit complicated. I'm trying ti implement that but I can't suppress the first "move"sprite, so I don't implement it for the moment.

  • Hutto: yes it was what I mean. Even for Shoot :) I will try to do that.

    Trunks252: I think there no problem to do such think. Maybe I will implement that or similar things in the next update

    Thx

  • Hi, Thank you very much for your comment.

    Hutto: I'm working on the bug when mouse is dragging out of screen, I will check if I can make a "cancel Move"

    drzanuff: I will work to improve it.

    Trunks252: Do you mean for example, a change of button's color when mouse is over it?

    All have you test on android (with chrome?).

    Thx

  • Anybody to post comment?

  • Hi everybody,

    Please take a look to my first game.

    scirra.com/arcade/addicting-rotary-games/6995/unity-ball

    Let me know your opinion, bug and anything you want to say.

    :)

  • 10 posts