How do I turn off interpolation in multiplayer?

Get help using Construct 2

Post » Mon Oct 20, 2014 7:11 am

I have object that Sync with posiition only and with very low bandwidth. In my game mechanics it object must change position on some actions. from (-100,-100) to some other an instant without interpolation.

Example:
Backpack on ground synced (backpack on player is only visual anims on peer side). When backpack picked its on (-100,-100) position. When player initiates backpack drop its "set position to player X,Y" Built in interpolation makes sub positions and it causes this visual flying backpack bug:
Image
Deleting backpack and creating another one in new position is not an option for my gmeplay mechanics.
@Ashley is it possible to add in multiplayer "Sync object" — interpolation mode on\off?
Creator of MiniDayZ
B
22
S
2
G
2
Posts: 75
Reputation: 1,858

Post » Mon Oct 20, 2014 8:57 am

Did you sync the backpack? If yes, you shouldn't do that, you're wasting bandwidth. Use send message to pin/unpin the backpack, this will guarantee pin point accuracy in placing the backpack. All dependent object should be dependent to "main referenced position", not independently synced position.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Oct 20, 2014 9:45 am

DuckfaceNinja wrote:Did you sync the backpack? If yes, you shouldn't do that, you're wasting bandwidth. Use send message to pin/unpin the backpack, this will guarantee pin point accuracy in placing the backpack. All dependent object should be dependent to "main referenced position", not independently synced position.

Other players must see this backpack, without sync its bad. Make it via broadcast message with position is bad too, because on start all loot generates randomly, and it will destroy bandwith by sending for each player postions of created objects.
Creator of MiniDayZ
B
22
S
2
G
2
Posts: 75
Reputation: 1,858

Post » Mon Oct 20, 2014 10:18 am

Farsight wrote:Other players must see this backpack, without sync its bad. Make it via broadcast message with position is bad too, because on start all loot generates randomly, and it will destroy bandwith by sending for each player postions of created objects.

That is why you need to pin the backpack to your referenced position which is the character. Broadcast message is used like function/trigger which you have to send it only one time, unpin the backpack and set the position according the message.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Oct 20, 2014 10:30 am

DuckfaceNinja wrote:
Farsight wrote:Other players must see this backpack, without sync its bad. Make it via broadcast message with position is bad too, because on start all loot generates randomly, and it will destroy bandwith by sending for each player postions of created objects.

That is why you need to pin the backpack to your referenced position which is the character. Broadcast message is used like function/trigger which you have to send it only one time, unpin the backpack and set the position according the message.

And how in this case other players will see backpack on connect(if backpack not sync)?
Creator of MiniDayZ
B
22
S
2
G
2
Posts: 75
Reputation: 1,858

Post » Mon Oct 20, 2014 12:31 pm

Farsight wrote:And how in this case other players will see backpack on connect(if backpack not sync)?

If the host is the one who created the backpack, the backpack will also created on all peer, but set the position manually and pin them. This is how you sync backpack position by piggyriding the position value of the character.
Ashley also mentioned this before.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Mon Oct 20, 2014 1:09 pm

Where is it interpolating to? It sounds like you might be trying to position it on the peer, but that will be overridden by 'sync object', you have to make sure it's created on the host.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,681

Post » Tue Oct 21, 2014 6:16 am

Ashley wrote:Where is it interpolating to? It sounds like you might be trying to position it on the peer, but that will be overridden by 'sync object', you have to make sure it's created on the host.


@Ashley No, its repositioned on host, when recieved message "drop" from peer. When backpack repositioning from -100,-100 to Player.X,Player.Y its drawn with inertion(interpolation) Peer side thinks that its slighty move and starts "smooth" it with interpolation. And we get what we see on gif above. I need just simple replace it from one position to another without sliding effect.
Last edited by Farsight on Tue Oct 21, 2014 11:34 am, edited 1 time in total.
Creator of MiniDayZ
B
22
S
2
G
2
Posts: 75
Reputation: 1,858

Post » Tue Oct 21, 2014 6:37 am

DuckfaceNinja wrote:
Farsight wrote:And how in this case other players will see backpack on connect(if backpack not sync)?

If the host is the one who created the backpack, the backpack will also created on all peer, but set the position manually and pin them. This is how you sync backpack position by piggyriding the position value of the character.
Ashley also mentioned this before.


New items\backpacks respawns\erases with time and in case of it new players connects you propose to send for everyone newcomer messages about every loot positions?
Creator of MiniDayZ
B
22
S
2
G
2
Posts: 75
Reputation: 1,858

Post » Wed Oct 22, 2014 2:36 am

Farsight wrote:New items\backpacks respawns\erases with time and in case of it new players connects you propose to send for everyone newcomer messages about every loot positions?

Yes, doable in the form of array.asjson . However to set it up, it is not as direct as syncing the position, rather quite tedious but it'll save you bandwidth.

If you don't mind about the bandwidth at all you can still go with syncing positions, but you have to live with the interpolation issue that you show, unless Ashley provide the "no interpolation" option for sync object.

I think the other syncing way you can try is using instance variable. They have no-interpolation mode, so basically record you x and y in the host and have an event in common group to position to instance variable every tick, or every1/30 second depends on what you prefer but the drawback is, the object movement might look choppy, jerky or stuttery.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Next

Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, maranpis, missile, oosyrag, Yahoo [Bot] and 31 guests