oosyrag's Recent Forum Activity

  • Syncing variables (and objects) happens only one way, from host to peer.

    Synced variables can only be number variables, not strings or booleans.

    To communicate with strings, use messages.

    You can send mouse inputs as strings through messages, like how noahboy described. Or you can send mouse inputs as numbers, as described in the multiplayer tutorial part 4. This has the advantage of being lighter in bandwidth and can take advantage of the built in interpolation feature.

    The normal flow of peer to peer multiplayer communication is as follows: A peer sends it's inputs to the host. The host processes these inputs, makes changes, and syncs the changes back to all the peers.

    In the meantime, to hide latency, the peer who sent the input will show the change on their own screen immediately, before getting what actually happened from the host. This is called local input prediction. After the true state of everything arrives from the host, differences are corrected.

    These are all concepts covered in the multiplayer tutorials. If you don't have a decent grasp understanding everything that is done in the tutorials, making a multiplayer game will be exceedingly difficult. So do go through all the tutorials, even if you're not making a real time multiplayer top down shooter.

    For example, given that you want a host authoritative design, a peer would never try to tell the host "I chopped this tree down". The peer only says "I clicked here", and the host would reply "You clicked on a tree, this is the tree's new life", and sync the fact that happened to all the peers.

  • A dedicated server is any computer that stays on and connected to the internet.

    If you were using the included multiplayer plugin for peer to peer, all the server would need is to be able to open a browser. Any desktop environment running Windows,Linux, or MacOS can do this.

    Would it need DB integration? Maybe. Do you need DB integration? You can build your own DB in an array. If all you need is a DB, you might not even need multiplayer at all. Each player can just communicate with the DB directly and not with each other. You can interact with a MySQL database through PHP with the ajax plugin. This database could be hosted on any normal website server. Or you can just save to local storage on the host machine.

    Do you need remote access and control? Most desktop environments can be accessed through vnc software.

    If you have no idea what you're doing, you're probably best off using a third party backend service like Photon or gamesparks or playfab ect.

  • Just because it is peer to peer, doesn't mean you can't have a server.

    You would have a dedicated server join first to take the role of the host, and always leave it on.

  • Here is the issue from the OP (I haven't looked at your last post yet). Since we can't sync strings in instance variables, we send a message instead. This is also better because the PID doesn't actually need to be synced, since it shouldn't be changing after being initially set anyway.

    However, if the host creates an object and sends the message with the peerID associated with it, we won't be able to know if the sync feature will create that object on peer clients first, or if the message will arrive first.

    When the message arrives, it will check if the last created object has a PID already. If it does, store the PID in a variable, for use when the new object is created. Otherwise, set the PID in the last created object has an empty PID.

    Similarly, when an object is created (from syncing with the host), check if there is a PID in the variable, and use that and clear the variable if there is. Otherwise, do nothing, and wait for the message to arrive to assign the PID.

    Edit: link removed, bad example

  • Set text to sliderbar.value.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What do your conditions look like? Trigger once should work.

    Allen described an achievement type system, which should also work. Basically it consists of:

    Trigger Condition
    If achievement=false
    
    Add one to trophy
    Set achievement to true
    

    This should only be able to run once, as after it has run the condition will no longer be met.

  • Try the persist behavior.

  • I used to use these alll the time in C2, when modifying a condition/action to another action.

    It keeps my hand on the keyboard, which I use to search and choose conditions and actions from the dialogue, instead of switching back and forth from the mouse or hitting tab 5 times to get to the back button. Although usually Enter is used to go forwards...

    In C3 I haven't used it as much due to the mentioned wonkiness when autofocusing text fields.

    I find myself working with really fat expressions often, and I like that the contents of particular fields are sometimes preserved when changing conditions/actions. So instead of copying the expression I used in one event, creating a new one, and pasting, I'll copy and paste the entire condition/action, and then go in and change it to whatever new thing I wanted.

  • How easy it is depends on the subject and your own familiarity with the subject. In particular, how well you can describe the mechanics and logic behind how something works too a computer.

    I would hardly say this is a new application of software, it's just not what most people are here to make.

    If you give it a shot, you should be able to see very quickly if Construct 3 is suitable for you. There is a free demo after all. The event system will either make sense to you or not. I find it very intuitive, other people might not.

    I'd recommend following the ghost shooter beginner's tutorial, even if your goal is not to make a traditional game. It will give you a good idea of how C3 works.

  • You do not have permission to view this post

  • You'll need some way to differentiate the gun object instances so that you can pick them properly. Can be done with an instance variable.

    For example, when spawning a gun for a player, set an instance variable in the gun object to playerSprite.UID. This will associate the gun to that player, and you can pick that gun in particular by comparing instance variables.

    Better yet, use the same method you're already using to pick the correct player sprite to move for your controls.

  • My mistake, I forgot strings like peerID cannot be synced through the sync instance variable action. I'll revisit this shortly.

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-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

21/44
How to earn trophies