Make the new multiplayer feature work?

Hello,

I have tested the new multiplayer feature and I am facing an issue.
In the scene, I create per client 1 player which has MultiplayerObject and physics2 behaviours.
I make them move independently on each client.
But then, it’s going weird. It duplicates and blinks like if there were some synch issues.
And I don’t understand what could be wrong :confused:

Here is my code:

Can you identify what’s wrong?

Thanks

I think you also need to set the Owner of each player object?

Ownership is already set by default on Host (behavior config).

Right, you want the player objects to be owned by specific player ID though. So when you create the player object for player 2, you should set the ownership to player 2.

Looking at the screenshot, it looks like you are only creating one player object at the beginning of the scene? (Does this retrigger for each client? I would think not…)

Also, instead of the condition to check player object ID, I think you can use “object is owned by current player”

I’m trying to test this as well and having the same problem…

It’s created on each client and ownership is taken by each client.
As it’s a synchronized object, it’s visible on other clients.
But when starting moving it, it’s going weird :confused:

Answer from Gdevelop (Wesley) on youtube:
“We noticed an issue with multiplayer and the physics behavior, once it’s fixed we’ll be putting out an example game similar to the physics example in this video that people can try to use. You can keep an eye on the updates coming out here: [Releases · 4ian/GDevelop · GitHub]”

cool… I also submitted a bug report because I found this is happening even with the regular forces :frowning:

yes I tried as well and it’s crashing :confused: