How do I change layout with multiplayer sync palyer ?

Get help using Construct 2

Post » Tue Oct 28, 2014 6:29 am

Hello ,
i try to make a little platform puzzle multiplayer game
I search how can i change a layout (for lvl) , with sync object (player)

Need to disconnect and reconnect , reloggin, rejoining ?? and change the room ?

i try lot of thing , no of my solutions work, but now i m out of idea !!

Thank for all !
(sorry for my bad english , french )
B
4
S
1
Posts: 2
Reputation: 254

Post » Tue Oct 28, 2014 8:12 am

Hey Neo,

Using Sync object is an easy way to keep the position and variables of objects in a multiplayer game the same but its not built to do extra things like keeping the layout the same (unless you make it so by using an object as a source for your triggers) which I wouldn't recommend.

What you need to do is create a set of events that are shared with both the peer and the host.

Take another look at the multiplayer tutorials again, in particular the section that focuses on sending messages between the peer and host. I'm sorry its not very easy to explain but I hope it helps.
ImageImage
B
120
S
23
G
7
Posts: 1,070
Reputation: 13,014

Post » Tue Oct 28, 2014 10:40 am

Neolitik29 wrote:Hello ,
i try to make a little platform puzzle multiplayer game
I search how can i change a layout (for lvl) , with sync object (player)

Need to disconnect and reconnect , reloggin, rejoining ?? and change the room ?

i try lot of thing , no of my solutions work, but now i m out of idea !!

Thank for all !
(sorry for my bad english , french )

Are you using dedicated host or peer to peer? The solution might be different, depends on how you build your game.

In this case I would go with dedicated host for each level (each room) because this is the easier approach, by doing room-join/leave.

If you're doing peer-to-peer, changing layout during live game without disconnecting is not a good idea at all, since the host can destroy objects prematurely and cause some mayhem in your game. To mitigate this, it will require some serious event setup involving global objects, I think all are required to be global. Then there is the necessity of making certain object, certain IID to be invisible and disable collision what not. Tl;dr it's a nightmare. You need MOBA approach on level management.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Thu Oct 30, 2014 5:06 pm

Thank ,

i have discover the Object type properties : Global.
My game is simple : coop 2 player game platformer with puzzle (gravity , door , buton...)

The global properties it's my solution ! All Work !

Thank for all !
B
4
S
1
Posts: 2
Reputation: 254


Return to How do I....?

Who is online

Users browsing this forum: David181, jorgmaquoi, unicornspitfire and 34 guests