oosyrag's Recent Forum Activity

  • Fps is hard to diagnose in any project, but I don't imagine yours would be resource intensive. First thing I usually do is to change any event that runs every tick to have a trigger instead if possible. Updating text objects every tick can be a huge one. Second is to look for big loops that can be optimized. Is your original download link up to date? I can take a look when I get a chance.

    I would always appreciate a drink.

    paypal.me/oosyrag

  • I would use a synced instance variable, assuming both the peer and host have access to the same array.

    Host side -

    On creation of the text object, how are you setting the text from the array? I assume you're using some sort of index. Save this index number (location in the array where your text is) to the synced instance variable for that text object at the same time you set the text value from the array.

    Peer side -

    The text object will get created, and it will have the synced instance variable referencing the correct text for itself. Use that instance variable either on created or other trigger of your choosing to reference the array to grab the right text.

    I'm not comfortable taking paid work, as I would not be able to make a time commitment for it, nor am I 100% positive I'd be able to solve any issues that come up. Multiplayer is really difficult to design for. I don't mind throwing out ideas here on the forum as usual though.

  • Can't do much. Unless you think you'll have a way to find out who does it.

    Again, it will cost you more to sue someone than whatever damages you'll be able to collect from them.

    Also again, if your game is worth hacking, you're probably already fabulously successful to the point where it doesn't matter.

  • Dt should not be used when setting behavior properties, as behaviors are already made to be framerate independent.

    I do not understand your second question.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You cannot copyright an name, logo, or idea. You can trademark a name or logo though.

    A copyright allows you to sue for damages, assuming you have any. It could cost you a few thousand bucks to retain a lawyer to do so for you, assuming you aren't one yourself. So unless you're making boatloads of money from your game and are so popular you expect others to profit from copying it, then no. Basically the only main reasonable situation is if someone else sells your game without your knowledge. Do you have a way of finding out who to sue?

    If your work is derivitive of Pokemon, you are infringing on Copyright. If you draw a Pokemon that is distinctly recognizable, you are infringing on copyright even though you drew it yourself.

    The question to ask is are there enough significant or distinct differences that show it is your original work?

    For example anyone can make an RPG about capturing creatures and levelling them up to fight, but I would avoid things like throwing balls to catch them or any sort of electric mouse.

    If you happen to make any significant money off of your work and the entity you are copying from is nintendo... Yes I would definitely be worried about getting sued.

  • Use the tween behavior.

  • I avoid containers in multiplayer. I believe that's an old bug, unlikely to be fixed in the near future.

    Just sync and create both objects together.

    Regarding passing the information, remember sync only syncs creation, destruction, position, and angle. For everything else, you can have the host send a message, or sync an instance variable. The peer will then need to set the content of the text object based on the received message or synced instance variable.

    Also after you get your host and peer communicating, you probably want to implement local input prediction to deal with the lag. Just enable it on the object the peer is trying to move, and have the peer move it in the exact same method the host would. You probably will need to add checks to prevent the host and peer from moving the same object at the same time as well.

  • mobile.twitter.com/MattThorson/status/1238338574220546049

    This thread is a fantastic reference for anyone working on a platformer.

  • Some behaviors are not meant to work with each other, for example physics and any other movement behavior.

    Behaviors are tools and shortcuts to do specific things more quickly and easily, when used for their intended purpose.

    Anything a behavior can do can be replicated with events, so if a behavior doesn't do exactly what you need it to you can always make your own system.

    You can also post a suggestion if you feel like something lacks functionality people could use. Construct is under quite active development. construct3.ideas.aha.io/ideas

  • If you're using Photoshop, there's really no need to use the built in editor, as it is far more limited.

  • Ok there are a few issues here...

    You only have one input value, at very low precision. This can only contain a 1 byte value, which is a single number between 0 and 255. A 1 byte value can also be represented in binary to simulate 8 on/off switches - this is how they used it in the multiplayer tutorial. With it, they can keep track of up to 8 keys or mouse buttons that are being pressed or not.

    However, consider your own needs. What does the peer need to tell the host? In your game, you'll need to send the fact that the peer clicked, and also where the peer clicked. The location is two values, an x and a y number, that can definitely go above 255. So these two values need a higher precision. I would use normal or high, since you're honestly not going to have bandwidth concerns with just two players and small amounts of data going back and forth.

    So step 1, add two more input value tags, for "mouseX" and "mouseY", precision high, no interpolation.

    You probably also don't need to store the peer values as instance variables in the object, since I'm assuming you may have multiple cards eventually, and either player can move them so the peer inputs are not associated with any particular card. So you can get rid of the sync variable, and use the inputs directly to keep it simpler.

    -> Multiplayer: Add client input value tag "inputs", precision Very low (uint8, 1 byte), interpolation None
    -> Multiplayer: Add client input value tag "mouseX", precision High (double, 8 bytes), interpolation None
    -> Multiplayer: Add client input value tag "mouseY", precision High (double, 8 bytes), interpolation None
    

    Next lets look at the peer events, to send the peer inputs to the host. Lets remove local input prediction for now, since you haven't gotten the underlying system working yet. Since you're only keeping track of 1 button press, left mouse down, you don't even have to worry about setting bits. So keep it simple. If left button is down, set inputs to 1. Else 0. You'll also always want to send your current mouse position every update, so you need to add

    + Multiplayer: On client update
    -> Multiplayer: Set client input state "mouseX" to value Mouse.X
    -> Multiplayer: Set client input state "mouseY" to value Mouse.Y
    ----+ Mouse: Left button is down
    -----> Multiplayer: Set client input state "inputs" to value 1
    
    ----+ System: Else
    -----> Multiplayer: Set client input state "inputs" to value 0
    

    Your peer events should have nothing else for now. Remember the peer only tells the host what its inputs are, the host will do all the work and sync back the results to the peer.

    As for your host events... the "On client update" is a peer only trigger. So basically your host is doing nothing at all right now. Again, the host needs to do the actual work of moving of the object based on peer inputs.

    So first it needs to have its own way of moving the object. The drag and drop behavior should be enough for this for now.

    Secondly, it needs to check if the peer's mouse is down. If it is, then is it clicking on the sprite? Then after that, if it is clicking and on top of a sprite, update the sprites position every tick to wherever the peer's mouseX and mouseY are.

    At this point, if you've got everything working properly, both players should be able to move the object around with their mouse. You can try adding lag compensation after you get this working.

  • peerid is used as a unique identifier for each person, while myid gets their own.

    You probably don't need to associate if each player isn't controlling a single object.

    Sync object is something the host does. Once an object is synced, if this object gets created or destroyed by the host, create it and destroy it on all connected peers (same for position and angle, if selected).

    So if the host moves a synced object, it will move the same way on all peers.

    Peers cannot move the synced object. They can only tell the host what they are doing with their mouse and keyboard inputs, and then the host can move it based on that.

    This will cause what appears to be input delay/lag on peers. You can hide this lag on the peer side by using "local input prediction".

    Multiplayer concepts definitely take more than the usual effort to learn, even if the game itself is simple enough.

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