oosyrag's Forum Posts

  • Leave room is a signaling action, which will leave the signaling room. This does NOT disconnect the peer from the host in the current connected session.

    Use the disconnect action instead, which will disconnect from the current session, AND leave the signaling room.

  • Hi, i tried to adapt the multiplayer demo for my game.

    Essentialy is a turn based game like Monopoly, the main issue is that the host see all others players moves, but the peers see no other peers.

    I attach the c3p file.

    Can you help me?

    Thanks in advance

    Your peer objects are likely not synced properly.

  • Generally speaking you can use the lerp, qarp, or cubic expressions (or some combination) with your ease formula to get the value at any point within an ease. Easing formulas can be found online easings.net

    Note that you'll want one for each the x and y axes.

    For example, for a quadratic ease in/out

    lerp(startpositiony,endpositiony,x<0.5?2*x^2:1-((-2*x+2)^2/2))

    Would give you the y value between start and end positions when inputting an x value between 0-1.

  • Just create a static variable and copy it over.

  • Use an array to store sets of coordinates, which you can modify as you want.

    The built in behavior will not be able to do what you are describing.

  • There are multiple examples and demos included with Construct 3. Search "Space" on the start page, as well as the "Glokar" game demo.

  • Array for each x/y

    Array.at(currentx,currenty)/=0

    Increment count variable by one.

  • Zango's Shark Adventure Out now on Android! Download for free!

    Subscribe to Construct videos now

    Link: https://play.google.com/store/apps/details?id=com.reflectivebyte.zangothegame

    Looks fantastic! Congrats on publishing!

  • What universe did you get the idea that that would work from?

    Edit: In the event that you're serious, just a tip - make a copy of a file before you fiddle with the bits. I'm amazed you know how to use a hex editor and not make backups.

  • PeerID is available as an expression in certain triggered multiplayer conditions like on peer connected and on message received. When used in those triggered events, it will give you the ID of the relevant peer.

    Normally you would store this in an instance variable in an object associated to that peer upon them connecting, but you can use any data structure you want, like a dictionary (key:value=name:PeerID) or an array.

    In the case of a chatroom, the simplest way would use a text object with an instance variable. Upon joining, set the text object to display the name of the user, and save the PeerID to an instance variable in that text object. Then for example if you clicked that name, it would be easy to get the associated PeerID.

    I would probably use a dictionary myself for flexibility, but that is a slight bit more complicated.

    Edit: You'll learn how to get and use PeerID better in the fourth multiplayer tutorial. That's why I'd recommended following and understanding all the multiplayer tutorials before using the multiplayer plugin, even if your end goal is just a chat room. The multiplayer plugin and multiplayer concepts are very complicated, so cutting corners will often lead to frustration in the future. The tutorials seem long, but they're actually quite concise and thorough.

  • You can do this with a tiled background and a blending mode "mask".

  • Sorry it's been a while since I worked with the platformer behavior. Messed around with it a bit and this is a more difficult problem than I originally thought. Platforming mechanics are always deceptively simple but actually quite complicated.

    To approach this I would probably want some additional hitboxes and special logic for "stairs".

    Additionally I think I'd have everything above the bottom of the character hitbox to not be solid until the bottom of the player collision box rises above the horizontal level of the top of any given platform.

  • Signaling server connection, room connection, and peer-host connection are all different things. You're looking for the multiplayer - room - disconnect action, which will disconnect the host from the peer (and leave the signaling room) not multiplayer - signaling - leave room.

    You can leave the signaling room (or even disconnect from signaling entirely) after making a connection with the host, and still be connected to the host. When you refresh/close your browser window you are finally closing that peer-host connection.

    Regarding the kick feature you need to use peerid, not the username.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why do you need jumps? It should normally go upwards on diagonals when you run into them.

    Edit: Check out one way solids - construct.net/en/forum/construct-2/how-do-i-18/object-solid-one-direction-101758

  • This is mostly a case where left and right are constantly activated and speed set, while using jumpthrough for "rail" platforms and the fallthrough action should get you most of the way there, unless you are aiming for other specific behavior.

    Diagonals and high speeds can cause other issues you may need to work around that I'm not familiar with though.