Multiplayer and Sync object

Get help using Construct 2

Post » Mon Aug 18, 2014 9:33 am

In Manual u can read:
As synced objects are created, moved and destroyed on the host, they are correspondingly created, moved and destroyed on all connected peers. It is important to disable any behaviors and deactivate any events on the peers that may attempt to move the objects themselves; this will conflict with what Sync object is trying to do, and will not have any effect on the host.


How can i give peer ability to move their own object and sync only with host and other peers (but not them self)?

I enable local input prediction.
Every peer sent positionX and positionY to host, and host set X and Y to sync object but then host send back position of this object back to peer so object dont move smooth.
You do not have the required permissions to view the files attached to this post.
B
22
S
3
Posts: 74
Reputation: 1,515

Post » Tue Aug 19, 2014 6:24 am

Bump!
B
3
Posts: 6
Reputation: 458

Post » Wed Aug 20, 2014 11:13 am

I've solved my own problem, about this and maybe it will help you too. When syncing objects, if that objects movement dependent to another object that controlled by you (for ex. soldier(main object) walking with his spear(dependent object)) dependent movement gradually fall behind. But if you simulate this movements locally by local variables you can prevent this, dont use synced variables and also dont forget to simulate this behaviour on peer and host's ''peerid not equal to multiplayer.myid'' section, hope this helps.
B
3
Posts: 6
Reputation: 458


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, Iakkery and 33 guests