M4dM4tt's Recent Forum Activity

  • Changing RoomName and GameName fixed it. Seemingly someone else can be in the same room with their own game or something. So they became my host..?

  • that's how the log looks on first browser window.

    also there seems to be 2 peers connected (should be only 1 as to my understanding?)

    and there's a peer joining with weird cyrillic letters as username.

  • Hey everyone

    I was working on a multiplayer game for the past week.

    Yesterday evening all was fine, but when i wanted to continue today, i realised that the first client opening the game does no longer become the host as usual.

    I asked myself if i messed up something and re-opened the original realtime multiplayer shooter file (which i used as template). Same happens when i launch that project.

    Went one level down and opened the chat tutorial. This one works. I become the host when i launch the project.

    What happened since midnight??? What is the difference? The signalling/log in code in chat tutorial, rt-shooter and my own project look identical to me.

    Anybody has any clue?

    I also can't figure out a way to FORCE myself to be the host. If i understand correctly the first who enters the game should be the host and there's no way around?

  • it DID work as expected. sorry. i mucked it up myself. (as in most cases)

    i'll try to add the second "else if...or..." block and report back.

    sorry again

  • My sample CAPX on the first page does this already.

    in my case i have to mix "else if...and...and" and "else if...or...or..."

    for now it's:

    for each:

    if

    or

    or

    else if

    else if

    else

    and works.

    when i try to apply your method onto that it doesnt work anymore.

    and even if it would work i would have to add another "else if...or...or..." to implement the new feature

    understandable enough?

  • I read again your doubt and logic to try to help you.

    Is your idea:

    - If condition is A or B or C Then Do Logic

    - Else if condition is X or Y or Z Then Do Other Logic

    - But else if condition is 1 or 2 or 3 Then Do A Barrel Roll

    Am I right?

    that is EXACTLY my problem at the moment.

    can you explain or show a screenshot of what it has to look like please?

    thank you very much!

  • cheers to Mrcoldmu and jose 901105!

    works ike a charm!

  • Problem Description

    in a multiplayer game, where one browser is host only and other browsers or browser tabs connect as players, when the playerobject is associated to the peer on the host, and that player object gets destroyed by the host (through destroy command directly or over health=0=destroy) it takes several seconds for the client to also destroy the object. if you disable said association the destroy command happens instantly on host and client.

    Attach a Capx

    see attachment

    Description of Capx

    the wreck chassis helps out as a base where the player(smoke, use "up arrow" for moving to the right) should respawn instantly after he gets killed by pressing "k" on the host browser. disable the associate blacksmoketopdown with multiplayer.peerid on the host side of the code and the bug is gone. but not associating makes multiplayer impossible right?...

    Steps to Reproduce Bug

    • Step 1: see "what the capx does"
    • Step 2
    • Step 3 etc.

    Observed Result

    few seconds delay to destroy player(smoke) on client if "k" is pressed on host and player is associated with multiplayer.peerid on host

    Expected Result

    player (smoke) gets deleted instantly on client and host on pressing "k" on host

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Opera: YES Operating System and Service Pack Win7 64bit SP1 Construct 2 Version ID Release173 64bit
  • hello anyone?

  • oh! well thank you it's good to know that! even though i wonder what the subfolders in project folder are for if the images are stored in the capx?

    i finally figured out the problem. seems to be not my fault but merely a bug in construct or a necessity i dont understand.

    the delay on destroying objects on the client is depending on the "associate with multiplayer.peerid".

    -if you do that (which you have to if you go for multiplayer), you get that delay which sucks hell.

    -if you don't there's no delay but also no multiplayer.

    i'd really like to hear a statement from ashley or someone also that knows whats going on.

    check out the capx in the attachment and try enabling/disabling the associate actions on event sheet1.

    tnx for the help and little hints anyway unnatural!

    edit!: i forgot! use the UP arrow to accelerate the smoke then switch to the host window (2 browsers needed!) and press K the destroy it.

    you will see that on the client window the smoke lives much longer

    edit2!: just found out that what makes it delaying is the association on the player object on the host side.

    the other 3 object associations dont matter.

  • just from what i've seen on the forum so far when looking up something, i never saw someone putting such a huge capx up.

    and i'm not understanding how you would see my content anyhow qith no images.

    but maybe i'm just getting something wrong on how to upload it anyway...?

    would i have to put my project somewhere? you know like dropbox or something? i think of all the content in it. just a capx doesnt contain any sprites right?

    I was stripping my project down over the last two hours kickin everything out that was not related to my problem.

    Now at least i figured out the problem with the wrecks not appearing.

    it had to do with the scaling of the created wrecks.

    you see the working solution in the attachment.

    before that i directly scaled the wrecks. and then every tick set the scaling again to Self.S which was of course "0" so the wrecks became invisible.

    stupid error.

    gonna try to figure out the problem with the tank not destroying properly now.

    you see the code for that as well on the attachment.

    any ideas still welcome!

    and thanks so far because you got me to strip down the project, which helped me solve the first problem .

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • smassa: sounds he said.

    but i'm afraid i can't help with that topic, since i don't know either.

M4dM4tt's avatar

M4dM4tt

Member since 13 Jan, 2015

None one is following M4dM4tt yet!

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies