How do I handle drag and drop in multiplayer

Get help using Construct 2

Post » Sat Jul 04, 2015 8:59 am

Hi guys,

I am having a simple game idea that two player can join into a game where there are multiple objects(some cubes) and they can move objects in turn.
Something similar to chess that you can drag and drop items on the board in turn.

What I can't figure out is how the information of drag and drop is passed on from the peer to the host and from host to the peers, so both of them can see the dragged and droped object and later on they can intercact with the object that has been dropped by the other player.

Does anyone have any example of drag and drop for multiplayer? :geek: :shock: :?: :?

This is what I have done so far https://www.dropbox.com/s/1gfahznq5pbnc ... .capx?dl=0
B
5
S
1
Posts: 35
Reputation: 447

Post » Sat Jul 04, 2015 10:12 am

Send the positions continuously (or every x seconds) when an object is dragged + on drag and drop drop, no?
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Post » Sat Jul 04, 2015 10:33 am

@mindfaQ well I am not sure how to do that? do you mind to modify the file that I have sent you the link?

Cheers
B
5
S
1
Posts: 35
Reputation: 447

Post » Sat Jul 04, 2015 9:49 pm

This should help you well on your way.

demo

capx
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Sun Jul 05, 2015 4:09 pm

Thanks @lennaert that is exactly what I needed. I knew you would know the answer. Cheers mate :)
B
5
S
1
Posts: 35
Reputation: 447

Post » Tue Jul 21, 2015 10:59 pm

thanks @lennaert :D
B
6
S
1
Posts: 12
Reputation: 422

Post » Fri Jan 27, 2017 1:53 am

I've been trying to figure this out the past couple days and I just thought to check here :) thanks so much for the demo file, this makes so much more sense now!
B
25
S
5
G
5
Posts: 21
Reputation: 4,322


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests