oosyrag's Recent Forum Activity

  • https://www.dropbox.com/s/sjtjilffjvtdu ... .capx?dl=0

    They do receive the broadcast, but they do not run until you focus the tab again.

    Try downloading the example capx, preview, duplicating a few tabs. On the host tab, click anywhere to send the message to change layouts.

    On peers, they will receive the message, wait 3, then change layouts.

    You can switch to each tab to see that they all got the message to change layouts, but don't start their 3 second delay until the tab is active.

    In the event where your layouts have different event sheets, or when you send multiple messages in the same frame (before going back to the peer tab to process the original message), you may end up with issues.

  • I found this - http://t-machine.org/index.php/2012/03/ ... etization/

    Rotmg is a bullet hell type game in a MMO setting, with similar projectile mechanics to the kind I'm working with. They made some interesting decisions with the netcode that I don't know if I can duplicate in C2. Don't know if I want to either, as compromises must be made.

    I'm going to research and see if I can find any good articles on Quake netcode, as many Quake weapons are projectile based and not hitscan. Also competitive pvp has different netcode requirements than an MMO, which would influence compromise decisions in different ways.

  • That function is for the SDK for if you are building your own plugin in javascript.

    I'm assuming that is not what you are doing. What you should be using is UID, which you can get from object.uid. This can be stored in an array or variable when you create the object (pushing it to an array will give you the order each one is created in as well).

    Otherwise, the shortcut to use IID is to reference the newest instance of an object in an expression by object(-1).expression.

    You generally never need to know to know what the IID of any specific object is, as it can change as objects are destroyed.

    So IID basically is a way to get relative order for expressions - first, second, third, last, next to last, ect. UID useful to pick a specific instance of an object.

  • Thanks gumshoe, those are some excellent articles. I'm mostly familiar with the concepts of authoritative hosts, interpolation, and lag compensation. Ashley's own multiplayer tutorials also cover the concepts and walks through lag compensation for instant hit weapons.

    I'm a bit stuck regarding lag compensation for created objects in particular and working with the multiplayer plugin's object syncing system. If I were to create an object client side instantly upon receiving input to do so (similar to moving a player immediately client side upon input, then correcting position based on host version), the host would also create the object upon receiving the input and sync that object. The peer would then see two created objects instead of syncing the one that the peer already created...

    I'm starting to think I might need to create a "bank" of already synced objects located somewhere off the layout, and just move them around as needed rather than trying to create and destroy them dynamically.

    The other thing I'm thinking is to not sync the projectile objects at all and just have the peer display "phantom" objects as purely visual approximations.

  • Ok here is how I would do it. Remember there are may ways to implement it.

    Basically, you have a variable that you keep appending text to to keep track of what keys are pressed. You'll use expressions to check if the last x characters in this variable match your cheat code then do something.

    I'll add in an event to delete the leftmost character after the variable is x length, so it doesn't keep growing forever.

    https://www.dropbox.com/s/ki12vj9ylgsc3 ... .capx?dl=0

  • The Trigger once condition usually solves repeating sound issues. Of it is not that, a simplified capx of the problem would help to diagnose the issue.

  • Well first you would have to decide how you want the cheat code entered. Is there somewhere a player can type like a text box? Or if they enter the correct sequence any time it will trigger during gameplay? Is there a chat system you already have in place, or maybe a console the player can bring up to enter a code?

  • Push out solids at angle gives you a little more control.

    How fast are your players moving, in terms of how many pixels might they overlap on the collision frame? Also are your players irregular shapes?

    Try testing your game with physics on the target device, you might not even have anything to worry about. Preview over lan is a feature to help you easily test on mobile.

  • For future reference, when you drag them over another tab, you'll see a little cross of icons that kinda looks like a controller d-pad in the middle, drag over that to choose above/below/side/tabbed.

  • My mistake. I would have the host send a message with the relevant peer's index. The peer can then store it in a variable locally to access if necessary. Either do it on request by having the peer send a message requesting the number and the host responds with it, or do it on peer joined have the host send the number and the peer save it.

    Or if peers need to be constantly updated as people leave and join, the host can just broadcast the relevant information regularly via messages.

  • I didn't check if the connection was maintained or if everyone has to reconnect via signaling. If they do stay connected, they will probably retain the same peerids from the original layout. The host can probably keep track of all the peers/peerids in an array and sync/create/assign the objects on the new layout accordingly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Multiplayer.MyID

oosyrag's avatar

oosyrag

Online Now

Member since 20 Feb, 2013
Last online 20 Feb, 2025

Twitter
oosyrag has 39 followers

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies